From 1a89fea81600b9bd35da624af5e58f6e4d258efe Mon Sep 17 00:00:00 2001 From: Warren Date: Fri, 24 Aug 2018 10:53:53 +0100 Subject: [PATCH 001/437] Adds a Logs Tree controller in the Developer section --- src/Umbraco.Core/Constants-Applications.cs | 2 + .../config/trees.Release.config | 1 + src/Umbraco.Web.UI/config/trees.config | 1 + src/Umbraco.Web/Trees/LogsTreeController.cs | 44 +++++++++++++++++++ src/Umbraco.Web/Umbraco.Web.csproj | 1 + 5 files changed, 49 insertions(+) create mode 100644 src/Umbraco.Web/Trees/LogsTreeController.cs diff --git a/src/Umbraco.Core/Constants-Applications.cs b/src/Umbraco.Core/Constants-Applications.cs index 9a1883a065..a3dd878d67 100644 --- a/src/Umbraco.Core/Constants-Applications.cs +++ b/src/Umbraco.Core/Constants-Applications.cs @@ -145,6 +145,8 @@ public const string PartialViewMacros = "partialViewMacros"; + public const string Logs = "logs"; + //TODO: Fill in the rest! } } diff --git a/src/Umbraco.Web.UI/config/trees.Release.config b/src/Umbraco.Web.UI/config/trees.Release.config index c5a56be290..cd3335d8c4 100644 --- a/src/Umbraco.Web.UI/config/trees.Release.config +++ b/src/Umbraco.Web.UI/config/trees.Release.config @@ -22,6 +22,7 @@ + diff --git a/src/Umbraco.Web.UI/config/trees.config b/src/Umbraco.Web.UI/config/trees.config index c445e92807..fe4075e096 100644 --- a/src/Umbraco.Web.UI/config/trees.config +++ b/src/Umbraco.Web.UI/config/trees.config @@ -22,6 +22,7 @@ + diff --git a/src/Umbraco.Web/Trees/LogsTreeController.cs b/src/Umbraco.Web/Trees/LogsTreeController.cs new file mode 100644 index 0000000000..e87d79da9f --- /dev/null +++ b/src/Umbraco.Web/Trees/LogsTreeController.cs @@ -0,0 +1,44 @@ +using System.Net.Http.Formatting; +using Umbraco.Web.Models.Trees; +using Umbraco.Web.Mvc; +using Umbraco.Web.WebApi.Filters; +using Constants = Umbraco.Core.Constants; + +namespace Umbraco.Web.Trees +{ + [UmbracoTreeAuthorize(Constants.Trees.Logs)] + [Tree(Constants.Applications.Developer, Constants.Trees.Logs, null, sortOrder: 7)] + [PluginController("UmbracoTrees")] + [CoreTree] + public class LogsTreeController : TreeController + { + protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) + { + //We don't have any child nodes & only use the root node to load a custom UI + return new TreeNodeCollection(); + } + + protected override MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings) + { + //We don't have any menu item options (such as create/delete/reload) & only use the root node to load a custom UI + return null; + } + + /// + /// Helper method to create a root model for a tree + /// + /// + protected override TreeNode CreateRootNode(FormDataCollection queryStrings) + { + var root = base.CreateRootNode(queryStrings); + + //this will load in a custom UI instead of the dashboard for the root node + root.RoutePath = string.Format("{0}/{1}/{2}", Constants.Applications.Developer, Constants.Trees.Logs, "overview"); + root.Icon = "icon-bug"; + root.HasChildren = false; + root.MenuUrl = null; + + return root; + } + } +} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 6d25493914..d9a1445da3 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -114,6 +114,7 @@ + From 4d66b2108419df0a69e64cc80c3905c1b91c0f97 Mon Sep 17 00:00:00 2001 From: Warren Date: Fri, 24 Aug 2018 12:57:59 +0100 Subject: [PATCH 002/437] Adds in chart.js Angular Wrapper lib --- src/Umbraco.Web.UI.Client/bower.json | 75 +-- src/Umbraco.Web.UI.Client/package-lock.json | 434 +++++++++--------- src/Umbraco.Web.UI.Client/src/app.js | 3 +- src/Umbraco.Web/UI/JavaScript/JsInitialize.js | 3 + 4 files changed, 261 insertions(+), 254 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/bower.json b/src/Umbraco.Web.UI.Client/bower.json index 6119bd5ae3..a8478273d8 100644 --- a/src/Umbraco.Web.UI.Client/bower.json +++ b/src/Umbraco.Web.UI.Client/bower.json @@ -44,7 +44,8 @@ "font-awesome": "~4.2", "animejs": "^2.2.0", "angular-ui-sortable": "0.14.3", - "angular-messages": "^1.7.2" + "angular-messages": "^1.7.2", + "angular-chart.js": "^1.1.1" }, "install": { "path": "lib-bower", @@ -55,41 +56,43 @@ "ace-builds" ], "sources": { - "moment": [ - "bower_components/moment/min/moment.min.js", - "bower_components/moment/min/moment-with-locales.js", - "bower_components/moment/min/moment-with-locales.min.js", - "bower_components/moment/locale/*.js" - ], - "underscore": [ - "bower_components/underscore/underscore-min.js", - "bower_components/underscore/underscore-min.map" - ], - "jquery": [ - "bower_components/jquery/dist/jquery.min.js", - "bower_components/jquery/dist/jquery.min.map" - ], - "angular-dynamic-locale": [ - "bower_components/angular-dynamic-locale/tmhDynamicLocale.min.js", - "bower_components/angular-dynamic-locale/tmhDynamicLocale.min.js.map" - ], - "angular-local-storage": [ - "bower_components/angular-local-storage/dist/angular-local-storage.min.js", - "bower_components/angular-local-storage/dist/angular-local-storage.min.js.map" - ], - "tinymce": [ - "bower_components/tinymce/tinymce.min.js" - ], - "angular-i18n": "bower_components/angular-i18n/angular-locale_*.js", - "typeahead.js": "bower_components/typeahead.js/dist/typeahead.bundle.min.js", - "rgrove-lazyload": "bower_components/rgrove-lazyload/lazyload.js", - "ng-file-upload": "bower_components/ng-file-upload/ng-file-upload.min.js", - "jquery-ui": "bower_components/jquery-ui/jquery-ui.min.js", - "jquery-migrate": "bower_components/jquery-migrate/jquery-migrate.min.js", - "clipboard": "bower_components/clipboard/dist/clipboard.min.js", - "animejs": "bower_components/animejs/anime.min.js", - "jquery-validate": "bower_components/jquery-validate/dist/jquery.validate.min.js", - "jquery-validation-unobtrusive": "bower_components/jquery-validation-unobtrusive/dist/jquery.validate.unobtrusive.min.js" + "moment": [ + "bower_components/moment/min/moment.min.js", + "bower_components/moment/min/moment-with-locales.js", + "bower_components/moment/min/moment-with-locales.min.js", + "bower_components/moment/locale/*.js" + ], + "underscore": [ + "bower_components/underscore/underscore-min.js", + "bower_components/underscore/underscore-min.map" + ], + "jquery": [ + "bower_components/jquery/dist/jquery.min.js", + "bower_components/jquery/dist/jquery.min.map" + ], + "angular-dynamic-locale": [ + "bower_components/angular-dynamic-locale/tmhDynamicLocale.min.js", + "bower_components/angular-dynamic-locale/tmhDynamicLocale.min.js.map" + ], + "angular-local-storage": [ + "bower_components/angular-local-storage/dist/angular-local-storage.min.js", + "bower_components/angular-local-storage/dist/angular-local-storage.min.js.map" + ], + "tinymce": [ + "bower_components/tinymce/tinymce.min.js" + ], + "angular-i18n": "bower_components/angular-i18n/angular-locale_*.js", + "typeahead.js": "bower_components/typeahead.js/dist/typeahead.bundle.min.js", + "rgrove-lazyload": "bower_components/rgrove-lazyload/lazyload.js", + "ng-file-upload": "bower_components/ng-file-upload/ng-file-upload.min.js", + "jquery-ui": "bower_components/jquery-ui/jquery-ui.min.js", + "jquery-migrate": "bower_components/jquery-migrate/jquery-migrate.min.js", + "clipboard": "bower_components/clipboard/dist/clipboard.min.js", + "animejs": "bower_components/animejs/anime.min.js", + "jquery-validate": "bower_components/jquery-validate/dist/jquery.validate.min.js", + "jquery-validation-unobtrusive": "bower_components/jquery-validation-unobtrusive/dist/jquery.validate.unobtrusive.min.js", + "chart.js": "bower_components/chart.js/dist/chart.min.js", + "angular-chart.js": "bower_components/angular-chart.js/dist/angular-chart.min.js" } }, "devDependencies": { diff --git a/src/Umbraco.Web.UI.Client/package-lock.json b/src/Umbraco.Web.UI.Client/package-lock.json index 2497bdc592..131dcd3404 100644 --- a/src/Umbraco.Web.UI.Client/package-lock.json +++ b/src/Umbraco.Web.UI.Client/package-lock.json @@ -59,7 +59,7 @@ "acorn-jsx": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-4.1.1.tgz", - "integrity": "sha512-JY+iV6r+cO21KtntVvFkD+iqjtdpRUpGqKWgfkCdZq1R+kbreEl8EcdcJR4SmiIgsIQT33s6QzheQ9a275Q8xw==", + "integrity": "sha1-6OQeSOov4MiWdAYQq2pP/YrdIl4=", "dev": true, "requires": { "acorn": "^5.0.3" @@ -81,7 +81,7 @@ "agent-base": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", - "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", + "integrity": "sha1-2J5ZmfeXh1Z0wH2H8mD8Qeg+jKk=", "dev": true, "requires": { "es6-promisify": "^5.0.0" @@ -140,7 +140,7 @@ "amqplib": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/amqplib/-/amqplib-0.5.2.tgz", - "integrity": "sha512-l9mCs6LbydtHqRniRwYkKdqxVa6XMz3Vw1fh+2gJaaVgTM6Jk3o8RccAKWKtlhT1US5sWrFh+KKxsVUALURSIA==", + "integrity": "sha1-0tcxPH/6pNELzx5iUt5FkbbMe2M=", "dev": true, "optional": true, "requires": { @@ -166,7 +166,7 @@ "ansi-colors": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", - "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", + "integrity": "sha1-Y3S03V1HGP884npnGjscrQdxMqk=", "dev": true, "requires": { "ansi-wrap": "^0.1.0" @@ -184,7 +184,7 @@ "ansi-escapes": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", - "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", + "integrity": "sha1-9zIHu4EgfXX9bIPxJa8m7qN4yjA=", "dev": true }, "ansi-gray": { @@ -422,7 +422,7 @@ "arraybuffer.slice": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", - "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==", + "integrity": "sha1-O7xCdd1YTMGxCAm4nU6LY6aednU=", "dev": true }, "arrify": { @@ -459,7 +459,7 @@ "ast-types": { "version": "0.11.5", "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.11.5.tgz", - "integrity": "sha512-oJjo+5e7/vEc2FBK8gUalV0pba4L3VdBIs2EKhOLHLcOd2FgQIVQN9xb0eZ9IjEWyAL7vq6fGJxOvVvdCHNyMw==", + "integrity": "sha1-mJCCXWYMA8KDOfMV6foKNg4x7Cg=", "dev": true, "optional": true }, @@ -488,7 +488,7 @@ "async-limiter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", - "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==", + "integrity": "sha1-ePrtjD0HSrgfIrTphdeehzj3IPg=", "dev": true }, "asynckit": { @@ -818,25 +818,25 @@ "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", "dev": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.2", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", "dev": true, "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "~5.1.0" } } } @@ -1320,7 +1320,7 @@ "circular-json": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", - "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", + "integrity": "sha1-gVyZ6oT2gJUp0vRXkb34JxE1LWY=", "dev": true }, "clap": { @@ -1826,7 +1826,7 @@ "core-js": { "version": "2.5.7", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", - "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", + "integrity": "sha1-+XJgj/DOrWi4QaFqky0LGDeRgU4=", "dev": true }, "core-util-is": { @@ -2066,7 +2066,7 @@ "data-uri-to-buffer": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz", - "integrity": "sha512-vKQ9DTQPN1FLYiiEEOQ6IBGFqvjCa5rSK3cWMy/Nespm5d/x3dGFT9UBZnkLxCwua/IXBi2TYnwTEpsOvhC4UQ==", + "integrity": "sha1-dxY+qcINhkG0cH6PGKvfmnjzSDU=", "dev": true, "optional": true }, @@ -2299,25 +2299,25 @@ "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", "dev": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.2", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", "dev": true, "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "~5.1.0" } }, "strip-bom": { @@ -2765,7 +2765,7 @@ "doctrine": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "integrity": "sha1-XNAfwQFiG0LEzX9dGmYkNxbT850=", "dev": true, "requires": { "esutils": "^2.0.2" @@ -3030,25 +3030,25 @@ "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", "dev": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.2", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", "dev": true, "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "~5.1.0" } }, "strip-bom": { @@ -3148,10 +3148,10 @@ "end-of-stream": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "integrity": "sha1-7SljTRm6ukY7bOa4CjchPqtx7EM=", "dev": true, "requires": { - "once": "1.4.0" + "once": "^1.4.0" } }, "isarray": { @@ -3163,25 +3163,25 @@ "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", "dev": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.2", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", "dev": true, "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "~5.1.0" } } } @@ -3247,7 +3247,7 @@ "engine.io": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.1.5.tgz", - "integrity": "sha512-D06ivJkYxyRrcEe0bTpNnBQNgP9d3xog+qZlLbui8EsMr/DouQpf5o9FzJnWYHEYE0YsFHllUv2R1dkgYZXHcA==", + "integrity": "sha1-Dn751pDrCzVZfx1K0Comyi26OEU=", "dev": true, "requires": { "accepts": "~1.3.4", @@ -3278,7 +3278,7 @@ "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "dev": true, "requires": { "ms": "2.0.0" @@ -3295,7 +3295,7 @@ "engine.io-client": { "version": "3.1.6", "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.1.6.tgz", - "integrity": "sha512-hnuHsFluXnsKOndS4Hv6SvUrgdYx1pk2NqfaDMW+GWdgfU3+/V25Cj7I8a0x92idSpa5PIhJRKxPvp9mnoLsfg==", + "integrity": "sha1-W96xMPi5SlCsXL63JYPnpKBj3f0=", "dev": true, "requires": { "component-emitter": "1.2.1", @@ -3314,7 +3314,7 @@ "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "dev": true, "requires": { "ms": "2.0.0" @@ -3325,7 +3325,7 @@ "engine.io-parser": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.2.tgz", - "integrity": "sha512-dInLFzr80RijZ1rGpx1+56/uFoH7/7InhH3kZt+Ms6hT8tNx3NGW/WNSA/f8As1WkOfkuyb3tnRyuXGxusclMw==", + "integrity": "sha1-TA9M/3mq7su9z96maoI8YIVAkZY=", "dev": true, "requires": { "after": "0.8.2", @@ -3437,7 +3437,7 @@ "es6-promise": { "version": "4.2.4", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz", - "integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==", + "integrity": "sha1-3EIhwrFlGHYL2MOaUtjzVvwA7Sk=", "dev": true } } @@ -3550,7 +3550,7 @@ "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", "dev": true, "requires": { "color-convert": "^1.9.0" @@ -3559,7 +3559,7 @@ "chalk": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", "dev": true, "requires": { "ansi-styles": "^3.2.1", @@ -3583,7 +3583,7 @@ "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "dev": true, "requires": { "ms": "2.0.0" @@ -3592,7 +3592,7 @@ "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "integrity": "sha1-E7BM2z5sXRnfkatph6hpVhmwqnE=", "dev": true }, "has-flag": { @@ -3604,7 +3604,7 @@ "js-yaml": { "version": "3.12.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "integrity": "sha1-6u1lbsg0TxD1J8a/obbiJE3hZ9E=", "dev": true, "requires": { "argparse": "^1.0.7", @@ -3646,7 +3646,7 @@ "eslint-scope": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", - "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", + "integrity": "sha1-UL8wcekzi83EMzF5Sgy1M/ATYXI=", "dev": true, "requires": { "esrecurse": "^4.1.0", @@ -3656,19 +3656,19 @@ "eslint-utils": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", - "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", + "integrity": "sha1-moUbqJ7nxGA0b5fPiTnHKYgn5RI=", "dev": true }, "eslint-visitor-keys": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "integrity": "sha1-PzGA+y4pEBdxastMnW1bXDSmqB0=", "dev": true }, "espree": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/espree/-/espree-4.0.0.tgz", - "integrity": "sha512-kapdTCt1bjmspxStVKX6huolXVV5ZfyZguY1lcfhVVZstce3bqxH9mcLzNn3/mlgW6wQ732+0fuG9v7h0ZQoKg==", + "integrity": "sha1-JTmY8goPgttdhmOFeZ2RKoOjZjQ=", "dev": true, "requires": { "acorn": "^5.6.0", @@ -3684,7 +3684,7 @@ "esquery": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", - "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "integrity": "sha1-QGxRZYsfWZGl+bYrHcJbAOPlxwg=", "dev": true, "requires": { "estraverse": "^4.0.0" @@ -3693,7 +3693,7 @@ "esrecurse": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "integrity": "sha1-AHo7n9vCs7uH5IeeoZyS/b05Qs8=", "dev": true, "requires": { "estraverse": "^4.1.0" @@ -3745,7 +3745,7 @@ "eventemitter3": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz", - "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==", + "integrity": "sha1-CQtNbNvWRe0Qv3UNS1QHlC17oWM=", "dev": true }, "exec-buffer": { @@ -4038,7 +4038,7 @@ "external-editor": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", - "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", + "integrity": "sha1-BFURz9jRM/OEZnPRBHwVTiFK09U=", "dev": true, "requires": { "chardet": "^0.4.0", @@ -4237,7 +4237,7 @@ "file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "integrity": "sha1-VTp7hEb/b2hDWcRF8eN6BdrMM90=", "dev": true, "optional": true }, @@ -4426,7 +4426,7 @@ "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "dev": true, "requires": { "ms": "2.0.0" @@ -5144,7 +5144,7 @@ "get-uri": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-2.0.2.tgz", - "integrity": "sha512-ZD325dMZOgerGqF/rF6vZXyFGTAay62svjQIT+X/oU2PtxYpFxvSkbsdi+oxIrsNxlZVd4y8wUDqkaExWTI/Cw==", + "integrity": "sha1-XHlecTJvbKEoby/IJXXNK6sq9Xg=", "dev": true, "optional": true, "requires": { @@ -5166,7 +5166,7 @@ "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", "dev": true, "optional": true, "requires": { @@ -5182,7 +5182,7 @@ "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", "dev": true, "optional": true, "requires": { @@ -5390,7 +5390,7 @@ "globals": { "version": "11.7.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz", - "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==", + "integrity": "sha1-pYP6pDBVsayncZFL9oJY4vwSVnM=", "dev": true }, "globby": { @@ -5508,25 +5508,25 @@ "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", "dev": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.2", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", "dev": true, "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "~5.1.0" } } } @@ -5654,25 +5654,25 @@ "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", "dev": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.2", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", "dev": true, "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "~5.1.0" } } } @@ -5680,7 +5680,7 @@ "gulp-eslint": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/gulp-eslint/-/gulp-eslint-5.0.0.tgz", - "integrity": "sha512-9GUqCqh85C7rP9120cpxXuZz2ayq3BZc85pCTuPJS03VQYxne0aWPIXWx6LSvsGPa3uRqtSO537vaugOh+5cXg==", + "integrity": "sha1-KiaECV93Syz3kxAmIHjFbMehK1I=", "dev": true, "requires": { "eslint": "^5.0.1", @@ -6351,7 +6351,7 @@ "has-binary2": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", - "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", + "integrity": "sha1-d3asYn8+p3JQz8My2rfd9eT10R0=", "dev": true, "requires": { "isarray": "2.0.1" @@ -6503,7 +6503,7 @@ "http-proxy": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz", - "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==", + "integrity": "sha1-etOElGWPhGBeL220Q230EPTlvpo=", "dev": true, "requires": { "eventemitter3": "^3.0.0", @@ -6514,7 +6514,7 @@ "http-proxy-agent": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", - "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", + "integrity": "sha1-5IIb7vWyFCogJr1zkm/lN2McVAU=", "dev": true, "requires": { "agent-base": "4", @@ -6524,7 +6524,7 @@ "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "dev": true, "requires": { "ms": "2.0.0" @@ -6562,7 +6562,7 @@ "https-proxy-agent": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", - "integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==", + "integrity": "sha1-UVUpcPoE1yPgTFbQQXjD+SWSu8A=", "dev": true, "requires": { "agent-base": "^4.1.0", @@ -6572,7 +6572,7 @@ "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "dev": true, "requires": { "ms": "2.0.0" @@ -6817,7 +6817,7 @@ "inquirer": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", - "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", + "integrity": "sha1-2zUMK3Paynf/EkOWLp8i8JloVyY=", "dev": true, "requires": { "ansi-escapes": "^3.0.0", @@ -6844,7 +6844,7 @@ "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", "dev": true, "requires": { "color-convert": "^1.9.0" @@ -6853,7 +6853,7 @@ "chalk": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", "dev": true, "requires": { "ansi-styles": "^3.2.1", @@ -7130,7 +7130,7 @@ "is-my-ip-valid": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz", - "integrity": "sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ==", + "integrity": "sha1-ezUbjo7dTTmV1NBmaA5mTZRpaCQ=", "dev": true, "optional": true }, @@ -7206,7 +7206,7 @@ "is-path-in-cwd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", - "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", + "integrity": "sha1-WsSLNF72dTOb1sekipEhELJBz1I=", "dev": true, "requires": { "is-path-inside": "^1.0.0" @@ -7295,7 +7295,7 @@ "is-resolvable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", + "integrity": "sha1-+xj4fOH+uSUWnJpAfBkxijIG7Yg=", "dev": true }, "is-retry-allowed": { @@ -7385,7 +7385,7 @@ "isbinaryfile": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.3.tgz", - "integrity": "sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw==", + "integrity": "sha1-XW3vPt6/boyoyunDAYOoBLX4voA=", "dev": true, "requires": { "buffer-alloc": "^1.2.0" @@ -7465,7 +7465,7 @@ "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA=", "dev": true }, "json-stable-stringify": { @@ -7543,7 +7543,7 @@ "karma": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/karma/-/karma-2.0.5.tgz", - "integrity": "sha512-rECezBeY7mjzGUWhFlB7CvPHgkHJLXyUmWg+6vHCEsdWNUTnmiS6jRrIMcJEWgU2DUGZzGWG0bTRVky8fsDTOA==", + "integrity": "sha1-NxDHoucbHEOTE/KDhG2I4E5PkYw=", "dev": true, "requires": { "bluebird": "^3.3.0", @@ -7578,7 +7578,7 @@ "anymatch": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "integrity": "sha1-vLJLTzeTTZqnrBe0ra+J58du8us=", "dev": true, "requires": { "micromatch": "^3.1.4", @@ -7612,7 +7612,7 @@ "chokidar": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", - "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", + "integrity": "sha1-NW/04rDo5D4yLRijckYLvPOszSY=", "dev": true, "requires": { "anymatch": "^2.0.0", @@ -7692,7 +7692,7 @@ "iconv-lite": { "version": "0.4.23", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "integrity": "sha1-KXhx9jvlB63Pv8pxXQzQ7thOmmM=", "dev": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" @@ -7710,7 +7710,7 @@ "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "integrity": "sha1-yzroBuh0BERYTvFUzo7pjUA/PjY=", "dev": true }, "range-parser": { @@ -7722,7 +7722,7 @@ "raw-body": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", - "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", + "integrity": "sha1-GzJOzmtXBuFThVvBFIxlu39uoMM=", "dev": true, "requires": { "bytes": "3.0.0", @@ -7734,7 +7734,7 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", "dev": true }, "utils-merge": { @@ -7822,25 +7822,25 @@ "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", "dev": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.2", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", "dev": true, "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "~5.1.0" } } } @@ -8247,7 +8247,7 @@ "log4js": { "version": "2.11.0", "resolved": "https://registry.npmjs.org/log4js/-/log4js-2.11.0.tgz", - "integrity": "sha512-z1XdwyGFg8/WGkOyF6DPJjivCWNLKrklGdViywdYnSKOvgtEBo2UyEMZS5sD2mZrQlU3TvO8wDWLc8mzE1ncBQ==", + "integrity": "sha1-vzkC7/ZcaSPZzpz70ttUFg40AFo=", "dev": true, "requires": { "amqplib": "^0.5.2", @@ -8268,13 +8268,13 @@ "circular-json": { "version": "0.5.5", "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.5.5.tgz", - "integrity": "sha512-13YaR6kiz0kBNmIVM87Io8Hp7bWOo4r61vkEANy8iH9R9bc6avud/1FT0SBpqR1RpIQADOh/Q+yHZDA1iL6ysA==", + "integrity": "sha1-ZBgu81kELTfNjnZ/yd6Hix6UR9M=", "dev": true }, "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "dev": true, "requires": { "ms": "2.0.0" @@ -8331,7 +8331,7 @@ "commander": { "version": "2.17.1", "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", - "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", + "integrity": "sha1-vXerfebelCBc6sxy8XFtKfIKd78=", "dev": true, "optional": true }, @@ -8503,7 +8503,7 @@ "mailgun-js": { "version": "0.18.1", "resolved": "https://registry.npmjs.org/mailgun-js/-/mailgun-js-0.18.1.tgz", - "integrity": "sha512-lvuMP14u24HS2uBsJEnzSyPMxzU2b99tQsIx1o6QNjqxjk8b3WvR+vq5oG1mjqz/IBYo+5gF+uSoDS0RkMVHmg==", + "integrity": "sha1-7jmqGNe7WYpc6e3oSvtoHe/IprA=", "dev": true, "optional": true, "requires": { @@ -8521,7 +8521,7 @@ "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "dev": true, "optional": true, "requires": { @@ -8763,7 +8763,7 @@ "mimic-fn": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "integrity": "sha1-ggyGo5M0ZA6ZUWkovQP8qIBX0CI=", "dev": true }, "minimatch": { @@ -8927,7 +8927,7 @@ "nice-try": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz", - "integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==", + "integrity": "sha1-2Tli9sUvLBVYwPvabVEoGfHv4cQ=", "dev": true }, "node-fs": { @@ -9387,7 +9387,7 @@ "pac-proxy-agent": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-2.0.2.tgz", - "integrity": "sha512-cDNAN1Ehjbf5EHkNY5qnRhGPUCp6SnpyVof5fRzN800QV1Y2OkzbH9rmjZkbBRa8igof903yOnjIl6z0SlAhxA==", + "integrity": "sha1-kNn2cwqw9NJgfc3NTT1kGqJsOJY=", "dev": true, "optional": true, "requires": { @@ -9411,7 +9411,7 @@ "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "dev": true, "optional": true, "requires": { @@ -9441,7 +9441,7 @@ "iconv-lite": { "version": "0.4.23", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "integrity": "sha1-KXhx9jvlB63Pv8pxXQzQ7thOmmM=", "dev": true, "optional": true, "requires": { @@ -9451,7 +9451,7 @@ "raw-body": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", - "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", + "integrity": "sha1-GzJOzmtXBuFThVvBFIxlu39uoMM=", "dev": true, "optional": true, "requires": { @@ -9464,7 +9464,7 @@ "socks-proxy-agent": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-3.0.1.tgz", - "integrity": "sha512-ZwEDymm204mTzvdqyUqOdovVr2YRd2NYskrYrF2LXyZ9qDiMAoFESGK8CRphiO7rtbo2Y757k2Nia3x2hGtalA==", + "integrity": "sha1-Lq58+OKoLTRWV2FTmn+XGMVhdlk=", "dev": true, "optional": true, "requires": { @@ -9477,7 +9477,7 @@ "pac-resolver": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-3.0.0.tgz", - "integrity": "sha512-tcc38bsjuE3XZ5+4vP96OfhOugrX+JcnpUbhfuc4LuXBLQhoTthOstZeoQJBDnQUDYzYmdImKsbz0xSl1/9qeA==", + "integrity": "sha1-auoweH2wqJFwTet4AKcip2FabyY=", "dev": true, "optional": true, "requires": { @@ -9830,7 +9830,7 @@ "pluralize": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", - "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", + "integrity": "sha1-KYuJ34uTsCIdv0Ia0rGx6iP8Z3c=", "dev": true }, "posix-character-classes": { @@ -10232,7 +10232,7 @@ "proxy-agent": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-3.0.1.tgz", - "integrity": "sha512-mAZexaz9ZxQhYPWfAjzlrloEjW+JHiBFryE4AJXFDTnaXfmH/FKqC1swTRKuEPbHWz02flQNXFOyDUF7zfEG6A==", + "integrity": "sha1-T7e2GxR20P6OOjOE2Q4kYLve0/k=", "dev": true, "optional": true, "requires": { @@ -10249,7 +10249,7 @@ "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "dev": true, "optional": true, "requires": { @@ -10259,7 +10259,7 @@ "lru-cache": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", + "integrity": "sha1-oRdc80lt/IQ2wVbDNLSVWZK85pw=", "dev": true, "optional": true, "requires": { @@ -10305,7 +10305,7 @@ "qjobs": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", - "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", + "integrity": "sha1-xF6cYYAL0IfviNfiVkI73Unl0HE=", "dev": true }, "qs": { @@ -10419,25 +10419,25 @@ "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", "dev": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.2", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", "dev": true, "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "~5.1.0" } } } @@ -10547,7 +10547,7 @@ "redis": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/redis/-/redis-2.8.0.tgz", - "integrity": "sha512-M1OkonEQwtRmZv4tEWF2VgpG0JWJ8Fv1PhlgT5+B+uNq2cA3Rt1Yt/ryoR+vQNOQcIEgdCdfH0jr3bDpihAw1A==", + "integrity": "sha1-ICKI4/WMSfYHnZevehDhMDrhSwI=", "dev": true, "optional": true, "requires": { @@ -10559,7 +10559,7 @@ "redis-commands": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.3.5.tgz", - "integrity": "sha512-foGF8u6MXGFF++1TZVC6icGXuMYPftKXt1FBT2vrfU9ZATNtZJ8duRC5d1lEfE8hyVe3jhelHGB91oB7I6qLsA==", + "integrity": "sha1-RJWIlBTx6IYmEYCxRC5ylWAtg6I=", "dev": true, "optional": true }, @@ -10637,7 +10637,7 @@ "regexpp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.0.tgz", - "integrity": "sha512-g2FAVtR8Uh8GO1Nv5wpxW7VFVwHcCEr4wyA8/MHiRkO8uHoR5ntAA8Uq3P1vvMTX/BeQiRVSpDGLd+Wn5HNOTA==", + "integrity": "sha1-sqdTSoXKGwM7z1zp/45W1OB1U2U=", "dev": true }, "remove-trailing-separator": { @@ -10723,7 +10723,7 @@ "requestretry": { "version": "1.13.0", "resolved": "https://registry.npmjs.org/requestretry/-/requestretry-1.13.0.tgz", - "integrity": "sha512-Lmh9qMvnQXADGAQxsXHP4rbgO6pffCfuR8XUBdP9aitJcLQJxhp7YZK4xAVYXnPJ5E52mwrfiKQtKonPL8xsmg==", + "integrity": "sha1-IT7BAG7rdQ6LjOVBdig9FajVXZQ=", "dev": true, "optional": true, "requires": { @@ -10878,7 +10878,7 @@ "rxjs": { "version": "5.5.11", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.11.tgz", - "integrity": "sha512-3bjO7UwWfA2CV7lmwYMBzj4fQ6Cq+ftHc2MvUe+WMS7wcdJ1LosDWmdjPQanYp2dBRj572p7PeU81JUxHKOcBA==", + "integrity": "sha1-9zMCfKQ+O+xrmURzvkq5itQ87Yc=", "dev": true, "requires": { "symbol-observable": "1.0.1" @@ -10902,7 +10902,7 @@ "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=", "dev": true }, "sax": { @@ -11102,7 +11102,7 @@ "setprototypeof": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "integrity": "sha1-0L2FU2iHtv58DYGMuWLZ2RxU5lY=", "dev": true }, "shebang-command": { @@ -11151,7 +11151,7 @@ "slice-ansi": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", - "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", + "integrity": "sha1-BE8aSdiEL/MHqta1Be0Xi9lQE00=", "dev": true, "requires": { "is-fullwidth-code-point": "^2.0.0" @@ -11333,7 +11333,7 @@ "socket.io-parser": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.1.3.tgz", - "integrity": "sha512-g0a2HPqLguqAczs3dMECuA1RgoGFPyvDqcbaDEdCWY9g59kdUAz3YRmaJBNKXflrHNwB7Q12Gkf/0CZXfdHR7g==", + "integrity": "sha1-7S2l7nnxCVUDbj2kE7/X8eTYbI4=", "dev": true, "requires": { "component-emitter": "1.2.1", @@ -11345,7 +11345,7 @@ "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "dev": true, "requires": { "ms": "2.0.0" @@ -11373,7 +11373,7 @@ "socks-proxy-agent": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-4.0.1.tgz", - "integrity": "sha512-Kezx6/VBguXOsEe5oU3lXYyKMi4+gva72TwJ7pQY5JfqUx2nMk7NXA6z/mpNqIlfQjWYVfeuNvQjexiTaTn6Nw==", + "integrity": "sha1-WTa/i3B6mTB5xvN9sgkYIb/6ZHM=", "dev": true, "optional": true, "requires": { @@ -11384,14 +11384,14 @@ "smart-buffer": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.0.1.tgz", - "integrity": "sha512-RFqinRVJVcCAL9Uh1oVqE6FZkqsyLiVOYEZ20TqIOjuX7iFVJ+zsbs4RIghnw/pTs7mZvt8ZHhvm1ZUrR4fykg==", + "integrity": "sha1-B+ocqNTbJOtMrIZTfX0YmVIhrOM=", "dev": true, "optional": true }, "socks": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/socks/-/socks-2.2.1.tgz", - "integrity": "sha512-0GabKw7n9mI46vcNrVfs0o6XzWzjVa3h6GaSo2UPxtWAROXUWavfJWh1M4PR5tnE0dcnQXZIDFP4yrAysLze/w==", + "integrity": "sha1-aK1nizZC+8XZnGTBZbxWHqsCFfk=", "dev": true, "optional": true, "requires": { @@ -11610,25 +11610,25 @@ "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", "dev": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.2", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", "dev": true, "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "~5.1.0" } } } @@ -11657,7 +11657,7 @@ "streamroller": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-0.7.0.tgz", - "integrity": "sha512-WREzfy0r0zUqp3lGO096wRuUp7ho1X6uo/7DJfTlEi0Iv/4gT7YHqXDjKC2ioVGBZtE8QzsQD9nx1nIuoZ57jQ==", + "integrity": "sha1-odG3z4PTmvsNYwSaWsv5NJO99ks=", "dev": true, "requires": { "date-format": "^1.2.0", @@ -11669,7 +11669,7 @@ "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "dev": true, "requires": { "ms": "2.0.0" @@ -11684,7 +11684,7 @@ "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", "dev": true, "requires": { "core-util-is": "~1.0.0", @@ -11699,7 +11699,7 @@ "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", "dev": true, "requires": { "safe-buffer": "~5.1.0" @@ -11716,7 +11716,7 @@ "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", "dev": true, "requires": { "is-fullwidth-code-point": "^2.0.0", @@ -11962,7 +11962,7 @@ "table": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/table/-/table-4.0.3.tgz", - "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", + "integrity": "sha1-ALXitgLxeUuayvnKkIp2OGp4E7w=", "dev": true, "requires": { "ajv": "^6.0.1", @@ -11988,7 +11988,7 @@ "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", "dev": true, "requires": { "color-convert": "^1.9.0" @@ -11997,7 +11997,7 @@ "chalk": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", "dev": true, "requires": { "ansi-styles": "^3.2.1", @@ -12055,25 +12055,25 @@ "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", "dev": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.2", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", "dev": true, "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "~5.1.0" } } } @@ -12294,7 +12294,7 @@ "tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "integrity": "sha1-bTQzWIl2jSGyvNoKonfO07G/rfk=", "dev": true, "requires": { "os-tmpdir": "~1.0.2" @@ -12481,7 +12481,7 @@ "ultron": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", - "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", + "integrity": "sha1-n+FTahCmZKZSZqHjzPhf02MCvJw=", "dev": true }, "unc-path-regex": { @@ -12626,13 +12626,13 @@ "upath": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", - "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", + "integrity": "sha1-NSVll+RqWB20eT0M5H+prr/J+r0=", "dev": true }, "uri-js": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "integrity": "sha1-lMVA4f93KVbiKZUHwBCupsiDjrA=", "dev": true, "requires": { "punycode": "^2.1.0" @@ -12736,7 +12736,7 @@ "uws": { "version": "9.14.0", "resolved": "https://registry.npmjs.org/uws/-/uws-9.14.0.tgz", - "integrity": "sha512-HNMztPP5A1sKuVFmdZ6BPVpBQd5bUjNC8EFMFiICK+oho/OQsAJy5hnIx4btMHiOk8j04f/DbIlqnEZ9d72dqg==", + "integrity": "sha1-+sg4a+/DOno3BcvVjcR7Qwyk3ZU=", "dev": true, "optional": true }, @@ -12832,25 +12832,25 @@ "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", "dev": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.2", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", "dev": true, "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "~5.1.0" } } } @@ -13077,7 +13077,7 @@ "ws": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", - "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", + "integrity": "sha1-8c+E/i1ekB686U767OeF8YeiKPI=", "dev": true, "requires": { "async-limiter": "~1.0.0", diff --git a/src/Umbraco.Web.UI.Client/src/app.js b/src/Umbraco.Web.UI.Client/src/app.js index c7b813c1bf..938d3edde8 100644 --- a/src/Umbraco.Web.UI.Client/src/app.js +++ b/src/Umbraco.Web.UI.Client/src/app.js @@ -14,7 +14,8 @@ var app = angular.module('umbraco', [ 'ngMessages', 'tmh.dynamicLocale', 'ngFileUpload', - 'LocalStorageModule' + 'LocalStorageModule', + 'chart.js' ]); app.config(['$compileProvider', function ($compileProvider) { diff --git a/src/Umbraco.Web/UI/JavaScript/JsInitialize.js b/src/Umbraco.Web/UI/JavaScript/JsInitialize.js index 5dfa53b9d8..db6137499a 100644 --- a/src/Umbraco.Web/UI/JavaScript/JsInitialize.js +++ b/src/Umbraco.Web/UI/JavaScript/JsInitialize.js @@ -23,6 +23,9 @@ 'lib/ng-file-upload/ng-file-upload.min.js', 'lib/angular-local-storage/angular-local-storage.min.js', + 'lib/chart.js/chart.min.js', + 'lib/angular-chart.js/angular-chart.min.js', + 'lib/bootstrap/js/bootstrap.2.3.2.min.js', 'lib/umbraco/Extensions.js', From fbba60a56bf246b19fcef5c95f425391754b30fd Mon Sep 17 00:00:00 2001 From: Warren Date: Fri, 24 Aug 2018 12:58:50 +0100 Subject: [PATCH 003/437] Super rough - WIP UI/layout with a working chart with fake data --- .../src/views/logs/overview.controller.js | 59 +++++++++++++++ .../src/views/logs/overview.html | 75 +++++++++++++++++++ 2 files changed, 134 insertions(+) create mode 100644 src/Umbraco.Web.UI.Client/src/views/logs/overview.controller.js create mode 100644 src/Umbraco.Web.UI.Client/src/views/logs/overview.html diff --git a/src/Umbraco.Web.UI.Client/src/views/logs/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/logs/overview.controller.js new file mode 100644 index 0000000000..6ba57df102 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/logs/overview.controller.js @@ -0,0 +1,59 @@ +(function () { + "use strict"; + + function LogsOverviewController($scope, $location, localizationService) { + + var vm = this; + + vm.page = {}; + vm.labels = {}; + + + vm.logTypeLabels = ["Info", "Debug", "Warning", "Error", "Critical"]; + vm.logTypeData = [500, 75, 10, 45, 2]; + + vm.chartOptions = { + legend: { + display: true, + position: 'left', + labels: { + /*fontColor: 'rgb(255, 99, 132)'*/ + } + } + }; + + vm.editLanguage = editLanguage; + + + function init() { + + vm.loading = true; + + // localize labels + var labelKeys = [ + "treeHeaders_languages", + "general_mandatory", + "general_default" + ]; + + localizationService.localizeMany(labelKeys).then(function (values) { + vm.labels.languages = values[0]; + vm.labels.mandatory = values[1]; + vm.labels.general = values[2]; + // set page name + vm.page.name = vm.labels.languages; + }); + } + + function editLanguage(language) { + $location.search('create', null); + $location.path("/settings/languages/edit/" + language.id); + } + + init(); + + } + + angular.module("umbraco").controller("Umbraco.Editors.Logs.OverviewController", LogsOverviewController); + +})(); diff --git a/src/Umbraco.Web.UI.Client/src/views/logs/overview.html b/src/Umbraco.Web.UI.Client/src/views/logs/overview.html new file mode 100644 index 0000000000..303d6feac6 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/logs/overview.html @@ -0,0 +1,75 @@ +
+ + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + Main logs here + + + +
+ +
+ + + + 1234 + + + + + + + + + + + + + +
+
+ + +
+ +
+ +
From cb5dca55442bd9aba81892de634f729483a4ce8c Mon Sep 17 00:00:00 2001 From: Warren Date: Fri, 24 Aug 2018 15:02:38 +0100 Subject: [PATCH 004/437] More rough UI work - to figure out how it should look or work --- .../src/views/logs/overview.controller.js | 2 + .../src/views/logs/overview.html | 90 +++++++++++++++++-- 2 files changed, 87 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/logs/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/logs/overview.controller.js index 6ba57df102..61de9b625c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logs/overview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logs/overview.controller.js @@ -11,6 +11,8 @@ vm.logTypeLabels = ["Info", "Debug", "Warning", "Error", "Critical"]; vm.logTypeData = [500, 75, 10, 45, 2]; + vm.logTypeColors = [ '#dcdcdc', '#97bbcd', '#46bfbd', '#fdb45c', '#f7464a']; + vm.chartOptions = { legend: { diff --git a/src/Umbraco.Web.UI.Client/src/views/logs/overview.html b/src/Umbraco.Web.UI.Client/src/views/logs/overview.html index 303d6feac6..d94ebc3a81 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logs/overview.html +++ b/src/Umbraco.Web.UI.Client/src/views/logs/overview.html @@ -33,36 +33,116 @@
- - Main logs here + + + + + + + + + + + + + + + + + + + + + + + + + + +
TimestampLevelMachine NameMessage
2018-08-24T08:27:06INFODELLBOOKSome info log message
2018-08-24T08:27:06INFODELLBOOKOrdered Components:
+ Umbraco.Core.Runtime.CoreRuntimeComponent
+ Umbraco.Web.Runtime.WebRuntimeComponent
+ Umbraco.Core.Logging.WebProfilerComponent
+ Umbraco.Core.Auditing.AuditEventsComponent
+ Umbraco.Web.PublishedCache.NuCache.NuCacheComponent
+ Umbraco.Core.Components.UmbracoCoreComponent +
+
+ + - + Number of Errors 1234 + - + Log Types + + + Common Log Messages + + + + + + + + + + + + + + + + + + + + + +
+ [Timing {TimingId}] {EndMessage} ({TimingDuration}ms) + + 1234 +
+ [Timing {TimingId}] {StartMessage} + + 487 +
+ The tree definition: {AddElement} could not be resolved to a .Net object type + + 360 +
+ Getting {TypeName}: found a cached type list. + + 145 +
+
+
From cae468eaebc3adead767cb4188e0222ce3c48043 Mon Sep 17 00:00:00 2001 From: Warren Date: Mon, 27 Aug 2018 20:05:17 +0100 Subject: [PATCH 005/437] Some rough untested POC code to read JSON log file from disk --- .../Logging/Viewer/CommonLogMessage.cs | 9 +++ src/Umbraco.Core/Logging/Viewer/ILogViewer.cs | 30 +++++++++ .../Logging/Viewer/LogLevelCounts.cs | 15 +++++ src/Umbraco.Core/Logging/Viewer/LogViewer.cs | 63 +++++++++++++++++++ src/Umbraco.Core/Umbraco.Core.csproj | 7 +++ 5 files changed, 124 insertions(+) create mode 100644 src/Umbraco.Core/Logging/Viewer/CommonLogMessage.cs create mode 100644 src/Umbraco.Core/Logging/Viewer/ILogViewer.cs create mode 100644 src/Umbraco.Core/Logging/Viewer/LogLevelCounts.cs create mode 100644 src/Umbraco.Core/Logging/Viewer/LogViewer.cs diff --git a/src/Umbraco.Core/Logging/Viewer/CommonLogMessage.cs b/src/Umbraco.Core/Logging/Viewer/CommonLogMessage.cs new file mode 100644 index 0000000000..150e5f62cc --- /dev/null +++ b/src/Umbraco.Core/Logging/Viewer/CommonLogMessage.cs @@ -0,0 +1,9 @@ +namespace Umbraco.Core.Logging.Viewer +{ + public class CommonLogMessage + { + public string MessageTemplate { get; set; } + + public int Count { get; set; } + } +} diff --git a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs new file mode 100644 index 0000000000..080a9285f2 --- /dev/null +++ b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; +using Serilog.Events; + +namespace Umbraco.Core.Logging.Viewer +{ + public interface ILogViewer + { + /// + /// A count of number of errors + /// By counting Warnings with Exceptions, Errors & Fatal messages + /// + int GetNumberOfErrors(); + + /// + /// Returns a number of the different log level entries + /// + LogLevelCounts GetLogLevelCounts(); + + /// + /// Returns the top 5 common log message templates and their counts + /// + IEnumerable GetCommonLogMessages(); + + /// + /// Returns the collection of logs + /// + IEnumerable GetLogs(); + + } +} diff --git a/src/Umbraco.Core/Logging/Viewer/LogLevelCounts.cs b/src/Umbraco.Core/Logging/Viewer/LogLevelCounts.cs new file mode 100644 index 0000000000..4d2e39f6e2 --- /dev/null +++ b/src/Umbraco.Core/Logging/Viewer/LogLevelCounts.cs @@ -0,0 +1,15 @@ +namespace Umbraco.Core.Logging.Viewer +{ + public class LogLevelCounts + { + public int Information { get; set; } + + public int Debug { get; set; } + + public int Warning { get; set; } + + public int Error { get; set; } + + public int Fatal { get; set; } + } +} diff --git a/src/Umbraco.Core/Logging/Viewer/LogViewer.cs b/src/Umbraco.Core/Logging/Viewer/LogViewer.cs new file mode 100644 index 0000000000..c72798f3dd --- /dev/null +++ b/src/Umbraco.Core/Logging/Viewer/LogViewer.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Serilog.Events; +using Serilog.Formatting.Compact.Reader; + +namespace Umbraco.Core.Logging.Viewer +{ + public class LogViewer : ILogViewer + { + private List _logs; + + public LogViewer() + { + var filePath = $@"{AppDomain.CurrentDomain.BaseDirectory}\App_Data\Logs\UmbracoTraceLog.DELLBOOK.20180824.json"; + + //Open log file + using (var fs = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) + { + using (var stream = new StreamReader(fs)) + { + + var reader = new LogEventReader(stream); + LogEvent evt; + while (reader.TryRead(out evt)) + { + _logs.Add(evt); + } + } + } + } + + public int GetNumberOfErrors() + { + return _logs.Count(x => x.Level == LogEventLevel.Fatal && x.Level == LogEventLevel.Error && x.Exception != null); + } + + public LogLevelCounts GetLogLevelCounts() + { + return new LogLevelCounts + { + Information = _logs.Count(x => x.Level == LogEventLevel.Information), + Debug = _logs.Count(x => x.Level == LogEventLevel.Debug), + Warning = _logs.Count(x => x.Level == LogEventLevel.Warning), + Error = _logs.Count(x => x.Level == LogEventLevel.Error), + Fatal = _logs.Count(x => x.Level == LogEventLevel.Fatal) + }; + } + + public IEnumerable GetCommonLogMessages() + { + var messages = new List(); + return messages; + + } + + public IEnumerable GetLogs() + { + throw new NotImplementedException(); + } + } +} diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 5fde7c9ae5..9ffb0161d9 100644 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -89,6 +89,9 @@ 1.0.0 + + 1.0.2 + 2.1.2 @@ -331,6 +334,10 @@ + + + + From df13af9dc223aee10192e9295e925c913ea200f3 Mon Sep 17 00:00:00 2001 From: Warren Date: Mon, 27 Aug 2018 20:05:59 +0100 Subject: [PATCH 006/437] Attempt to get a WebAPI Controller setup --- src/Umbraco.Web/Editors/LogsController.cs | 32 +++++++++++++++++++++++ src/Umbraco.Web/Umbraco.Web.csproj | 1 + 2 files changed, 33 insertions(+) create mode 100644 src/Umbraco.Web/Editors/LogsController.cs diff --git a/src/Umbraco.Web/Editors/LogsController.cs b/src/Umbraco.Web/Editors/LogsController.cs new file mode 100644 index 0000000000..96add77d66 --- /dev/null +++ b/src/Umbraco.Web/Editors/LogsController.cs @@ -0,0 +1,32 @@ +using System.Web.Mvc; +using Umbraco.Core.Logging.Viewer; +using Umbraco.Web.Mvc; + +namespace Umbraco.Web.Editors +{ + /// + /// Backoffice controller supporting the dashboard for language administration. + /// + [PluginController("UmbracoApi")] + public class LogsController : UmbracoAuthorizedJsonController + { + private LogViewer _logViewer; + + public LogsController() + { + _logViewer = new LogViewer(); + } + + [HttpGet] + public int GetNumberOfErrors() + { + return _logViewer.GetNumberOfErrors(); + } + + [HttpGet] + public LogLevelCounts GetLogLevelCounts() + { + return _logViewer.GetLogLevelCounts(); + } + } +} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index d9a1445da3..879e563343 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -113,6 +113,7 @@ + From 152ddbd2528ce447dc71ad843f09123dc0c1ecec Mon Sep 17 00:00:00 2001 From: Warren Date: Tue, 28 Aug 2018 14:48:54 +0100 Subject: [PATCH 007/437] Adds LogViewerComponent & registers singleton in DI (3rd party devs will have to disable this component & register their own implementation) Get some more of the basic WebAPI stubs fleshed out to get some data to start using in the UI layer --- src/Umbraco.Core/Logging/Viewer/ILogViewer.cs | 7 ++-- .../Viewer/{LogViewer.cs => JsonLogViewer.cs} | 39 +++++++++++++---- src/Umbraco.Core/Logging/Viewer/LogMessage.cs | 42 +++++++++++++++++++ .../Logging/Viewer/LogViewerComponent.cs | 14 +++++++ src/Umbraco.Core/Umbraco.Core.csproj | 4 +- src/Umbraco.Web/Editors/LogsController.cs | 26 +++++++++--- 6 files changed, 112 insertions(+), 20 deletions(-) rename src/Umbraco.Core/Logging/Viewer/{LogViewer.cs => JsonLogViewer.cs} (55%) create mode 100644 src/Umbraco.Core/Logging/Viewer/LogMessage.cs create mode 100644 src/Umbraco.Core/Logging/Viewer/LogViewerComponent.cs diff --git a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs index 080a9285f2..1b7016307d 100644 --- a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using Serilog.Events; namespace Umbraco.Core.Logging.Viewer { @@ -17,14 +16,14 @@ namespace Umbraco.Core.Logging.Viewer LogLevelCounts GetLogLevelCounts(); /// - /// Returns the top 5 common log message templates and their counts + /// Returns the top common log message templates and their counts /// - IEnumerable GetCommonLogMessages(); + IEnumerable GetCommonLogMessages(int numberOfResults = 10); /// /// Returns the collection of logs /// - IEnumerable GetLogs(); + IEnumerable GetLogs(); } } diff --git a/src/Umbraco.Core/Logging/Viewer/LogViewer.cs b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs similarity index 55% rename from src/Umbraco.Core/Logging/Viewer/LogViewer.cs rename to src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs index c72798f3dd..b7d13777c8 100644 --- a/src/Umbraco.Core/Logging/Viewer/LogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs @@ -7,13 +7,13 @@ using Serilog.Formatting.Compact.Reader; namespace Umbraco.Core.Logging.Viewer { - public class LogViewer : ILogViewer + public class JsonLogViewer : ILogViewer { - private List _logs; + private List _logs = new List(); - public LogViewer() + public JsonLogViewer() { - var filePath = $@"{AppDomain.CurrentDomain.BaseDirectory}\App_Data\Logs\UmbracoTraceLog.DELLBOOK.20180824.json"; + var filePath = $@"{AppDomain.CurrentDomain.BaseDirectory}\App_Data\Logs\UmbracoTraceLog.DELLBOOK.20180828.json"; //Open log file using (var fs = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) @@ -48,16 +48,37 @@ namespace Umbraco.Core.Logging.Viewer }; } - public IEnumerable GetCommonLogMessages() + public IEnumerable GetCommonLogMessages(int numberOfResults) { - var messages = new List(); - return messages; + var templates = _logs.GroupBy(x => x.MessageTemplate.Text) + .Select(g => new CommonLogMessage { MessageTemplate = g.Key, Count = g.Count() }) + .OrderByDescending(x => x.Count) + .Take(numberOfResults); + return templates; } - public IEnumerable GetLogs() + public IEnumerable GetLogs() { - throw new NotImplementedException(); + var messages = new List(); + var logs = _logs.Take(20); + + foreach(var log in logs) + { + var logItem = new LogMessage + { + Level = log.Level, + Properties = log.Properties, + Timestamp = log.Timestamp, + MessageTemplateText = log.MessageTemplate.Text, //Not necesarily worried about token position just the message text itself + RenderedMessage = log.RenderMessage(), //Not returning LogEvent itself from Serilog (as we don't get the rendered txt log back) + Exception = log.Exception + }; + + messages.Add(logItem); + } + + return messages; } } } diff --git a/src/Umbraco.Core/Logging/Viewer/LogMessage.cs b/src/Umbraco.Core/Logging/Viewer/LogMessage.cs new file mode 100644 index 0000000000..86d136be43 --- /dev/null +++ b/src/Umbraco.Core/Logging/Viewer/LogMessage.cs @@ -0,0 +1,42 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Serilog.Events; +using System; +using System.Collections.Generic; + +namespace Umbraco.Core.Logging.Viewer +{ + public class LogMessage + { + /// + /// The time at which the logevent occurred. + /// + public DateTimeOffset Timestamp { get; set; } + + /// + /// The level of the event. + /// + [JsonConverter(typeof(StringEnumConverter))] + public LogEventLevel Level { get; set; } + + /// + /// The message template describing the logevent. + /// + public string MessageTemplateText { get; set; } + + /// + /// The message template filled with the logevent properties. + /// + public string RenderedMessage { get; set; } + + /// + /// Properties associated with the logevent, including those presented in Serilog.Events.LogEvent.MessageTemplate. + /// + public IReadOnlyDictionary Properties { get; set; } + + /// + /// An exception associated with the logevent, or null. + /// + public Exception Exception { get; set; } + } +} diff --git a/src/Umbraco.Core/Logging/Viewer/LogViewerComponent.cs b/src/Umbraco.Core/Logging/Viewer/LogViewerComponent.cs new file mode 100644 index 0000000000..5c22ae9282 --- /dev/null +++ b/src/Umbraco.Core/Logging/Viewer/LogViewerComponent.cs @@ -0,0 +1,14 @@ +using Umbraco.Core.Components; +using Umbraco.Core.Composing; + +namespace Umbraco.Core.Logging.Viewer +{ + [RuntimeLevel(MinLevel = RuntimeLevel.Run)] + public class LogViewerComponent : UmbracoComponentBase, IUmbracoCoreComponent + { + public override void Compose(Composition composition) + { + composition.Container.RegisterSingleton(); + } + } +} diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 9ffb0161d9..42b893aea2 100644 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -337,7 +337,9 @@ - + + + diff --git a/src/Umbraco.Web/Editors/LogsController.cs b/src/Umbraco.Web/Editors/LogsController.cs index 96add77d66..a649dffde0 100644 --- a/src/Umbraco.Web/Editors/LogsController.cs +++ b/src/Umbraco.Web/Editors/LogsController.cs @@ -1,20 +1,21 @@ -using System.Web.Mvc; +using System.Collections.Generic; +using System.Web.Mvc; using Umbraco.Core.Logging.Viewer; using Umbraco.Web.Mvc; namespace Umbraco.Web.Editors { /// - /// Backoffice controller supporting the dashboard for language administration. + /// Backoffice controller supporting the dashboard for viewing logs with some simple graphs & filtering /// [PluginController("UmbracoApi")] public class LogsController : UmbracoAuthorizedJsonController { - private LogViewer _logViewer; + private ILogViewer _logViewer; - public LogsController() + public LogsController(ILogViewer logViewer) { - _logViewer = new LogViewer(); + _logViewer = logViewer; } [HttpGet] @@ -22,11 +23,24 @@ namespace Umbraco.Web.Editors { return _logViewer.GetNumberOfErrors(); } - + [HttpGet] public LogLevelCounts GetLogLevelCounts() { return _logViewer.GetLogLevelCounts(); } + + [HttpGet] + public IEnumerable GetCommonLogMessages() + { + return _logViewer.GetCommonLogMessages(); + } + + [HttpGet] + public IEnumerable GetLogs() + { + return _logViewer.GetLogs(); + } + } } From 50e3f84759ba0c8523637e6837600d4b9f6bb742 Mon Sep 17 00:00:00 2001 From: Warren Date: Tue, 28 Aug 2018 18:29:05 +0100 Subject: [PATCH 008/437] As new extension method - to set order by descending or ascending with a property --- src/Umbraco.Core/EnumerableExtensions.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Umbraco.Core/EnumerableExtensions.cs b/src/Umbraco.Core/EnumerableExtensions.cs index 0d199d1d0d..e5c82e807f 100644 --- a/src/Umbraco.Core/EnumerableExtensions.cs +++ b/src/Umbraco.Core/EnumerableExtensions.cs @@ -6,6 +6,7 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Text; using Umbraco.Core.Logging; +using Umbraco.Core.Persistence.DatabaseModelDefinitions; namespace Umbraco.Core { @@ -341,5 +342,10 @@ namespace Umbraco.Core yield return value; } } + + public static IOrderedEnumerable OrderBy(this IEnumerable source, Func keySelector, Direction sortOrder) + { + return sortOrder == Direction.Ascending ? source.OrderBy(keySelector) : source.OrderByDescending(keySelector); + } } } From 4ce33c4e3de2f96095bf2bfe898b88f1d089ee8e Mon Sep 17 00:00:00 2001 From: Warren Date: Tue, 28 Aug 2018 18:30:58 +0100 Subject: [PATCH 009/437] Updates signature with start/end date and prep for returning paginated logs items --- src/Umbraco.Core/Logging/Viewer/ILogViewer.cs | 22 ++++-- .../Logging/Viewer/JsonLogViewer.cs | 79 +++++++++++-------- src/Umbraco.Web.UI.Client/package-lock.json | 28 +++++-- src/Umbraco.Web/Editors/LogsController.cs | 14 ++-- 4 files changed, 90 insertions(+), 53 deletions(-) diff --git a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs index 1b7016307d..ff2c583db7 100644 --- a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs @@ -1,29 +1,39 @@ -using System.Collections.Generic; +using Serilog.Events; +using System; +using System.Collections.Generic; +using Umbraco.Core.Models; +using Umbraco.Core.Persistence.DatabaseModelDefinitions; namespace Umbraco.Core.Logging.Viewer { public interface ILogViewer { + /// + /// Get all logs from your chosen datasource back as Serilog LogEvents + /// + IEnumerable GetAllLogs(DateTime startDate, DateTime endDate); + /// /// A count of number of errors /// By counting Warnings with Exceptions, Errors & Fatal messages /// - int GetNumberOfErrors(); + int GetNumberOfErrors(DateTime startDate, DateTime endDate); /// /// Returns a number of the different log level entries /// - LogLevelCounts GetLogLevelCounts(); + LogLevelCounts GetLogLevelCounts(DateTime startDate, DateTime endDate); /// - /// Returns the top common log message templates and their counts + /// Returns the top 10 common log message templates and their counts /// - IEnumerable GetCommonLogMessages(int numberOfResults = 10); + IEnumerable GetCommonLogMessages(DateTime startDate, DateTime endDate, int numberOfResults = 10); /// /// Returns the collection of logs /// - IEnumerable GetLogs(); + PagedResult GetLogs(DateTime startDate, DateTime endDate, + int pageNumber = 1, int pageSize = 100, Direction orderDirection = Direction.Descending); } } diff --git a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs index b7d13777c8..a59847de9a 100644 --- a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs @@ -4,15 +4,17 @@ using System.IO; using System.Linq; using Serilog.Events; using Serilog.Formatting.Compact.Reader; +using Umbraco.Core.Models; +using Umbraco.Core.Persistence.DatabaseModelDefinitions; namespace Umbraco.Core.Logging.Viewer { public class JsonLogViewer : ILogViewer { - private List _logs = new List(); - - public JsonLogViewer() + + public IEnumerable GetAllLogs(DateTime startDate, DateTime endDate) { + var logs = new List(); var filePath = $@"{AppDomain.CurrentDomain.BaseDirectory}\App_Data\Logs\UmbracoTraceLog.DELLBOOK.20180828.json"; //Open log file @@ -20,37 +22,42 @@ namespace Umbraco.Core.Logging.Viewer { using (var stream = new StreamReader(fs)) { - + var reader = new LogEventReader(stream); LogEvent evt; while (reader.TryRead(out evt)) { - _logs.Add(evt); + logs.Add(evt); } } } + + return logs; } - public int GetNumberOfErrors() + public int GetNumberOfErrors(DateTime startDate, DateTime endDate) { - return _logs.Count(x => x.Level == LogEventLevel.Fatal && x.Level == LogEventLevel.Error && x.Exception != null); + var logs = GetAllLogs(startDate, endDate); + return logs.Count(x => x.Level == LogEventLevel.Fatal && x.Level == LogEventLevel.Error && x.Exception != null); } - public LogLevelCounts GetLogLevelCounts() + public LogLevelCounts GetLogLevelCounts(DateTime startDate, DateTime endDate) { + var logs = GetAllLogs(startDate, endDate); return new LogLevelCounts { - Information = _logs.Count(x => x.Level == LogEventLevel.Information), - Debug = _logs.Count(x => x.Level == LogEventLevel.Debug), - Warning = _logs.Count(x => x.Level == LogEventLevel.Warning), - Error = _logs.Count(x => x.Level == LogEventLevel.Error), - Fatal = _logs.Count(x => x.Level == LogEventLevel.Fatal) + Information = logs.Count(x => x.Level == LogEventLevel.Information), + Debug = logs.Count(x => x.Level == LogEventLevel.Debug), + Warning = logs.Count(x => x.Level == LogEventLevel.Warning), + Error = logs.Count(x => x.Level == LogEventLevel.Error), + Fatal = logs.Count(x => x.Level == LogEventLevel.Fatal) }; } - public IEnumerable GetCommonLogMessages(int numberOfResults) + public IEnumerable GetCommonLogMessages(DateTime startDate, DateTime endDate, int numberOfResults) { - var templates = _logs.GroupBy(x => x.MessageTemplate.Text) + var logs = GetAllLogs(startDate, endDate); + var templates = logs.GroupBy(x => x.MessageTemplate.Text) .Select(g => new CommonLogMessage { MessageTemplate = g.Key, Count = g.Count() }) .OrderByDescending(x => x.Count) .Take(numberOfResults); @@ -58,27 +65,31 @@ namespace Umbraco.Core.Logging.Viewer return templates; } - public IEnumerable GetLogs() - { - var messages = new List(); - var logs = _logs.Take(20); + public PagedResult GetLogs(DateTime startDate, DateTime endDate, int pageNumber = 1, int pageSize = 100, Direction orderDirection = Direction.Descending) + { + //Get all logs into memory (Not sure this good or not) + var logs = GetAllLogs(startDate, endDate); + long totalRecords = logs.Count(); + long pageIndex = pageNumber - 1; + + //Skip, Take & Select + var logItems = logs + .OrderBy(l => l.Timestamp, orderDirection) + .Skip(pageSize * pageNumber) + .Take(pageSize) + .Select(x => new LogMessage { + Timestamp = x.Timestamp, + Level = x.Level, + MessageTemplateText = x.MessageTemplate.Text, + Exception = x.Exception, + Properties = x.Properties, + RenderedMessage = x.RenderMessage() + }); - foreach(var log in logs) + return new PagedResult(totalRecords, pageNumber, pageSize) { - var logItem = new LogMessage - { - Level = log.Level, - Properties = log.Properties, - Timestamp = log.Timestamp, - MessageTemplateText = log.MessageTemplate.Text, //Not necesarily worried about token position just the message text itself - RenderedMessage = log.RenderMessage(), //Not returning LogEvent itself from Serilog (as we don't get the rendered txt log back) - Exception = log.Exception - }; - - messages.Add(logItem); - } - - return messages; + Items = logItems + }; } } } diff --git a/src/Umbraco.Web.UI.Client/package-lock.json b/src/Umbraco.Web.UI.Client/package-lock.json index 131dcd3404..fba504d87c 100644 --- a/src/Umbraco.Web.UI.Client/package-lock.json +++ b/src/Umbraco.Web.UI.Client/package-lock.json @@ -4582,12 +4582,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -4602,17 +4604,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -4729,7 +4734,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -4741,6 +4747,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -4755,6 +4762,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -4762,12 +4770,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -4786,6 +4796,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -4866,7 +4877,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -4878,6 +4890,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -4999,6 +5012,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", diff --git a/src/Umbraco.Web/Editors/LogsController.cs b/src/Umbraco.Web/Editors/LogsController.cs index a649dffde0..c1ca023cad 100644 --- a/src/Umbraco.Web/Editors/LogsController.cs +++ b/src/Umbraco.Web/Editors/LogsController.cs @@ -1,6 +1,8 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Web.Mvc; using Umbraco.Core.Logging.Viewer; +using Umbraco.Core.Models; using Umbraco.Web.Mvc; namespace Umbraco.Web.Editors @@ -21,25 +23,25 @@ namespace Umbraco.Web.Editors [HttpGet] public int GetNumberOfErrors() { - return _logViewer.GetNumberOfErrors(); + return _logViewer.GetNumberOfErrors(startDate: DateTime.Now, endDate: DateTime.Now); } [HttpGet] public LogLevelCounts GetLogLevelCounts() { - return _logViewer.GetLogLevelCounts(); + return _logViewer.GetLogLevelCounts(startDate: DateTime.Now, endDate: DateTime.Now); } [HttpGet] public IEnumerable GetCommonLogMessages() { - return _logViewer.GetCommonLogMessages(); + return _logViewer.GetCommonLogMessages(startDate: DateTime.Now, endDate: DateTime.Now); } [HttpGet] - public IEnumerable GetLogs() + public PagedResult GetLogs() { - return _logViewer.GetLogs(); + return _logViewer.GetLogs(startDate: DateTime.Now, endDate: DateTime.Now); } } From 424ae7bb91701cc31d52e156cf5eb8044c562abc Mon Sep 17 00:00:00 2001 From: Warren Date: Tue, 28 Aug 2018 21:12:38 +0100 Subject: [PATCH 010/437] WIP to open a range of log files --- src/Umbraco.Core/Logging/Viewer/ILogViewer.cs | 10 ++-- .../Logging/Viewer/JsonLogViewer.cs | 49 +++++++++++++------ 2 files changed, 39 insertions(+), 20 deletions(-) diff --git a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs index ff2c583db7..a8ae6a5b3f 100644 --- a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs @@ -11,28 +11,28 @@ namespace Umbraco.Core.Logging.Viewer /// /// Get all logs from your chosen datasource back as Serilog LogEvents /// - IEnumerable GetAllLogs(DateTime startDate, DateTime endDate); + IEnumerable GetAllLogs(DateTimeOffset startDate, DateTimeOffset endDate); /// /// A count of number of errors /// By counting Warnings with Exceptions, Errors & Fatal messages /// - int GetNumberOfErrors(DateTime startDate, DateTime endDate); + int GetNumberOfErrors(DateTimeOffset startDate, DateTimeOffset endDate); /// /// Returns a number of the different log level entries /// - LogLevelCounts GetLogLevelCounts(DateTime startDate, DateTime endDate); + LogLevelCounts GetLogLevelCounts(DateTimeOffset startDate, DateTimeOffset endDate); /// /// Returns the top 10 common log message templates and their counts /// - IEnumerable GetCommonLogMessages(DateTime startDate, DateTime endDate, int numberOfResults = 10); + IEnumerable GetCommonLogMessages(DateTimeOffset startDate, DateTimeOffset endDate, int numberOfResults = 10); /// /// Returns the collection of logs /// - PagedResult GetLogs(DateTime startDate, DateTime endDate, + PagedResult GetLogs(DateTimeOffset startDate, DateTimeOffset endDate, int pageNumber = 1, int pageSize = 100, Direction orderDirection = Direction.Descending); } diff --git a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs index a59847de9a..adc6064e21 100644 --- a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs @@ -12,36 +12,55 @@ namespace Umbraco.Core.Logging.Viewer public class JsonLogViewer : ILogViewer { - public IEnumerable GetAllLogs(DateTime startDate, DateTime endDate) + public IEnumerable GetAllLogs(DateTimeOffset startDate, DateTimeOffset endDate) { var logs = new List(); - var filePath = $@"{AppDomain.CurrentDomain.BaseDirectory}\App_Data\Logs\UmbracoTraceLog.DELLBOOK.20180828.json"; - //Open log file - using (var fs = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) + //Open the JSON log file for the range of dates (and exclude machinename) Could be several for LB + var dateRange = endDate - startDate; + + //Log Directory + var logDirectory = $@"{AppDomain.CurrentDomain.BaseDirectory}\App_Data\Logs\"; + + //foreach full day in the range - see if we can find one or more filenames that end with + //yyyyMMdd.json - Ends with due to MachineName in filenames - could be 1 or more due to load balancing + for (var day = startDate.Date; day.Date <= endDate.Date; day = day.AddDays(1)) { - using (var stream = new StreamReader(fs)) - { + //Filename ending to search for (As could be multiple) + var filesToFind = $"*{day.ToString("yyyyMMdd")}.json"; - var reader = new LogEventReader(stream); - LogEvent evt; - while (reader.TryRead(out evt)) + var filesForCurrentDay = Directory.GetFiles(logDirectory, filesToFind); + + //Foreach file we find - open it + foreach(var filePath in filesForCurrentDay) + { + //Open log file & add contents to the log collection + //Which we then use LINQ to page over + using (var fs = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) { - logs.Add(evt); + using (var stream = new StreamReader(fs)) + { + var reader = new LogEventReader(stream); + LogEvent evt; + while (reader.TryRead(out evt)) + { + logs.Add(evt); + } + } } } } - + return logs; } - public int GetNumberOfErrors(DateTime startDate, DateTime endDate) + public int GetNumberOfErrors(DateTimeOffset startDate, DateTimeOffset endDate) { var logs = GetAllLogs(startDate, endDate); return logs.Count(x => x.Level == LogEventLevel.Fatal && x.Level == LogEventLevel.Error && x.Exception != null); } - public LogLevelCounts GetLogLevelCounts(DateTime startDate, DateTime endDate) + public LogLevelCounts GetLogLevelCounts(DateTimeOffset startDate, DateTimeOffset endDate) { var logs = GetAllLogs(startDate, endDate); return new LogLevelCounts @@ -54,7 +73,7 @@ namespace Umbraco.Core.Logging.Viewer }; } - public IEnumerable GetCommonLogMessages(DateTime startDate, DateTime endDate, int numberOfResults) + public IEnumerable GetCommonLogMessages(DateTimeOffset startDate, DateTimeOffset endDate, int numberOfResults) { var logs = GetAllLogs(startDate, endDate); var templates = logs.GroupBy(x => x.MessageTemplate.Text) @@ -65,7 +84,7 @@ namespace Umbraco.Core.Logging.Viewer return templates; } - public PagedResult GetLogs(DateTime startDate, DateTime endDate, int pageNumber = 1, int pageSize = 100, Direction orderDirection = Direction.Descending) + public PagedResult GetLogs(DateTimeOffset startDate, DateTimeOffset endDate, int pageNumber = 1, int pageSize = 100, Direction orderDirection = Direction.Descending) { //Get all logs into memory (Not sure this good or not) var logs = GetAllLogs(startDate, endDate); From fcf8290df97fed1cc7e8513adbfa1f2d7c2eac04 Mon Sep 17 00:00:00 2001 From: Warren Date: Wed, 29 Aug 2018 18:37:37 +0100 Subject: [PATCH 011/437] Update WebAPI method for GetLogs so that we can test out some Expression filter queries in POSTMAN --- src/Umbraco.Core/Logging/Viewer/ILogViewer.cs | 5 ++++- src/Umbraco.Web/Editors/LogsController.cs | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs index a8ae6a5b3f..2af1313097 100644 --- a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs @@ -33,7 +33,10 @@ namespace Umbraco.Core.Logging.Viewer /// Returns the collection of logs /// PagedResult GetLogs(DateTimeOffset startDate, DateTimeOffset endDate, - int pageNumber = 1, int pageSize = 100, Direction orderDirection = Direction.Descending); + int pageNumber = 1, + int pageSize = 100, + Direction orderDirection = Direction.Descending, + string filterExpression = null); } } diff --git a/src/Umbraco.Web/Editors/LogsController.cs b/src/Umbraco.Web/Editors/LogsController.cs index c1ca023cad..fcdf1d6861 100644 --- a/src/Umbraco.Web/Editors/LogsController.cs +++ b/src/Umbraco.Web/Editors/LogsController.cs @@ -39,9 +39,9 @@ namespace Umbraco.Web.Editors } [HttpGet] - public PagedResult GetLogs() + public PagedResult GetLogs(int pageNumber = 1, string filterExpression = null) { - return _logViewer.GetLogs(startDate: DateTime.Now, endDate: DateTime.Now); + return _logViewer.GetLogs(startDate: DateTime.Now, endDate: DateTime.Now, filterExpression: filterExpression, pageNumber: pageNumber); } } From 38e8feb588e0d1fa5767efd261247636edc0904e Mon Sep 17 00:00:00 2001 From: Warren Date: Wed, 29 Aug 2018 18:42:12 +0100 Subject: [PATCH 012/437] Renames LogsController to LogViewerController to be more explicit only as we have a LogController already for audit logs --- .../Editors/{LogsController.cs => LogViewerController.cs} | 4 ++-- src/Umbraco.Web/Umbraco.Web.csproj | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename src/Umbraco.Web/Editors/{LogsController.cs => LogViewerController.cs} (91%) diff --git a/src/Umbraco.Web/Editors/LogsController.cs b/src/Umbraco.Web/Editors/LogViewerController.cs similarity index 91% rename from src/Umbraco.Web/Editors/LogsController.cs rename to src/Umbraco.Web/Editors/LogViewerController.cs index fcdf1d6861..417c5d22fc 100644 --- a/src/Umbraco.Web/Editors/LogsController.cs +++ b/src/Umbraco.Web/Editors/LogViewerController.cs @@ -11,11 +11,11 @@ namespace Umbraco.Web.Editors /// Backoffice controller supporting the dashboard for viewing logs with some simple graphs & filtering /// [PluginController("UmbracoApi")] - public class LogsController : UmbracoAuthorizedJsonController + public class LogViewerController : UmbracoAuthorizedJsonController { private ILogViewer _logViewer; - public LogsController(ILogViewer logViewer) + public LogViewerController(ILogViewer logViewer) { _logViewer = logViewer; } diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 55c1f12f0f..54e7398475 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -113,7 +113,7 @@ - + From cc915d6ef1245223e7f10fb823442e4ffda5ae85 Mon Sep 17 00:00:00 2001 From: Warren Date: Wed, 29 Aug 2018 19:01:26 +0100 Subject: [PATCH 013/437] Adds in URL to WebAPI/Editor to Umbraco.Sys global JS object --- src/Umbraco.Web/Editors/BackOfficeServerVariables.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs index 8eb1c4247f..431a3b8cb4 100644 --- a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs +++ b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs @@ -296,6 +296,10 @@ namespace Umbraco.Web.Editors { "languageApiBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl( controller => controller.GetAllLanguages()) + }, + { + "logViewerApiBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl( + controller => controller.GetNumberOfErrors()) } } }, From e4c76096750c82183a5dafaacf05ecdbf0d2bf0d Mon Sep 17 00:00:00 2001 From: Warren Date: Wed, 29 Aug 2018 19:11:20 +0100 Subject: [PATCH 014/437] Fixes paging and uses the same Serilog Expression filtering when setting up loggers to query the same LogEvents loaded into memory * StartsWith(SourceContext, 'Umbraco.Core') * StartsWith(SourceContext, 'Umbraco.Core') and @MessageTemplate='[Timing {TimingId}] {EndMessage} ({TimingDuration}ms)' * @MessageTemplate='[Timing {TimingId}] {EndMessage} ({TimingDuration}ms)' and TimingDuration > 1000 --- .../Logging/Viewer/JsonLogViewer.cs | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs index adc6064e21..905e21c45e 100644 --- a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using Serilog.Events; +using Serilog.Filters.Expressions; using Serilog.Formatting.Compact.Reader; using Umbraco.Core.Models; using Umbraco.Core.Persistence.DatabaseModelDefinitions; @@ -84,17 +85,31 @@ namespace Umbraco.Core.Logging.Viewer return templates; } - public PagedResult GetLogs(DateTimeOffset startDate, DateTimeOffset endDate, int pageNumber = 1, int pageSize = 100, Direction orderDirection = Direction.Descending) + public PagedResult GetLogs(DateTimeOffset startDate, DateTimeOffset endDate, + int pageNumber = 1, int pageSize = 100, + Direction orderDirection = Direction.Descending, + string filterExpression = null) { //Get all logs into memory (Not sure this good or not) var logs = GetAllLogs(startDate, endDate); + + //If we have a filter expression, apply it + if(string.IsNullOrEmpty(filterExpression) == false) + { + Func filter = null; + var eval = FilterLanguage.CreateFilter(filterExpression); + filter = evt => true.Equals(eval(evt)); + + logs = logs.Where(filter); + } + long totalRecords = logs.Count(); long pageIndex = pageNumber - 1; - //Skip, Take & Select - var logItems = logs + //Order By, Skip, Take & Select + IEnumerable logMessages = logs .OrderBy(l => l.Timestamp, orderDirection) - .Skip(pageSize * pageNumber) + .Skip(pageSize * (pageNumber -1)) .Take(pageSize) .Select(x => new LogMessage { Timestamp = x.Timestamp, @@ -107,7 +122,7 @@ namespace Umbraco.Core.Logging.Viewer return new PagedResult(totalRecords, pageNumber, pageSize) { - Items = logItems + Items = logMessages }; } } From cce70f139c0dddba6212efaabc770afc6063e16c Mon Sep 17 00:00:00 2001 From: Warren Date: Thu, 30 Aug 2018 09:59:53 +0100 Subject: [PATCH 015/437] Changed to LogViewer as Logs in solution refers to AuditLogs so this makes it more explicit --- src/Umbraco.Core/Constants-Applications.cs | 2 +- .../{logs => logviewer}/overview.controller.js | 15 +++++---------- .../src/views/{logs => logviewer}/overview.html | 2 +- src/Umbraco.Web.UI/config/trees.config | 2 +- ...eeController.cs => LogViewerTreeController.cs} | 8 ++++---- src/Umbraco.Web/Umbraco.Web.csproj | 2 +- 6 files changed, 13 insertions(+), 18 deletions(-) rename src/Umbraco.Web.UI.Client/src/views/{logs => logviewer}/overview.controller.js (76%) rename src/Umbraco.Web.UI.Client/src/views/{logs => logviewer}/overview.html (99%) rename src/Umbraco.Web/Trees/{LogsTreeController.cs => LogViewerTreeController.cs} (83%) diff --git a/src/Umbraco.Core/Constants-Applications.cs b/src/Umbraco.Core/Constants-Applications.cs index a3dd878d67..4040f52818 100644 --- a/src/Umbraco.Core/Constants-Applications.cs +++ b/src/Umbraco.Core/Constants-Applications.cs @@ -145,7 +145,7 @@ public const string PartialViewMacros = "partialViewMacros"; - public const string Logs = "logs"; + public const string LogViewer = "logViewer"; //TODO: Fill in the rest! } diff --git a/src/Umbraco.Web.UI.Client/src/views/logs/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js similarity index 76% rename from src/Umbraco.Web.UI.Client/src/views/logs/overview.controller.js rename to src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js index 61de9b625c..8c85b34980 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logs/overview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js @@ -1,26 +1,21 @@ (function () { "use strict"; - function LogsOverviewController($scope, $location, localizationService) { + function LogViewerOverviewController($scope, $location, localizationService) { var vm = this; vm.page = {}; vm.labels = {}; - + // ChartJS Options - for count/overview of log distribution vm.logTypeLabels = ["Info", "Debug", "Warning", "Error", "Critical"]; - vm.logTypeData = [500, 75, 10, 45, 2]; + vm.logTypeData = [0, 0, 0, 0, 0]; vm.logTypeColors = [ '#dcdcdc', '#97bbcd', '#46bfbd', '#fdb45c', '#f7464a']; - - vm.chartOptions = { legend: { display: true, - position: 'left', - labels: { - /*fontColor: 'rgb(255, 99, 132)'*/ - } + position: 'left' } }; @@ -56,6 +51,6 @@ } - angular.module("umbraco").controller("Umbraco.Editors.Logs.OverviewController", LogsOverviewController); + angular.module("umbraco").controller("Umbraco.Editors.LogViewer.OverviewController", LogViewerOverviewController); })(); diff --git a/src/Umbraco.Web.UI.Client/src/views/logs/overview.html b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html similarity index 99% rename from src/Umbraco.Web.UI.Client/src/views/logs/overview.html rename to src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html index d94ebc3a81..af69ad4d7c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logs/overview.html +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html @@ -1,4 +1,4 @@ -
+
diff --git a/src/Umbraco.Web.UI/config/trees.config b/src/Umbraco.Web.UI/config/trees.config index fe4075e096..fd32380bcb 100644 --- a/src/Umbraco.Web.UI/config/trees.config +++ b/src/Umbraco.Web.UI/config/trees.config @@ -22,7 +22,7 @@ - + diff --git a/src/Umbraco.Web/Trees/LogsTreeController.cs b/src/Umbraco.Web/Trees/LogViewerTreeController.cs similarity index 83% rename from src/Umbraco.Web/Trees/LogsTreeController.cs rename to src/Umbraco.Web/Trees/LogViewerTreeController.cs index e87d79da9f..a8cee48ac7 100644 --- a/src/Umbraco.Web/Trees/LogsTreeController.cs +++ b/src/Umbraco.Web/Trees/LogViewerTreeController.cs @@ -6,11 +6,11 @@ using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Trees { - [UmbracoTreeAuthorize(Constants.Trees.Logs)] - [Tree(Constants.Applications.Developer, Constants.Trees.Logs, null, sortOrder: 7)] + [UmbracoTreeAuthorize(Constants.Trees.LogViewer)] + [Tree(Constants.Applications.Developer, Constants.Trees.LogViewer, null, sortOrder: 7)] [PluginController("UmbracoTrees")] [CoreTree] - public class LogsTreeController : TreeController + public class LogViewerTreeController : TreeController { protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) { @@ -33,7 +33,7 @@ namespace Umbraco.Web.Trees var root = base.CreateRootNode(queryStrings); //this will load in a custom UI instead of the dashboard for the root node - root.RoutePath = string.Format("{0}/{1}/{2}", Constants.Applications.Developer, Constants.Trees.Logs, "overview"); + root.RoutePath = string.Format("{0}/{1}/{2}", Constants.Applications.Developer, Constants.Trees.LogViewer, "overview"); root.Icon = "icon-bug"; root.HasChildren = false; root.MenuUrl = null; diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 54e7398475..f2f13b9395 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -115,7 +115,7 @@ - + From 08618b653cd7a7ed1602ab87a09ba28a1d94f54d Mon Sep 17 00:00:00 2001 From: Warren Date: Thu, 30 Aug 2018 12:42:43 +0100 Subject: [PATCH 016/437] Gets the rough wrieframe to use real API data now * List number of total errors * Pie Chart of log level counts * Message counts * Log items with paging & searching --- .../common/resources/logviewer.resource.js | 72 +++++++++++++++ .../views/logviewer/overview.controller.js | 54 +++++++++-- .../src/views/logviewer/overview.html | 91 ++++++++----------- 3 files changed, 155 insertions(+), 62 deletions(-) create mode 100644 src/Umbraco.Web.UI.Client/src/common/resources/logviewer.resource.js diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/logviewer.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/logviewer.resource.js new file mode 100644 index 0000000000..d5a12bdf67 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/resources/logviewer.resource.js @@ -0,0 +1,72 @@ +/** + * @ngdoc service + * @name umbraco.resources.logViewerResource + * @description Retrives Umbraco log items (by default from JSON files on disk) + * + * + **/ + function logViewerResource($q, $http, umbRequestHelper) { + + //the factory object returned + return { + + getNumberOfErrors: function(){ + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "logViewerApiBaseUrl", + "GetNumberOfErrors")), + 'Failed to retrieve number of errors in logs') + }, + + getLogLevelCounts: function(){ + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "logViewerApiBaseUrl", + "GetLogLevelCounts")), + 'Failed to retrieve log level counts'); + }, + + getCommonLogMessages: function(){ + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "logViewerApiBaseUrl", + "GetCommonLogMessages")), + 'Failed to retrieve common log messages'); + }, + + getLogs: function(options){ + + var defaults = { + pageSize: 100, + pageNumber: 1, + orderDirection: "Descending", + filterExpression: '' + }; + + if (options === undefined) { + options = {}; + } + + //overwrite the defaults if there are any specified + angular.extend(defaults, options); + + //now copy back to the options we will use + options = defaults; + + + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "logViewerApiBaseUrl", + "GetLogs", + options)), + 'Failed to retrieve common log messages'); + } + + }; +} + +angular.module('umbraco.resources').factory('logViewerResource', logViewerResource); diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js index 8c85b34980..7abacccb2d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js @@ -1,13 +1,19 @@ (function () { "use strict"; - function LogViewerOverviewController($scope, $location, localizationService) { + function LogViewerOverviewController($scope, $location, localizationService, logViewerResource) { var vm = this; + vm.loading = false; vm.page = {}; vm.labels = {}; + vm.logItems = {}; + vm.numberOfErrors = 0; + vm.commonLogMessages = []; + vm.logOptions = {}; + // ChartJS Options - for count/overview of log distribution vm.logTypeLabels = ["Info", "Debug", "Warning", "Error", "Critical"]; vm.logTypeData = [0, 0, 0, 0, 0]; @@ -19,12 +25,33 @@ } }; - vm.editLanguage = editLanguage; + //Functions + vm.getLogs = getLogs; + vm.changePageNumber = changePageNumber; + vm.search = search; function init() { - vm.loading = true; + logViewerResource.getNumberOfErrors().then(function (data) { + vm.numberOfErrors = data; + }); + + logViewerResource.getLogLevelCounts().then(function (data) { + vm.logTypeData = []; + vm.logTypeData.push(data.Information); + vm.logTypeData.push(data.Debug); + vm.logTypeData.push(data.Warning); + vm.logTypeData.push(data.Error); + vm.logTypeData.push(data.Fatal); + }); + + logViewerResource.getCommonLogMessages().then(function(data){ + vm.commonLogMessages = data; + }); + + //Get all logs on init load + getLogs(); // localize labels var labelKeys = [ @@ -40,11 +67,24 @@ // set page name vm.page.name = vm.labels.languages; }); + } + + + function search(){ + //Reset pagenumber back to 1 + vm.logOptions.pageNumber = 1; + getLogs(); } - - function editLanguage(language) { - $location.search('create', null); - $location.path("/settings/languages/edit/" + language.id); + + function changePageNumber(pageNumber) { + vm.logOptions.pageNumber = pageNumber; + getLogs(); + } + + function getLogs(){ + logViewerResource.getLogs(vm.logOptions).then(function (data) { + vm.logItems = data; + }); } init(); diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html index af69ad4d7c..96cde37b34 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html @@ -12,30 +12,40 @@ - + + + button-style="button" + type="button" + action="vm.search()" + label-key="general_search"> + -
+
+ + + + +
+
+ Total Items: {{ vm.logItems.totalItems }} +
- +
@@ -46,30 +56,25 @@ - - - - - + + + + + - - - - - - -
Timestamp
2018-08-24T08:27:06INFODELLBOOKSome info log message
{{ log.Timestamp }}{{ log.Level }}{{ log.Properties.MachineName.Value }}{{ log.RenderedMessage }}
2018-08-24T08:27:06INFODELLBOOKOrdered Components:
- Umbraco.Core.Runtime.CoreRuntimeComponent
- Umbraco.Web.Runtime.WebRuntimeComponent
- Umbraco.Core.Logging.WebProfilerComponent
- Umbraco.Core.Auditing.AuditEventsComponent
- Umbraco.Web.PublishedCache.NuCache.NuCacheComponent
- Umbraco.Core.Components.UmbracoCoreComponent -
+ +
+ + +
@@ -81,7 +86,7 @@ Number of Errors - 1234 + {{ vm.numberOfErrors }} @@ -101,42 +106,18 @@ - + Common Log Messages - + - - - - - - - - - - - - From 04f7b14702252cbdc514c5d82ae66256c3a70d60 Mon Sep 17 00:00:00 2001 From: Warren Date: Thu, 30 Aug 2018 14:27:31 +0100 Subject: [PATCH 017/437] * Click to toggle row to see the log properties & ex if present * Toggle timestamp order by ascending or descending --- .../views/logviewer/overview.controller.js | 9 +++++++- .../src/views/logviewer/overview.html | 22 ++++++++++++++++--- .../Editors/LogViewerController.cs | 6 +++-- 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js index 7abacccb2d..4b70ba1bec 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js @@ -1,7 +1,7 @@ (function () { "use strict"; - function LogViewerOverviewController($scope, $location, localizationService, logViewerResource) { + function LogViewerOverviewController($scope, localizationService, logViewerResource) { var vm = this; @@ -13,6 +13,7 @@ vm.numberOfErrors = 0; vm.commonLogMessages = []; vm.logOptions = {}; + vm.logOptions.orderDirection = 'Descending'; // ChartJS Options - for count/overview of log distribution vm.logTypeLabels = ["Info", "Debug", "Warning", "Error", "Critical"]; @@ -29,6 +30,7 @@ vm.getLogs = getLogs; vm.changePageNumber = changePageNumber; vm.search = search; + vm.updateSort = updateSort; function init() { @@ -81,6 +83,11 @@ getLogs(); } + function updateSort() { + //vm.logOptions.orderDirection + getLogs(); + } + function getLogs(){ logViewerResource.getLogs(vm.logOptions).then(function (data) { vm.logItems = data; diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html index 96cde37b34..a4bc8e06d1 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html @@ -25,6 +25,10 @@ label-key="general_search"> + Sort by timestamp + Ascending + Descending + @@ -52,16 +56,28 @@ - - + - + + +
- [Timing {TimingId}] {EndMessage} ({TimingDuration}ms) + {{ template.MessageTemplate }} - 1234 -
- [Timing {TimingId}] {StartMessage} - - 487 -
- The tree definition: {AddElement} could not be resolved to a .Net object type - - 360 -
- Getting {TypeName}: found a cached type list. - - 145 + {{ template.Count }}
Level Machine Name Message
{{ log.Timestamp }} {{ log.Level }} {{ log.Properties.MachineName.Value }} {{ log.RenderedMessage }}
+
+

Exception

+ TODO: Make this a red box or something?! + {{ log.Exception }} +
+ +

Properties

+
+ {{ key }} {{ val.Value }} +
+
diff --git a/src/Umbraco.Web/Editors/LogViewerController.cs b/src/Umbraco.Web/Editors/LogViewerController.cs index 417c5d22fc..319e7a6dd9 100644 --- a/src/Umbraco.Web/Editors/LogViewerController.cs +++ b/src/Umbraco.Web/Editors/LogViewerController.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Web.Mvc; using Umbraco.Core.Logging.Viewer; using Umbraco.Core.Models; +using Umbraco.Core.Persistence.DatabaseModelDefinitions; using Umbraco.Web.Mvc; namespace Umbraco.Web.Editors @@ -39,9 +40,10 @@ namespace Umbraco.Web.Editors } [HttpGet] - public PagedResult GetLogs(int pageNumber = 1, string filterExpression = null) + public PagedResult GetLogs(string orderDirection = "Descending", int pageNumber = 1, string filterExpression = null) { - return _logViewer.GetLogs(startDate: DateTime.Now, endDate: DateTime.Now, filterExpression: filterExpression, pageNumber: pageNumber); + var direction = orderDirection == "Descending" ? Direction.Descending : Direction.Ascending; + return _logViewer.GetLogs(startDate: DateTime.Now, endDate: DateTime.Now, filterExpression: filterExpression, pageNumber: pageNumber, orderDirection: direction); } } From c3fa12be6e4d03aaaeea2908302640cc0c5b3896 Mon Sep 17 00:00:00 2001 From: Warren Date: Thu, 30 Aug 2018 16:24:34 +0100 Subject: [PATCH 018/437] Exception needs to be a string as Serilog cant easily convert JSON serialised EX back to proper exceptions so we call ToString on it instead --- src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs | 4 ++-- src/Umbraco.Core/Logging/Viewer/LogMessage.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs index 905e21c45e..b3f4b352d1 100644 --- a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs @@ -58,7 +58,7 @@ namespace Umbraco.Core.Logging.Viewer public int GetNumberOfErrors(DateTimeOffset startDate, DateTimeOffset endDate) { var logs = GetAllLogs(startDate, endDate); - return logs.Count(x => x.Level == LogEventLevel.Fatal && x.Level == LogEventLevel.Error && x.Exception != null); + return logs.Count(x => x.Level == LogEventLevel.Fatal || x.Level == LogEventLevel.Error || x.Exception != null); } public LogLevelCounts GetLogLevelCounts(DateTimeOffset startDate, DateTimeOffset endDate) @@ -115,7 +115,7 @@ namespace Umbraco.Core.Logging.Viewer Timestamp = x.Timestamp, Level = x.Level, MessageTemplateText = x.MessageTemplate.Text, - Exception = x.Exception, + Exception = x.Exception?.ToString(), Properties = x.Properties, RenderedMessage = x.RenderMessage() }); diff --git a/src/Umbraco.Core/Logging/Viewer/LogMessage.cs b/src/Umbraco.Core/Logging/Viewer/LogMessage.cs index 86d136be43..c03b26fa98 100644 --- a/src/Umbraco.Core/Logging/Viewer/LogMessage.cs +++ b/src/Umbraco.Core/Logging/Viewer/LogMessage.cs @@ -37,6 +37,6 @@ namespace Umbraco.Core.Logging.Viewer /// /// An exception associated with the logevent, or null. /// - public Exception Exception { get; set; } + public string Exception { get; set; } } } From b15e8a13db09eb1d861c87ea4afad2c3ca86d280 Mon Sep 17 00:00:00 2001 From: Warren Date: Thu, 30 Aug 2018 16:26:11 +0100 Subject: [PATCH 019/437] * Attempt to get date picker components setup * Output ex nicer * Add log level colours to badges * Output date in friendlier format --- .../views/logviewer/overview.controller.js | 51 +++++++++++++++++++ .../src/views/logviewer/overview.html | 27 ++++++++-- 2 files changed, 73 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js index 4b70ba1bec..f9da8bc64a 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js @@ -26,6 +26,33 @@ } }; + vm.fromDatePickerConfig = { + pickDate: true, + pickTime: true, + useSeconds: false, + useCurrent: false, + format: "YYYY-MM-DD HH:mm", + icons: { + time: "icon-time", + date: "icon-calendar", + up: "icon-chevron-up", + down: "icon-chevron-down" + } + }; + + vm.toDatePickerConfig = { + pickDate: true, + pickTime: true, + useSeconds: false, + format: "YYYY-MM-DD HH:mm", + icons: { + time: "icon-time", + date: "icon-calendar", + up: "icon-chevron-up", + down: "icon-chevron-down" + } + }; + //Functions vm.getLogs = getLogs; vm.changePageNumber = changePageNumber; @@ -91,6 +118,30 @@ function getLogs(){ logViewerResource.getLogs(vm.logOptions).then(function (data) { vm.logItems = data; + + setLogTypeColor( vm.logItems.items); + }); + } + + function setLogTypeColor(logItems) { + angular.forEach(logItems, function (log) { + switch (log.Level) { + case "Information": + log.logTypeColor = "primary"; + break; + case "Debug": + log.logTypeColor = "secondary"; + break; + case "Warning": + log.logTypeColor = "warning"; + break; + case "Fatal": + case "Error": + log.logTypeColor = "danger"; + break; + default: + log.logTypeColor = "gray"; + } }); } diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html index a4bc8e06d1..f54c7fc0a5 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html @@ -31,6 +31,24 @@ + + + From + + + + To + + + + + @@ -60,17 +78,16 @@ - {{ log.Timestamp }} - {{ log.Level }} + {{ log.Timestamp | date:'medium' }} + {{ log.Level }} {{ log.Properties.MachineName.Value }} {{ log.RenderedMessage }} -
+

Exception

- TODO: Make this a red box or something?! - {{ log.Exception }} +

{{ log.Exception }}

Properties

From 20cf8a7637f67c5520857537bc915dd6c5dc5587 Mon Sep 17 00:00:00 2001 From: Warren Date: Fri, 31 Aug 2018 21:57:51 +0100 Subject: [PATCH 020/437] Create a base class - so we can have the GetLogs implemented by 3rd party devs. Say from Azure Table Storage for example --- .../Logging/Viewer/JsonLogViewer.cs | 78 +---------------- .../Logging/Viewer/LogViewerSourceBase.cs | 87 +++++++++++++++++++ src/Umbraco.Core/Umbraco.Core.csproj | 1 + 3 files changed, 90 insertions(+), 76 deletions(-) create mode 100644 src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs diff --git a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs index b3f4b352d1..6d27e04c57 100644 --- a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs @@ -1,19 +1,15 @@ using System; using System.Collections.Generic; using System.IO; -using System.Linq; using Serilog.Events; -using Serilog.Filters.Expressions; using Serilog.Formatting.Compact.Reader; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; namespace Umbraco.Core.Logging.Viewer { - public class JsonLogViewer : ILogViewer + public class JsonLogViewer : LogViewerSourceBase { - public IEnumerable GetAllLogs(DateTimeOffset startDate, DateTimeOffset endDate) + public override IEnumerable GetAllLogs(DateTimeOffset startDate, DateTimeOffset endDate) { var logs = new List(); @@ -55,75 +51,5 @@ namespace Umbraco.Core.Logging.Viewer return logs; } - public int GetNumberOfErrors(DateTimeOffset startDate, DateTimeOffset endDate) - { - var logs = GetAllLogs(startDate, endDate); - return logs.Count(x => x.Level == LogEventLevel.Fatal || x.Level == LogEventLevel.Error || x.Exception != null); - } - - public LogLevelCounts GetLogLevelCounts(DateTimeOffset startDate, DateTimeOffset endDate) - { - var logs = GetAllLogs(startDate, endDate); - return new LogLevelCounts - { - Information = logs.Count(x => x.Level == LogEventLevel.Information), - Debug = logs.Count(x => x.Level == LogEventLevel.Debug), - Warning = logs.Count(x => x.Level == LogEventLevel.Warning), - Error = logs.Count(x => x.Level == LogEventLevel.Error), - Fatal = logs.Count(x => x.Level == LogEventLevel.Fatal) - }; - } - - public IEnumerable GetCommonLogMessages(DateTimeOffset startDate, DateTimeOffset endDate, int numberOfResults) - { - var logs = GetAllLogs(startDate, endDate); - var templates = logs.GroupBy(x => x.MessageTemplate.Text) - .Select(g => new CommonLogMessage { MessageTemplate = g.Key, Count = g.Count() }) - .OrderByDescending(x => x.Count) - .Take(numberOfResults); - - return templates; - } - - public PagedResult GetLogs(DateTimeOffset startDate, DateTimeOffset endDate, - int pageNumber = 1, int pageSize = 100, - Direction orderDirection = Direction.Descending, - string filterExpression = null) - { - //Get all logs into memory (Not sure this good or not) - var logs = GetAllLogs(startDate, endDate); - - //If we have a filter expression, apply it - if(string.IsNullOrEmpty(filterExpression) == false) - { - Func filter = null; - var eval = FilterLanguage.CreateFilter(filterExpression); - filter = evt => true.Equals(eval(evt)); - - logs = logs.Where(filter); - } - - long totalRecords = logs.Count(); - long pageIndex = pageNumber - 1; - - //Order By, Skip, Take & Select - IEnumerable logMessages = logs - .OrderBy(l => l.Timestamp, orderDirection) - .Skip(pageSize * (pageNumber -1)) - .Take(pageSize) - .Select(x => new LogMessage { - Timestamp = x.Timestamp, - Level = x.Level, - MessageTemplateText = x.MessageTemplate.Text, - Exception = x.Exception?.ToString(), - Properties = x.Properties, - RenderedMessage = x.RenderMessage() - }); - - return new PagedResult(totalRecords, pageNumber, pageSize) - { - Items = logMessages - }; - } } } diff --git a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs new file mode 100644 index 0000000000..089c83f33e --- /dev/null +++ b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Serilog.Events; +using Serilog.Filters.Expressions; +using Umbraco.Core.Models; +using Umbraco.Core.Persistence.DatabaseModelDefinitions; + +namespace Umbraco.Core.Logging.Viewer +{ + public abstract class LogViewerSourceBase : ILogViewer + { + public abstract IEnumerable GetAllLogs(DateTimeOffset startDate, DateTimeOffset endDate); + + public int GetNumberOfErrors(DateTimeOffset startDate, DateTimeOffset endDate) + { + var logs = GetAllLogs(startDate, endDate); + return logs.Count(x => x.Level == LogEventLevel.Fatal || x.Level == LogEventLevel.Error || x.Exception != null); + } + + public LogLevelCounts GetLogLevelCounts(DateTimeOffset startDate, DateTimeOffset endDate) + { + var logs = GetAllLogs(startDate, endDate); + return new LogLevelCounts + { + Information = logs.Count(x => x.Level == LogEventLevel.Information), + Debug = logs.Count(x => x.Level == LogEventLevel.Debug), + Warning = logs.Count(x => x.Level == LogEventLevel.Warning), + Error = logs.Count(x => x.Level == LogEventLevel.Error), + Fatal = logs.Count(x => x.Level == LogEventLevel.Fatal) + }; + } + + public IEnumerable GetCommonLogMessages(DateTimeOffset startDate, DateTimeOffset endDate, int numberOfResults) + { + var logs = GetAllLogs(startDate, endDate); + var templates = logs.GroupBy(x => x.MessageTemplate.Text) + .Select(g => new CommonLogMessage { MessageTemplate = g.Key, Count = g.Count() }) + .OrderByDescending(x => x.Count) + .Take(numberOfResults); + + return templates; + } + + public PagedResult GetLogs(DateTimeOffset startDate, DateTimeOffset endDate, + int pageNumber = 1, int pageSize = 100, + Direction orderDirection = Direction.Descending, + string filterExpression = null) + { + //Get all logs into memory (Not sure this good or not) + var logs = GetAllLogs(startDate, endDate); + + //If we have a filter expression, apply it + if (string.IsNullOrEmpty(filterExpression) == false) + { + Func filter = null; + var eval = FilterLanguage.CreateFilter(filterExpression); + filter = evt => true.Equals(eval(evt)); + + logs = logs.Where(filter); + } + + long totalRecords = logs.Count(); + long pageIndex = pageNumber - 1; + + //Order By, Skip, Take & Select + IEnumerable logMessages = logs + .OrderBy(l => l.Timestamp, orderDirection) + .Skip(pageSize * (pageNumber - 1)) + .Take(pageSize) + .Select(x => new LogMessage + { + Timestamp = x.Timestamp, + Level = x.Level, + MessageTemplateText = x.MessageTemplate.Text, + Exception = x.Exception?.ToString(), + Properties = x.Properties, + RenderedMessage = x.RenderMessage() + }); + + return new PagedResult(totalRecords, pageNumber, pageSize) + { + Items = logMessages + }; + } + } +} diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 78a6d57d52..304be5fb1d 100644 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -340,6 +340,7 @@ + From 96d76c211c849e78a06da6db5ec7f3639bb3d09c Mon Sep 17 00:00:00 2001 From: Warren Date: Mon, 3 Sep 2018 21:29:13 +0100 Subject: [PATCH 021/437] Adds in support for log level filtering - rather than using expressions --- src/Umbraco.Core/Logging/Viewer/ILogViewer.cs | 3 ++- .../Logging/Viewer/LogViewerSourceBase.cs | 15 ++++++++++++++- src/Umbraco.Web/Editors/LogViewerController.cs | 12 ++++++------ 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs index 2af1313097..ed5ca8f806 100644 --- a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs @@ -36,7 +36,8 @@ namespace Umbraco.Core.Logging.Viewer int pageNumber = 1, int pageSize = 100, Direction orderDirection = Direction.Descending, - string filterExpression = null); + string filterExpression = null, + string[] logLevels = null); } } diff --git a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs index 089c83f33e..2270143da2 100644 --- a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs +++ b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs @@ -45,7 +45,8 @@ namespace Umbraco.Core.Logging.Viewer public PagedResult GetLogs(DateTimeOffset startDate, DateTimeOffset endDate, int pageNumber = 1, int pageSize = 100, Direction orderDirection = Direction.Descending, - string filterExpression = null) + string filterExpression = null, + string[] logLevels = null) { //Get all logs into memory (Not sure this good or not) var logs = GetAllLogs(startDate, endDate); @@ -60,6 +61,18 @@ namespace Umbraco.Core.Logging.Viewer logs = logs.Where(filter); } + //This is user used the checkbox UI to toggle which log levels they wish to see + //If an empty array - its implied all levels to be viewed + if(logLevels.Length > 0) + { + var logsAfterLevelFilters = new List(); + foreach (var level in logLevels) + { + logsAfterLevelFilters.AddRange(logs.Where(x => x.Level.ToString() == level)); + } + logs = logsAfterLevelFilters; + } + long totalRecords = logs.Count(); long pageIndex = pageNumber - 1; diff --git a/src/Umbraco.Web/Editors/LogViewerController.cs b/src/Umbraco.Web/Editors/LogViewerController.cs index 319e7a6dd9..7cf3125ff5 100644 --- a/src/Umbraco.Web/Editors/LogViewerController.cs +++ b/src/Umbraco.Web/Editors/LogViewerController.cs @@ -1,6 +1,6 @@ using System; using System.Collections.Generic; -using System.Web.Mvc; +using System.Web.Http; using Umbraco.Core.Logging.Viewer; using Umbraco.Core.Models; using Umbraco.Core.Persistence.DatabaseModelDefinitions; @@ -24,26 +24,26 @@ namespace Umbraco.Web.Editors [HttpGet] public int GetNumberOfErrors() { - return _logViewer.GetNumberOfErrors(startDate: DateTime.Now, endDate: DateTime.Now); + return _logViewer.GetNumberOfErrors(startDate: DateTime.Now.AddDays(-1), endDate: DateTime.Now); } [HttpGet] public LogLevelCounts GetLogLevelCounts() { - return _logViewer.GetLogLevelCounts(startDate: DateTime.Now, endDate: DateTime.Now); + return _logViewer.GetLogLevelCounts(startDate: DateTime.Now.AddDays(-1), endDate: DateTime.Now); } [HttpGet] public IEnumerable GetCommonLogMessages() { - return _logViewer.GetCommonLogMessages(startDate: DateTime.Now, endDate: DateTime.Now); + return _logViewer.GetCommonLogMessages(startDate: DateTime.Now.AddDays(-1), endDate: DateTime.Now); } [HttpGet] - public PagedResult GetLogs(string orderDirection = "Descending", int pageNumber = 1, string filterExpression = null) + public PagedResult GetLogs(string orderDirection = "Descending", int pageNumber = 1, string filterExpression = null, [FromUri]string[] logLevels = null) { var direction = orderDirection == "Descending" ? Direction.Descending : Direction.Ascending; - return _logViewer.GetLogs(startDate: DateTime.Now, endDate: DateTime.Now, filterExpression: filterExpression, pageNumber: pageNumber, orderDirection: direction); + return _logViewer.GetLogs(startDate: DateTime.Now.AddDays(-1), endDate: DateTime.Now, filterExpression: filterExpression, pageNumber: pageNumber, orderDirection: direction, logLevels: logLevels); } } From ab3c5d4d52951951430da9fe837d19de6249d8d4 Mon Sep 17 00:00:00 2001 From: Warren Date: Mon, 3 Sep 2018 21:30:16 +0100 Subject: [PATCH 022/437] Adds in same UI from user overview filters - to add dropdown list of checkboxes to filter by log levels --- .../views/logviewer/overview.controller.js | 77 +++++++++++++++++-- .../src/views/logviewer/overview.html | 40 ++++++++-- 2 files changed, 105 insertions(+), 12 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js index f9da8bc64a..06cdce2e5f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js @@ -1,14 +1,37 @@ (function () { "use strict"; - function LogViewerOverviewController($scope, localizationService, logViewerResource) { + function LogViewerOverviewController($scope, $q, localizationService, logViewerResource) { var vm = this; vm.loading = false; + vm.logsLoading = false; + vm.page = {}; vm.labels = {}; + vm.logLevels = [ + { + name: 'Verbose' + }, + { + name: 'Debug' + }, + { + name: 'Information' + }, + { + name: 'Warning' + }, + { + name: 'Error' + }, + { + name: 'Fatal' + } + ]; + vm.logItems = {}; vm.numberOfErrors = 0; vm.commonLogMessages = []; @@ -58,15 +81,19 @@ vm.changePageNumber = changePageNumber; vm.search = search; vm.updateSort = updateSort; + vm.getFilterName = getFilterName; + vm.setLogLevelFilter = setLogLevelFilter; function init() { - logViewerResource.getNumberOfErrors().then(function (data) { + vm.loading = true; + + var numOfErrors = logViewerResource.getNumberOfErrors().then(function (data) { vm.numberOfErrors = data; }); - logViewerResource.getLogLevelCounts().then(function (data) { + var logCounts = logViewerResource.getLogLevelCounts().then(function (data) { vm.logTypeData = []; vm.logTypeData.push(data.Information); vm.logTypeData.push(data.Debug); @@ -75,10 +102,15 @@ vm.logTypeData.push(data.Fatal); }); - logViewerResource.getCommonLogMessages().then(function(data){ + var commonMsgs = logViewerResource.getCommonLogMessages().then(function(data){ vm.commonLogMessages = data; }); + //Set loading indicatior to false when these 3 queries complete + $q.all([numOfErrors, logCounts, commonMsgs]).then(function(data) { + vm.loading = false; + }); + //Get all logs on init load getLogs(); @@ -116,10 +148,13 @@ } function getLogs(){ + vm.logsLoading = true; + logViewerResource.getLogs(vm.logOptions).then(function (data) { vm.logItems = data; + vm.logsLoading = false; - setLogTypeColor( vm.logItems.items); + setLogTypeColor(vm.logItems.items); }); } @@ -145,6 +180,38 @@ }); } + function getFilterName(array) { + var name = "All"; + var found = false; + angular.forEach(array, function (item) { + if (item.selected) { + if (!found) { + name = item.name + found = true; + } else { + name = name + ", " + item.name; + } + } + }); + return name; + } + + function setLogLevelFilter(logLevel) { + + if (!vm.logOptions.logLevels) { + vm.logOptions.logLevels = []; + } + + if (logLevel.selected) { + vm.logOptions.logLevels.push(logLevel.name); + } else { + var index = vm.logOptions.logLevels.indexOf(logLevel.name); + vm.logOptions.logLevels.splice(index, 1); + } + + getLogs(); + } + init(); } diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html index f54c7fc0a5..d5004fcab1 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html @@ -29,6 +29,28 @@ Ascending Descending + + + @@ -53,15 +75,19 @@
- - - - - - +
- + + + + + + + + + +
Total Items: {{ vm.logItems.totalItems }} From b4164521f72adf89aef27a59b989628b76635e16 Mon Sep 17 00:00:00 2001 From: Warren Date: Tue, 4 Sep 2018 13:16:01 +0100 Subject: [PATCH 023/437] Update UI for logviewer - toggle sort order by clicking table header name for timestamp --- .../views/logviewer/overview.controller.js | 13 ++--- .../src/views/logviewer/overview.html | 53 +++++++++---------- 2 files changed, 32 insertions(+), 34 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js index 06cdce2e5f..6a94f240b6 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js @@ -80,9 +80,9 @@ vm.getLogs = getLogs; vm.changePageNumber = changePageNumber; vm.search = search; - vm.updateSort = updateSort; vm.getFilterName = getFilterName; vm.setLogLevelFilter = setLogLevelFilter; + vm.toggleOrderBy = toggleOrderBy; function init() { @@ -142,11 +142,6 @@ getLogs(); } - function updateSort() { - //vm.logOptions.orderDirection - getLogs(); - } - function getLogs(){ vm.logsLoading = true; @@ -212,6 +207,12 @@ getLogs(); } + function toggleOrderBy(){ + vm.logOptions.orderDirection = vm.logOptions.orderDirection === 'Descending' ? 'Ascending' : 'Descending'; + + getLogs(); + } + init(); } diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html index d5004fcab1..1c044801d2 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html @@ -12,23 +12,10 @@ - + - - - - - - - Sort by timestamp - Ascending - Descending - + - - - - + From + + - - - - + + + + + + + +
@@ -86,7 +80,7 @@ - +
@@ -96,7 +90,10 @@ - + @@ -109,6 +106,8 @@ + +
Timestamp + Timestamp +   + Level Machine Name Message{{ log.Properties.MachineName.Value }} {{ log.RenderedMessage }}
@@ -183,10 +182,8 @@
-
-
- +
From c403df1990f0861a13f94485beb26cdbb54e96bb Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Fri, 7 Sep 2018 21:43:44 +0100 Subject: [PATCH 024/437] Update to Common Log Messages - it now returns all unique message templates and their counts In the UI we display the total count of unique but use LimitTo AngularJS filter to continue to display 10 items Returning all items so that we have a way to show the next 10 items or similar --- src/Umbraco.Core/Logging/Viewer/ILogViewer.cs | 4 +- .../Logging/Viewer/LogViewerSourceBase.cs | 7 ++-- src/Umbraco.Core/Umbraco.Core.csproj | 2 +- .../common/resources/logviewer.resource.js | 10 ++--- .../views/logviewer/overview.controller.js | 23 ++--------- .../src/views/logviewer/overview.html | 38 +++++++++---------- .../Editors/LogViewerController.cs | 4 +- 7 files changed, 36 insertions(+), 52 deletions(-) diff --git a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs index ed5ca8f806..817c612933 100644 --- a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs @@ -25,9 +25,9 @@ namespace Umbraco.Core.Logging.Viewer LogLevelCounts GetLogLevelCounts(DateTimeOffset startDate, DateTimeOffset endDate); /// - /// Returns the top 10 common log message templates and their counts + /// Returns a list of all unique message templates and their counts /// - IEnumerable GetCommonLogMessages(DateTimeOffset startDate, DateTimeOffset endDate, int numberOfResults = 10); + IEnumerable GetMessageTemplates(DateTimeOffset startDate, DateTimeOffset endDate); /// /// Returns the collection of logs diff --git a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs index 2270143da2..1d8dd0d9b7 100644 --- a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs +++ b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs @@ -31,13 +31,12 @@ namespace Umbraco.Core.Logging.Viewer }; } - public IEnumerable GetCommonLogMessages(DateTimeOffset startDate, DateTimeOffset endDate, int numberOfResults) + public IEnumerable GetMessageTemplates(DateTimeOffset startDate, DateTimeOffset endDate) { var logs = GetAllLogs(startDate, endDate); var templates = logs.GroupBy(x => x.MessageTemplate.Text) - .Select(g => new CommonLogMessage { MessageTemplate = g.Key, Count = g.Count() }) - .OrderByDescending(x => x.Count) - .Take(numberOfResults); + .Select(g => new LogTemplate { MessageTemplate = g.Key, Count = g.Count() }) + .OrderByDescending(x => x.Count); return templates; } diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 304be5fb1d..94d88d7a91 100644 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -334,7 +334,7 @@ - + diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/logviewer.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/logviewer.resource.js index d5a12bdf67..526bafa52a 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/logviewer.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/logviewer.resource.js @@ -2,7 +2,7 @@ * @ngdoc service * @name umbraco.resources.logViewerResource * @description Retrives Umbraco log items (by default from JSON files on disk) - * + * * **/ function logViewerResource($q, $http, umbRequestHelper) { @@ -28,13 +28,13 @@ 'Failed to retrieve log level counts'); }, - getCommonLogMessages: function(){ + getMessageTemplates: function(){ return umbRequestHelper.resourcePromise( $http.get( umbRequestHelper.getApiUrl( "logViewerApiBaseUrl", - "GetCommonLogMessages")), - 'Failed to retrieve common log messages'); + "GetMessageTemplates")), + 'Failed to retrieve log templates'); }, getLogs: function(options){ @@ -65,7 +65,7 @@ options)), 'Failed to retrieve common log messages'); } - + }; } diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js index 6a94f240b6..102dc0eca7 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js @@ -1,7 +1,7 @@ (function () { "use strict"; - function LogViewerOverviewController($scope, $q, localizationService, logViewerResource) { + function LogViewerOverviewController($q, logViewerResource) { var vm = this; @@ -102,34 +102,19 @@ vm.logTypeData.push(data.Fatal); }); - var commonMsgs = logViewerResource.getCommonLogMessages().then(function(data){ + var commonMsgs = logViewerResource.getMessageTemplates().then(function(data){ vm.commonLogMessages = data; }); //Set loading indicatior to false when these 3 queries complete $q.all([numOfErrors, logCounts, commonMsgs]).then(function(data) { - vm.loading = false; + vm.loading = false; }); //Get all logs on init load getLogs(); + } - // localize labels - var labelKeys = [ - "treeHeaders_languages", - "general_mandatory", - "general_default" - ]; - - localizationService.localizeMany(labelKeys).then(function (values) { - vm.labels.languages = values[0]; - vm.labels.mandatory = values[1]; - vm.labels.general = values[2]; - // set page name - vm.page.name = vm.labels.languages; - }); - } - function search(){ //Reset pagenumber back to 1 diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html index 1c044801d2..923a6176d9 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html @@ -11,8 +11,8 @@ - - + + @@ -56,7 +56,7 @@ - +
- +
- + @@ -81,17 +81,17 @@ - +
Total Items: {{ vm.logItems.totalItems }}
- + @@ -114,7 +114,7 @@

Exception

{{ log.Exception }}

- +

Properties

{{ key }} {{ val.Value }} @@ -123,7 +123,7 @@
- Timestamp + Timestamp   Level
- +
- +
@@ -153,11 +153,11 @@ Log Types - @@ -167,13 +167,13 @@ Common Log Messages - + Total Unique Message types: {{ vm.commonLogMessages.length }} - + + @@ -183,7 +183,7 @@ - + diff --git a/src/Umbraco.Web/Editors/LogViewerController.cs b/src/Umbraco.Web/Editors/LogViewerController.cs index 7cf3125ff5..87161d9a69 100644 --- a/src/Umbraco.Web/Editors/LogViewerController.cs +++ b/src/Umbraco.Web/Editors/LogViewerController.cs @@ -34,9 +34,9 @@ namespace Umbraco.Web.Editors } [HttpGet] - public IEnumerable GetCommonLogMessages() + public IEnumerable GetMessageTemplates() { - return _logViewer.GetCommonLogMessages(startDate: DateTime.Now.AddDays(-1), endDate: DateTime.Now); + return _logViewer.GetMessageTemplates(startDate: DateTime.Now.AddDays(-1), endDate: DateTime.Now); } [HttpGet] From 8cd28a62ea96cac1c419594d7c3496b42f1b1291 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Mon, 10 Sep 2018 09:40:21 +0100 Subject: [PATCH 025/437] Rename CommonLogMessage to LogTemplate --- .../Logging/Viewer/{CommonLogMessage.cs => LogTemplate.cs} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename src/Umbraco.Core/Logging/Viewer/{CommonLogMessage.cs => LogTemplate.cs} (81%) diff --git a/src/Umbraco.Core/Logging/Viewer/CommonLogMessage.cs b/src/Umbraco.Core/Logging/Viewer/LogTemplate.cs similarity index 81% rename from src/Umbraco.Core/Logging/Viewer/CommonLogMessage.cs rename to src/Umbraco.Core/Logging/Viewer/LogTemplate.cs index 150e5f62cc..dd960a9e81 100644 --- a/src/Umbraco.Core/Logging/Viewer/CommonLogMessage.cs +++ b/src/Umbraco.Core/Logging/Viewer/LogTemplate.cs @@ -1,6 +1,6 @@ namespace Umbraco.Core.Logging.Viewer { - public class CommonLogMessage + public class LogTemplate { public string MessageTemplate { get; set; } From ce83e25390b668dfac9c17b34829e70e52b61a99 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Mon, 10 Sep 2018 10:30:23 +0100 Subject: [PATCH 026/437] Adds in a little better CSS styling for the error ex message block than a massive RED background Starts work on getting the dropdown for some example queries setup --- .../views/logviewer/overview.controller.js | 27 +++++++++++++++++++ .../src/views/logviewer/overview.html | 16 ++++++++--- 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js index 102dc0eca7..914234b4d3 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js @@ -32,6 +32,33 @@ } ]; + vm.searches = [ + { + name: "Find all logs where the Level is NOT Verbose and NOT Debug", + query: "Not(@Level='Verbose') and Not(@Level='Debug')" + }, + { + name: "Find all logs that has an exception property (Warning, Error & Critical with Exceptions)", + query: "Has(@Exception)" + }, + { + name: "Find all logs that have the property 'TimingDuration'", + query: "Has(TimingDuration)" + }, + { + name: "Find all logs that have the property 'TimingDuration' and the duration is greater than 1000ms", + query: "Has(TimingDuration) and TimingDuration > 1000" + }, + { + name: "Find all logs that are from the namespace 'Umbraco.Core'", + query: "StartsWith(SourceContext, 'Umbraco.Core')" + }, + { + name: "Find all logs that use a specific log message template", + query: "@MessageTemplate = '[Timing {TimingId}] {EndMessage} ({TimingDuration}ms)'" + } + ] + vm.logItems = {}; vm.numberOfErrors = 0; vm.commonLogMessages = []; diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html index 923a6176d9..b65de92444 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html @@ -56,7 +56,7 @@ - + + + + + + {{search.name}} + {{ search.query }} + + + + @@ -110,8 +120,8 @@ From 6d7fcb7d646af243a0ce905480d1fdbae68a8b36 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Mon, 10 Sep 2018 15:23:41 +0100 Subject: [PATCH 030/437] Adds buttons to find logs with a request number OR with a namespace/sourcecontext --- .../src/views/logviewer/overview.controller.js | 12 ++++++++++++ .../src/views/logviewer/overview.html | 6 +++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js index bd5040a7bb..07ca48904a 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js @@ -120,6 +120,7 @@ vm.findMessageTemplate = findMessageTemplate; vm.selectSearch = selectSearch; vm.resetSearch = resetSearch; + vm.findItem = findItem; function init() { @@ -255,6 +256,17 @@ search(); } + function findItem(key, value){ + if(isNaN(value)){ + vm.logOptions.filterExpression = key + "='" + value + "'"; + } + else { + vm.logOptions.filterExpression = key + "=" + value; + } + + search(); + } + init(); } diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html index 253f3936f9..e465117534 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html @@ -149,7 +149,11 @@ - +
{{ template.MessageTemplate }} - {{ template.Count }}
-
-

Exception

+
+

Exception

{{ log.Exception }}

From c7bff0f9ffe6b8f70a8c73c9c7c33e8eba9db166 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Mon, 10 Sep 2018 11:22:32 +0100 Subject: [PATCH 027/437] Update csproj after recent merge from MOAR logging branch --- src/Umbraco.Core/Umbraco.Core.csproj | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index c24d0339eb..2946a4957a 100644 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -329,8 +329,6 @@ - - From 53bdef68f4b9f9c429f0e48627dc2d29a21e1f2d Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Mon, 10 Sep 2018 11:23:48 +0100 Subject: [PATCH 028/437] * Click on a message template in right column - searches for it * Show more button - to list out more/all message templates * Get the variant style dropdown to work & display example queries --- .../views/logviewer/overview.controller.js | 18 +++++++++ .../src/views/logviewer/overview.html | 38 ++++++++++++------- 2 files changed, 43 insertions(+), 13 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js index 914234b4d3..c935ad1d81 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js @@ -62,6 +62,7 @@ vm.logItems = {}; vm.numberOfErrors = 0; vm.commonLogMessages = []; + vm.commonLogMessagesCount = 10; vm.logOptions = {}; vm.logOptions.orderDirection = 'Descending'; @@ -110,6 +111,8 @@ vm.getFilterName = getFilterName; vm.setLogLevelFilter = setLogLevelFilter; vm.toggleOrderBy = toggleOrderBy; + vm.findMessageTemplate = findMessageTemplate; + vm.selectSearch = selectSearch; function init() { @@ -225,6 +228,21 @@ getLogs(); } + function findMessageTemplate(template){ + + //Update search box input + vm.logOptions.filterExpression = "@MessageTemplate='" + template.MessageTemplate + "'"; + search(); + } + + function selectSearch(searchItem){ + //Update search box input + vm.logOptions.filterExpression = searchItem.query; + vm.dropdownOpen = false; + + search(); + } + init(); } diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html index b65de92444..560e9fbc5d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html @@ -56,9 +56,29 @@ - - - + + + + + - - - - {{search.name}} - {{ search.query }} - - - - @@ -180,7 +191,7 @@ Total Unique Message types: {{ vm.commonLogMessages.length }} - + @@ -190,6 +201,7 @@
{{ template.MessageTemplate }}
+ Show More
From 0844cb15e0303573a4a10a3334db8807763118bd Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Mon, 10 Sep 2018 14:44:07 +0100 Subject: [PATCH 029/437] Adds a clear/reset cross button in search box Adds @MessageTemplate when listing out properties Makes the dropdown level filter to be same as badges in main log list --- .../views/logviewer/overview.controller.js | 24 ++++++++++++----- .../src/views/logviewer/overview.html | 27 ++++++++++++++----- 2 files changed, 38 insertions(+), 13 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js index c935ad1d81..bd5040a7bb 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js @@ -13,22 +13,28 @@ vm.logLevels = [ { - name: 'Verbose' + name: 'Verbose', + logTypeColor: 'gray' }, { - name: 'Debug' + name: 'Debug', + logTypeColor: 'secondary' }, { - name: 'Information' + name: 'Information', + logTypeColor: 'primary' }, { - name: 'Warning' + name: 'Warning', + logTypeColor: 'warning' }, { - name: 'Error' + name: 'Error', + logTypeColor: 'danger' }, { - name: 'Fatal' + name: 'Fatal', + logTypeColor: 'danger' } ]; @@ -113,6 +119,7 @@ vm.toggleOrderBy = toggleOrderBy; vm.findMessageTemplate = findMessageTemplate; vm.selectSearch = selectSearch; + vm.resetSearch = resetSearch; function init() { @@ -243,6 +250,11 @@ search(); } + function resetSearch(){ + vm.logOptions.filterExpression = ''; + search(); + } + init(); } diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html index 560e9fbc5d..253f3936f9 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html @@ -15,7 +15,7 @@ - + - From + From  - To + To  +   + Example Searches   @@ -137,9 +141,18 @@

Properties

-
- {{ key }} {{ val.Value }} -
+ + + + + + + + + + + +
@MessageTemplate{{log.MessageTemplateText}}
{{key}}{{val.Value}}
{{key}}{{val.Value}} + + + {{val.Value}} +
From d38e4a044235347cdb74d3252026db742f25f031 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Tue, 11 Sep 2018 15:06:35 +0100 Subject: [PATCH 031/437] Adds in fallback logic to do a search on @Message which is the rendered message template along with a SQL like. Thanks Diplo aka Dan Booth @Message like '%find me%' --- .../Logging/Viewer/LogViewerSourceBase.cs | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs index 1d8dd0d9b7..6fffb52482 100644 --- a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs +++ b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs @@ -54,15 +54,31 @@ namespace Umbraco.Core.Logging.Viewer if (string.IsNullOrEmpty(filterExpression) == false) { Func filter = null; - var eval = FilterLanguage.CreateFilter(filterExpression); - filter = evt => true.Equals(eval(evt)); - logs = logs.Where(filter); + // If the expression evaluates then make it into a filter + // TODO: Why does any single word evaluate? + if (FilterLanguage.TryCreateFilter(filterExpression, out Func eval, out string error)) + { + filter = evt => true.Equals(eval(evt)); + } + else // assume the expression was a search string and make a Like filter from that + { + var filterSearch = $"@Message like '%{FilterLanguage.EscapeStringContent(filterExpression)}%'"; + if (FilterLanguage.TryCreateFilter(filterSearch, out eval, out error)) + { + filter = evt => true.Equals(eval(evt)); + } + } + + if (filter != null) + { + logs = logs.Where(filter); + } } //This is user used the checkbox UI to toggle which log levels they wish to see //If an empty array - its implied all levels to be viewed - if(logLevels.Length > 0) + if (logLevels.Length > 0) { var logsAfterLevelFilters = new List(); foreach (var level in logLevels) From c3cfee7b2c8bdfe72426f6fba0889a76d4adff35 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 12 Sep 2018 11:33:19 +0100 Subject: [PATCH 032/437] Need to use the EscapleLikeExpression method instead for the fallback check --- src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs index 6fffb52482..08a19ec202 100644 --- a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs +++ b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs @@ -54,16 +54,15 @@ namespace Umbraco.Core.Logging.Viewer if (string.IsNullOrEmpty(filterExpression) == false) { Func filter = null; - + // If the expression evaluates then make it into a filter - // TODO: Why does any single word evaluate? if (FilterLanguage.TryCreateFilter(filterExpression, out Func eval, out string error)) { filter = evt => true.Equals(eval(evt)); } else // assume the expression was a search string and make a Like filter from that { - var filterSearch = $"@Message like '%{FilterLanguage.EscapeStringContent(filterExpression)}%'"; + var filterSearch = $"@Message like '%{FilterLanguage.EscapeLikeExpressionContent(filterExpression)}%'"; if (FilterLanguage.TryCreateFilter(filterSearch, out eval, out error)) { filter = evt => true.Equals(eval(evt)); From 0933443cb3f011ff41af6893e7c3dd6e70d6867e Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 12 Sep 2018 11:35:51 +0100 Subject: [PATCH 033/437] Adds in new API endpoint that get the saved search - our default implmentation gets them from a JSON file off disk * If the API call fails then we load in some defaults * The GetSavedSearches is Abstract so along with the GetLogs the GetSavedSearches could be custom implemented if it needed to come from a DB or some other location for dev's needs --- src/Umbraco.Core/Logging/Viewer/ILogViewer.cs | 5 ++ .../Logging/Viewer/JsonLogViewer.cs | 14 ++++ .../Logging/Viewer/LogViewerSourceBase.cs | 4 +- .../Logging/Viewer/SavedLogSearch.cs | 13 ++++ src/Umbraco.Core/Umbraco.Core.csproj | 1 + .../common/resources/logviewer.resource.js | 11 ++- .../views/logviewer/overview.controller.js | 67 +++++++++++-------- src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 3 +- .../config/logviewer.searches.config.js | 34 ++++++++++ .../Editors/LogViewerController.cs | 8 ++- 10 files changed, 129 insertions(+), 31 deletions(-) create mode 100644 src/Umbraco.Core/Logging/Viewer/SavedLogSearch.cs create mode 100644 src/Umbraco.Web.UI/config/logviewer.searches.config.js diff --git a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs index 817c612933..16568bfef3 100644 --- a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs @@ -13,6 +13,11 @@ namespace Umbraco.Core.Logging.Viewer ///
IEnumerable GetAllLogs(DateTimeOffset startDate, DateTimeOffset endDate); + /// + /// Get all saved searches from your chosen datasource + /// + IEnumerable GetSavedSearches(); + /// /// A count of number of errors /// By counting Warnings with Exceptions, Errors & Fatal messages diff --git a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs index 6d27e04c57..60166669e1 100644 --- a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs @@ -1,8 +1,10 @@ using System; using System.Collections.Generic; using System.IO; +using Newtonsoft.Json; using Serilog.Events; using Serilog.Formatting.Compact.Reader; +using Umbraco.Core.IO; namespace Umbraco.Core.Logging.Viewer { @@ -51,5 +53,17 @@ namespace Umbraco.Core.Logging.Viewer return logs; } + public override IEnumerable GetSavedSearches() + { + //Our default implementation + //Open JSON file on disk and return serialize obj back + var path = IOHelper.MapPath("~/Config/logviewer.searches.config.js"); + + //If file does not exist - lets create it with an empty array + IOHelper.EnsureFileExists(path, "[]"); + + var rawJson = File.ReadAllText(path); + return JsonConvert.DeserializeObject>(rawJson); + } } } diff --git a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs index 08a19ec202..3aee40dd10 100644 --- a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs +++ b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs @@ -11,7 +11,9 @@ namespace Umbraco.Core.Logging.Viewer public abstract class LogViewerSourceBase : ILogViewer { public abstract IEnumerable GetAllLogs(DateTimeOffset startDate, DateTimeOffset endDate); - + + public abstract IEnumerable GetSavedSearches(); + public int GetNumberOfErrors(DateTimeOffset startDate, DateTimeOffset endDate) { var logs = GetAllLogs(startDate, endDate); diff --git a/src/Umbraco.Core/Logging/Viewer/SavedLogSearch.cs b/src/Umbraco.Core/Logging/Viewer/SavedLogSearch.cs new file mode 100644 index 0000000000..ef2181e3bf --- /dev/null +++ b/src/Umbraco.Core/Logging/Viewer/SavedLogSearch.cs @@ -0,0 +1,13 @@ +using Newtonsoft.Json; + +namespace Umbraco.Core.Logging.Viewer +{ + public class SavedLogSearch + { + [JsonProperty("name")] + public string Name { get; set; } + + [JsonProperty("query")] + public string Query { get; set; } + } +} diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 2946a4957a..58f10d3761 100644 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -343,6 +343,7 @@ + diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/logviewer.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/logviewer.resource.js index 526bafa52a..4bc5cf42b4 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/logviewer.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/logviewer.resource.js @@ -16,7 +16,7 @@ umbRequestHelper.getApiUrl( "logViewerApiBaseUrl", "GetNumberOfErrors")), - 'Failed to retrieve number of errors in logs') + 'Failed to retrieve number of errors in logs'); }, getLogLevelCounts: function(){ @@ -37,6 +37,15 @@ 'Failed to retrieve log templates'); }, + getSavedSearches: function(){ + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "logViewerApiBaseUrl", + "GetSavedSearches")), + 'Failed to retrieve saved searches'); + }, + getLogs: function(options){ var defaults = { diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js index 07ca48904a..0827e43b03 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js @@ -38,32 +38,7 @@ } ]; - vm.searches = [ - { - name: "Find all logs where the Level is NOT Verbose and NOT Debug", - query: "Not(@Level='Verbose') and Not(@Level='Debug')" - }, - { - name: "Find all logs that has an exception property (Warning, Error & Critical with Exceptions)", - query: "Has(@Exception)" - }, - { - name: "Find all logs that have the property 'TimingDuration'", - query: "Has(TimingDuration)" - }, - { - name: "Find all logs that have the property 'TimingDuration' and the duration is greater than 1000ms", - query: "Has(TimingDuration) and TimingDuration > 1000" - }, - { - name: "Find all logs that are from the namespace 'Umbraco.Core'", - query: "StartsWith(SourceContext, 'Umbraco.Core')" - }, - { - name: "Find all logs that use a specific log message template", - query: "@MessageTemplate = '[Timing {TimingId}] {EndMessage} ({TimingDuration}ms)'" - } - ] + vm.searches = []; vm.logItems = {}; vm.numberOfErrors = 0; @@ -127,6 +102,44 @@ vm.loading = true; + var savedSearches = logViewerResource.getSavedSearches().then(function (data) { + vm.searches = data; + }); + + var savedSearches = logViewerResource.getSavedSearches().then(function (data) { + vm.searches = data; + }, + // fallback to some defaults if error from API response + function () { + vm.searches = [ + { + "name": "Find all logs where the Level is NOT Verbose and NOT Debug", + "query": "Not(@Level='Verbose') and Not(@Level='Debug')" + }, + { + "name": "Find all logs that has an exception property (Warning, Error & Critical with Exceptions)", + "query": "Has(@Exception)" + }, + { + "name": "Find all logs that have the property 'TimingDuration'", + "query": "Has(TimingDuration)" + }, + { + "name": "Find all logs that have the property 'TimingDuration' and the duration is greater than 1000ms", + "query": "Has(TimingDuration) and TimingDuration > 1000" + }, + { + "name": "Find all logs that are from the namespace 'Umbraco.Core'", + "query": "StartsWith(SourceContext, 'Umbraco.Core')" + }, + { + "name": "Find all logs that use a specific log message template", + "query": "@MessageTemplate = '[Timing {TimingId}] {EndMessage} ({TimingDuration}ms)'" + } + ] + }); + + var numOfErrors = logViewerResource.getNumberOfErrors().then(function (data) { vm.numberOfErrors = data; }); @@ -145,7 +158,7 @@ }); //Set loading indicatior to false when these 3 queries complete - $q.all([numOfErrors, logCounts, commonMsgs]).then(function(data) { + $q.all([savedSearches, numOfErrors, logCounts, commonMsgs]).then(function(data) { vm.loading = false; }); diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index bb1be50baf..4ada66f3e1 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -276,6 +276,7 @@ Designer + umbracoSettings.config Designer @@ -600,4 +601,4 @@ - + \ No newline at end of file diff --git a/src/Umbraco.Web.UI/config/logviewer.searches.config.js b/src/Umbraco.Web.UI/config/logviewer.searches.config.js new file mode 100644 index 0000000000..88f134edc1 --- /dev/null +++ b/src/Umbraco.Web.UI/config/logviewer.searches.config.js @@ -0,0 +1,34 @@ +[ + { + "name": "Find all logs where the Level is NOT Verbose and NOT Debug", + "query": "Not(@Level='Verbose') and Not(@Level='Debug')" + }, + { + "name": "Find all logs that has an exception property (Warning, Error & Critical with Exceptions)", + "query": "Has(@Exception)" + }, + { + "name": "Find all logs that have the property 'TimingDuration'", + "query": "Has(TimingDuration)" + }, + { + "name": "Find all logs that have the property 'TimingDuration' and the duration is greater than 1000ms", + "query": "Has(TimingDuration) and TimingDuration > 1000" + }, + { + "name": "Find all logs that are from the namespace 'Umbraco.Core'", + "query": "StartsWith(SourceContext, 'Umbraco.Core')" + }, + { + "name": "Find all logs that use a specific log message template", + "query": "@MessageTemplate = '[Timing {TimingId}] {EndMessage} ({TimingDuration}ms)'" + }, + { + "name": "Find logs where one of the items in the SortedComponentTypes property array is equal to", + "query": "SortedComponentTypes[?] = 'Umbraco.Web.Search.ExamineComponent'" + }, + { + "name": "Find logs where one of the items in the SortedComponentTypes property array contains", + "query": "Contains(SortedComponentTypes[?], 'DatabaseServer')" + } +] diff --git a/src/Umbraco.Web/Editors/LogViewerController.cs b/src/Umbraco.Web/Editors/LogViewerController.cs index 87161d9a69..bdd3fcc5e6 100644 --- a/src/Umbraco.Web/Editors/LogViewerController.cs +++ b/src/Umbraco.Web/Editors/LogViewerController.cs @@ -1,4 +1,5 @@ -using System; +using Newtonsoft.Json; +using System; using System.Collections.Generic; using System.Web.Http; using Umbraco.Core.Logging.Viewer; @@ -46,5 +47,10 @@ namespace Umbraco.Web.Editors return _logViewer.GetLogs(startDate: DateTime.Now.AddDays(-1), endDate: DateTime.Now, filterExpression: filterExpression, pageNumber: pageNumber, orderDirection: direction, logLevels: logLevels); } + [HttpGet] + public IEnumerable GetSavedSearches() + { + return _logViewer.GetSavedSearches(); + } } } From 4501368cc3c44523d7e9a6259479120c5a39a5fc Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 12 Sep 2018 14:38:43 +0100 Subject: [PATCH 034/437] Adds in UI for new overlay to add a logviewer saved search - will need to add API method in C# and AngularJS Resource etc --- .../logviewersearch/logviewersearch.html | 11 ++++ .../views/logviewer/overview.controller.js | 50 ++++++++++++++++++- .../src/views/logviewer/overview.html | 2 + 3 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 src/Umbraco.Web.UI.Client/src/views/common/overlays/logviewersearch/logviewersearch.html diff --git a/src/Umbraco.Web.UI.Client/src/views/common/overlays/logviewersearch/logviewersearch.html b/src/Umbraco.Web.UI.Client/src/views/common/overlays/logviewersearch/logviewersearch.html new file mode 100644 index 0000000000..1a62549f4d --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/common/overlays/logviewersearch/logviewersearch.html @@ -0,0 +1,11 @@ +
+

+ Query:
+ {{ model.queryToSave }} +

+ +

+ Name:
+ +

+
\ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js index 0827e43b03..25ddbda16a 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js @@ -1,7 +1,7 @@ (function () { "use strict"; - function LogViewerOverviewController($q, logViewerResource) { + function LogViewerOverviewController($q, logViewerResource, overlayService) { var vm = this; @@ -96,6 +96,8 @@ vm.selectSearch = selectSearch; vm.resetSearch = resetSearch; vm.findItem = findItem; + vm.checkForSavedSearch = checkForSavedSearch; + vm.addToSavedSearches = addToSavedSearches; function init() { @@ -280,6 +282,52 @@ search(); } + //Return a bool to toggle display of the star/fav + function checkForSavedSearch(){ + //Check if we have a value in + if(!vm.logOptions.filterExpression){ + return false; + } + else { + //Check what we have searched for is not an existing saved search + var findQuery = _.findWhere(vm.searches, {query: vm.logOptions.filterExpression}); + return !findQuery ? true: false; + } + } + + function addToSavedSearches(){ + + var overlay = { + title: "Save Search", + subtitle: "Enter a friendly name for your search query", + closeButtonLabel: "Cancel", + submitButtonLabel: "Save Search", + disableSubmitButton: true, + view: "logviewersearch", + queryToSave: vm.logOptions.filterExpression, + submit: function (model) { + overlayService.close(); + + //Resource call with two params (name & query) + //API that opens the JSON and adds it to the bottom + + //model.queryName + //model.queryToSave + + //Once OK from API - push it into existing vm.searches array + vm.searches.push({'name': model.queryName, 'query': model.queryToSave}); + + }, + close: function() { + overlayService.close(); + } + }; + + overlayService.open(overlay); + + } + + init(); } diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html index e465117534..ce7922b04d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html @@ -64,6 +64,8 @@ + +     From 57a7cf3903e249e621e6b4e41c854d016c26197e Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 12 Sep 2018 16:14:42 +0100 Subject: [PATCH 035/437] We can now save a query to the JSON file on disk now - for our cheap persistence layer --- src/Umbraco.Core/Logging/Viewer/ILogViewer.cs | 5 ++ .../Logging/Viewer/JsonLogViewer.cs | 27 ++++++++ .../Logging/Viewer/LogViewerSourceBase.cs | 2 + .../common/resources/logviewer.resource.js | 13 ++++ .../views/logviewer/overview.controller.js | 13 ++-- .../config/logviewer.searches.config.js | 66 +++++++++---------- 6 files changed, 85 insertions(+), 41 deletions(-) diff --git a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs index 16568bfef3..4ab3a9f6bd 100644 --- a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs @@ -18,6 +18,11 @@ namespace Umbraco.Core.Logging.Viewer ///
IEnumerable GetSavedSearches(); + /// + /// Adds a new saved search to chosen datasource + /// + IEnumerable AddSavedSearch(string name, string query); + /// /// A count of number of errors /// By counting Warnings with Exceptions, Errors & Fatal messages diff --git a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs index 60166669e1..1f0faf1d40 100644 --- a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Linq; using Newtonsoft.Json; using Serilog.Events; using Serilog.Formatting.Compact.Reader; @@ -65,5 +66,31 @@ namespace Umbraco.Core.Logging.Viewer var rawJson = File.ReadAllText(path); return JsonConvert.DeserializeObject>(rawJson); } + + public override IEnumerable AddSavedSearch(string name, string query) + { + //Get the existing items + var searches = GetSavedSearches().ToList(); + + //Add the new item to the bottom of the list + searches.Add(new SavedLogSearch { Name = name, Query = query }); + + //Serilaize to JSON string + var rawJson = JsonConvert.SerializeObject(searches, Formatting.Indented); + + //Open file & save contents + var path = IOHelper.MapPath("~/Config/logviewer.searches.config.js"); + + //If file does not exist - lets create it with an empty array + IOHelper.EnsureFileExists(path, "[]"); + + //Write it back down to file + File.WriteAllText(path, rawJson); + + //Return the updated object - so we can instantly reset the entire array from the API response + //As opposed to push a new item into the array + return searches; + + } } } diff --git a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs index 3aee40dd10..07fee47fa1 100644 --- a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs +++ b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs @@ -14,6 +14,8 @@ namespace Umbraco.Core.Logging.Viewer public abstract IEnumerable GetSavedSearches(); + public abstract IEnumerable AddSavedSearch(string name, string query); + public int GetNumberOfErrors(DateTimeOffset startDate, DateTimeOffset endDate) { var logs = GetAllLogs(startDate, endDate); diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/logviewer.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/logviewer.resource.js index 4bc5cf42b4..1182901d6b 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/logviewer.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/logviewer.resource.js @@ -46,6 +46,19 @@ 'Failed to retrieve saved searches'); }, + postSavedSearch: function(name, query){ + return umbRequestHelper.resourcePromise( + $http.post( + umbRequestHelper.getApiUrl( + "logViewerApiBaseUrl", + "PostSavedSearch"), {'name': name, 'query': query }), + 'Failed to add new saved search'); + + return umbRequestHelper.resourcePromise( + $http.post(umbRequestHelper.getApiUrl("dataTypeApiBaseUrl", "PostSave"), saveModel), + "Failed to save data for data type id " + dataType.id); + }, + getLogs: function(options){ var defaults = { diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js index 25ddbda16a..475ff48d9c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js @@ -306,17 +306,14 @@ view: "logviewersearch", queryToSave: vm.logOptions.filterExpression, submit: function (model) { - overlayService.close(); - //Resource call with two params (name & query) //API that opens the JSON and adds it to the bottom + logViewerResource.postSavedSearch(model.queryName, model.queryToSave).then(function(data){ + console.log('search after add', data); + vm.searches = data; - //model.queryName - //model.queryToSave - - //Once OK from API - push it into existing vm.searches array - vm.searches.push({'name': model.queryName, 'query': model.queryToSave}); - + overlayService.close(); + }); }, close: function() { overlayService.close(); diff --git a/src/Umbraco.Web.UI/config/logviewer.searches.config.js b/src/Umbraco.Web.UI/config/logviewer.searches.config.js index 88f134edc1..cc5cd845ae 100644 --- a/src/Umbraco.Web.UI/config/logviewer.searches.config.js +++ b/src/Umbraco.Web.UI/config/logviewer.searches.config.js @@ -1,34 +1,34 @@ -[ - { - "name": "Find all logs where the Level is NOT Verbose and NOT Debug", - "query": "Not(@Level='Verbose') and Not(@Level='Debug')" - }, - { - "name": "Find all logs that has an exception property (Warning, Error & Critical with Exceptions)", - "query": "Has(@Exception)" - }, - { - "name": "Find all logs that have the property 'TimingDuration'", - "query": "Has(TimingDuration)" - }, - { - "name": "Find all logs that have the property 'TimingDuration' and the duration is greater than 1000ms", - "query": "Has(TimingDuration) and TimingDuration > 1000" - }, - { - "name": "Find all logs that are from the namespace 'Umbraco.Core'", - "query": "StartsWith(SourceContext, 'Umbraco.Core')" - }, - { - "name": "Find all logs that use a specific log message template", - "query": "@MessageTemplate = '[Timing {TimingId}] {EndMessage} ({TimingDuration}ms)'" - }, - { - "name": "Find logs where one of the items in the SortedComponentTypes property array is equal to", - "query": "SortedComponentTypes[?] = 'Umbraco.Web.Search.ExamineComponent'" - }, - { - "name": "Find logs where one of the items in the SortedComponentTypes property array contains", - "query": "Contains(SortedComponentTypes[?], 'DatabaseServer')" - } +[ + { + "name": "Find all logs where the Level is NOT Verbose and NOT Debug", + "query": "Not(@Level='Verbose') and Not(@Level='Debug')" + }, + { + "name": "Find all logs that has an exception property (Warning, Error & Critical with Exceptions)", + "query": "Has(@Exception)" + }, + { + "name": "Find all logs that have the property 'TimingDuration'", + "query": "Has(TimingDuration)" + }, + { + "name": "Find all logs that have the property 'TimingDuration' and the duration is greater than 1000ms", + "query": "Has(TimingDuration) and TimingDuration > 1000" + }, + { + "name": "Find all logs that are from the namespace 'Umbraco.Core'", + "query": "StartsWith(SourceContext, 'Umbraco.Core')" + }, + { + "name": "Find all logs that use a specific log message template", + "query": "@MessageTemplate = '[Timing {TimingId}] {EndMessage} ({TimingDuration}ms)'" + }, + { + "name": "Find logs where one of the items in the SortedComponentTypes property array is equal to", + "query": "SortedComponentTypes[?] = 'Umbraco.Web.Search.ExamineComponent'" + }, + { + "name": "Find logs where one of the items in the SortedComponentTypes property array contains", + "query": "Contains(SortedComponentTypes[?], 'DatabaseServer')" + } ] From 630a8af217523d515f4ebca0d03a0c38721aa6ac Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 12 Sep 2018 16:30:10 +0100 Subject: [PATCH 036/437] Adds in some example SQL like style queries --- src/Umbraco.Web.UI/config/logviewer.searches.config.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI/config/logviewer.searches.config.js b/src/Umbraco.Web.UI/config/logviewer.searches.config.js index cc5cd845ae..d6eff108cd 100644 --- a/src/Umbraco.Web.UI/config/logviewer.searches.config.js +++ b/src/Umbraco.Web.UI/config/logviewer.searches.config.js @@ -30,5 +30,13 @@ { "name": "Find logs where one of the items in the SortedComponentTypes property array contains", "query": "Contains(SortedComponentTypes[?], 'DatabaseServer')" + }, + { + "name": "Find all logs that the message has localhost in it with SQL like", + "query": "@Message like '%localhost%'" + }, + { + "name": "Find all logs that the message that starts with 'end' in it with SQL like", + "query": "@Message like 'end%'" } -] +] \ No newline at end of file From 962bdcf1b4e6bb1e4049aedad10a9c4e0147c9f9 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 12 Sep 2018 16:38:35 +0100 Subject: [PATCH 037/437] Remove dupe code --- .../src/views/logviewer/overview.controller.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js index 475ff48d9c..6e6f87fb35 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js @@ -104,10 +104,6 @@ vm.loading = true; - var savedSearches = logViewerResource.getSavedSearches().then(function (data) { - vm.searches = data; - }); - var savedSearches = logViewerResource.getSavedSearches().then(function (data) { vm.searches = data; }, From 3886d47c57b672fa3ab5cbefaec61b4b063cd9f0 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 12 Sep 2018 16:47:36 +0100 Subject: [PATCH 038/437] Forgot to add the WebAPI method for PostSavedSearch --- src/Umbraco.Web/Editors/LogViewerController.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Umbraco.Web/Editors/LogViewerController.cs b/src/Umbraco.Web/Editors/LogViewerController.cs index bdd3fcc5e6..82a4a953f0 100644 --- a/src/Umbraco.Web/Editors/LogViewerController.cs +++ b/src/Umbraco.Web/Editors/LogViewerController.cs @@ -52,5 +52,11 @@ namespace Umbraco.Web.Editors { return _logViewer.GetSavedSearches(); } + + [HttpPost] + public IEnumerable PostSavedSearch(SavedLogSearch item) + { + return _logViewer.AddSavedSearch(item.Name, item.Query); + } } } From 1839c5b3a80eb827009a99c25d010363823eec91 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 12 Sep 2018 16:49:31 +0100 Subject: [PATCH 039/437] Wraps search input field with ng-form and updates button to submit so that we can then allow users to hit enter key to perform a search --- .../src/views/logviewer/overview.html | 144 +++++++++--------- 1 file changed, 73 insertions(+), 71 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html index ce7922b04d..a2ff0804a2 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html @@ -14,86 +14,88 @@ - - - - +
+ + + +
+ + Log Levels: + {{ vm.getFilterName(vm.logLevels) }} + + + + +
+ + +
+
+
+
- - From  - - + + From  + + - To  - - -
-
+ To  + + + + - - + + - - - - + + + - - + + +
From 756e0bbbe1fbc84127c8d0bb7309ca4236aff3f6 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 12 Sep 2018 16:52:04 +0100 Subject: [PATCH 040/437] Update Machine name column in main table to take some less space (Thx Dan Booth) --- src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html index a2ff0804a2..85c96a2241 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html @@ -124,7 +124,7 @@   Level - Machine Name + Machine Message @@ -132,7 +132,7 @@ {{ log.Timestamp | date:'medium' }} {{ log.Level }} - {{ log.Properties.MachineName.Value }} + {{ log.Properties.MachineName.Value }} {{ log.RenderedMessage }} From 142a319776cd673c3e1532d76e7cd00a7884feb0 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 12 Sep 2018 16:52:32 +0100 Subject: [PATCH 041/437] Adds full RAW timestamp to properties table (Thx Dan Booth) --- src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html index 85c96a2241..7d394d0938 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html @@ -147,6 +147,10 @@

Properties

+ + + + From a3a95c0f9de7ea373b51508d8842bc18ea6b2b7c Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 12 Sep 2018 16:53:17 +0100 Subject: [PATCH 042/437] Makes the special links to find related values not buttons but simplier links with search icon (Thx Dan Booth) --- src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html index 7d394d0938..87bade3b66 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html @@ -158,8 +158,10 @@ From bad002b58a1a69dc74bc0e7244ea0295eada88dd Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 12 Sep 2018 16:57:03 +0100 Subject: [PATCH 043/437] Same feature in Dan Booth's Log Viewer for Find Log message in Search places (Thx Dan Booth) --- .../src/views/logviewer/overview.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html index 87bade3b66..8d71a9a520 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html @@ -167,6 +167,22 @@
Timestamp{{log.Timestamp}}
@MessageTemplate {{log.MessageTemplateText}}
{{key}} - - + {{val.Value}} + {{val.Value}} + {{val.Value}} + {{val.Value}} {{val.Value}}
+ + + From 385bc9c7705ed646b92331ec13bd67c925b07d95 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 12 Sep 2018 21:22:40 +0100 Subject: [PATCH 044/437] Rename overview to search (so I can start maming this view focus only on searching) --- .../{overview.controller.js => search.controller.js} | 4 ++-- .../src/views/logviewer/{overview.html => search.html} | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename src/Umbraco.Web.UI.Client/src/views/logviewer/{overview.controller.js => search.controller.js} (98%) rename src/Umbraco.Web.UI.Client/src/views/logviewer/{overview.html => search.html} (99%) diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js similarity index 98% rename from src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js rename to src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js index 6e6f87fb35..742f79fb58 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js @@ -1,7 +1,7 @@ (function () { "use strict"; - function LogViewerOverviewController($q, logViewerResource, overlayService) { + function LogViewerSearchController($q, logViewerResource, overlayService) { var vm = this; @@ -325,6 +325,6 @@ } - angular.module("umbraco").controller("Umbraco.Editors.LogViewer.OverviewController", LogViewerOverviewController); + angular.module("umbraco").controller("Umbraco.Editors.LogViewer.SearchController", LogViewerSearchController); })(); diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.html similarity index 99% rename from src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html rename to src/Umbraco.Web.UI.Client/src/views/logviewer/search.html index 8d71a9a520..5b9ee98d93 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.html @@ -1,4 +1,4 @@ -
+
From 6bee3a421fa5c11924f2207278ea2caf6ed8ecfc Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 12 Sep 2018 21:46:22 +0100 Subject: [PATCH 045/437] Make search page full width & remove some variables & func's in controller that is no longer needed (as will move to an overview/welcome type dashboard) --- .../src/views/logviewer/search.controller.js | 47 +--------------- .../src/views/logviewer/search.html | 55 ++----------------- 2 files changed, 5 insertions(+), 97 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js index 742f79fb58..4bb6ff9d8a 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js @@ -9,7 +9,6 @@ vm.logsLoading = false; vm.page = {}; - vm.labels = {}; vm.logLevels = [ { @@ -41,23 +40,9 @@ vm.searches = []; vm.logItems = {}; - vm.numberOfErrors = 0; - vm.commonLogMessages = []; - vm.commonLogMessagesCount = 10; vm.logOptions = {}; vm.logOptions.orderDirection = 'Descending'; - // ChartJS Options - for count/overview of log distribution - vm.logTypeLabels = ["Info", "Debug", "Warning", "Error", "Critical"]; - vm.logTypeData = [0, 0, 0, 0, 0]; - vm.logTypeColors = [ '#dcdcdc', '#97bbcd', '#46bfbd', '#fdb45c', '#f7464a']; - vm.chartOptions = { - legend: { - display: true, - position: 'left' - } - }; - vm.fromDatePickerConfig = { pickDate: true, pickTime: true, @@ -92,7 +77,6 @@ vm.getFilterName = getFilterName; vm.setLogLevelFilter = setLogLevelFilter; vm.toggleOrderBy = toggleOrderBy; - vm.findMessageTemplate = findMessageTemplate; vm.selectSearch = selectSearch; vm.resetSearch = resetSearch; vm.findItem = findItem; @@ -106,6 +90,7 @@ var savedSearches = logViewerResource.getSavedSearches().then(function (data) { vm.searches = data; + vm.loading = false; }, // fallback to some defaults if error from API response function () { @@ -137,29 +122,6 @@ ] }); - - var numOfErrors = logViewerResource.getNumberOfErrors().then(function (data) { - vm.numberOfErrors = data; - }); - - var logCounts = logViewerResource.getLogLevelCounts().then(function (data) { - vm.logTypeData = []; - vm.logTypeData.push(data.Information); - vm.logTypeData.push(data.Debug); - vm.logTypeData.push(data.Warning); - vm.logTypeData.push(data.Error); - vm.logTypeData.push(data.Fatal); - }); - - var commonMsgs = logViewerResource.getMessageTemplates().then(function(data){ - vm.commonLogMessages = data; - }); - - //Set loading indicatior to false when these 3 queries complete - $q.all([savedSearches, numOfErrors, logCounts, commonMsgs]).then(function(data) { - vm.loading = false; - }); - //Get all logs on init load getLogs(); } @@ -247,13 +209,6 @@ getLogs(); } - function findMessageTemplate(template){ - - //Update search box input - vm.logOptions.filterExpression = "@MessageTemplate='" + template.MessageTemplate + "'"; - search(); - } - function selectSearch(searchItem){ //Update search box input vm.logOptions.filterExpression = searchItem.query; diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/search.html b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.html index 5b9ee98d93..7ddad1e0ca 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/search.html +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.html @@ -16,7 +16,7 @@
- +
@@ -59,7 +59,7 @@ - +
@@ -97,9 +97,9 @@ -
+
-
+
@@ -201,53 +201,6 @@
- -
From 603a1c7814c11b1ec51f0c3d6284782c75d83fed Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 12 Sep 2018 21:49:59 +0100 Subject: [PATCH 046/437] Log property is now Duration as opposed to TimingDuration (A few diff logtypes that store ms all use same prop name of Duration) --- .../src/views/logviewer/search.controller.js | 10 +++++----- src/Umbraco.Web.UI/config/logviewer.searches.config.js | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js index 4bb6ff9d8a..49566138a7 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js @@ -88,7 +88,7 @@ vm.loading = true; - var savedSearches = logViewerResource.getSavedSearches().then(function (data) { + logViewerResource.getSavedSearches().then(function (data) { vm.searches = data; vm.loading = false; }, @@ -104,12 +104,12 @@ "query": "Has(@Exception)" }, { - "name": "Find all logs that have the property 'TimingDuration'", - "query": "Has(TimingDuration)" + "name": "Find all logs that have the property 'Duration'", + "query": "Has(Duration)" }, { - "name": "Find all logs that have the property 'TimingDuration' and the duration is greater than 1000ms", - "query": "Has(TimingDuration) and TimingDuration > 1000" + "name": "Find all logs that have the property 'Duration' and the duration is greater than 1000ms", + "query": "Has(Duration) and Duration > 1000" }, { "name": "Find all logs that are from the namespace 'Umbraco.Core'", diff --git a/src/Umbraco.Web.UI/config/logviewer.searches.config.js b/src/Umbraco.Web.UI/config/logviewer.searches.config.js index d6eff108cd..25ee9b2242 100644 --- a/src/Umbraco.Web.UI/config/logviewer.searches.config.js +++ b/src/Umbraco.Web.UI/config/logviewer.searches.config.js @@ -8,12 +8,12 @@ "query": "Has(@Exception)" }, { - "name": "Find all logs that have the property 'TimingDuration'", - "query": "Has(TimingDuration)" + "name": "Find all logs that have the property 'Duration'", + "query": "Has(Duration)" }, { - "name": "Find all logs that have the property 'TimingDuration' and the duration is greater than 1000ms", - "query": "Has(TimingDuration) and TimingDuration > 1000" + "name": "Find all logs that have the property 'Duration' and the duration is greater than 1000ms", + "query": "Has(Duration) and Duration > 1000" }, { "name": "Find all logs that are from the namespace 'Umbraco.Core'", @@ -39,4 +39,4 @@ "name": "Find all logs that the message that starts with 'end' in it with SQL like", "query": "@Message like 'end%'" } -] \ No newline at end of file +] From 5bbe17af5455b66ca80c6a5fadb4a26e9d589326 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 12 Sep 2018 22:46:58 +0100 Subject: [PATCH 047/437] Start work on getting an overview page that will be entry point with shiny graphs and numbers before jumping over to search page --- .../views/logviewer/overview.controller.js | 99 +++++++++++++++++++ .../src/views/logviewer/overview.html | 85 ++++++++++++++++ 2 files changed, 184 insertions(+) create mode 100644 src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js create mode 100644 src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js new file mode 100644 index 0000000000..281d228bfd --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js @@ -0,0 +1,99 @@ +(function () { + "use strict"; + + function LogViewerOverviewController($q, $location, logViewerResource) { + + var vm = this; + vm.loading = false; + vm.searches = []; + vm.numberOfErrors = 0; + vm.commonLogMessages = []; + vm.commonLogMessagesCount = 10; + + // ChartJS Options - for count/overview of log distribution + vm.logTypeLabels = ["Info", "Debug", "Warning", "Error", "Critical"]; + vm.logTypeData = [0, 0, 0, 0, 0]; + vm.logTypeColors = [ '#dcdcdc', '#97bbcd', '#46bfbd', '#fdb45c', '#f7464a']; + vm.chartOptions = { + legend: { + display: true, + position: 'left' + } + }; + + //functions + vm.searchLogQuery = searchLogQuery; + + + function init() { + + vm.loading = true; + + var savedSearches = logViewerResource.getSavedSearches().then(function (data) { + vm.searches = data; + }, + // fallback to some defaults if error from API response + function () { + vm.searches = [ + { + "name": "Find all logs where the Level is NOT Verbose and NOT Debug", + "query": "Not(@Level='Verbose') and Not(@Level='Debug')" + }, + { + "name": "Find all logs that has an exception property (Warning, Error & Critical with Exceptions)", + "query": "Has(@Exception)" + }, + { + "name": "Find all logs that have the property 'Duration'", + "query": "Has(Duration)" + }, + { + "name": "Find all logs that have the property 'Duration' and the duration is greater than 1000ms", + "query": "Has(Duration) and Duration > 1000" + }, + { + "name": "Find all logs that are from the namespace 'Umbraco.Core'", + "query": "StartsWith(SourceContext, 'Umbraco.Core')" + }, + { + "name": "Find all logs that use a specific log message template", + "query": "@MessageTemplate = '[Timing {TimingId}] {EndMessage} ({TimingDuration}ms)'" + } + ] + }); + + var numOfErrors = logViewerResource.getNumberOfErrors().then(function (data) { + vm.numberOfErrors = data; + }); + + var logCounts = logViewerResource.getLogLevelCounts().then(function (data) { + vm.logTypeData = []; + vm.logTypeData.push(data.Information); + vm.logTypeData.push(data.Debug); + vm.logTypeData.push(data.Warning); + vm.logTypeData.push(data.Error); + vm.logTypeData.push(data.Fatal); + }); + + var commonMsgs = logViewerResource.getMessageTemplates().then(function(data){ + vm.commonLogMessages = data; + }); + + //Set loading indicatior to false when these 3 queries complete + $q.all([savedSearches, numOfErrors, logCounts, commonMsgs]).then(function(data) { + vm.loading = false; + }); + + } + + function searchLogQuery(logQuery){ + $location.path("/developer/logViewer/search").search({lq: logQuery}); + } + + init(); + + } + + angular.module("umbraco").controller("Umbraco.Editors.LogViewer.OverviewController", LogViewerOverviewController); + +})(); diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html new file mode 100644 index 0000000000..1ba9a6d3ff --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html @@ -0,0 +1,85 @@ +
+ + + + + + + + + +
+
+ + + Saved Searches + + + + + + + + + +
+ All Logs +
+ {{search.name}} +
+
+
+ + + + Common Log Messages + + Total Unique Message types: {{ vm.commonLogMessages.length }} + + + + + + + +
+ {{ template.MessageTemplate }} + + {{ template.Count }} +
+ Show More +
+
+
+ +
+ + + Number of Errors + + {{ vm.numberOfErrors }} + + + + + + Log Types + + + + + +
+
+
+
+
\ No newline at end of file From 9f484d0fe233f1e5f8f09d4839ab6f45fb5087ca Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Thu, 13 Sep 2018 11:30:50 +0100 Subject: [PATCH 048/437] Update the overview page to link through to the search page and read the lq (log query) querystring --- .../src/views/logviewer/overview.controller.js | 6 ++++++ .../src/views/logviewer/overview.html | 2 +- .../src/views/logviewer/search.controller.js | 17 ++++++++++++++++- .../src/views/logviewer/search.html | 5 ++++- 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js index 281d228bfd..52ff25286f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js @@ -23,6 +23,7 @@ //functions vm.searchLogQuery = searchLogQuery; + vm.findMessageTemplate = findMessageTemplate; function init() { @@ -90,6 +91,11 @@ $location.path("/developer/logViewer/search").search({lq: logQuery}); } + function findMessageTemplate(template){ + var logQuery = "@MessageTemplate='" + template.MessageTemplate + "'"; + searchLogQuery(logQuery); + } + init(); } diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html index 1ba9a6d3ff..12dc459189 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html @@ -22,7 +22,7 @@ diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js index 49566138a7..3ec73ce226 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js @@ -1,13 +1,14 @@ (function () { "use strict"; - function LogViewerSearchController($q, logViewerResource, overlayService) { + function LogViewerSearchController($location, logViewerResource, overlayService) { var vm = this; vm.loading = false; vm.logsLoading = false; + vm.showBackButton = true; vm.page = {}; vm.logLevels = [ @@ -82,10 +83,18 @@ vm.findItem = findItem; vm.checkForSavedSearch = checkForSavedSearch; vm.addToSavedSearches = addToSavedSearches; + vm.back = back; function init() { + //If we have a Querystring set for lq (log query) + //Then update vm.logOptions.filterExpression + var querystring = $location.search(); + if(querystring.lq){ + vm.logOptions.filterExpression = querystring.lq; + } + vm.loading = true; logViewerResource.getSavedSearches().then(function (data) { @@ -128,6 +137,9 @@ function search(){ + //Update the querystring lq (log query) + $location.search('lq', vm.logOptions.filterExpression); + //Reset pagenumber back to 1 vm.logOptions.pageNumber = 1; getLogs(); @@ -275,6 +287,9 @@ } + function back() { + $location.path("developer/logViewer/overview"); + } init(); diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/search.html b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.html index 7ddad1e0ca..284703d7d0 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/search.html +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.html @@ -3,8 +3,10 @@ @@ -112,6 +114,7 @@ +
Total Items: {{ vm.logItems.totalItems }}
From 33fae0cd401188ba733200b01155a884cc3f2c71 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Thu, 13 Sep 2018 11:53:40 +0100 Subject: [PATCH 049/437] Fixup the back button to remove the lq querystring --- .../src/views/logviewer/search.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js index 3ec73ce226..e047881e5e 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js @@ -288,7 +288,7 @@ } function back() { - $location.path("developer/logViewer/overview"); + $location.path("developer/logViewer/overview").search('lq', null); } init(); From 2f9459f2963e932ffad88bb593b8f8e19efa7481 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Fri, 14 Sep 2018 15:17:12 +0100 Subject: [PATCH 050/437] Adds in functionality to remove items from the saved searches - Thanks Dan Booth Co-authored-by: Dan Booth Co-authored-by: Warren Buckley --- src/Umbraco.Core/Logging/Viewer/ILogViewer.cs | 7 +++- .../Logging/Viewer/JsonLogViewer.cs | 39 ++++++++++++------- .../Logging/Viewer/LogViewerSourceBase.cs | 2 + .../common/resources/logviewer.resource.js | 27 +++++++------ .../src/views/logviewer/search.controller.js | 8 +++- .../src/views/logviewer/search.html | 1 + .../Editors/LogViewerController.cs | 11 ++++-- 7 files changed, 65 insertions(+), 30 deletions(-) diff --git a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs index 4ab3a9f6bd..71a863fb3e 100644 --- a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs @@ -19,10 +19,15 @@ namespace Umbraco.Core.Logging.Viewer IEnumerable GetSavedSearches(); /// - /// Adds a new saved search to chosen datasource + /// Adds a new saved search to chosen datasource and returns the updated searches /// IEnumerable AddSavedSearch(string name, string query); + /// + /// Deletes a saved search to chosen datasource and returns the remaining searches + /// + IEnumerable DeleteSavedSearch(string name, string query); + /// /// A count of number of errors /// By counting Warnings with Exceptions, Errors & Fatal messages diff --git a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs index 1f0faf1d40..4698853ab4 100644 --- a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs @@ -11,7 +11,8 @@ namespace Umbraco.Core.Logging.Viewer { public class JsonLogViewer : LogViewerSourceBase { - + private static readonly string SearchesConfigPath = IOHelper.MapPath("~/Config/logviewer.searches.config.js"); + public override IEnumerable GetAllLogs(DateTimeOffset startDate, DateTimeOffset endDate) { var logs = new List(); @@ -32,7 +33,7 @@ namespace Umbraco.Core.Logging.Viewer var filesForCurrentDay = Directory.GetFiles(logDirectory, filesToFind); //Foreach file we find - open it - foreach(var filePath in filesForCurrentDay) + foreach (var filePath in filesForCurrentDay) { //Open log file & add contents to the log collection //Which we then use LINQ to page over @@ -50,20 +51,18 @@ namespace Umbraco.Core.Logging.Viewer } } } - + return logs; } public override IEnumerable GetSavedSearches() { //Our default implementation - //Open JSON file on disk and return serialize obj back - var path = IOHelper.MapPath("~/Config/logviewer.searches.config.js"); //If file does not exist - lets create it with an empty array - IOHelper.EnsureFileExists(path, "[]"); + IOHelper.EnsureFileExists(SearchesConfigPath, "[]"); - var rawJson = File.ReadAllText(path); + var rawJson = File.ReadAllText(SearchesConfigPath); return JsonConvert.DeserializeObject>(rawJson); } @@ -78,19 +77,33 @@ namespace Umbraco.Core.Logging.Viewer //Serilaize to JSON string var rawJson = JsonConvert.SerializeObject(searches, Formatting.Indented); - //Open file & save contents - var path = IOHelper.MapPath("~/Config/logviewer.searches.config.js"); - //If file does not exist - lets create it with an empty array - IOHelper.EnsureFileExists(path, "[]"); + IOHelper.EnsureFileExists(SearchesConfigPath, "[]"); //Write it back down to file - File.WriteAllText(path, rawJson); + File.WriteAllText(SearchesConfigPath, rawJson); //Return the updated object - so we can instantly reset the entire array from the API response //As opposed to push a new item into the array return searches; - + } + + public override IEnumerable DeleteSavedSearch(string name, string query) + { + //Get the existing items + var searches = GetSavedSearches().ToList(); + + //Removes the search + searches.RemoveAll(s => s.Name.Equals(name) && s.Query.Equals(query)); + + //Serilaize to JSON string + var rawJson = JsonConvert.SerializeObject(searches, Formatting.Indented); + + //Write it back down to file + File.WriteAllText(SearchesConfigPath, rawJson); + + //Return the updated object - so we can instantly reset the entire array from the API response + return searches; } } } diff --git a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs index 07fee47fa1..ed3032d145 100644 --- a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs +++ b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs @@ -16,6 +16,8 @@ namespace Umbraco.Core.Logging.Viewer public abstract IEnumerable AddSavedSearch(string name, string query); + public abstract IEnumerable DeleteSavedSearch(string name, string query); + public int GetNumberOfErrors(DateTimeOffset startDate, DateTimeOffset endDate) { var logs = GetAllLogs(startDate, endDate); diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/logviewer.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/logviewer.resource.js index 1182901d6b..0d7270b937 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/logviewer.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/logviewer.resource.js @@ -10,7 +10,7 @@ //the factory object returned return { - getNumberOfErrors: function(){ + getNumberOfErrors: function () { return umbRequestHelper.resourcePromise( $http.get( umbRequestHelper.getApiUrl( @@ -19,7 +19,7 @@ 'Failed to retrieve number of errors in logs'); }, - getLogLevelCounts: function(){ + getLogLevelCounts: function () { return umbRequestHelper.resourcePromise( $http.get( umbRequestHelper.getApiUrl( @@ -28,7 +28,7 @@ 'Failed to retrieve log level counts'); }, - getMessageTemplates: function(){ + getMessageTemplates: function () { return umbRequestHelper.resourcePromise( $http.get( umbRequestHelper.getApiUrl( @@ -37,7 +37,7 @@ 'Failed to retrieve log templates'); }, - getSavedSearches: function(){ + getSavedSearches: function () { return umbRequestHelper.resourcePromise( $http.get( umbRequestHelper.getApiUrl( @@ -46,20 +46,25 @@ 'Failed to retrieve saved searches'); }, - postSavedSearch: function(name, query){ + postSavedSearch: function (name, query) { return umbRequestHelper.resourcePromise( $http.post( umbRequestHelper.getApiUrl( "logViewerApiBaseUrl", - "PostSavedSearch"), {'name': name, 'query': query }), + "PostSavedSearch"), { 'name': name, 'query': query }), 'Failed to add new saved search'); - - return umbRequestHelper.resourcePromise( - $http.post(umbRequestHelper.getApiUrl("dataTypeApiBaseUrl", "PostSave"), saveModel), - "Failed to save data for data type id " + dataType.id); }, - getLogs: function(options){ + deleteSavedSearch: function (name, query) { + return umbRequestHelper.resourcePromise( + $http.post( + umbRequestHelper.getApiUrl( + "logViewerApiBaseUrl", + "DeleteSavedSearch"), { 'name': name, 'query': query }), + 'Failed to delete saved search'); + }, + + getLogs: function (options) { var defaults = { pageSize: 100, diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js index e047881e5e..ef4e1b8f9f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js @@ -83,6 +83,7 @@ vm.findItem = findItem; vm.checkForSavedSearch = checkForSavedSearch; vm.addToSavedSearches = addToSavedSearches; + vm.deleteSavedSearch = deleteSavedSearch; vm.back = back; @@ -272,9 +273,7 @@ //Resource call with two params (name & query) //API that opens the JSON and adds it to the bottom logViewerResource.postSavedSearch(model.queryName, model.queryToSave).then(function(data){ - console.log('search after add', data); vm.searches = data; - overlayService.close(); }); }, @@ -284,7 +283,12 @@ }; overlayService.open(overlay); + } + function deleteSavedSearch(model) { + logViewerResource.deleteSavedSearch(model.name, model.query).then(function (data) { + vm.searches = data; + }); } function back() { diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/search.html b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.html index 284703d7d0..e2587986d8 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/search.html +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.html @@ -83,6 +83,7 @@ {{search.name}} {{ search.query }} + diff --git a/src/Umbraco.Web/Editors/LogViewerController.cs b/src/Umbraco.Web/Editors/LogViewerController.cs index 82a4a953f0..61ba3d0a9b 100644 --- a/src/Umbraco.Web/Editors/LogViewerController.cs +++ b/src/Umbraco.Web/Editors/LogViewerController.cs @@ -1,5 +1,4 @@ -using Newtonsoft.Json; -using System; +using System; using System.Collections.Generic; using System.Web.Http; using Umbraco.Core.Logging.Viewer; @@ -27,7 +26,7 @@ namespace Umbraco.Web.Editors { return _logViewer.GetNumberOfErrors(startDate: DateTime.Now.AddDays(-1), endDate: DateTime.Now); } - + [HttpGet] public LogLevelCounts GetLogLevelCounts() { @@ -58,5 +57,11 @@ namespace Umbraco.Web.Editors { return _logViewer.AddSavedSearch(item.Name, item.Query); } + + [HttpPost] + public IEnumerable DeleteSavedSearch(SavedLogSearch item) + { + return _logViewer.DeleteSavedSearch(item.Name, item.Query); + } } } From 19310111521a58a825ea2481b425069340782bf7 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Fri, 14 Sep 2018 15:25:55 +0100 Subject: [PATCH 051/437] Adds in confirmation delete dialog for saved searches --- .../logviewersearch/logviewersearch.html | 4 +-- .../src/views/logviewer/search.controller.js | 30 +++++++++++++++---- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/common/overlays/logviewersearch/logviewersearch.html b/src/Umbraco.Web.UI.Client/src/views/common/overlays/logviewersearch/logviewersearch.html index 1a62549f4d..464a24517a 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/overlays/logviewersearch/logviewersearch.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/overlays/logviewersearch/logviewersearch.html @@ -1,11 +1,11 @@

Query:
- {{ model.queryToSave }} + {{ model.query }}

Name:
- +

\ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js index ef4e1b8f9f..f2ff154448 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js @@ -268,11 +268,11 @@ submitButtonLabel: "Save Search", disableSubmitButton: true, view: "logviewersearch", - queryToSave: vm.logOptions.filterExpression, + query: vm.logOptions.filterExpression, submit: function (model) { //Resource call with two params (name & query) //API that opens the JSON and adds it to the bottom - logViewerResource.postSavedSearch(model.queryName, model.queryToSave).then(function(data){ + logViewerResource.postSavedSearch(model.name, model.query).then(function(data){ vm.searches = data; overlayService.close(); }); @@ -285,10 +285,28 @@ overlayService.open(overlay); } - function deleteSavedSearch(model) { - logViewerResource.deleteSavedSearch(model.name, model.query).then(function (data) { - vm.searches = data; - }); + function deleteSavedSearch(searchItem) { + + var overlay = { + title: "Delete Search", + subtitle: "Are you sure you wish to delete", + closeButtonLabel: "Cancel", + submitButtonLabel: "Delete Search", + view: "default", + submit: function (model) { + //Resource call with two params (name & query) + //API that opens the JSON and adds it to the bottom + logViewerResource.deleteSavedSearch(searchItem.name, searchItem.query).then(function(data){ + vm.searches = data; + overlayService.close(); + }); + }, + close: function() { + overlayService.close(); + } + }; + + overlayService.open(overlay); } function back() { From 9f5fe7ddfe6201054957c7190ad51780cb3d07ed Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Tue, 18 Sep 2018 21:50:31 +0100 Subject: [PATCH 052/437] Adds some logic if we get 0 results back and the search expression contains no spaces (we retry with a message like filter) Moves some of the logic into methods - as we end up reusing it --- .../Logging/Viewer/LogViewerSourceBase.cs | 56 +++++++++++++++---- 1 file changed, 45 insertions(+), 11 deletions(-) diff --git a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs index ed3032d145..0c1358a143 100644 --- a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs +++ b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs @@ -54,30 +54,43 @@ namespace Umbraco.Core.Logging.Viewer string[] logLevels = null) { //Get all logs into memory (Not sure this good or not) - var logs = GetAllLogs(startDate, endDate); + var allLogs = GetAllLogs(startDate, endDate); + var logs = allLogs; //If we have a filter expression, apply it if (string.IsNullOrEmpty(filterExpression) == false) { Func filter = null; - + // If the expression evaluates then make it into a filter if (FilterLanguage.TryCreateFilter(filterExpression, out Func eval, out string error)) { filter = evt => true.Equals(eval(evt)); } - else // assume the expression was a search string and make a Like filter from that + else { - var filterSearch = $"@Message like '%{FilterLanguage.EscapeLikeExpressionContent(filterExpression)}%'"; - if (FilterLanguage.TryCreateFilter(filterSearch, out eval, out error)) - { - filter = evt => true.Equals(eval(evt)); - } + //Assume the expression was a search string and make a Like filter from that + filter = PerformMessageLikeFilter(filterExpression); } - - if (filter != null) + + //Go and filter the logs + //May be with a valid expression (could be single word & return no results) + //Failed expression so we try @Message like + logs = FilterLogs(logs, filter); + + //If logs now has a count of 0 AND filterExpression contains no spaces + //We can assume a single word search (Which would PASS creating a filter above) + if (logs.Count() == 0 && filterExpression.Contains(" ") == false) { - logs = logs.Where(filter); + //Reset logs & filter + logs = allLogs; + filter = null; + + //Do an expression using message like + filter = PerformMessageLikeFilter(filterExpression); + + //Filter the logs again with the single word + logs = FilterLogs(logs, filter); } } @@ -116,5 +129,26 @@ namespace Umbraco.Core.Logging.Viewer Items = logMessages }; } + + private Func PerformMessageLikeFilter(string filterExpression) + { + var filterSearch = $"@Message like '%{FilterLanguage.EscapeLikeExpressionContent(filterExpression)}%'"; + if (FilterLanguage.TryCreateFilter(filterSearch, out var eval, out var error)) + { + return evt => true.Equals(eval(evt)); + } + + return null; + } + + private IEnumerable FilterLogs(IEnumerable logs, Func filter) + { + if (filter != null) + { + logs = logs.Where(filter); + } + + return logs; + } } } From b54998f0af9b3bc387e9e4f381f05d19e18a8f3c Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 19 Sep 2018 15:03:34 +0100 Subject: [PATCH 053/437] Adds 'lq' aka Log Query Search querystring to be ignored for reloading the view & controller for the log viewer search --- .../src/common/services/navigation.service.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js b/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js index ffcf9f2eef..e4d0959d09 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js @@ -29,12 +29,12 @@ function navigationService($rootScope, $route, $routeParams, $log, $location, $q }); //A list of query strings defined that when changed will not cause a reload of the route - var nonRoutingQueryStrings = ["mculture", "cculture"]; - var retainedQueryStrings = ['mculture']; + var nonRoutingQueryStrings = ["mculture", "cculture", "lq"]; + var retainedQueryStrings = ["mculture"]; //used to track the current dialog object var currentDialog = null; - + //tracks the user profile dialog var userDialog = null; From 2ed048e4e14435fd3d6bd128aa04dcc0bf11f9df Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 19 Sep 2018 21:22:10 +0100 Subject: [PATCH 054/437] Improves logic for single word search to use Message Like expression - Thanks Dan Booth Co-authored-by: Dan Booth Co-authored-by: Warren Buckley --- .../Logging/Viewer/LogViewerSourceBase.cs | 45 +++++++++---------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs index 0c1358a143..8db64d6256 100644 --- a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs +++ b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs @@ -10,6 +10,8 @@ namespace Umbraco.Core.Logging.Viewer { public abstract class LogViewerSourceBase : ILogViewer { + private static readonly string expressionOperators = "()+=*<>%-"; + public abstract IEnumerable GetAllLogs(DateTimeOffset startDate, DateTimeOffset endDate); public abstract IEnumerable GetSavedSearches(); @@ -57,39 +59,32 @@ namespace Umbraco.Core.Logging.Viewer var allLogs = GetAllLogs(startDate, endDate); var logs = allLogs; - //If we have a filter expression, apply it + //If we have a filter expression check it and apply if (string.IsNullOrEmpty(filterExpression) == false) { Func filter = null; - // If the expression evaluates then make it into a filter - if (FilterLanguage.TryCreateFilter(filterExpression, out Func eval, out string error)) + // If the expression is one word and doesn't contain a serilog operator then we can perform a like search + if (!filterExpression.Contains(" ") && !filterExpression.ContainsAny(expressionOperators.Select(c => c))) { - filter = evt => true.Equals(eval(evt)); - } - else - { - //Assume the expression was a search string and make a Like filter from that filter = PerformMessageLikeFilter(filterExpression); } - - //Go and filter the logs - //May be with a valid expression (could be single word & return no results) - //Failed expression so we try @Message like - logs = FilterLogs(logs, filter); - - //If logs now has a count of 0 AND filterExpression contains no spaces - //We can assume a single word search (Which would PASS creating a filter above) - if (logs.Count() == 0 && filterExpression.Contains(" ") == false) + else // check if it's a valid expression { - //Reset logs & filter - logs = allLogs; - filter = null; + // If the expression evaluates then make it into a filter + if (FilterLanguage.TryCreateFilter(filterExpression, out Func eval, out string error)) + { + filter = evt => true.Equals(eval(evt)); + } + else + { + //Assume the expression was a search string and make a Like filter from that + filter = PerformMessageLikeFilter(filterExpression); + } + } - //Do an expression using message like - filter = PerformMessageLikeFilter(filterExpression); - - //Filter the logs again with the single word + if (filter != null) + { logs = FilterLogs(logs, filter); } } @@ -110,7 +105,7 @@ namespace Umbraco.Core.Logging.Viewer long pageIndex = pageNumber - 1; //Order By, Skip, Take & Select - IEnumerable logMessages = logs + var logMessages = logs .OrderBy(l => l.Timestamp, orderDirection) .Skip(pageSize * (pageNumber - 1)) .Take(pageSize) From 964dd0374d9a8cd7cea6865645ee4b0325197fe6 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Mon, 24 Sep 2018 13:12:30 +0100 Subject: [PATCH 055/437] Makes SavedSearches Get, Add & Delete methods virtual - as you may only want to implement the GetLogs but NOT the GetSavedSearch method for example --- .../Logging/Viewer/JsonLogViewer.cs | 55 +------------------ .../Logging/Viewer/LogViewerSourceBase.cs | 54 +++++++++++++++++- 2 files changed, 53 insertions(+), 56 deletions(-) diff --git a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs index 4698853ab4..6c384db401 100644 --- a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs @@ -10,8 +10,7 @@ using Umbraco.Core.IO; namespace Umbraco.Core.Logging.Viewer { public class JsonLogViewer : LogViewerSourceBase - { - private static readonly string SearchesConfigPath = IOHelper.MapPath("~/Config/logviewer.searches.config.js"); + { public override IEnumerable GetAllLogs(DateTimeOffset startDate, DateTimeOffset endDate) { @@ -54,56 +53,6 @@ namespace Umbraco.Core.Logging.Viewer return logs; } - - public override IEnumerable GetSavedSearches() - { - //Our default implementation - - //If file does not exist - lets create it with an empty array - IOHelper.EnsureFileExists(SearchesConfigPath, "[]"); - - var rawJson = File.ReadAllText(SearchesConfigPath); - return JsonConvert.DeserializeObject>(rawJson); - } - - public override IEnumerable AddSavedSearch(string name, string query) - { - //Get the existing items - var searches = GetSavedSearches().ToList(); - - //Add the new item to the bottom of the list - searches.Add(new SavedLogSearch { Name = name, Query = query }); - - //Serilaize to JSON string - var rawJson = JsonConvert.SerializeObject(searches, Formatting.Indented); - - //If file does not exist - lets create it with an empty array - IOHelper.EnsureFileExists(SearchesConfigPath, "[]"); - - //Write it back down to file - File.WriteAllText(SearchesConfigPath, rawJson); - - //Return the updated object - so we can instantly reset the entire array from the API response - //As opposed to push a new item into the array - return searches; - } - - public override IEnumerable DeleteSavedSearch(string name, string query) - { - //Get the existing items - var searches = GetSavedSearches().ToList(); - - //Removes the search - searches.RemoveAll(s => s.Name.Equals(name) && s.Query.Equals(query)); - - //Serilaize to JSON string - var rawJson = JsonConvert.SerializeObject(searches, Formatting.Indented); - - //Write it back down to file - File.WriteAllText(SearchesConfigPath, rawJson); - - //Return the updated object - so we can instantly reset the entire array from the API response - return searches; - } + } } diff --git a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs index 8db64d6256..b57542e6c3 100644 --- a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs +++ b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs @@ -1,8 +1,10 @@ using System; using System.Collections.Generic; using System.Linq; +using Newtonsoft.Json; using Serilog.Events; using Serilog.Filters.Expressions; +using Umbraco.Core.IO; using Umbraco.Core.Models; using Umbraco.Core.Persistence.DatabaseModelDefinitions; @@ -11,14 +13,60 @@ namespace Umbraco.Core.Logging.Viewer public abstract class LogViewerSourceBase : ILogViewer { private static readonly string expressionOperators = "()+=*<>%-"; + private static readonly string SearchesConfigPath = IOHelper.MapPath("~/Config/logviewer.searches.config.js"); public abstract IEnumerable GetAllLogs(DateTimeOffset startDate, DateTimeOffset endDate); - public abstract IEnumerable GetSavedSearches(); + public virtual IEnumerable GetSavedSearches() + { + //Our default implementation - public abstract IEnumerable AddSavedSearch(string name, string query); + //If file does not exist - lets create it with an empty array + IOHelper.EnsureFileExists(SearchesConfigPath, "[]"); - public abstract IEnumerable DeleteSavedSearch(string name, string query); + var rawJson = System.IO.File.ReadAllText(SearchesConfigPath); + return JsonConvert.DeserializeObject>(rawJson); + } + + public virtual IEnumerable AddSavedSearch(string name, string query) + { + //Get the existing items + var searches = GetSavedSearches().ToList(); + + //Add the new item to the bottom of the list + searches.Add(new SavedLogSearch { Name = name, Query = query }); + + //Serilaize to JSON string + var rawJson = JsonConvert.SerializeObject(searches, Formatting.Indented); + + //If file does not exist - lets create it with an empty array + IOHelper.EnsureFileExists(SearchesConfigPath, "[]"); + + //Write it back down to file + System.IO.File.WriteAllText(SearchesConfigPath, rawJson); + + //Return the updated object - so we can instantly reset the entire array from the API response + //As opposed to push a new item into the array + return searches; + } + + public virtual IEnumerable DeleteSavedSearch(string name, string query) + { + //Get the existing items + var searches = GetSavedSearches().ToList(); + + //Removes the search + searches.RemoveAll(s => s.Name.Equals(name) && s.Query.Equals(query)); + + //Serilaize to JSON string + var rawJson = JsonConvert.SerializeObject(searches, Formatting.Indented); + + //Write it back down to file + System.IO.File.WriteAllText(SearchesConfigPath, rawJson); + + //Return the updated object - so we can instantly reset the entire array from the API response + return searches; + } public int GetNumberOfErrors(DateTimeOffset startDate, DateTimeOffset endDate) { From 168f4d33d35878961c66da78808d5c77f377a37c Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 26 Sep 2018 18:24:40 +0100 Subject: [PATCH 056/437] Update failing test - as the numkber of trees has increased (Added the Log Viewer tree controller & type attribute) --- src/Umbraco.Tests/Composing/TypeFinderTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Tests/Composing/TypeFinderTests.cs b/src/Umbraco.Tests/Composing/TypeFinderTests.cs index 955f6f94c8..a8624e8871 100644 --- a/src/Umbraco.Tests/Composing/TypeFinderTests.cs +++ b/src/Umbraco.Tests/Composing/TypeFinderTests.cs @@ -90,7 +90,7 @@ namespace Umbraco.Tests.Composing Assert.AreEqual(0, typesFound.Count()); // 0 classes in _assemblies are marked with [Tree] typesFound = TypeFinder.FindClassesWithAttribute(new[] { typeof (UmbracoContext).Assembly }); - Assert.AreEqual(21, typesFound.Count()); // + classes in Umbraco.Web are marked with [Tree] + Assert.AreEqual(22, typesFound.Count()); // + classes in Umbraco.Web are marked with [Tree] } private static ProfilingLogger GetTestProfilingLogger() From 45b5cb02576228984fc306d47f7c9cf47e900d14 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 3 Oct 2018 17:43:42 +0100 Subject: [PATCH 057/437] Move the tree from developer section to settings section - as we say goodbye to the developer section --- src/Umbraco.Web.UI/config/trees.config | 3 ++- src/Umbraco.Web/Trees/LogViewerTreeController.cs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI/config/trees.config b/src/Umbraco.Web.UI/config/trees.config index fd32380bcb..3e905c5056 100644 --- a/src/Umbraco.Web.UI/config/trees.config +++ b/src/Umbraco.Web.UI/config/trees.config @@ -17,12 +17,13 @@ + - + diff --git a/src/Umbraco.Web/Trees/LogViewerTreeController.cs b/src/Umbraco.Web/Trees/LogViewerTreeController.cs index a8cee48ac7..8df32be866 100644 --- a/src/Umbraco.Web/Trees/LogViewerTreeController.cs +++ b/src/Umbraco.Web/Trees/LogViewerTreeController.cs @@ -7,7 +7,7 @@ using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Trees { [UmbracoTreeAuthorize(Constants.Trees.LogViewer)] - [Tree(Constants.Applications.Developer, Constants.Trees.LogViewer, null, sortOrder: 7)] + [Tree(Constants.Applications.Settings, Constants.Trees.LogViewer, null, sortOrder: 7)] [PluginController("UmbracoTrees")] [CoreTree] public class LogViewerTreeController : TreeController @@ -33,7 +33,7 @@ namespace Umbraco.Web.Trees var root = base.CreateRootNode(queryStrings); //this will load in a custom UI instead of the dashboard for the root node - root.RoutePath = string.Format("{0}/{1}/{2}", Constants.Applications.Developer, Constants.Trees.LogViewer, "overview"); + root.RoutePath = string.Format("{0}/{1}/{2}", Constants.Applications.Settings, Constants.Trees.LogViewer, "overview"); root.Icon = "icon-bug"; root.HasChildren = false; root.MenuUrl = null; From 5084c82ac7f18c85c634664eaa5364e79de4d488 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Thu, 4 Oct 2018 15:13:56 +0100 Subject: [PATCH 058/437] Suggestion after talking with Stephane for some refactorings --- .../Logging/Viewer/CountingFilter.cs | 50 ++++++++++ .../Logging/Viewer/ErrorCounterFilter.cs | 18 ++++ .../Logging/Viewer/ExpressionFilter.cs | 56 +++++++++++ src/Umbraco.Core/Logging/Viewer/ILogFilter.cs | 9 ++ src/Umbraco.Core/Logging/Viewer/ILogViewer.cs | 2 +- .../Logging/Viewer/JsonLogViewer.cs | 32 ++++-- .../Logging/Viewer/LogViewerSourceBase.cs | 99 +++++-------------- .../Logging/Viewer/MessageTemplateFilter.cs | 28 ++++++ src/Umbraco.Core/Umbraco.Core.csproj | 5 + 9 files changed, 212 insertions(+), 87 deletions(-) create mode 100644 src/Umbraco.Core/Logging/Viewer/CountingFilter.cs create mode 100644 src/Umbraco.Core/Logging/Viewer/ErrorCounterFilter.cs create mode 100644 src/Umbraco.Core/Logging/Viewer/ExpressionFilter.cs create mode 100644 src/Umbraco.Core/Logging/Viewer/ILogFilter.cs create mode 100644 src/Umbraco.Core/Logging/Viewer/MessageTemplateFilter.cs diff --git a/src/Umbraco.Core/Logging/Viewer/CountingFilter.cs b/src/Umbraco.Core/Logging/Viewer/CountingFilter.cs new file mode 100644 index 0000000000..36c3c9c45c --- /dev/null +++ b/src/Umbraco.Core/Logging/Viewer/CountingFilter.cs @@ -0,0 +1,50 @@ +using Serilog.Events; + +namespace Umbraco.Core.Logging.Viewer +{ + public class CountingFilter : ILogFilter + { + public CountingFilter() + { + Counts = new LogLevelCounts(); + } + + public LogLevelCounts Counts { get; set; } + + public bool TakeLogEvent(LogEvent e) + { + + switch (e.Level) + { + case LogEventLevel.Verbose: + break; + + case LogEventLevel.Debug: + Counts.Debug++; + break; + + case LogEventLevel.Information: + Counts.Information++; + break; + + case LogEventLevel.Warning: + Counts.Warning++; + break; + + case LogEventLevel.Error: + Counts.Error++; + break; + + case LogEventLevel.Fatal: + Counts.Fatal++; + break; + + default: + break; + } + + //Don't add it to the list + return false; + } + } +} diff --git a/src/Umbraco.Core/Logging/Viewer/ErrorCounterFilter.cs b/src/Umbraco.Core/Logging/Viewer/ErrorCounterFilter.cs new file mode 100644 index 0000000000..8889b62a03 --- /dev/null +++ b/src/Umbraco.Core/Logging/Viewer/ErrorCounterFilter.cs @@ -0,0 +1,18 @@ +using Serilog.Events; + +namespace Umbraco.Core.Logging.Viewer +{ + public class ErrorCounterFilter : ILogFilter + { + public int count; + + public bool TakeLogEvent(LogEvent e) + { + if (e.Level == LogEventLevel.Fatal || e.Level == LogEventLevel.Error || e.Exception != null) + count++; + + //Don't add it to the list + return false; + } + } +} diff --git a/src/Umbraco.Core/Logging/Viewer/ExpressionFilter.cs b/src/Umbraco.Core/Logging/Viewer/ExpressionFilter.cs new file mode 100644 index 0000000000..c971c9b394 --- /dev/null +++ b/src/Umbraco.Core/Logging/Viewer/ExpressionFilter.cs @@ -0,0 +1,56 @@ +using System; +using System.Linq; +using Serilog.Events; +using Serilog.Filters.Expressions; + +namespace Umbraco.Core.Logging.Viewer +{ + //Log Expression Filters (pass in filter exp string) + public class ExpressionFilter : ILogFilter + { + private Func _filter; + private readonly string expressionOperators = "()+=*<>%-"; + + public ExpressionFilter(string filterExpression) + { + Func filter = null; + + // If the expression is one word and doesn't contain a serilog operator then we can perform a like search + if (!filterExpression.Contains(" ") && !filterExpression.ContainsAny(expressionOperators.Select(c => c))) + { + filter = PerformMessageLikeFilter(filterExpression); + } + else // check if it's a valid expression + { + // If the expression evaluates then make it into a filter + if (FilterLanguage.TryCreateFilter(filterExpression, out Func eval, out string error)) + { + filter = evt => true.Equals(eval(evt)); + } + else + { + //Assume the expression was a search string and make a Like filter from that + filter = PerformMessageLikeFilter(filterExpression); + } + } + + _filter = filter; + } + + public bool TakeLogEvent(LogEvent e) + { + return _filter(e); + } + + private Func PerformMessageLikeFilter(string filterExpression) + { + var filterSearch = $"@Message like '%{FilterLanguage.EscapeLikeExpressionContent(filterExpression)}%'"; + if (FilterLanguage.TryCreateFilter(filterSearch, out var eval, out var error)) + { + return evt => true.Equals(eval(evt)); + } + + return null; + } + } +} diff --git a/src/Umbraco.Core/Logging/Viewer/ILogFilter.cs b/src/Umbraco.Core/Logging/Viewer/ILogFilter.cs new file mode 100644 index 0000000000..3e1deb4923 --- /dev/null +++ b/src/Umbraco.Core/Logging/Viewer/ILogFilter.cs @@ -0,0 +1,9 @@ +using Serilog.Events; + +namespace Umbraco.Core.Logging.Viewer +{ + public interface ILogFilter + { + bool TakeLogEvent(LogEvent e); + } +} diff --git a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs index 71a863fb3e..c3e17931a3 100644 --- a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs @@ -11,7 +11,7 @@ namespace Umbraco.Core.Logging.Viewer /// /// Get all logs from your chosen datasource back as Serilog LogEvents /// - IEnumerable GetAllLogs(DateTimeOffset startDate, DateTimeOffset endDate); + IEnumerable GetLogs(DateTimeOffset startDate, DateTimeOffset endDate, ILogFilter filter, int skip, int take); /// /// Get all saved searches from your chosen datasource diff --git a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs index 6c384db401..22e02ea991 100644 --- a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs @@ -1,18 +1,14 @@ using System; using System.Collections.Generic; using System.IO; -using System.Linq; -using Newtonsoft.Json; using Serilog.Events; using Serilog.Formatting.Compact.Reader; -using Umbraco.Core.IO; namespace Umbraco.Core.Logging.Viewer { - public class JsonLogViewer : LogViewerSourceBase + public partial class JsonLogViewer : LogViewerSourceBase { - - public override IEnumerable GetAllLogs(DateTimeOffset startDate, DateTimeOffset endDate) + public override IEnumerable GetLogs(DateTimeOffset startDate, DateTimeOffset endDate, ILogFilter filter, int skip, int take) { var logs = new List(); @@ -22,6 +18,8 @@ namespace Umbraco.Core.Logging.Viewer //Log Directory var logDirectory = $@"{AppDomain.CurrentDomain.BaseDirectory}\App_Data\Logs\"; + var count = 0; + //foreach full day in the range - see if we can find one or more filenames that end with //yyyyMMdd.json - Ends with due to MachineName in filenames - could be 1 or more due to load balancing for (var day = startDate.Date; day.Date <= endDate.Date; day = day.AddDays(1)) @@ -44,7 +42,24 @@ namespace Umbraco.Core.Logging.Viewer LogEvent evt; while (reader.TryRead(out evt)) { - logs.Add(evt); + //TODO - convert psuedo code + if (count > skip + take) + { + break; + } + + if (count < skip) + { + count++; + continue; + } + + if (filter.TakeLogEvent(evt)) + { + logs.Add(evt); + } + + count++; } } } @@ -52,7 +67,6 @@ namespace Umbraco.Core.Logging.Viewer } return logs; - } - + } } } diff --git a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs index b57542e6c3..7f0531a570 100644 --- a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs +++ b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs @@ -12,10 +12,10 @@ namespace Umbraco.Core.Logging.Viewer { public abstract class LogViewerSourceBase : ILogViewer { - private static readonly string expressionOperators = "()+=*<>%-"; + private static readonly string SearchesConfigPath = IOHelper.MapPath("~/Config/logviewer.searches.config.js"); - public abstract IEnumerable GetAllLogs(DateTimeOffset startDate, DateTimeOffset endDate); + public abstract IEnumerable GetLogs(DateTimeOffset startDate, DateTimeOffset endDate, ILogFilter filter, int skip, int take); public virtual IEnumerable GetSavedSearches() { @@ -70,29 +70,26 @@ namespace Umbraco.Core.Logging.Viewer public int GetNumberOfErrors(DateTimeOffset startDate, DateTimeOffset endDate) { - var logs = GetAllLogs(startDate, endDate); - return logs.Count(x => x.Level == LogEventLevel.Fatal || x.Level == LogEventLevel.Error || x.Exception != null); + var errorCounter = new ErrorCounterFilter(); + GetLogs(DateTime.Now, DateTime.Now, errorCounter, 0, int.MaxValue); + return errorCounter.count; } public LogLevelCounts GetLogLevelCounts(DateTimeOffset startDate, DateTimeOffset endDate) { - var logs = GetAllLogs(startDate, endDate); - return new LogLevelCounts - { - Information = logs.Count(x => x.Level == LogEventLevel.Information), - Debug = logs.Count(x => x.Level == LogEventLevel.Debug), - Warning = logs.Count(x => x.Level == LogEventLevel.Warning), - Error = logs.Count(x => x.Level == LogEventLevel.Error), - Fatal = logs.Count(x => x.Level == LogEventLevel.Fatal) - }; + var counter = new CountingFilter(); + GetLogs(DateTime.Now, DateTime.Now, counter, 0, int.MaxValue); + return counter.Counts; } public IEnumerable GetMessageTemplates(DateTimeOffset startDate, DateTimeOffset endDate) { - var logs = GetAllLogs(startDate, endDate); - var templates = logs.GroupBy(x => x.MessageTemplate.Text) - .Select(g => new LogTemplate { MessageTemplate = g.Key, Count = g.Count() }) - .OrderByDescending(x => x.Count); + var messageTemplates = new MessageTemplateFilter(); + GetLogs(DateTime.Now, DateTime.Now, messageTemplates, 0, int.MaxValue); + + var templates = messageTemplates.counts. + Select(x => new LogTemplate { MessageTemplate = x.Key, Count = x.Value }) + .OrderByDescending(x=> x.Count); return templates; } @@ -103,40 +100,9 @@ namespace Umbraco.Core.Logging.Viewer string filterExpression = null, string[] logLevels = null) { - //Get all logs into memory (Not sure this good or not) - var allLogs = GetAllLogs(startDate, endDate); - var logs = allLogs; - - //If we have a filter expression check it and apply - if (string.IsNullOrEmpty(filterExpression) == false) - { - Func filter = null; - - // If the expression is one word and doesn't contain a serilog operator then we can perform a like search - if (!filterExpression.Contains(" ") && !filterExpression.ContainsAny(expressionOperators.Select(c => c))) - { - filter = PerformMessageLikeFilter(filterExpression); - } - else // check if it's a valid expression - { - // If the expression evaluates then make it into a filter - if (FilterLanguage.TryCreateFilter(filterExpression, out Func eval, out string error)) - { - filter = evt => true.Equals(eval(evt)); - } - else - { - //Assume the expression was a search string and make a Like filter from that - filter = PerformMessageLikeFilter(filterExpression); - } - } - - if (filter != null) - { - logs = FilterLogs(logs, filter); - } - } - + var expression = new ExpressionFilter(filterExpression); + var filteredLogs = GetLogs(DateTime.Now, DateTime.Now, expression, 0, int.MaxValue); + //This is user used the checkbox UI to toggle which log levels they wish to see //If an empty array - its implied all levels to be viewed if (logLevels.Length > 0) @@ -144,16 +110,16 @@ namespace Umbraco.Core.Logging.Viewer var logsAfterLevelFilters = new List(); foreach (var level in logLevels) { - logsAfterLevelFilters.AddRange(logs.Where(x => x.Level.ToString() == level)); + logsAfterLevelFilters.AddRange(filteredLogs.Where(x => x.Level.ToString() == level)); } - logs = logsAfterLevelFilters; + filteredLogs = logsAfterLevelFilters; } - long totalRecords = logs.Count(); + long totalRecords = filteredLogs.Count(); long pageIndex = pageNumber - 1; //Order By, Skip, Take & Select - var logMessages = logs + var logMessages = filteredLogs .OrderBy(l => l.Timestamp, orderDirection) .Skip(pageSize * (pageNumber - 1)) .Take(pageSize) @@ -171,27 +137,6 @@ namespace Umbraco.Core.Logging.Viewer { Items = logMessages }; - } - - private Func PerformMessageLikeFilter(string filterExpression) - { - var filterSearch = $"@Message like '%{FilterLanguage.EscapeLikeExpressionContent(filterExpression)}%'"; - if (FilterLanguage.TryCreateFilter(filterSearch, out var eval, out var error)) - { - return evt => true.Equals(eval(evt)); - } - - return null; - } - - private IEnumerable FilterLogs(IEnumerable logs, Func filter) - { - if (filter != null) - { - logs = logs.Where(filter); - } - - return logs; - } + } } } diff --git a/src/Umbraco.Core/Logging/Viewer/MessageTemplateFilter.cs b/src/Umbraco.Core/Logging/Viewer/MessageTemplateFilter.cs new file mode 100644 index 0000000000..01f9d7c290 --- /dev/null +++ b/src/Umbraco.Core/Logging/Viewer/MessageTemplateFilter.cs @@ -0,0 +1,28 @@ +using System.Collections.Generic; +using Serilog.Events; + +namespace Umbraco.Core.Logging.Viewer +{ + public class MessageTemplateFilter : ILogFilter + { + public Dictionary counts = new Dictionary(); + + public bool TakeLogEvent(LogEvent e) + { + var templateText = e.MessageTemplate.Text; + if (counts.TryGetValue(templateText, out var count)) + { + count++; + } + else + { + count = 1; + } + + counts[templateText] = count; + + //Don't add it to the list + return false; + } + } +} diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 6a2ef30aa5..7d5ce2f0ec 100644 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -329,6 +329,10 @@ + + + + @@ -344,6 +348,7 @@ + From dce485bc6f687451ce0134aacb0097ad0527dcda Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Mon, 29 Oct 2018 10:41:58 +0000 Subject: [PATCH 059/437] Adds chartjs & the angular wrapper lib to package.json now that bower has been removed --- src/Umbraco.Web.UI.Client/package-lock.json | 56 ++++++++++++++++++++- src/Umbraco.Web.UI.Client/package.json | 2 + 2 files changed, 56 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/package-lock.json b/src/Umbraco.Web.UI.Client/package-lock.json index 9233b24d53..b4d3e4e0ad 100644 --- a/src/Umbraco.Web.UI.Client/package-lock.json +++ b/src/Umbraco.Web.UI.Client/package-lock.json @@ -976,6 +976,26 @@ "resolved": "https://registry.npmjs.org/angular-animate/-/angular-animate-1.7.5.tgz", "integrity": "sha512-kU/fHIGf2a4a3bH7E1tzALTHk+QfoUSCK9fEcMFisd6ZWvNDwPzXWAilItqOC3EDiAXPmGHaNc9/aXiD9xrAxQ==" }, + "angular-chart.js": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/angular-chart.js/-/angular-chart.js-1.1.1.tgz", + "integrity": "sha1-SfDhjQgXYrbUyXkeSHr/L7sw9a4=", + "requires": { + "angular": "1.x", + "chart.js": "2.3.x" + }, + "dependencies": { + "chart.js": { + "version": "2.3.0", + "resolved": "http://registry.npmjs.org/chart.js/-/chart.js-2.3.0.tgz", + "integrity": "sha1-QEYOSOLEF8BfwzJc2E97AA3H19Y=", + "requires": { + "chartjs-color": "^2.0.0", + "moment": "^2.10.6" + } + } + } + }, "angular-cookies": { "version": "1.7.5", "resolved": "https://registry.npmjs.org/angular-cookies/-/angular-cookies-1.7.5.tgz", @@ -2164,6 +2184,39 @@ "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", "dev": true }, + "chart.js": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-2.7.3.tgz", + "integrity": "sha512-3+7k/DbR92m6BsMUYP6M0dMsMVZpMnwkUyNSAbqolHKsbIzH2Q4LWVEHHYq7v0fmEV8whXE0DrjANulw9j2K5g==", + "requires": { + "chartjs-color": "^2.1.0", + "moment": "^2.10.2" + } + }, + "chartjs-color": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/chartjs-color/-/chartjs-color-2.2.0.tgz", + "integrity": "sha1-hKL7dVeH7YXDndbdjHsdiEKbrq4=", + "requires": { + "chartjs-color-string": "^0.5.0", + "color-convert": "^0.5.3" + }, + "dependencies": { + "color-convert": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-0.5.3.tgz", + "integrity": "sha1-vbbGnOZg+t/+CwAHzER+G59ygr0=" + } + } + }, + "chartjs-color-string": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/chartjs-color-string/-/chartjs-color-string-0.5.0.tgz", + "integrity": "sha512-amWNvCOXlOUYxZVDSa0YOab5K/lmEhbFNKI55PWc4mlv28BDzA7zaoQTGxSBgJMHIW+hGX8YUrvw/FH4LyhwSQ==", + "requires": { + "color-name": "^1.0.0" + } + }, "chokidar": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", @@ -2420,8 +2473,7 @@ "color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "color-string": { "version": "0.3.0", diff --git a/src/Umbraco.Web.UI.Client/package.json b/src/Umbraco.Web.UI.Client/package.json index 69c046624f..6b1ebcc88b 100644 --- a/src/Umbraco.Web.UI.Client/package.json +++ b/src/Umbraco.Web.UI.Client/package.json @@ -8,6 +8,7 @@ "ace-builds": "1.3.3", "angular": "1.7.5", "angular-animate": "1.7.5", + "angular-chart.js": "^1.1.1", "angular-cookies": "1.7.5", "angular-dynamic-locale": "0.1.37", "angular-i18n": "1.7.5", @@ -20,6 +21,7 @@ "angular-ui-sortable": "0.15.0", "animejs": "2.2.0", "bootstrap-social": "4.8.0", + "chart.js": "^2.7.3", "clipboard": "2.0.0", "codemirror": "5.3.0", "diff": "3.4.0", From f2667210b798283c7f6f032cf7f12a98f8bb73f2 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Mon, 29 Oct 2018 11:15:37 +0000 Subject: [PATCH 060/437] Add in chartjs & angular wrapper lib into the gulp to ensure they get copied over from node_modules --- src/Umbraco.Web.UI.Client/gulpfile.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Umbraco.Web.UI.Client/gulpfile.js b/src/Umbraco.Web.UI.Client/gulpfile.js index d1bbfe65db..3bf58a0109 100644 --- a/src/Umbraco.Web.UI.Client/gulpfile.js +++ b/src/Umbraco.Web.UI.Client/gulpfile.js @@ -209,6 +209,11 @@ gulp.task('dependencies', function () { "src": ["./node_modules/angular-animate/angular-animate.js"], "base": "./node_modules/angular-animate" }, + { + "name": "angular-chart.js", + "src": ["./node_modules/angular-chart.js/dist/angular-chart.min.js"], + "base": "./node_modules/angular-chart.js/dist" + }, { "name": "angular-i18n", "src": [ @@ -245,6 +250,11 @@ gulp.task('dependencies', function () { "src": ["./node_modules/bootstrap-social/bootstrap-social.css"], "base": "./node_modules/bootstrap-social" }, + { + "name": "chart.js", + "src": ["./node_modules/chart.js/dist/Chart.min.js"], + "base": "./node_modules/chart.js/dist" + }, { "name": "clipboard", "src": ["./node_modules/clipboard/dist/clipboard.min.js"], From 45e892a4b1f9cbaace7b68141a06c65dfbb00e3d Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Mon, 29 Oct 2018 14:41:14 +0000 Subject: [PATCH 061/437] Now that developer section is no more - update the routes to use 'settings' --- .../src/views/logviewer/overview.controller.js | 2 +- .../src/views/logviewer/search.controller.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js index 52ff25286f..d1eb73b2b3 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js @@ -88,7 +88,7 @@ } function searchLogQuery(logQuery){ - $location.path("/developer/logViewer/search").search({lq: logQuery}); + $location.path("/settings/logViewer/search").search({lq: logQuery}); } function findMessageTemplate(template){ diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js index f2ff154448..e2f159199c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js @@ -310,7 +310,7 @@ } function back() { - $location.path("developer/logViewer/overview").search('lq', null); + $location.path("settings/logViewer/overview").search('lq', null); } init(); From 436a6df917da0b3bea796da3c0471b12889db148 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Tue, 30 Oct 2018 12:33:28 +0000 Subject: [PATCH 062/437] Fix up log viewer - if viewing all log items & filterExpression is null or emtpy string return all log items --- .../Logging/Viewer/ExpressionFilter.cs | 39 ++++++++++++------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/src/Umbraco.Core/Logging/Viewer/ExpressionFilter.cs b/src/Umbraco.Core/Logging/Viewer/ExpressionFilter.cs index c971c9b394..c559b55c95 100644 --- a/src/Umbraco.Core/Logging/Viewer/ExpressionFilter.cs +++ b/src/Umbraco.Core/Logging/Viewer/ExpressionFilter.cs @@ -15,30 +15,39 @@ namespace Umbraco.Core.Logging.Viewer { Func filter = null; - // If the expression is one word and doesn't contain a serilog operator then we can perform a like search - if (!filterExpression.Contains(" ") && !filterExpression.ContainsAny(expressionOperators.Select(c => c))) + if (string.IsNullOrEmpty(filterExpression) == false) { - filter = PerformMessageLikeFilter(filterExpression); - } - else // check if it's a valid expression - { - // If the expression evaluates then make it into a filter - if (FilterLanguage.TryCreateFilter(filterExpression, out Func eval, out string error)) + // If the expression is one word and doesn't contain a serilog operator then we can perform a like search + if (!filterExpression.Contains(" ") && !filterExpression.ContainsAny(expressionOperators.Select(c => c))) { - filter = evt => true.Equals(eval(evt)); - } - else - { - //Assume the expression was a search string and make a Like filter from that filter = PerformMessageLikeFilter(filterExpression); } - } + else // check if it's a valid expression + { + // If the expression evaluates then make it into a filter + if (FilterLanguage.TryCreateFilter(filterExpression, out Func eval, out string error)) + { + filter = evt => true.Equals(eval(evt)); + } + else + { + //Assume the expression was a search string and make a Like filter from that + filter = PerformMessageLikeFilter(filterExpression); + } + } - _filter = filter; + _filter = filter; + } } public bool TakeLogEvent(LogEvent e) { + if(_filter == null) + { + //If no filter has been setup - take all log items + return true; + } + return _filter(e); } From 1c9a960f3dcb882e363d8f803b4efd2ff1165a15 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Tue, 30 Oct 2018 12:46:54 +0000 Subject: [PATCH 063/437] Remove the date picker ranges - as not sure how to do the UI/UX best for this --- .../src/views/logviewer/search.html | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/search.html b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.html index e2587986d8..dc61f987b2 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/search.html +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.html @@ -43,20 +43,6 @@ - - From  - - - - To  - - From 569241eba37c05c8659cc45dfe4536f2dd23279c Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 31 Oct 2018 11:18:55 +0000 Subject: [PATCH 064/437] Bumped [Tree] attribute type finder tests to 22 as now there is a new tree for log viewer --- src/Umbraco.Tests/Composing/TypeFinderTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Tests/Composing/TypeFinderTests.cs b/src/Umbraco.Tests/Composing/TypeFinderTests.cs index 955f6f94c8..a8624e8871 100644 --- a/src/Umbraco.Tests/Composing/TypeFinderTests.cs +++ b/src/Umbraco.Tests/Composing/TypeFinderTests.cs @@ -90,7 +90,7 @@ namespace Umbraco.Tests.Composing Assert.AreEqual(0, typesFound.Count()); // 0 classes in _assemblies are marked with [Tree] typesFound = TypeFinder.FindClassesWithAttribute(new[] { typeof (UmbracoContext).Assembly }); - Assert.AreEqual(21, typesFound.Count()); // + classes in Umbraco.Web are marked with [Tree] + Assert.AreEqual(22, typesFound.Count()); // + classes in Umbraco.Web are marked with [Tree] } private static ProfilingLogger GetTestProfilingLogger() From 24a6aecd735b5b694411d90bf80b100b73f8327f Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Thu, 1 Nov 2018 16:14:03 +0000 Subject: [PATCH 065/437] Adds in a new API endpoint to get the size of logs - which will determine to display a warning message if the filesize is too big to read (to help prevent the CPU & memory being eaten up & killing the site) --- src/Umbraco.Core/Logging/Viewer/ILogViewer.cs | 2 + .../Logging/Viewer/JsonLogViewer.cs | 41 ++++++++++++++++++- .../Logging/Viewer/LogViewerSourceBase.cs | 5 ++- .../Editors/LogViewerController.cs | 29 +++++++++++++ 4 files changed, 74 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs index c3e17931a3..1f23353608 100644 --- a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs @@ -44,6 +44,8 @@ namespace Umbraco.Core.Logging.Viewer /// IEnumerable GetMessageTemplates(DateTimeOffset startDate, DateTimeOffset endDate); + long GetLogSize(DateTimeOffset startDate, DateTimeOffset endDate); + /// /// Returns the collection of logs /// diff --git a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs index 22e02ea991..4e887352d4 100644 --- a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs @@ -67,6 +67,45 @@ namespace Umbraco.Core.Logging.Viewer } return logs; - } + } + + /// + /// This default JSON disk implementation here - returns the total filesize & NOT the count of entries + /// Other implementations we would expect to return the count of entries + /// We use this number to help prevent the logviewer killing the site with CPU/Memory if the number of items too big to handle + /// + public override long GetLogSize(DateTimeOffset startDate, DateTimeOffset endDate) + { + //Open the JSON log file for the range of dates (and exclude machinename) Could be several for LB + var dateRange = endDate - startDate; + + //Log Directory + var logDirectory = $@"{AppDomain.CurrentDomain.BaseDirectory}\App_Data\Logs\"; + + //Number of entries + long count = 0; + + //foreach full day in the range - see if we can find one or more filenames that end with + //yyyyMMdd.json - Ends with due to MachineName in filenames - could be 1 or more due to load balancing + for (var day = startDate.Date; day.Date <= endDate.Date; day = day.AddDays(1)) + { + //Filename ending to search for (As could be multiple) + var filesToFind = $"*{day.ToString("yyyyMMdd")}.json"; + + var filesForCurrentDay = Directory.GetFiles(logDirectory, filesToFind); + + //Foreach file we find - open it + foreach (var filePath in filesForCurrentDay) + { + //Get the current filesize in bytes ! + var byteFileSize = new FileInfo(filePath).Length; + + count += byteFileSize; + } + } + + //Count contains a combination of file sizes in bytes + return count; + } } } diff --git a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs index 7f0531a570..eed5fcc9ab 100644 --- a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs +++ b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Linq; using Newtonsoft.Json; using Serilog.Events; -using Serilog.Filters.Expressions; using Umbraco.Core.IO; using Umbraco.Core.Models; using Umbraco.Core.Persistence.DatabaseModelDefinitions; @@ -17,6 +16,8 @@ namespace Umbraco.Core.Logging.Viewer public abstract IEnumerable GetLogs(DateTimeOffset startDate, DateTimeOffset endDate, ILogFilter filter, int skip, int take); + public abstract long GetLogSize(DateTimeOffset startDate, DateTimeOffset endDate); + public virtual IEnumerable GetSavedSearches() { //Our default implementation @@ -137,6 +138,6 @@ namespace Umbraco.Core.Logging.Viewer { Items = logMessages }; - } + } } } diff --git a/src/Umbraco.Web/Editors/LogViewerController.cs b/src/Umbraco.Web/Editors/LogViewerController.cs index 61ba3d0a9b..e7e20cda05 100644 --- a/src/Umbraco.Web/Editors/LogViewerController.cs +++ b/src/Umbraco.Web/Editors/LogViewerController.cs @@ -21,6 +21,35 @@ namespace Umbraco.Web.Editors _logViewer = logViewer; } + [HttpGet] + public IHttpActionResult GetLogSize() + { + //Returns 200 OK if the logs can be viewed + + //Check if the ILogViewer is our JSON file + var isJsonLogViewer = _logViewer is JsonLogViewer; + + //Don't WARN or check if it's not our JSON disk file approach + if (isJsonLogViewer == false) + { + return Ok(); + } + + //Go & fetch the number of log entries OR + var logSize = _logViewer.GetLogSize(startDate: DateTime.Now.AddDays(-1), endDate: DateTime.Now); + + //If the number of items is less than + if (logSize >= 10) + { + return Ok(logSize); + } + + //TODO: It may need to be an Umbraco request with errow/warning notification?! + //Depends how best to bubble up to UI - with some custom JS promise error that is caught + return BadRequest(); + + } + [HttpGet] public int GetNumberOfErrors() { From 398134251ec0515f30a19dd4b29982c26e048238 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Thu, 1 Nov 2018 16:19:18 +0000 Subject: [PATCH 066/437] Add in some TODO notes to pickup from next time I get time to hack on this --- src/Umbraco.Web/Editors/LogViewerController.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web/Editors/LogViewerController.cs b/src/Umbraco.Web/Editors/LogViewerController.cs index e7e20cda05..e74b39e4a5 100644 --- a/src/Umbraco.Web/Editors/LogViewerController.cs +++ b/src/Umbraco.Web/Editors/LogViewerController.cs @@ -22,7 +22,7 @@ namespace Umbraco.Web.Editors } [HttpGet] - public IHttpActionResult GetLogSize() + public IHttpActionResult GetCanViewLogs() { //Returns 200 OK if the logs can be viewed @@ -38,7 +38,9 @@ namespace Umbraco.Web.Editors //Go & fetch the number of log entries OR var logSize = _logViewer.GetLogSize(startDate: DateTime.Now.AddDays(-1), endDate: DateTime.Now); - //If the number of items is less than + //The GetLogSize call on JsonLogViewer returns the total filesize in bytes + //Check if the logsize is not greater than 200Mb + //TODO: Convert the bytes to Megabytes and check less than 200Mb if (logSize >= 10) { return Ok(logSize); @@ -53,24 +55,32 @@ namespace Umbraco.Web.Editors [HttpGet] public int GetNumberOfErrors() { + //TODO: We will need to stop the request if trying to do this on a 1GB file + return _logViewer.GetNumberOfErrors(startDate: DateTime.Now.AddDays(-1), endDate: DateTime.Now); } [HttpGet] public LogLevelCounts GetLogLevelCounts() { + //TODO: We will need to stop the request if trying to do this on a 1GB file + return _logViewer.GetLogLevelCounts(startDate: DateTime.Now.AddDays(-1), endDate: DateTime.Now); } [HttpGet] public IEnumerable GetMessageTemplates() { + //TODO: We will need to stop the request if trying to do this on a 1GB file + return _logViewer.GetMessageTemplates(startDate: DateTime.Now.AddDays(-1), endDate: DateTime.Now); } [HttpGet] public PagedResult GetLogs(string orderDirection = "Descending", int pageNumber = 1, string filterExpression = null, [FromUri]string[] logLevels = null) { + //TODO: We will need to stop the request if trying to do this on a 1GB file + var direction = orderDirection == "Descending" ? Direction.Descending : Direction.Ascending; return _logViewer.GetLogs(startDate: DateTime.Now.AddDays(-1), endDate: DateTime.Now, filterExpression: filterExpression, pageNumber: pageNumber, orderDirection: direction, logLevels: logLevels); } From 758eea479deef73179382dc1f3978c8e653ba7d5 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Thu, 1 Nov 2018 16:24:48 +0000 Subject: [PATCH 067/437] Move the logic for checking can view logs out to a bool so it can be reused in the other API method calls --- .../Editors/LogViewerController.cs | 41 +++++++++++++++---- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/src/Umbraco.Web/Editors/LogViewerController.cs b/src/Umbraco.Web/Editors/LogViewerController.cs index e74b39e4a5..ab6ae40c5c 100644 --- a/src/Umbraco.Web/Editors/LogViewerController.cs +++ b/src/Umbraco.Web/Editors/LogViewerController.cs @@ -21,18 +21,15 @@ namespace Umbraco.Web.Editors _logViewer = logViewer; } - [HttpGet] - public IHttpActionResult GetCanViewLogs() + private bool CanViewLogs() { - //Returns 200 OK if the logs can be viewed - //Check if the ILogViewer is our JSON file var isJsonLogViewer = _logViewer is JsonLogViewer; //Don't WARN or check if it's not our JSON disk file approach if (isJsonLogViewer == false) - { - return Ok(); + { + return true; } //Go & fetch the number of log entries OR @@ -43,7 +40,21 @@ namespace Umbraco.Web.Editors //TODO: Convert the bytes to Megabytes and check less than 200Mb if (logSize >= 10) { - return Ok(logSize); + return true; + } + + //TODO: It may need to be an Umbraco request with errow/warning notification?! + //Depends how best to bubble up to UI - with some custom JS promise error that is caught + return false; + } + + [HttpGet] + public IHttpActionResult GetCanViewLogs() + { + //Returns 200 OK if the logs can be viewed + if (CanViewLogs() == true) + { + return Ok(); } //TODO: It may need to be an Umbraco request with errow/warning notification?! @@ -56,6 +67,10 @@ namespace Umbraco.Web.Editors public int GetNumberOfErrors() { //TODO: We will need to stop the request if trying to do this on a 1GB file + if(CanViewLogs() == false) + { + //Throw err + } return _logViewer.GetNumberOfErrors(startDate: DateTime.Now.AddDays(-1), endDate: DateTime.Now); } @@ -64,6 +79,10 @@ namespace Umbraco.Web.Editors public LogLevelCounts GetLogLevelCounts() { //TODO: We will need to stop the request if trying to do this on a 1GB file + if (CanViewLogs() == false) + { + //Throw err + } return _logViewer.GetLogLevelCounts(startDate: DateTime.Now.AddDays(-1), endDate: DateTime.Now); } @@ -72,6 +91,10 @@ namespace Umbraco.Web.Editors public IEnumerable GetMessageTemplates() { //TODO: We will need to stop the request if trying to do this on a 1GB file + if (CanViewLogs() == false) + { + //Throw err + } return _logViewer.GetMessageTemplates(startDate: DateTime.Now.AddDays(-1), endDate: DateTime.Now); } @@ -80,6 +103,10 @@ namespace Umbraco.Web.Editors public PagedResult GetLogs(string orderDirection = "Descending", int pageNumber = 1, string filterExpression = null, [FromUri]string[] logLevels = null) { //TODO: We will need to stop the request if trying to do this on a 1GB file + if (CanViewLogs() == false) + { + //Throw err + } var direction = orderDirection == "Descending" ? Direction.Descending : Direction.Ascending; return _logViewer.GetLogs(startDate: DateTime.Now.AddDays(-1), endDate: DateTime.Now, filterExpression: filterExpression, pageNumber: pageNumber, orderDirection: direction, logLevels: logLevels); From 7a23fdc1ea509a6a1bcaafaaef862c023de35f2a Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Fri, 2 Nov 2018 11:09:59 +0000 Subject: [PATCH 068/437] Update logic for pre-flight check --- src/Umbraco.Core/Logging/Viewer/ILogViewer.cs | 4 +- .../Logging/Viewer/JsonLogViewer.cs | 82 ++++++++++--------- .../Logging/Viewer/LogViewerSourceBase.cs | 8 +- .../common/resources/logviewer.resource.js | 9 ++ .../views/logviewer/overview.controller.js | 19 ++++- .../src/views/logviewer/overview.html | 13 ++- .../src/views/logviewer/search.controller.js | 2 + .../Editors/LogViewerController.cs | 57 ++++--------- 8 files changed, 108 insertions(+), 86 deletions(-) diff --git a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs index 1f23353608..73b518980c 100644 --- a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs @@ -44,7 +44,9 @@ namespace Umbraco.Core.Logging.Viewer ///
IEnumerable GetMessageTemplates(DateTimeOffset startDate, DateTimeOffset endDate); - long GetLogSize(DateTimeOffset startDate, DateTimeOffset endDate); + bool CanHandleLargeLogs { get; } + + bool CheckCanOpenLogs(DateTimeOffset startDate, DateTimeOffset endDate); /// /// Returns the collection of logs diff --git a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs index 4e887352d4..fdd833ae65 100644 --- a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs @@ -7,7 +7,47 @@ using Serilog.Formatting.Compact.Reader; namespace Umbraco.Core.Logging.Viewer { public partial class JsonLogViewer : LogViewerSourceBase - { + { + const int FileSizeCap = 100; + + public override bool CanHandleLargeLogs { get => false; } + + public override bool CheckCanOpenLogs(DateTimeOffset startDate, DateTimeOffset endDate) + { + //Open the JSON log file for the range of dates(and exclude machinename) Could be several for LB + var dateRange = endDate - startDate; + + //Log Directory + var logDirectory = $@"{AppDomain.CurrentDomain.BaseDirectory}\App_Data\Logs\"; + + //Number of entries + long fileSizeCount = 0; + + //foreach full day in the range - see if we can find one or more filenames that end with + //yyyyMMdd.json - Ends with due to MachineName in filenames - could be 1 or more due to load balancing + for (var day = startDate.Date; day.Date <= endDate.Date; day = day.AddDays(1)) + { + //Filename ending to search for (As could be multiple) + var filesToFind = $"*{day.ToString("yyyyMMdd")}.json"; + + var filesForCurrentDay = Directory.GetFiles(logDirectory, filesToFind); + + //Foreach file we find - open it + foreach (var filePath in filesForCurrentDay) + { + //Get the current filesize in bytes ! + var byteFileSize = new FileInfo(filePath).Length; + + fileSizeCount += byteFileSize; + } + } + + //The GetLogSize call on JsonLogViewer returns the total filesize in bytes + //Check if the logsize is not greater than 100Mb (FileSizeCap) + var logSizeAsMegabytes = fileSizeCount / 1024 / 1024; + return logSizeAsMegabytes <= FileSizeCap; + } + public override IEnumerable GetLogs(DateTimeOffset startDate, DateTimeOffset endDate, ILogFilter filter, int skip, int take) { var logs = new List(); @@ -68,44 +108,6 @@ namespace Umbraco.Core.Logging.Viewer return logs; } - - /// - /// This default JSON disk implementation here - returns the total filesize & NOT the count of entries - /// Other implementations we would expect to return the count of entries - /// We use this number to help prevent the logviewer killing the site with CPU/Memory if the number of items too big to handle - /// - public override long GetLogSize(DateTimeOffset startDate, DateTimeOffset endDate) - { - //Open the JSON log file for the range of dates (and exclude machinename) Could be several for LB - var dateRange = endDate - startDate; - - //Log Directory - var logDirectory = $@"{AppDomain.CurrentDomain.BaseDirectory}\App_Data\Logs\"; - - //Number of entries - long count = 0; - - //foreach full day in the range - see if we can find one or more filenames that end with - //yyyyMMdd.json - Ends with due to MachineName in filenames - could be 1 or more due to load balancing - for (var day = startDate.Date; day.Date <= endDate.Date; day = day.AddDays(1)) - { - //Filename ending to search for (As could be multiple) - var filesToFind = $"*{day.ToString("yyyyMMdd")}.json"; - - var filesForCurrentDay = Directory.GetFiles(logDirectory, filesToFind); - - //Foreach file we find - open it - foreach (var filePath in filesForCurrentDay) - { - //Get the current filesize in bytes ! - var byteFileSize = new FileInfo(filePath).Length; - - count += byteFileSize; - } - } - - //Count contains a combination of file sizes in bytes - return count; - } + } } diff --git a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs index eed5fcc9ab..ee122317ff 100644 --- a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs +++ b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs @@ -14,9 +14,11 @@ namespace Umbraco.Core.Logging.Viewer private static readonly string SearchesConfigPath = IOHelper.MapPath("~/Config/logviewer.searches.config.js"); + public abstract bool CanHandleLargeLogs { get; } + public abstract IEnumerable GetLogs(DateTimeOffset startDate, DateTimeOffset endDate, ILogFilter filter, int skip, int take); - - public abstract long GetLogSize(DateTimeOffset startDate, DateTimeOffset endDate); + + public abstract bool CheckCanOpenLogs(DateTimeOffset startDate, DateTimeOffset endDate); public virtual IEnumerable GetSavedSearches() { @@ -139,5 +141,7 @@ namespace Umbraco.Core.Logging.Viewer Items = logMessages }; } + + } } diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/logviewer.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/logviewer.resource.js index 0d7270b937..75c23e7adf 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/logviewer.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/logviewer.resource.js @@ -91,6 +91,15 @@ "GetLogs", options)), 'Failed to retrieve common log messages'); + }, + + canViewLogs: function () { + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "logViewerApiBaseUrl", + "GetCanViewLogs")), + 'Failed to retrieve state if logs can be viewed'); } }; diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js index d1eb73b2b3..c504d7caea 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js @@ -5,6 +5,7 @@ var vm = this; vm.loading = false; + vm.canLoadLogs = false; vm.searches = []; vm.numberOfErrors = 0; vm.commonLogMessages = []; @@ -25,6 +26,22 @@ vm.searchLogQuery = searchLogQuery; vm.findMessageTemplate = findMessageTemplate; + function preFlightCheck(){ + vm.loading = true; + + //Do our pre-flight check (to see if we can view logs) + //IE the log file is NOT too big such as 1GB & crash the site + logViewerResource.canViewLogs().then(function(result){ + vm.loading = false; + vm.canLoadLogs = result; + + if(result){ + //Can view logs - so initalise + init(); + } + }); + } + function init() { @@ -96,7 +113,7 @@ searchLogQuery(logQuery); } - init(); + preFlightCheck(); } diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html index 12dc459189..45ee3d5382 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html @@ -13,7 +13,18 @@ -
+ +
+ + + +

Today's log file is too large to be viewed and would cause performance problems.

+

If you need to view the log files, try opening them manually

+
+
+
+ +
diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js index e2f159199c..74395ffb25 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/search.controller.js @@ -159,6 +159,8 @@ vm.logsLoading = false; setLogTypeColor(vm.logItems.items); + }, function(err){ + vm.logsLoading = false; }); } diff --git a/src/Umbraco.Web/Editors/LogViewerController.cs b/src/Umbraco.Web/Editors/LogViewerController.cs index ab6ae40c5c..e5c75926f6 100644 --- a/src/Umbraco.Web/Editors/LogViewerController.cs +++ b/src/Umbraco.Web/Editors/LogViewerController.cs @@ -5,6 +5,7 @@ using Umbraco.Core.Logging.Viewer; using Umbraco.Core.Models; using Umbraco.Core.Persistence.DatabaseModelDefinitions; using Umbraco.Web.Mvc; +using Umbraco.Web.WebApi; namespace Umbraco.Web.Editors { @@ -23,53 +24,27 @@ namespace Umbraco.Web.Editors private bool CanViewLogs() { - //Check if the ILogViewer is our JSON file - var isJsonLogViewer = _logViewer is JsonLogViewer; - - //Don't WARN or check if it's not our JSON disk file approach - if (isJsonLogViewer == false) - { + //Can the interface deal with Large Files + if (_logViewer.CanHandleLargeLogs) return true; - } - //Go & fetch the number of log entries OR - var logSize = _logViewer.GetLogSize(startDate: DateTime.Now.AddDays(-1), endDate: DateTime.Now); - - //The GetLogSize call on JsonLogViewer returns the total filesize in bytes - //Check if the logsize is not greater than 200Mb - //TODO: Convert the bytes to Megabytes and check less than 200Mb - if (logSize >= 10) - { - return true; - } - - //TODO: It may need to be an Umbraco request with errow/warning notification?! - //Depends how best to bubble up to UI - with some custom JS promise error that is caught - return false; + //Interface CheckCanOpenLogs + return _logViewer.CheckCanOpenLogs(startDate: DateTime.Now.AddDays(-1), endDate: DateTime.Now); } [HttpGet] - public IHttpActionResult GetCanViewLogs() + public bool GetCanViewLogs() { - //Returns 200 OK if the logs can be viewed - if (CanViewLogs() == true) - { - return Ok(); - } - - //TODO: It may need to be an Umbraco request with errow/warning notification?! - //Depends how best to bubble up to UI - with some custom JS promise error that is caught - return BadRequest(); - + return CanViewLogs(); } [HttpGet] public int GetNumberOfErrors() { - //TODO: We will need to stop the request if trying to do this on a 1GB file - if(CanViewLogs() == false) + //We will need to stop the request if trying to do this on a 1GB file + if (CanViewLogs() == false) { - //Throw err + throw new HttpResponseException(Request.CreateNotificationValidationErrorResponse("Unable to view logs, due to size")); } return _logViewer.GetNumberOfErrors(startDate: DateTime.Now.AddDays(-1), endDate: DateTime.Now); @@ -78,10 +53,10 @@ namespace Umbraco.Web.Editors [HttpGet] public LogLevelCounts GetLogLevelCounts() { - //TODO: We will need to stop the request if trying to do this on a 1GB file + //We will need to stop the request if trying to do this on a 1GB file if (CanViewLogs() == false) { - //Throw err + throw new HttpResponseException(Request.CreateNotificationValidationErrorResponse("Unable to view logs, due to size")); } return _logViewer.GetLogLevelCounts(startDate: DateTime.Now.AddDays(-1), endDate: DateTime.Now); @@ -90,10 +65,10 @@ namespace Umbraco.Web.Editors [HttpGet] public IEnumerable GetMessageTemplates() { - //TODO: We will need to stop the request if trying to do this on a 1GB file + //We will need to stop the request if trying to do this on a 1GB file if (CanViewLogs() == false) { - //Throw err + throw new HttpResponseException(Request.CreateNotificationValidationErrorResponse("Unable to view logs, due to size")); } return _logViewer.GetMessageTemplates(startDate: DateTime.Now.AddDays(-1), endDate: DateTime.Now); @@ -102,10 +77,10 @@ namespace Umbraco.Web.Editors [HttpGet] public PagedResult GetLogs(string orderDirection = "Descending", int pageNumber = 1, string filterExpression = null, [FromUri]string[] logLevels = null) { - //TODO: We will need to stop the request if trying to do this on a 1GB file + //We will need to stop the request if trying to do this on a 1GB file if (CanViewLogs() == false) { - //Throw err + throw new HttpResponseException(Request.CreateNotificationValidationErrorResponse("Unable to view logs, due to size")); } var direction = orderDirection == "Descending" ? Direction.Descending : Direction.Ascending; From c5b7543e547e4dbe97e629d07fe2916ecc238d87 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Fri, 2 Nov 2018 15:32:37 +0000 Subject: [PATCH 069/437] Update to pass dates through correctly --- src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs index ee122317ff..89fe296f64 100644 --- a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs +++ b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs @@ -74,21 +74,21 @@ namespace Umbraco.Core.Logging.Viewer public int GetNumberOfErrors(DateTimeOffset startDate, DateTimeOffset endDate) { var errorCounter = new ErrorCounterFilter(); - GetLogs(DateTime.Now, DateTime.Now, errorCounter, 0, int.MaxValue); + GetLogs(startDate, endDate, errorCounter, 0, int.MaxValue); return errorCounter.count; } public LogLevelCounts GetLogLevelCounts(DateTimeOffset startDate, DateTimeOffset endDate) { var counter = new CountingFilter(); - GetLogs(DateTime.Now, DateTime.Now, counter, 0, int.MaxValue); + GetLogs(startDate, endDate, counter, 0, int.MaxValue); return counter.Counts; } public IEnumerable GetMessageTemplates(DateTimeOffset startDate, DateTimeOffset endDate) { var messageTemplates = new MessageTemplateFilter(); - GetLogs(DateTime.Now, DateTime.Now, messageTemplates, 0, int.MaxValue); + GetLogs(startDate, endDate, messageTemplates, 0, int.MaxValue); var templates = messageTemplates.counts. Select(x => new LogTemplate { MessageTemplate = x.Key, Count = x.Value }) @@ -104,7 +104,7 @@ namespace Umbraco.Core.Logging.Viewer string[] logLevels = null) { var expression = new ExpressionFilter(filterExpression); - var filteredLogs = GetLogs(DateTime.Now, DateTime.Now, expression, 0, int.MaxValue); + var filteredLogs = GetLogs(startDate, endDate, expression, 0, int.MaxValue); //This is user used the checkbox UI to toggle which log levels they wish to see //If an empty array - its implied all levels to be viewed From 2f6e66184f2c14ed81de54182b37a11bcb5e05ec Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Fri, 2 Nov 2018 15:33:43 +0000 Subject: [PATCH 070/437] Adds UmbracoFeatures to the Composition to allow user components to do something like this - composition.Features().Disabled.Controllers.Add() --- src/Umbraco.Web/CompositionExtensions.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Umbraco.Web/CompositionExtensions.cs b/src/Umbraco.Web/CompositionExtensions.cs index 38b0be3103..fe2ea4b8a7 100644 --- a/src/Umbraco.Web/CompositionExtensions.cs +++ b/src/Umbraco.Web/CompositionExtensions.cs @@ -11,6 +11,7 @@ using Umbraco.Web.Mvc; using Umbraco.Web.PublishedCache; using Umbraco.Web.Routing; using Umbraco.Web.ContentApps; +using Umbraco.Web.Features; // the namespace here is intentional - although defined in Umbraco.Web assembly, // this class should be visible when using Umbraco.Core.Components, alongside @@ -58,6 +59,9 @@ namespace Umbraco.Core.Components internal static EditorValidatorCollectionBuilder EditorValidators(this Composition composition) => composition.Container.GetInstance(); + public static UmbracoFeatures Features(this Composition composition) + => composition.Container.GetInstance(); + /// /// Gets the filtered controller factories collection builder. /// From 5cc4370dc14cad97dc3f42a5cf1185e62355cd6c Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Thu, 8 Nov 2018 13:09:26 +0000 Subject: [PATCH 071/437] Fix log message templates to not use single quotes - as not helpful for searching with logviewer --- .../Migrations/Install/DatabaseSchemaCreator.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Core/Migrations/Install/DatabaseSchemaCreator.cs b/src/Umbraco.Core/Migrations/Install/DatabaseSchemaCreator.cs index 30f7ba8834..edc5e453ed 100644 --- a/src/Umbraco.Core/Migrations/Install/DatabaseSchemaCreator.cs +++ b/src/Umbraco.Core/Migrations/Install/DatabaseSchemaCreator.cs @@ -423,7 +423,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; @@ -435,7 +435,7 @@ namespace Umbraco.Core.Migrations.Install { //Execute the Create Table sql var created = _database.Execute(new Sql(createSql)); - _logger.Info("Create Table '{TableName}' ({Created}): \n {Sql}", tableName, created, createSql); + _logger.Info("Create Table {TableName} ({Created}): \n {Sql}", tableName, created, createSql); //If any statements exists for the primary key execute them here if (string.IsNullOrEmpty(createPrimaryKeySql) == false) @@ -481,18 +481,18 @@ namespace Umbraco.Core.Migrations.Install 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); } } } else { // 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); } } From 818e9f8b4cb8b2374b6efcb4e66cdc76c98cc2ec Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Thu, 15 Nov 2018 15:28:35 +0100 Subject: [PATCH 072/437] 3417 - don't use legacy action for create method --- src/Umbraco.Web/Trees/MacrosTreeController.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Web/Trees/MacrosTreeController.cs b/src/Umbraco.Web/Trees/MacrosTreeController.cs index 3f925eef8d..0649378aaa 100644 --- a/src/Umbraco.Web/Trees/MacrosTreeController.cs +++ b/src/Umbraco.Web/Trees/MacrosTreeController.cs @@ -59,11 +59,8 @@ namespace Umbraco.Web.Trees if (id == Constants.System.Root.ToInvariantString()) { //Create the normal create action - menu.Items.Add(Services.TextService, opensDialog: true) - //Since we haven't implemented anything for macros in angular, this needs to be converted to - //use the legacy format - .ConvertLegacyMenuItem(null, "initmacros", queryStrings.GetValue("application")); - + menu.Items.Add(Services.TextService); + //refresh action menu.Items.Add(new RefreshNode(Services.TextService, true)); From b1244dfa1b87f23c97330a482ee69e70f8b39174 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Fri, 16 Nov 2018 13:20:21 +0000 Subject: [PATCH 073/437] Update JsonLogViewer & undelrying base class to support setting path to log files & path to search file - so can be used in testing --- .../Logging/Viewer/JsonLogViewer.cs | 12 ++++++++++- .../Logging/Viewer/LogViewerSourceBase.cs | 21 ++++++++++++------- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs index fdd833ae65..957a4af79b 100644 --- a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs @@ -8,6 +8,16 @@ namespace Umbraco.Core.Logging.Viewer { public partial class JsonLogViewer : LogViewerSourceBase { + private string _logsPath; + + public JsonLogViewer(string logsPath = "", string searchPath = "") : base(pathToSearches: searchPath) + { + if (string.IsNullOrEmpty(logsPath)) + logsPath = $@"{AppDomain.CurrentDomain.BaseDirectory}\App_Data\Logs\"; + + _logsPath = logsPath; + } + const int FileSizeCap = 100; public override bool CanHandleLargeLogs { get => false; } @@ -18,7 +28,7 @@ namespace Umbraco.Core.Logging.Viewer var dateRange = endDate - startDate; //Log Directory - var logDirectory = $@"{AppDomain.CurrentDomain.BaseDirectory}\App_Data\Logs\"; + var logDirectory = _logsPath; //Number of entries long fileSizeCount = 0; diff --git a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs index 89fe296f64..aede942ce0 100644 --- a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs +++ b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs @@ -11,8 +11,15 @@ namespace Umbraco.Core.Logging.Viewer { public abstract class LogViewerSourceBase : ILogViewer { - - private static readonly string SearchesConfigPath = IOHelper.MapPath("~/Config/logviewer.searches.config.js"); + public LogViewerSourceBase(string pathToSearches = "") + { + if (string.IsNullOrEmpty(pathToSearches)) + pathToSearches = IOHelper.MapPath("~/Config/logviewer.searches.config.js"); + + _searchesConfigPath = pathToSearches; + } + + private string _searchesConfigPath; public abstract bool CanHandleLargeLogs { get; } @@ -25,9 +32,9 @@ namespace Umbraco.Core.Logging.Viewer //Our default implementation //If file does not exist - lets create it with an empty array - IOHelper.EnsureFileExists(SearchesConfigPath, "[]"); + IOHelper.EnsureFileExists(_searchesConfigPath, "[]"); - var rawJson = System.IO.File.ReadAllText(SearchesConfigPath); + var rawJson = System.IO.File.ReadAllText(_searchesConfigPath); return JsonConvert.DeserializeObject>(rawJson); } @@ -43,10 +50,10 @@ namespace Umbraco.Core.Logging.Viewer var rawJson = JsonConvert.SerializeObject(searches, Formatting.Indented); //If file does not exist - lets create it with an empty array - IOHelper.EnsureFileExists(SearchesConfigPath, "[]"); + IOHelper.EnsureFileExists(_searchesConfigPath, "[]"); //Write it back down to file - System.IO.File.WriteAllText(SearchesConfigPath, rawJson); + System.IO.File.WriteAllText(_searchesConfigPath, rawJson); //Return the updated object - so we can instantly reset the entire array from the API response //As opposed to push a new item into the array @@ -65,7 +72,7 @@ namespace Umbraco.Core.Logging.Viewer var rawJson = JsonConvert.SerializeObject(searches, Formatting.Indented); //Write it back down to file - System.IO.File.WriteAllText(SearchesConfigPath, rawJson); + System.IO.File.WriteAllText(_searchesConfigPath, rawJson); //Return the updated object - so we can instantly reset the entire array from the API response return searches; From d9dc32edcb2bb9551920bcd10f57f9ff8ad4e64c Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Fri, 16 Nov 2018 13:32:43 +0000 Subject: [PATCH 074/437] Adds in example log file & JSON saved search file Unit test class preps/copies files in setup/teardown as needed --- .../UmbracoTraceLog.UNITTEST.20181112.json | 2410 +++++++++++++++++ .../Logging/logviewer.searches.config.js | 42 + src/Umbraco.Tests/Umbraco.Tests.csproj | 7 + 3 files changed, 2459 insertions(+) create mode 100644 src/Umbraco.Tests/Logging/UmbracoTraceLog.UNITTEST.20181112.json create mode 100644 src/Umbraco.Tests/Logging/logviewer.searches.config.js diff --git a/src/Umbraco.Tests/Logging/UmbracoTraceLog.UNITTEST.20181112.json b/src/Umbraco.Tests/Logging/UmbracoTraceLog.UNITTEST.20181112.json new file mode 100644 index 0000000000..fe2c022cbe --- /dev/null +++ b/src/Umbraco.Tests/Logging/UmbracoTraceLog.UNITTEST.20181112.json @@ -0,0 +1,2410 @@ +{"@t":"2018-11-12T08:34:45.8371142Z","@mt":"{StartMessage} [Timing {TimingId}]","StartMessage":"Booting Umbraco 8.0.0-alpha.52 on DELLBOOK.","TimingId":"9e76e5f","SourceContext":"Umbraco.Core.Runtime.CoreRuntime","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:45.8770471Z","@mt":"Runtime: {Runtime}","@l":"Debug","Runtime":"Umbraco.Web.Runtime.WebRuntime","SourceContext":"Umbraco.Core.Runtime.CoreRuntime","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:45.8780049Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Acquiring MainDom.","TimingId":"fa0a8ff","SourceContext":"Umbraco.Core.Runtime.CoreRuntime","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:45.8820357Z","@mt":"Acquiring.","SourceContext":"Umbraco.Core.MainDom","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:45.8870222Z","@mt":"Acquired.","SourceContext":"Umbraco.Core.MainDom","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:45.8890160Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Aquired.","Duration":9,"TimingId":"fa0a8ff","SourceContext":"Umbraco.Core.Runtime.CoreRuntime","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:45.8899734Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Determining runtime level.","TimingId":"de01157","SourceContext":"Umbraco.Core.Runtime.CoreRuntime","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:46.0515757Z","@mt":"Configuring.","@l":"Debug","SourceContext":"Umbraco.Core.Persistence.UmbracoDatabaseFactory","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:46.2091530Z","@mt":"Configured.","@l":"Debug","SourceContext":"Umbraco.Core.Persistence.UmbracoDatabaseFactory","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:46.7853838Z","@mt":"Final upgrade state is {FinalMigrationState}, database contains {DatabaseState}","@l":"Debug","FinalMigrationState":"{6B251841-3069-4AD5-8AE9-861F9523E8DA}","DatabaseState":"{6B251841-3069-4AD5-8AE9-861F9523E8DA}","SourceContext":"Umbraco.Core.Runtime.CoreRuntime","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:46.7853838Z","@mt":"Runtime level: {RuntimeLevel}","@l":"Debug","RuntimeLevel":"Run","SourceContext":"Umbraco.Core.Runtime.CoreRuntime","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:46.7853838Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Determined.","Duration":895,"TimingId":"de01157","SourceContext":"Umbraco.Core.Runtime.CoreRuntime","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:46.7863814Z","@mt":"{StartMessage} [Timing {TimingId}]","StartMessage":"Resolving component types.","TimingId":"d88f42d","SourceContext":"Umbraco.Core.Runtime.CoreRuntime","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:46.8053704Z","@mt":"{StartMessage} [Timing {TimingId}]","StartMessage":"Determining hash of code files on disk","TimingId":"e9adbba","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:46.8232811Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","EndMessage":"Hash determined","Duration":17,"TimingId":"e9adbba","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:46.8352878Z","@mt":"{StartMessage} [Timing {TimingId}]","StartMessage":"Getting Umbraco.Core.Composing.IDiscoverable","TimingId":"f2620d0","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:46.8372858Z","@mt":"Assemblies changes detected, need to rescan everything.","@l":"Debug","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:46.8372858Z","@mt":"Getting {TypeName}: scanning assemblies.","@l":"Debug","TypeName":"Umbraco.Core.Composing.IDiscoverable","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.1055270Z","@mt":"Got {TypeName}, caching ({CacheType}).","@l":"Debug","TypeName":"Umbraco.Core.Composing.IDiscoverable","CacheType":"true","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.1055270Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","EndMessage":"Got Umbraco.Core.Composing.IDiscoverable","Duration":270,"TimingId":"f2620d0","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.1065263Z","@mt":"{StartMessage} [Timing {TimingId}]","StartMessage":"Getting Umbraco.Core.Components.IUmbracoComponent","TimingId":"c2611be","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.1065263Z","@mt":"Getting {TypeName}: scanning assemblies.","@l":"Debug","TypeName":"Umbraco.Core.Components.IUmbracoComponent","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.1155013Z","@mt":"Got {TypeName}, caching ({CacheType}).","@l":"Debug","TypeName":"Umbraco.Core.Components.IUmbracoComponent","CacheType":"true","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.1155013Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","EndMessage":"Got Umbraco.Core.Components.IUmbracoComponent","Duration":9,"TimingId":"c2611be","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.1155013Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","EndMessage":"Resolved.","Duration":329,"TimingId":"d88f42d","SourceContext":"Umbraco.Core.Runtime.CoreRuntime","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.1164981Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Preparing component types.","TimingId":"e7ad952","SourceContext":"Umbraco.Core.Components.BootLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.1444223Z","@mt":"Ordered Components: {SortedComponentTypes}","@l":"Debug","SortedComponentTypes":["Umbraco.Core.Runtime.CoreRuntimeComponent","Umbraco.Web.Runtime.WebRuntimeComponent","Umbraco.Web.Cache.CacheRefresherComponent","Umbraco.Core.Logging.WebProfilerComponent","Umbraco.Core.Components.AuditEventsComponent","Umbraco.Core.Components.ManifestWatcherComponent","Umbraco.Core.Components.RelateOnCopyComponent","Umbraco.Core.Components.RelateOnTrashComponent","Umbraco.Web.SignalR.PreviewHubComponent","Umbraco.Web.Search.ExamineComponent","Umbraco.Web.Scheduling.SchedulerComponent","Umbraco.ModelsBuilder.Umbraco.ModelsBuilderComponent","Umbraco.Web.PublishedCache.NuCache.NuCacheComponent","Umbraco.Web.PropertyEditors.PropertyEditorsComponent","Umbraco.Web.Components.BackOfficeUserAuditEventsComponent","Umbraco.Web.Components.NotificationsComponent","Umbraco.Web.Components.PublicAccessComponent","Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent","Umbraco.Core.Components.UmbracoCoreComponent"],"SourceContext":"Umbraco.Core.Components.BootLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.1444223Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Prepared component types.","Duration":27,"TimingId":"e7ad952","SourceContext":"Umbraco.Core.Components.BootLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.1454207Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Instanciating components.","TimingId":"030399d","SourceContext":"Umbraco.Core.Components.BootLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.1474142Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Instanciated components.","Duration":2,"TimingId":"030399d","SourceContext":"Umbraco.Core.Components.BootLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.1484121Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Composing components. (log when >100ms)","TimingId":"ca1430e","SourceContext":"Umbraco.Core.Components.BootLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.1763377Z","@mt":"{StartMessage} [Timing {TimingId}]","StartMessage":"Getting Umbraco.Core.Composing.IDiscoverable","TimingId":"2bdc8f5","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.1773370Z","@mt":"Getting {TypeName}: found a cached type list.","@l":"Debug","TypeName":"Umbraco.Core.Composing.IDiscoverable","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.1773370Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","EndMessage":"Got Umbraco.Core.Composing.IDiscoverable","Duration":0,"TimingId":"2bdc8f5","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.1773370Z","@mt":"{StartMessage} [Timing {TimingId}]","StartMessage":"Getting Umbraco.Core.PropertyEditors.IPropertyValueConverter","TimingId":"13d4fd9","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.1773370Z","@mt":"Getting {TypeName}: scanning assemblies.","@l":"Debug","TypeName":"Umbraco.Core.PropertyEditors.IPropertyValueConverter","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.1883061Z","@mt":"Got {TypeName}, caching ({CacheType}).","@l":"Debug","TypeName":"Umbraco.Core.PropertyEditors.IPropertyValueConverter","CacheType":"true","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.1883061Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","EndMessage":"Got Umbraco.Core.PropertyEditors.IPropertyValueConverter","Duration":10,"TimingId":"13d4fd9","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.2152496Z","@mt":"{StartMessage} [Timing {TimingId}]","StartMessage":"Getting System.Web.Mvc.IController","TimingId":"5c51949","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.2152496Z","@mt":"Getting {TypeName}: scanning assemblies.","@l":"Debug","TypeName":"System.Web.Mvc.IController","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.2162328Z","@mt":"Got {TypeName}.","@l":"Debug","TypeName":"System.Web.Mvc.IController","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.2162328Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","EndMessage":"Got System.Web.Mvc.IController","Duration":1,"TimingId":"5c51949","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.3169624Z","@mt":"{StartMessage} [Timing {TimingId}]","StartMessage":"Getting System.Web.Http.Controllers.IHttpController","TimingId":"5fe641e","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.3169624Z","@mt":"Getting {TypeName}: scanning assemblies.","@l":"Debug","TypeName":"System.Web.Http.Controllers.IHttpController","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.3179595Z","@mt":"Got {TypeName}.","@l":"Debug","TypeName":"System.Web.Http.Controllers.IHttpController","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.3179595Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","EndMessage":"Got System.Web.Http.Controllers.IHttpController","Duration":1,"TimingId":"5fe641e","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.3289305Z","@mt":"{StartMessage} [Timing {TimingId}]","StartMessage":"Getting Umbraco.Core.Composing.IDiscoverable","TimingId":"6ff2067","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.3289305Z","@mt":"Getting {TypeName}: found a cached type list.","@l":"Debug","TypeName":"Umbraco.Core.Composing.IDiscoverable","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.3289305Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","EndMessage":"Got Umbraco.Core.Composing.IDiscoverable","Duration":0,"TimingId":"6ff2067","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.3289305Z","@mt":"{StartMessage} [Timing {TimingId}]","StartMessage":"Getting Umbraco.Web.Mvc.SurfaceController","TimingId":"ee39a8f","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.3299280Z","@mt":"Getting {TypeName}: scanning assemblies.","@l":"Debug","TypeName":"Umbraco.Web.Mvc.SurfaceController","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.3399005Z","@mt":"Got {TypeName}, caching ({CacheType}).","@l":"Debug","TypeName":"Umbraco.Web.Mvc.SurfaceController","CacheType":"true","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.3408994Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","EndMessage":"Got Umbraco.Web.Mvc.SurfaceController","Duration":11,"TimingId":"ee39a8f","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.3418946Z","@mt":"{StartMessage} [Timing {TimingId}]","StartMessage":"Getting Umbraco.Core.Composing.IDiscoverable","TimingId":"f53e587","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.3418946Z","@mt":"Getting {TypeName}: found a cached type list.","@l":"Debug","TypeName":"Umbraco.Core.Composing.IDiscoverable","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.3418946Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","EndMessage":"Got Umbraco.Core.Composing.IDiscoverable","Duration":0,"TimingId":"f53e587","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.3418946Z","@mt":"{StartMessage} [Timing {TimingId}]","StartMessage":"Getting Umbraco.Web.WebApi.UmbracoApiController","TimingId":"502b5b8","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.3418946Z","@mt":"Getting {TypeName}: scanning assemblies.","@l":"Debug","TypeName":"Umbraco.Web.WebApi.UmbracoApiController","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.3498746Z","@mt":"Got {TypeName}, caching ({CacheType}).","@l":"Debug","TypeName":"Umbraco.Web.WebApi.UmbracoApiController","CacheType":"true","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.3498746Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","EndMessage":"Got Umbraco.Web.WebApi.UmbracoApiController","Duration":8,"TimingId":"502b5b8","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.3598465Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Composed Umbraco.Web.Runtime.WebRuntimeComponent.","Duration":163,"TimingId":"f8ec818","SourceContext":"Umbraco.Core.Components.BootLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.3638356Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Composed components.","Duration":215,"TimingId":"ca1430e","SourceContext":"Umbraco.Core.Components.BootLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.3797931Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Initializing components. (log when >100ms)","TimingId":"3ac2c10","SourceContext":"Umbraco.Core.Components.BootLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.4137037Z","@mt":"{StartMessage} [Timing {TimingId}]","StartMessage":"Getting Umbraco.Core.Composing.IDiscoverable","TimingId":"78edf39","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.4137037Z","@mt":"Getting {TypeName}: found a cached type list.","@l":"Debug","TypeName":"Umbraco.Core.Composing.IDiscoverable","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.4147001Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","EndMessage":"Got Umbraco.Core.Composing.IDiscoverable","Duration":0,"TimingId":"78edf39","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.4147001Z","@mt":"{StartMessage} [Timing {TimingId}]","StartMessage":"Getting Umbraco.Core.PropertyEditors.IDataEditor","TimingId":"4f94a60","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.4147001Z","@mt":"Getting {TypeName}: scanning assemblies.","@l":"Debug","TypeName":"Umbraco.Core.PropertyEditors.IDataEditor","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.4227008Z","@mt":"Got {TypeName}, caching ({CacheType}).","@l":"Debug","TypeName":"Umbraco.Core.PropertyEditors.IDataEditor","CacheType":"true","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.4227008Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","EndMessage":"Got Umbraco.Core.PropertyEditors.IDataEditor","Duration":8,"TimingId":"4f94a60","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.6530958Z","@mt":"{StartMessage} [Timing {TimingId}]","StartMessage":"Getting Umbraco.Core.Composing.IDiscoverable","TimingId":"df11c59","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.6530958Z","@mt":"Getting {TypeName}: found a cached type list.","@l":"Debug","TypeName":"Umbraco.Core.Composing.IDiscoverable","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.6530958Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","EndMessage":"Got Umbraco.Core.Composing.IDiscoverable","Duration":0,"TimingId":"df11c59","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.6530958Z","@mt":"{StartMessage} [Timing {TimingId}]","StartMessage":"Getting Umbraco.Web.Actions.IAction","TimingId":"48d0b43","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.6530958Z","@mt":"Getting {TypeName}: scanning assemblies.","@l":"Debug","TypeName":"Umbraco.Web.Actions.IAction","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.6600450Z","@mt":"Got {TypeName}, caching ({CacheType}).","@l":"Debug","TypeName":"Umbraco.Web.Actions.IAction","CacheType":"true","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:47.6600450Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","EndMessage":"Got Umbraco.Web.Actions.IAction","Duration":7,"TimingId":"48d0b43","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:48.7700754Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Initialised Umbraco.Core.Runtime.CoreRuntimeComponent.","Duration":1388,"TimingId":"48c0e52","SourceContext":"Umbraco.Core.Components.BootLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:49.0369724Z","@mt":"Loading content from local db...","@l":"Debug","SourceContext":"Umbraco.Web.PublishedCache.NuCache.PublishedSnapshotService","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:49.0539274Z","@mt":"Loaded content from local db ({Duration}ms)","@l":"Debug","Duration":16,"SourceContext":"Umbraco.Web.PublishedCache.NuCache.PublishedSnapshotService","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.0193175Z","@mt":"Loading media from local db...","@l":"Debug","SourceContext":"Umbraco.Web.PublishedCache.NuCache.PublishedSnapshotService","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.0193175Z","@mt":"Loaded media from local db ({Duration}ms)","@l":"Debug","Duration":0,"SourceContext":"Umbraco.Web.PublishedCache.NuCache.PublishedSnapshotService","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.2028672Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Initialised Umbraco.Web.Runtime.WebRuntimeComponent.","Duration":1432,"TimingId":"cfd6b8c","SourceContext":"Umbraco.Core.Components.BootLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.2048308Z","@mt":"Initializing Umbraco internal event handlers for cache refreshing.","SourceContext":"Umbraco.Web.Cache.CacheRefresherComponent","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.2277994Z","@mt":"Examine shutdown registered with MainDom","@l":"Debug","SourceContext":"Umbraco.Web.Search.ExamineComponent","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.2542336Z","@mt":"{IndexerName} indexer initializing","@l":"Debug","IndexerName":"InternalIndexer","SourceContext":"Umbraco.Examine.UmbracoContentIndexer","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.2981185Z","@mt":"{IndexerName} indexer initializing","@l":"Debug","IndexerName":"InternalMemberIndexer","SourceContext":"Umbraco.Examine.UmbracoMemberIndexer","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.3050966Z","@mt":"{IndexerName} indexer initializing","@l":"Debug","IndexerName":"ExternalIndexer","SourceContext":"Umbraco.Examine.UmbracoContentIndexer","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.3140744Z","@mt":"Adding examine event handlers for {RegisteredIndexers} index providers.","RegisteredIndexers":3,"SourceContext":"Umbraco.Web.Search.ExamineComponent","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.3180640Z","@mt":"Forcing index {IndexerName} to be unlocked since it was left in a locked state","IndexerName":"InternalMemberIndexer","SourceContext":"Umbraco.Web.Search.ExamineComponent","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.3190624Z","@mt":"Forcing index {IndexerName} to be unlocked since it was left in a locked state","IndexerName":"InternalIndexer","SourceContext":"Umbraco.Web.Search.ExamineComponent","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.3200624Z","@mt":"Forcing index {IndexerName} to be unlocked since it was left in a locked state","IndexerName":"ExternalIndexer","SourceContext":"Umbraco.Web.Search.ExamineComponent","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.3210831Z","@mt":"Starting initialize async background thread.","SourceContext":"Umbraco.Web.Search.ExamineComponent","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.3250434Z","@mt":"{StartMessage} [Timing {TimingId}]","StartMessage":"Getting Umbraco.Core.Composing.IDiscoverable","TimingId":"7581323","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.3250434Z","@mt":"Getting {TypeName}: found a cached type list.","@l":"Debug","TypeName":"Umbraco.Core.Composing.IDiscoverable","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.3250434Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","EndMessage":"Got Umbraco.Core.Composing.IDiscoverable","Duration":0,"TimingId":"7581323","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.3250434Z","@mt":"{StartMessage} [Timing {TimingId}]","StartMessage":"Getting Umbraco.Web.HealthCheck.HealthCheck","TimingId":"3697358","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.3260718Z","@mt":"Getting {TypeName}: scanning assemblies.","@l":"Debug","TypeName":"Umbraco.Web.HealthCheck.HealthCheck","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.3360158Z","@mt":"Got {TypeName}, caching ({CacheType}).","@l":"Debug","TypeName":"Umbraco.Web.HealthCheck.HealthCheck","CacheType":"true","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.3360158Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","EndMessage":"Got Umbraco.Web.HealthCheck.HealthCheck","Duration":10,"TimingId":"3697358","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.3491865Z","@mt":"{StartMessage} [Timing {TimingId}]","StartMessage":"Getting Umbraco.Web.HealthCheck.NotificationMethods.IHealthCheckNotificationMethod","TimingId":"205a98e","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.3491865Z","@mt":"Getting {TypeName}: scanning assemblies.","@l":"Debug","TypeName":"Umbraco.Web.HealthCheck.NotificationMethods.IHealthCheckNotificationMethod","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.3571685Z","@mt":"Got {TypeName}, caching ({CacheType}).","@l":"Debug","TypeName":"Umbraco.Web.HealthCheck.NotificationMethods.IHealthCheckNotificationMethod","CacheType":"true","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.3571685Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","EndMessage":"Got Umbraco.Web.HealthCheck.NotificationMethods.IHealthCheckNotificationMethod","Duration":7,"TimingId":"205a98e","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.4020456Z","@mt":"{LogPrefix} Starting","@l":"Debug","LogPrefix":"[ServerRegistration] ","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.4020456Z","@mt":"{LogPrefix} Starting","@l":"Debug","LogPrefix":"[ServerInstProcess] ","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.4030425Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Initialized components.","Duration":3022,"TimingId":"3ac2c10","SourceContext":"Umbraco.Core.Components.BootLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.4120182Z","@mt":"{LogPrefix} Stopping","@l":"Debug","LogPrefix":"[ServerRegistration] ","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:34:50.4120182Z","@mt":"{LogPrefix} Stopping","@l":"Debug","LogPrefix":"[ServerInstProcess] ","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:34:50.4150111Z","@mt":"Rebuilding index","@l":"Debug","SourceContext":"Umbraco.Examine.UmbracoMemberIndexer","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:34:50.4190399Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","EndMessage":"Booted.","Duration":4586,"TimingId":"9e76e5f","SourceContext":"Umbraco.Core.Runtime.CoreRuntime","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":1,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"557f45ba-0888-4216-8723-e226d795a2f7"} +{"@t":"2018-11-12T08:34:50.6145811Z","@mt":"Rebuilding index","@l":"Debug","SourceContext":"Umbraco.Examine.UmbracoContentIndexer","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:34:50.8110564Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"ac83dbf0-66b4-4e36-9adb-02ebba505800","RequestUrl":"http://localhost:8000/","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":2} +{"@t":"2018-11-12T08:34:50.8130503Z","@mt":"New url {Url} detected, re-discovering application url.","Url":"http://localhost:8000/umbraco","SourceContext":"Umbraco.Core.Sync.ApplicationUrlHelper","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":2,"HttpRequestId":"ac83dbf0-66b4-4e36-9adb-02ebba505800"} +{"@t":"2018-11-12T08:34:50.8150525Z","@mt":"ApplicationUrl: {UmbracoAppUrl} (UmbracoModule request)","UmbracoAppUrl":"http://localhost:8000/umbraco","SourceContext":"Umbraco.Core.Sync.ApplicationUrlHelper","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":2,"HttpRequestId":"ac83dbf0-66b4-4e36-9adb-02ebba505800"} +{"@t":"2018-11-12T08:34:50.8369870Z","@mt":"Rebuilding index","@l":"Debug","SourceContext":"Umbraco.Examine.UmbracoContentIndexer","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:34:51.3007471Z","@mt":"Creating snapshot.","@l":"Debug","SourceContext":"Umbraco.Web.PublishedCache.NuCache.ContentStore+Snapshot","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":2,"HttpRequestId":"ac83dbf0-66b4-4e36-9adb-02ebba505800"} +{"@t":"2018-11-12T08:34:51.3007471Z","@mt":"Creating snapshot.","@l":"Debug","SourceContext":"Umbraco.Web.PublishedCache.NuCache.ContentStore+Snapshot","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":2,"HttpRequestId":"ac83dbf0-66b4-4e36-9adb-02ebba505800"} +{"@t":"2018-11-12T08:34:51.3635780Z","@mt":"Umbraco has no content","@l":"Warning","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"WARN ","HttpRequestNumber":2,"HttpRequestId":"ac83dbf0-66b4-4e36-9adb-02ebba505800"} +{"@t":"2018-11-12T08:34:52.5145008Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"ac83dbf0-66b4-4e36-9adb-02ebba505800","RequestUrl":"http://localhost:8000/config/splashes/noNodes.aspx","Duration":1695.4667000000002,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":2} +{"@t":"2018-11-12T08:34:52.5184895Z","@mt":"Dispose snapshot ({Snapshot})","@l":"Debug","Snapshot":"1","SourceContext":"Umbraco.Web.PublishedCache.NuCache.ContentStore+Snapshot","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":2,"HttpRequestId":"ac83dbf0-66b4-4e36-9adb-02ebba505800"} +{"@t":"2018-11-12T08:34:52.5184895Z","@mt":"Dispose snapshot ({Snapshot})","@l":"Debug","Snapshot":"1","SourceContext":"Umbraco.Web.PublishedCache.NuCache.ContentStore+Snapshot","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":2,"HttpRequestId":"ac83dbf0-66b4-4e36-9adb-02ebba505800"} +{"@t":"2018-11-12T08:34:52.6082515Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"880d4fe6-2b6c-427c-9cda-aced3496da47","RequestUrl":"http://localhost:8000/Umbraco/assets/css/nonodes.style.min.css","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":8,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":3} +{"@t":"2018-11-12T08:34:53.0560566Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"1f92d73d-f1eb-48aa-8637-7c4a7930bbab","RequestUrl":"http://localhost:8000/Umbraco/assets/img/nonodesbg.jpg","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":12,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":4} +{"@t":"2018-11-12T08:34:53.0580486Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"352ce5ad-c84b-4acd-bca9-43a0eaa5dd5d","RequestUrl":"http://localhost:8000/Umbraco/assets/img/logo.png","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":5} +{"@t":"2018-11-12T08:34:53.0720141Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"0201add1-2f46-4875-8c23-4048bad00eea","RequestUrl":"http://localhost:8000/Umbraco/assets/fonts/lato/LatoLatin-Bold.woff","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":6} +{"@t":"2018-11-12T08:34:53.1119039Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"4bbe5f67-8b76-4097-a453-c9014054c233","RequestUrl":"http://localhost:8000/Umbraco/assets/fonts/lato/LatoLatin-Italic.woff","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":8,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":7} +{"@t":"2018-11-12T08:34:53.1308532Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"959974f8-aa56-4372-9cce-0858344e3909","RequestUrl":"http://localhost:8000/Umbraco/assets/fonts/lato/LatoLatin-Regular.woff","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":8} +{"@t":"2018-11-12T08:34:53.2595111Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"80172e85-a7b1-4853-a619-0c4a71a7aade","RequestUrl":"http://localhost:8000/favicon.ico","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":8,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":9} +{"@t":"2018-11-12T08:37:54.1751391Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"ff2564b7-d504-4a1d-930e-85ae7857b706","RequestUrl":"http://localhost:8000/umbraco","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":10} +{"@t":"2018-11-12T08:37:57.1382184Z","@mt":"{StartMessage} [Timing {TimingId}]","StartMessage":"Getting Umbraco.Core.Composing.IDiscoverable","TimingId":"c2d39bb","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpSessionId":"bjm3dva3ozzwjofbsbjeshz1","HttpRequestNumber":10,"HttpRequestId":"ff2564b7-d504-4a1d-930e-85ae7857b706"} +{"@t":"2018-11-12T08:37:57.1382184Z","@mt":"Getting {TypeName}: found a cached type list.","@l":"Debug","TypeName":"Umbraco.Core.Composing.IDiscoverable","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpSessionId":"bjm3dva3ozzwjofbsbjeshz1","HttpRequestNumber":10,"HttpRequestId":"ff2564b7-d504-4a1d-930e-85ae7857b706"} +{"@t":"2018-11-12T08:37:57.1382184Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","EndMessage":"Got Umbraco.Core.Composing.IDiscoverable","Duration":0,"TimingId":"c2d39bb","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpSessionId":"bjm3dva3ozzwjofbsbjeshz1","HttpRequestNumber":10,"HttpRequestId":"ff2564b7-d504-4a1d-930e-85ae7857b706"} +{"@t":"2018-11-12T08:37:57.1382184Z","@mt":"{StartMessage} [Timing {TimingId}]","StartMessage":"Getting [Umbraco.Web.Trees.TreeAttribute]Umbraco.Web.Trees.TreeController","TimingId":"9a2f9dc","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpSessionId":"bjm3dva3ozzwjofbsbjeshz1","HttpRequestNumber":10,"HttpRequestId":"ff2564b7-d504-4a1d-930e-85ae7857b706"} +{"@t":"2018-11-12T08:37:57.1382184Z","@mt":"Getting {TypeName}: scanning assemblies.","@l":"Debug","TypeName":"[Umbraco.Web.Trees.TreeAttribute]Umbraco.Web.Trees.TreeController","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpSessionId":"bjm3dva3ozzwjofbsbjeshz1","HttpRequestNumber":10,"HttpRequestId":"ff2564b7-d504-4a1d-930e-85ae7857b706"} +{"@t":"2018-11-12T08:37:57.1471718Z","@mt":"Got {TypeName}, caching ({CacheType}).","@l":"Debug","TypeName":"[Umbraco.Web.Trees.TreeAttribute]Umbraco.Web.Trees.TreeController","CacheType":"true","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpSessionId":"bjm3dva3ozzwjofbsbjeshz1","HttpRequestNumber":10,"HttpRequestId":"ff2564b7-d504-4a1d-930e-85ae7857b706"} +{"@t":"2018-11-12T08:37:57.1471718Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","EndMessage":"Got [Umbraco.Web.Trees.TreeAttribute]Umbraco.Web.Trees.TreeController","Duration":8,"TimingId":"9a2f9dc","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpSessionId":"bjm3dva3ozzwjofbsbjeshz1","HttpRequestNumber":10,"HttpRequestId":"ff2564b7-d504-4a1d-930e-85ae7857b706"} +{"@t":"2018-11-12T08:37:57.2349256Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"ff2564b7-d504-4a1d-930e-85ae7857b706","RequestUrl":"http://localhost:8000/umbraco/Default","Duration":3059.7865,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":10} +{"@t":"2018-11-12T08:37:57.2588627Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"47bf742b-9dd2-41f2-8e45-fc17fb44abeb","RequestUrl":"http://localhost:8000/umbraco/Application?umb__rnd=59e73005b5344a136d8da9c5c5b2e23b","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":11} +{"@t":"2018-11-12T08:37:57.2678379Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"e4415a9e-ee00-4eee-b686-72a9ab01a0bc","RequestUrl":"http://localhost:8000/umbraco/assets/css/umbraco.css?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":21,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":12} +{"@t":"2018-11-12T08:37:57.2688368Z","@mt":"Initializing the scheduler","@l":"Debug","SourceContext":"Umbraco.Web.Scheduling.SchedulerComponent","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":11,"HttpRequestId":"47bf742b-9dd2-41f2-8e45-fc17fb44abeb"} +{"@t":"2018-11-12T08:37:57.2728260Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[KeepAlive] ","TaskType":"Umbraco.Web.Scheduling.KeepAlive","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":11,"HttpRequestId":"47bf742b-9dd2-41f2-8e45-fc17fb44abeb"} +{"@t":"2018-11-12T08:37:57.2748198Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"33f8cd80-5570-4bd4-a162-5c03ee027c6e","RequestUrl":"http://localhost:8000/umbraco/lib/font-awesome/css/font-awesome.min.css?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":13} +{"@t":"2018-11-12T08:37:57.2798063Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"892aa9c2-a99d-42ee-83de-f87dd0dd9100","RequestUrl":"http://localhost:8000/umbraco/lib/bootstrap-social/bootstrap-social.css?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":14} +{"@t":"2018-11-12T08:37:57.2798063Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"03854a08-2d0e-4cb3-9e3a-cf04ac94d3c8","RequestUrl":"http://localhost:8000/umbraco/lib/lazyload-js/lazyload.min.js","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":25,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":15} +{"@t":"2018-11-12T08:37:57.2857955Z","@mt":"{LogPrefix} Starting","@l":"Debug","LogPrefix":"[KeepAlive] ","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":11,"HttpRequestId":"47bf742b-9dd2-41f2-8e45-fc17fb44abeb"} +{"@t":"2018-11-12T08:37:57.2867874Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":11,"HttpRequestId":"47bf742b-9dd2-41f2-8e45-fc17fb44abeb"} +{"@t":"2018-11-12T08:37:57.3057363Z","@mt":"{LogPrefix} Starting","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":11,"HttpRequestId":"47bf742b-9dd2-41f2-8e45-fc17fb44abeb"} +{"@t":"2018-11-12T08:37:57.3057363Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":11,"HttpRequestId":"47bf742b-9dd2-41f2-8e45-fc17fb44abeb"} +{"@t":"2018-11-12T08:37:57.3067340Z","@mt":"{LogPrefix} Starting","@l":"Debug","LogPrefix":"[ScheduledTasks] ","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":11,"HttpRequestId":"47bf742b-9dd2-41f2-8e45-fc17fb44abeb"} +{"@t":"2018-11-12T08:37:57.3077316Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[LogScrubber] ","TaskType":"Umbraco.Web.Scheduling.LogScrubber","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":11,"HttpRequestId":"47bf742b-9dd2-41f2-8e45-fc17fb44abeb"} +{"@t":"2018-11-12T08:37:57.3087288Z","@mt":"{LogPrefix} Starting","@l":"Debug","LogPrefix":"[LogScrubber] ","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":11,"HttpRequestId":"47bf742b-9dd2-41f2-8e45-fc17fb44abeb"} +{"@t":"2018-11-12T08:37:57.3097256Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":11,"HttpRequestId":"47bf742b-9dd2-41f2-8e45-fc17fb44abeb"} +{"@t":"2018-11-12T08:37:57.3107228Z","@mt":"{LogPrefix} Starting","@l":"Debug","LogPrefix":"[ServerInstProcess] ","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":11,"HttpRequestId":"47bf742b-9dd2-41f2-8e45-fc17fb44abeb"} +{"@t":"2018-11-12T08:37:57.3107228Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":11,"HttpRequestId":"47bf742b-9dd2-41f2-8e45-fc17fb44abeb"} +{"@t":"2018-11-12T08:37:57.3107228Z","@mt":"{LogPrefix} Starting","@l":"Debug","LogPrefix":"[ServerRegistration] ","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":11,"HttpRequestId":"47bf742b-9dd2-41f2-8e45-fc17fb44abeb"} +{"@t":"2018-11-12T08:37:57.4633152Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"47bf742b-9dd2-41f2-8e45-fc17fb44abeb","RequestUrl":"http://localhost:8000/umbraco/Application?umb__rnd=59e73005b5344a136d8da9c5c5b2e23b","Duration":204.45250000000002,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":11} +{"@t":"2018-11-12T08:37:57.4732893Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"6aff11f3-7a93-4e66-b3e6-29d04d6529d9","RequestUrl":"http://localhost:8000/umbraco/lib/jquery/jquery.min.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":25,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":16} +{"@t":"2018-11-12T08:37:57.4772786Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"6b266108-0d9c-46c9-bcf5-6ce8e1cb1486","RequestUrl":"http://localhost:8000/umbraco/lib/jquery-ui-touch-punch/jquery.ui.touch-punch.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":17} +{"@t":"2018-11-12T08:37:57.4772786Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"b2a6d254-587c-4343-ae9b-5850abcf1e29","RequestUrl":"http://localhost:8000/umbraco/lib/jquery-ui/jquery-ui.min.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":18} +{"@t":"2018-11-12T08:37:57.4792729Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"6bd4fdb5-a03e-491f-a3ff-31da78c8550a","RequestUrl":"http://localhost:8000/umbraco/lib/angular/angular.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":19} +{"@t":"2018-11-12T08:37:57.4822650Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"33bb2d3a-5b02-45f0-b718-92fa59ba0ff3","RequestUrl":"http://localhost:8000/umbraco/lib/underscore/underscore-min.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":20} +{"@t":"2018-11-12T08:37:57.4822650Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"64042e7e-8a86-4e2a-820b-5a770732d5ae","RequestUrl":"http://localhost:8000/umbraco/lib/moment/moment.min.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":21,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":21} +{"@t":"2018-11-12T08:37:57.5121855Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"25d8b50f-23ca-40b3-8f64-f0f9a11fe9fc","RequestUrl":"http://localhost:8000/umbraco/lib/animejs/anime.min.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":28,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":22} +{"@t":"2018-11-12T08:37:57.5540731Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"193fa41d-ae63-4cfb-8728-61668a655382","RequestUrl":"http://localhost:8000/umbraco/lib/angular-route/angular-route.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":23} +{"@t":"2018-11-12T08:37:57.5540731Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"65fa710d-07e3-40b8-aa9c-a89c99254304","RequestUrl":"http://localhost:8000/umbraco/lib/angular-cookies/angular-cookies.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":24} +{"@t":"2018-11-12T08:37:57.5590599Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"37f712d1-8296-410f-b54a-1d0f3b5b3904","RequestUrl":"http://localhost:8000/umbraco/lib/angular-touch/angular-touch.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":21,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":25} +{"@t":"2018-11-12T08:37:57.5630488Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"24d327f2-6b15-4a7c-8393-8d77b045558f","RequestUrl":"http://localhost:8000/umbraco/lib/angular-sanitize/angular-sanitize.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":26} +{"@t":"2018-11-12T08:37:57.5840009Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"8674caa1-42fe-46c4-aef5-f63294d9ef7d","RequestUrl":"http://localhost:8000/umbraco/lib/angular-animate/angular-animate.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":25,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":27} +{"@t":"2018-11-12T08:37:57.5869892Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"b3cd5a55-ee24-4f2d-a620-84897d51e1a4","RequestUrl":"http://localhost:8000/umbraco/lib/angular-messages/angular-messages.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":28} +{"@t":"2018-11-12T08:37:57.5939662Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"5c281210-8066-413f-9d55-84d70df6eab0","RequestUrl":"http://localhost:8000/umbraco/lib/angular-ui-sortable/sortable.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":29} +{"@t":"2018-11-12T08:37:57.5949638Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"1adf1b2d-b651-4feb-85ae-f8d1ac4ae81a","RequestUrl":"http://localhost:8000/umbraco/lib/angular-dynamic-locale/tmhDynamicLocale.min.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":30} +{"@t":"2018-11-12T08:37:57.6119183Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"c8e87ff5-7ac1-4993-854d-74f6135ea777","RequestUrl":"http://localhost:8000/umbraco/lib/ng-file-upload/ng-file-upload.min.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":31} +{"@t":"2018-11-12T08:37:57.6119183Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"2cfe443e-28a4-4077-bed8-4a78c0e89c12","RequestUrl":"http://localhost:8000/umbraco/lib/angular-local-storage/angular-local-storage.min.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":32} +{"@t":"2018-11-12T08:37:57.6198970Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"2f6380e3-1541-410e-a979-262558749df2","RequestUrl":"http://localhost:8000/umbraco/lib/bootstrap/js/bootstrap.2.3.2.min.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":33} +{"@t":"2018-11-12T08:37:57.6268782Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"567fbde1-8569-4807-b97e-f16266f97528","RequestUrl":"http://localhost:8000/umbraco/lib/umbraco/Extensions.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":34} +{"@t":"2018-11-12T08:37:57.6288731Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"2529cc19-01ad-41cc-a557-933548e03efc","RequestUrl":"http://localhost:8000/umbraco/lib/umbraco/NamespaceManager.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":35} +{"@t":"2018-11-12T08:37:57.6288731Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"f84360b5-56fd-48ef-9439-4a393d969582","RequestUrl":"http://localhost:8000/umbraco/lib/umbraco/LegacyUmbClientMgr.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":21,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":36} +{"@t":"2018-11-12T08:37:57.6552791Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"16e3304b-28dc-4537-a792-b844fc6e5912","RequestUrl":"http://localhost:8000/umbraco/lib/umbraco/LegacySpeechBubble.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":37} +{"@t":"2018-11-12T08:37:57.6792092Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"000255bb-0530-4856-9a79-dd026b68aeb6","RequestUrl":"http://localhost:8000/umbraco/js/app.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":25,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":38} +{"@t":"2018-11-12T08:37:57.6792092Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"46189b5a-4f66-44f8-8dfb-70838037d77e","RequestUrl":"http://localhost:8000/umbraco/js/umbraco.services.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":39} +{"@t":"2018-11-12T08:37:57.6812015Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"15080fa1-3aa4-4e88-a9b5-89b74d4ffda7","RequestUrl":"http://localhost:8000/umbraco/js/umbraco.directives.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":40} +{"@t":"2018-11-12T08:37:57.6822086Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"1fc34857-1a76-4b17-ab0d-b10635f7e40c","RequestUrl":"http://localhost:8000/umbraco/js/umbraco.resources.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":21,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":41} +{"@t":"2018-11-12T08:37:57.6841937Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"cd9e6a27-f5b9-458c-93ff-7666d2fdd733","RequestUrl":"http://localhost:8000/umbraco/js/umbraco.interceptors.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":42} +{"@t":"2018-11-12T08:37:57.6891807Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"a5a4b806-673e-4e98-9cb8-42b856013445","RequestUrl":"http://localhost:8000/umbraco/js/umbraco.filters.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":43} +{"@t":"2018-11-12T08:37:57.7061349Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"c3adb018-7adc-4484-a9f7-c4758d7a30a9","RequestUrl":"http://localhost:8000/umbraco/js/umbraco.controllers.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":44} +{"@t":"2018-11-12T08:37:57.7151111Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"3da30277-54c3-46e2-92c3-d6d3c94ed842","RequestUrl":"http://localhost:8000/umbraco/js/init.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":45} +{"@t":"2018-11-12T08:37:57.7161091Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"1ac8fe32-4007-479f-8bf5-f9b13b87c76e","RequestUrl":"http://localhost:8000/umbraco/js/routes.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":28,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":46} +{"@t":"2018-11-12T08:37:57.7320658Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"bf2718f4-a797-4f7b-8ff8-6a504290e615","RequestUrl":"http://localhost:8000/App_Plugins/ModelsBuilder/modelsbuilder.controller.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":47} +{"@t":"2018-11-12T08:37:57.7340606Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"9a0bed25-ef51-4b11-aa70-b5313b46fc93","RequestUrl":"http://localhost:8000/App_Plugins/ModelsBuilder/modelsbuilder.resource.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":21,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":48} +{"@t":"2018-11-12T08:37:57.9255478Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"cd2812ac-0e0d-4310-b249-94f3dc0d4ce4","RequestUrl":"http://localhost:8000/umbraco/views/components/application/umb-app-header.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":49} +{"@t":"2018-11-12T08:37:57.9265453Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"ca8df7a8-7cd3-4cf3-af1a-9de186f8cedd","RequestUrl":"http://localhost:8000/umbraco/views/components/notifications/umb-notifications.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":25,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":50} +{"@t":"2018-11-12T08:37:57.9285449Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"51dad714-8e2d-489a-a69a-74f470eb8ef5","RequestUrl":"http://localhost:8000/umbraco/views/components/editor/umb-editors.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":51} +{"@t":"2018-11-12T08:37:57.9295384Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"b92d587b-f8cd-4124-b872-6cc5cef2f37f","RequestUrl":"http://localhost:8000/umbraco/views/components/application/umb-navigation.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":21,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":52} +{"@t":"2018-11-12T08:37:57.9345288Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"8b6ddcfb-e2c9-479d-b66e-422ed122d9da","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/IsAuthenticated","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":53} +{"@t":"2018-11-12T08:37:57.9863913Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"18ea4d5e-b20b-46af-bf1e-a4622bd9c5a8","RequestUrl":"http://localhost:8000/umbraco/views/components/tree/umb-tree.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":54} +{"@t":"2018-11-12T08:37:57.9873834Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"7ff26013-3de8-4df6-ac09-f74d6e4a5acc","RequestUrl":"http://localhost:8000/umbraco/views/components/application/umb-contextmenu.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":55} +{"@t":"2018-11-12T08:37:58.0003541Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"e6fc3af6-d01d-415a-9ead-095132372546","RequestUrl":"http://localhost:8000/umbraco/views/components/umb-avatar.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":56} +{"@t":"2018-11-12T08:37:58.0332606Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"466692b7-6378-478d-90e0-96ba1bd1bb73","RequestUrl":"http://localhost:8000/umbraco/assets/img/application/logo.png","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":57} +{"@t":"2018-11-12T08:37:58.1938303Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"8b6ddcfb-e2c9-479d-b66e-422ed122d9da","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/IsAuthenticated","Duration":258.3073,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":53} +{"@t":"2018-11-12T08:37:58.2028080Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"2be8bef5-ffca-4df4-9f81-b9129af3d98f","RequestUrl":"http://localhost:8000/umbraco/views/common/login.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":58} +{"@t":"2018-11-12T08:37:58.2197622Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"2e3129d3-e526-4cde-8904-56b861472d78","RequestUrl":"http://localhost:8000/umbraco/views/common/dialogs/login.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":59} +{"@t":"2018-11-12T08:37:58.2746165Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"5b19f3cd-e014-4809-9e73-8b304336ac91","RequestUrl":"http://localhost:8000/umbraco/LocalizedText","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":60} +{"@t":"2018-11-12T08:37:58.2756122Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"40a663a8-866c-437a-a616-2fb1d3881200","RequestUrl":"http://localhost:8000/umbraco/views/components/buttons/umb-button.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":21,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":61} +{"@t":"2018-11-12T08:37:58.2875801Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"54241569-97de-48dc-99f2-fa70798aa6be","RequestUrl":"http://localhost:8000/umbraco/assets/img/installer.jpg","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":62} +{"@t":"2018-11-12T08:37:58.3593883Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"5b19f3cd-e014-4809-9e73-8b304336ac91","RequestUrl":"http://localhost:8000/umbraco/LocalizedText","Duration":84.7718,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":60} +{"@t":"2018-11-12T08:38:03.0847807Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"9b93e05a-aad8-461d-81f1-42d3fe481078","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/PostLogin","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":63} +{"@t":"2018-11-12T08:38:04.2227119Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"b546f880-2012-4905-bc49-9a290ebec282","RequestUrl":"http://localhost:8000/umbraco/lib/angular-local-storage/angular-local-storage.min.js.map","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":64} +{"@t":"2018-11-12T08:38:04.2247067Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"a8336ec9-4521-4c49-b0e8-276f70eaf235","RequestUrl":"http://localhost:8000/umbraco/lib/angular-dynamic-locale/tmhDynamicLocale.min.js.map","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":65} +{"@t":"2018-11-12T08:38:04.3015021Z","@mt":"{StartMessage} [Timing {TimingId}]","StartMessage":"Getting Umbraco.Core.Composing.IDiscoverable","TimingId":"e783188","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":63,"HttpRequestId":"9b93e05a-aad8-461d-81f1-42d3fe481078"} +{"@t":"2018-11-12T08:38:04.3015021Z","@mt":"Getting {TypeName}: found a cached type list.","@l":"Debug","TypeName":"Umbraco.Core.Composing.IDiscoverable","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":63,"HttpRequestId":"9b93e05a-aad8-461d-81f1-42d3fe481078"} +{"@t":"2018-11-12T08:38:04.3015021Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","EndMessage":"Got Umbraco.Core.Composing.IDiscoverable","Duration":0,"TimingId":"e783188","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":63,"HttpRequestId":"9b93e05a-aad8-461d-81f1-42d3fe481078"} +{"@t":"2018-11-12T08:38:04.3015021Z","@mt":"{StartMessage} [Timing {TimingId}]","StartMessage":"Getting Umbraco.Core.Cache.ICacheRefresher","TimingId":"7efaac8","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":63,"HttpRequestId":"9b93e05a-aad8-461d-81f1-42d3fe481078"} +{"@t":"2018-11-12T08:38:04.3015021Z","@mt":"Getting {TypeName}: scanning assemblies.","@l":"Debug","TypeName":"Umbraco.Core.Cache.ICacheRefresher","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":63,"HttpRequestId":"9b93e05a-aad8-461d-81f1-42d3fe481078"} +{"@t":"2018-11-12T08:38:04.3084821Z","@mt":"Got {TypeName}, caching ({CacheType}).","@l":"Debug","TypeName":"Umbraco.Core.Cache.ICacheRefresher","CacheType":"true","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":63,"HttpRequestId":"9b93e05a-aad8-461d-81f1-42d3fe481078"} +{"@t":"2018-11-12T08:38:04.3084821Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","EndMessage":"Got Umbraco.Core.Cache.ICacheRefresher","Duration":6,"TimingId":"7efaac8","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":63,"HttpRequestId":"9b93e05a-aad8-461d-81f1-42d3fe481078"} +{"@t":"2018-11-12T08:38:04.3184548Z","@mt":"Invoking refresher {RefresherType} on local server for message type {MessageType}","@l":"Debug","RefresherType":"Umbraco.Web.Cache.UserCacheRefresher","MessageType":"RefreshById","SourceContext":"Umbraco.Core.Sync.ServerMessengerBase","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":63,"HttpRequestId":"9b93e05a-aad8-461d-81f1-42d3fe481078"} +{"@t":"2018-11-12T08:38:04.4231755Z","@mt":"[{EventType}] Event Id: {EventId}, State: {State}","EventType":"Information","EventId":0,"State":"Login attempt succeeded for username warren@umbraco.com from IP address ::1","SourceContext":"Umbraco.Core.Logging.OwinLogger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":63,"HttpRequestId":"9b93e05a-aad8-461d-81f1-42d3fe481078"} +{"@t":"2018-11-12T08:38:04.4241729Z","@mt":"[{EventType}] Event Id: {EventId}, State: {State}","EventType":"Information","EventId":0,"State":"User: warren@umbraco.com logged in from IP address ::1","SourceContext":"Umbraco.Core.Logging.OwinLogger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":63,"HttpRequestId":"9b93e05a-aad8-461d-81f1-42d3fe481078"} +{"@t":"2018-11-12T08:38:04.9607485Z","@mt":"Could not validate XSRF token","@l":"Error","@x":"System.Web.Mvc.HttpAntiForgeryException (0x80004005): The anti-forgery token could not be decrypted. If this application is hosted by a Web Farm or cluster, ensure that all machines are running the same version of ASP.NET Web Pages and that the configuration specifies explicit encryption and validation keys. AutoGenerate cannot be used in a cluster.\r\n at System.Web.Helpers.AntiXsrf.AntiForgeryTokenSerializer.Deserialize(String serializedToken)\r\n at System.Web.Helpers.AntiXsrf.AntiForgeryWorker.Validate(HttpContextBase httpContext, String cookieToken, String formToken)\r\n at System.Web.Helpers.AntiForgery.Validate(String cookieToken, String formToken)\r\n at Umbraco.Web.WebApi.Filters.AngularAntiForgeryHelper.ValidateTokens(String cookieToken, String headerToken) in C:\\Code\\Umbraco-CMS\\src\\Umbraco.Web\\WebApi\\Filters\\AngularAntiForgeryHelper.cs:line 58","SourceContext":"Umbraco.Web.WebApi.Filters.AngularAntiForgeryHelper","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ERROR","HttpRequestNumber":63,"HttpRequestId":"9b93e05a-aad8-461d-81f1-42d3fe481078"} +{"@t":"2018-11-12T08:38:05.0116370Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"9b93e05a-aad8-461d-81f1-42d3fe481078","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/PostLogin","Duration":1926.8563000000002,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":63} +{"@t":"2018-11-12T08:38:05.1352743Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"2b3637b3-c40d-48b3-a810-d6f07b3f68f3","RequestUrl":"http://localhost:8000/umbraco/ServerVariables?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":66} +{"@t":"2018-11-12T08:38:05.3247725Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"2b3637b3-c40d-48b3-a810-d6f07b3f68f3","RequestUrl":"http://localhost:8000/umbraco/ServerVariables?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","Duration":189.4982,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":66} +{"@t":"2018-11-12T08:38:05.3327449Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"19c06b62-9200-41af-964f-3c1b7e006c9c","RequestUrl":"http://localhost:8000/umbraco/lib/angular-i18n/angular-locale_en-US.js","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":67} +{"@t":"2018-11-12T08:38:05.3347401Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"a085ad93-8943-4275-ae6e-9997f2162a93","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/BackOfficeAssets/GetSupportedMomentLocales","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":21,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":68} +{"@t":"2018-11-12T08:38:05.3357371Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"ee4c19ad-54fb-4a22-bf6e-9c9da26fb438","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/UpdateCheck/GetCheck","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":69} +{"@t":"2018-11-12T08:38:05.3377312Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"e1087f73-b29f-4763-b894-b69dcddd0945","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Tour/GetTours","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":70} +{"@t":"2018-11-12T08:38:05.3467067Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"fe24fd53-b61f-47a8-9706-de9ef031a2b6","RequestUrl":"http://localhost:8000/umbraco/views/components/application/umb-sections.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":71} +{"@t":"2018-11-12T08:38:05.3666541Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"08c54d21-7a1c-40f9-8740-f7e92bda28d7","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Content/AllowsCultureVariation","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":25,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":72} +{"@t":"2018-11-12T08:38:05.3995690Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"b5c6de2e-81c0-41bd-9e0e-e0185691a5eb","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Section/GetSections","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":73} +{"@t":"2018-11-12T08:38:05.4075601Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"b42d2134-aa4b-40a4-8484-d4633d22eef3","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Section/GetSections","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":74} +{"@t":"2018-11-12T08:38:05.5262284Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"08c54d21-7a1c-40f9-8740-f7e92bda28d7","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Content/AllowsCultureVariation","Duration":159.5743,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":25,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":72} +{"@t":"2018-11-12T08:38:05.5262284Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"a085ad93-8943-4275-ae6e-9997f2162a93","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/BackOfficeAssets/GetSupportedMomentLocales","Duration":191.4883,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":21,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":68} +{"@t":"2018-11-12T08:38:05.5352025Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"2a3b9da8-441b-422a-b405-4471de4d908d","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoTrees/ApplicationTree/GetApplicationTrees?application=content&tree=&isDialog=false","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":75} +{"@t":"2018-11-12T08:38:05.5611334Z","@mt":"{StartMessage} [Timing {TimingId}]","StartMessage":"Getting [Umbraco.Web.Models.Trees.ApplicationAttribute]Umbraco.Web.Models.Trees.IApplication","TimingId":"d2e9dc6","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":74,"HttpRequestId":"b42d2134-aa4b-40a4-8484-d4633d22eef3"} +{"@t":"2018-11-12T08:38:05.5611334Z","@mt":"Getting {TypeName}: scanning assemblies.","@l":"Debug","TypeName":"[Umbraco.Web.Models.Trees.ApplicationAttribute]Umbraco.Web.Models.Trees.IApplication","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":74,"HttpRequestId":"b42d2134-aa4b-40a4-8484-d4633d22eef3"} +{"@t":"2018-11-12T08:38:05.5661208Z","@mt":"Got {TypeName}.","@l":"Debug","TypeName":"[Umbraco.Web.Models.Trees.ApplicationAttribute]Umbraco.Web.Models.Trees.IApplication","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG","HttpRequestNumber":74,"HttpRequestId":"b42d2134-aa4b-40a4-8484-d4633d22eef3"} +{"@t":"2018-11-12T08:38:05.5661208Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","EndMessage":"Got [Umbraco.Web.Models.Trees.ApplicationAttribute]Umbraco.Web.Models.Trees.IApplication","Duration":5,"TimingId":"d2e9dc6","SourceContext":"Umbraco.Core.Composing.TypeLoader","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"INFO ","HttpRequestNumber":74,"HttpRequestId":"b42d2134-aa4b-40a4-8484-d4633d22eef3"} +{"@t":"2018-11-12T08:38:05.6060173Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"e1087f73-b29f-4763-b894-b69dcddd0945","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Tour/GetTours","Duration":268.28610000000003,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":70} +{"@t":"2018-11-12T08:38:05.6129965Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"0e9e51e5-7a7e-4f8b-9189-2599f0327b9f","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/CurrentUser/GetUserTours","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":21,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":76} +{"@t":"2018-11-12T08:38:05.6848036Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"0e9e51e5-7a7e-4f8b-9189-2599f0327b9f","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/CurrentUser/GetUserTours","Duration":71.8071,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":21,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":76} +{"@t":"2018-11-12T08:38:05.6858005Z","@mt":"The tree definition: {AddElement} could not be resolved to a .Net object type","@l":"Warning","AddElement":"","SourceContext":"Umbraco.Web.Services.ApplicationTreeService","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"WARN ","HttpRequestNumber":73,"HttpRequestId":"b5c6de2e-81c0-41bd-9e0e-e0185691a5eb"} +{"@t":"2018-11-12T08:38:05.6887919Z","@mt":"The tree definition: {AddElement} could not be resolved to a .Net object type","@l":"Warning","AddElement":"","SourceContext":"Umbraco.Web.Services.ApplicationTreeService","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"WARN ","HttpRequestNumber":73,"HttpRequestId":"b5c6de2e-81c0-41bd-9e0e-e0185691a5eb"} +{"@t":"2018-11-12T08:38:05.6897893Z","@mt":"The tree definition: {AddElement} could not be resolved to a .Net object type","@l":"Warning","AddElement":"","SourceContext":"Umbraco.Web.Services.ApplicationTreeService","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"WARN ","HttpRequestNumber":73,"HttpRequestId":"b5c6de2e-81c0-41bd-9e0e-e0185691a5eb"} +{"@t":"2018-11-12T08:38:05.6907902Z","@mt":"The tree definition: {AddElement} could not be resolved to a .Net object type","@l":"Warning","AddElement":"","SourceContext":"Umbraco.Web.Services.ApplicationTreeService","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"WARN ","HttpRequestNumber":73,"HttpRequestId":"b5c6de2e-81c0-41bd-9e0e-e0185691a5eb"} +{"@t":"2018-11-12T08:38:05.6917843Z","@mt":"The tree definition: {AddElement} could not be resolved to a .Net object type","@l":"Warning","AddElement":"","SourceContext":"Umbraco.Web.Services.ApplicationTreeService","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"WARN ","HttpRequestNumber":73,"HttpRequestId":"b5c6de2e-81c0-41bd-9e0e-e0185691a5eb"} +{"@t":"2018-11-12T08:38:05.6917843Z","@mt":"The tree definition: {AddElement} could not be resolved to a .Net object type","@l":"Warning","AddElement":"","SourceContext":"Umbraco.Web.Services.ApplicationTreeService","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"WARN ","HttpRequestNumber":73,"HttpRequestId":"b5c6de2e-81c0-41bd-9e0e-e0185691a5eb"} +{"@t":"2018-11-12T08:39:18.1562229Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"f9683dae-21bd-479a-8fca-504b288c3875","RequestUrl":"http://localhost:8000/umbraco","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":37,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":77} +{"@t":"2018-11-12T08:39:18.1562229Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"511a0884-22a5-4369-beb9-80e75b1cb4dd","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":33,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":78} +{"@t":"2018-11-12T08:39:18.1632038Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"7211c02","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":36,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:18.1961166Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":33,"TimingId":"7211c02","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":36,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:18.1971147Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":36,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:18.2011032Z","@mt":"Does not run on servers with unknown role.","@l":"Debug","SourceContext":"Umbraco.Web.Scheduling.LogScrubber","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":36,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:18.2011032Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[LogScrubber] ","TaskType":"Umbraco.Web.Scheduling.LogScrubber","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":36,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:18.2021053Z","@mt":"Does not run on servers with unknown role.","@l":"Debug","SourceContext":"Umbraco.Web.Scheduling.ScheduledPublishing","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":36,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:18.2021053Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":36,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:18.2040952Z","@mt":"Does not run on servers with unknown role.","@l":"Debug","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":38,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:18.2050926Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":38,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:18.2060893Z","@mt":"Does not run on servers with unknown role.","@l":"Debug","SourceContext":"Umbraco.Web.Scheduling.KeepAlive","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":36,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:18.2060893Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[KeepAlive] ","TaskType":"Umbraco.Web.Scheduling.KeepAlive","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":36,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:18.2210546Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"511a0884-22a5-4369-beb9-80e75b1cb4dd","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":63.8342,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":36,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":78} +{"@t":"2018-11-12T08:39:18.2090826Z","@mt":"Unhandled controller exception occurred for request '{RequestUrl}'","@l":"Error","@x":"System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: This document already has an 'XmlDeclaration' node.\r\n at System.Xml.XmlDocument.IsValidChildType(XmlNodeType type)\r\n at System.Xml.XmlDocument.AppendChildForLoad(XmlNode newChild, XmlDocument doc)\r\n at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)\r\n at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)\r\n at System.Xml.XmlDocument.Load(XmlReader reader)\r\n at System.Xml.XmlDocument.Load(String filename)\r\n at umbraco.cms.businesslogic.packager.data.Reload(String dataSource) in C:\\Code\\Umbraco-CMS\\src\\Umbraco.Web\\_Legacy\\Packager\\data.cs:line 69\r\n at umbraco.cms.businesslogic.packager.data.GetAllPackages(String dataSource) in C:\\Code\\Umbraco-CMS\\src\\Umbraco.Web\\_Legacy\\Packager\\data.cs:line 170\r\n at umbraco.cms.businesslogic.packager.CreatedPackage.GetAllCreatedPackages() in C:\\Code\\Umbraco-CMS\\src\\Umbraco.Web\\_Legacy\\Packager\\PackageInstance\\CreatedPackage.cs:line 53\r\n at Umbraco.Web.Trees.PackagesTreeController.GetTreeNodes(String id, FormDataCollection queryStrings) in C:\\Code\\Umbraco-CMS\\src\\Umbraco.Web\\Trees\\PackagesTreeController.cs:line 41\r\n at Umbraco.Web.Trees.TreeControllerBase.GetNodes(String id, FormDataCollection queryStrings) in C:\\Code\\Umbraco-CMS\\src\\Umbraco.Web\\Trees\\TreeControllerBase.cs:line 104\r\n at Umbraco.Web.Trees.ApplicationTreeExtensions.TryLoadFromControllerTree(ApplicationTree appTree, String id, FormDataCollection formCollection, HttpControllerContext controllerContext) in C:\\Code\\Umbraco-CMS\\src\\Umbraco.Web\\Trees\\ApplicationTreeExtensions.cs:line 167\r\n at Umbraco.Web.Trees.ApplicationTreeController.d__2.MoveNext() in C:\\Code\\Umbraco-CMS\\src\\Umbraco.Web\\Trees\\ApplicationTreeController.cs:line 164\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at Umbraco.Web.Trees.ApplicationTreeController.d__0.MoveNext() in C:\\Code\\Umbraco-CMS\\src\\Umbraco.Web\\Trees\\ApplicationTreeController.cs:line 52\r\n --- End of inner exception stack trace ---\r\n at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)\r\n at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)\r\n at System.Threading.Tasks.Task`1.get_Result()\r\n at Umbraco.Web.Editors.SectionController.GetSections() in C:\\Code\\Umbraco-CMS\\src\\Umbraco.Web\\Editors\\SectionController.cs:line 54\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_1.b__3(Object instance, Object[] methodParameters)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.d__1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Web.Http.Filters.ActionFilterAttribute.d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Web.Http.Filters.ActionFilterAttribute.d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Web.Http.Filters.ActionFilterAttribute.d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Web.Http.Filters.ActionFilterAttribute.d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Web.Http.Filters.ActionFilterAttribute.d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.AuthorizationFilterAttribute.d__3.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.AuthorizationFilterAttribute.d__3.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.AuthorizationFilterAttribute.d__3.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ExceptionFilterResult.d__6.MoveNext()\r\n---> (Inner Exception #0) System.InvalidOperationException: This document already has an 'XmlDeclaration' node.\r\n at System.Xml.XmlDocument.IsValidChildType(XmlNodeType type)\r\n at System.Xml.XmlDocument.AppendChildForLoad(XmlNode newChild, XmlDocument doc)\r\n at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)\r\n at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)\r\n at System.Xml.XmlDocument.Load(XmlReader reader)\r\n at System.Xml.XmlDocument.Load(String filename)\r\n at umbraco.cms.businesslogic.packager.data.Reload(String dataSource) in C:\\Code\\Umbraco-CMS\\src\\Umbraco.Web\\_Legacy\\Packager\\data.cs:line 69\r\n at umbraco.cms.businesslogic.packager.data.GetAllPackages(String dataSource) in C:\\Code\\Umbraco-CMS\\src\\Umbraco.Web\\_Legacy\\Packager\\data.cs:line 170\r\n at umbraco.cms.businesslogic.packager.CreatedPackage.GetAllCreatedPackages() in C:\\Code\\Umbraco-CMS\\src\\Umbraco.Web\\_Legacy\\Packager\\PackageInstance\\CreatedPackage.cs:line 53\r\n at Umbraco.Web.Trees.PackagesTreeController.GetTreeNodes(String id, FormDataCollection queryStrings) in C:\\Code\\Umbraco-CMS\\src\\Umbraco.Web\\Trees\\PackagesTreeController.cs:line 41\r\n at Umbraco.Web.Trees.TreeControllerBase.GetNodes(String id, FormDataCollection queryStrings) in C:\\Code\\Umbraco-CMS\\src\\Umbraco.Web\\Trees\\TreeControllerBase.cs:line 104\r\n at Umbraco.Web.Trees.ApplicationTreeExtensions.TryLoadFromControllerTree(ApplicationTree appTree, String id, FormDataCollection formCollection, HttpControllerContext controllerContext) in C:\\Code\\Umbraco-CMS\\src\\Umbraco.Web\\Trees\\ApplicationTreeExtensions.cs:line 167\r\n at Umbraco.Web.Trees.ApplicationTreeController.d__2.MoveNext() in C:\\Code\\Umbraco-CMS\\src\\Umbraco.Web\\Trees\\ApplicationTreeController.cs:line 164\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at Umbraco.Web.Trees.ApplicationTreeController.d__0.MoveNext() in C:\\Code\\Umbraco-CMS\\src\\Umbraco.Web\\Trees\\ApplicationTreeController.cs:line 52<---\r\n","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Section/GetSections","SourceContext":"Umbraco.Web.Editors.SectionController","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ERROR","HttpRequestNumber":74,"HttpRequestId":"b42d2134-aa4b-40a4-8484-d4633d22eef3"} +{"@t":"2018-11-12T08:39:18.2090826Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:18.2250424Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"b5c6de2e-81c0-41bd-9e0e-e0185691a5eb","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Section/GetSections","Duration":72824.4796,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":73} +{"@t":"2018-11-12T08:39:18.2479793Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"4b4ea270-3ad3-438b-8092-777c19b737eb","RequestUrl":"http://localhost:8000/umbraco/views/common/dashboard.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":79} +{"@t":"2018-11-12T08:39:18.2609438Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"b42d2134-aa4b-40a4-8484-d4633d22eef3","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Section/GetSections","Duration":72851.4048,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":74} +{"@t":"2018-11-12T08:39:18.2888691Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"9691f36c-c75f-4579-9b8b-76450eb980b5","RequestUrl":"http://localhost:8000/umbraco/views/components/overlays/umb-overlay.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":80} +{"@t":"2018-11-12T08:39:18.2968476Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"c32e00cd-8de7-4159-9a0e-e4c806065ebb","RequestUrl":"http://localhost:8000/umbraco/assets/img/loader.gif","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":81} +{"@t":"2018-11-12T08:39:18.3058237Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"f9683dae-21bd-479a-8fca-504b288c3875","RequestUrl":"http://localhost:8000/umbraco/Default","Duration":149.60080000000002,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":37,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":77} +{"@t":"2018-11-12T08:39:18.3058237Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"ac61fadb-1242-4fe3-8693-59fb261d6fc4","RequestUrl":"http://localhost:8000/umbraco/views/components/umb-load-indicator.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":82} +{"@t":"2018-11-12T08:39:18.3147997Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"0a9ffc1a-f6d6-4278-b1e2-38577b3e92d2","RequestUrl":"http://localhost:8000/umbraco/LocalizedText","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":37,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":83} +{"@t":"2018-11-12T08:39:18.3167942Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"316404b6-1371-48c1-9e12-3ab2fcf9ff53","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Dashboard/GetDashboard?section=content","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":84} +{"@t":"2018-11-12T08:39:18.3347461Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"0a9ffc1a-f6d6-4278-b1e2-38577b3e92d2","RequestUrl":"http://localhost:8000/umbraco/LocalizedText","Duration":19.9464,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":37,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":83} +{"@t":"2018-11-12T08:39:18.3526980Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"ccb26207-a349-443d-a7ce-1602b234201d","RequestUrl":"http://localhost:8000/umbraco/views/common/overlays/ysod/ysod.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":85} +{"@t":"2018-11-12T08:39:18.3576851Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"316404b6-1371-48c1-9e12-3ab2fcf9ff53","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Dashboard/GetDashboard?section=content","Duration":38.8969,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":84} +{"@t":"2018-11-12T08:39:18.3975785Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"6d82982b-bd76-4af2-b005-69a9a4d4d9b6","RequestUrl":"http://localhost:8000/umbraco/views/components/tabs/umb-tabs-nav.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":86} +{"@t":"2018-11-12T08:39:18.4015667Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"8ca61d46-e3d2-4465-be6d-a0f5e24543bb","RequestUrl":"http://localhost:8000/umbraco/views/components/tabs/umb-tab-content.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":87} +{"@t":"2018-11-12T08:39:18.4733768Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"2a3b9da8-441b-422a-b405-4471de4d908d","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoTrees/ApplicationTree/GetApplicationTrees?application=content&tree=&isDialog=false","Duration":72937.1767,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":75} +{"@t":"2018-11-12T08:39:18.5342130Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"9501395a-270f-4103-b122-96c09e8df064","RequestUrl":"http://localhost:8000/umbraco/assets/css/umbraco.css?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":88} +{"@t":"2018-11-12T08:39:18.5352119Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"fd728de5-d790-4df1-8482-9bdeacf172e1","RequestUrl":"http://localhost:8000/umbraco/Application?umb__rnd=928550284e1883f3256a93ce73f74afd","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":37,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":89} +{"@t":"2018-11-12T08:39:18.5352119Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"dc000af8-7a11-4cea-9196-2aa562970b43","RequestUrl":"http://localhost:8000/umbraco/lib/bootstrap-social/bootstrap-social.css?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":90} +{"@t":"2018-11-12T08:39:18.5372051Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"fd8a508a-37b1-4b50-8cba-e7601c1d7ab0","RequestUrl":"http://localhost:8000/umbraco/lib/lazyload-js/lazyload.min.js","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":36,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":91} +{"@t":"2018-11-12T08:39:18.5382018Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"8e82094b-1516-4b90-ba25-b72686bca99f","RequestUrl":"http://localhost:8000/umbraco/lib/font-awesome/css/font-awesome.min.css?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":33,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":92} +{"@t":"2018-11-12T08:39:18.5591466Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"fd728de5-d790-4df1-8482-9bdeacf172e1","RequestUrl":"http://localhost:8000/umbraco/Application?umb__rnd=928550284e1883f3256a93ce73f74afd","Duration":23.9347,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":37,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":89} +{"@t":"2018-11-12T08:39:18.6678553Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"ee4c19ad-54fb-4a22-bf6e-9c9da26fb438","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/UpdateCheck/GetCheck","Duration":73332.1182,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":69} +{"@t":"2018-11-12T08:39:18.9451140Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"7f6ea5f4-d112-4285-aef8-a599fe494dab","RequestUrl":"http://localhost:8000/umbraco/lib/jquery/jquery.min.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":93} +{"@t":"2018-11-12T08:39:18.9491031Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"de3f3aca-ae3b-4c5e-b1a3-1324ffd96630","RequestUrl":"http://localhost:8000/umbraco/lib/jquery-ui/jquery-ui.min.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":94} +{"@t":"2018-11-12T08:39:18.9520966Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"50c7359e-c05f-4536-b438-8bcfa9aa0859","RequestUrl":"http://localhost:8000/umbraco/lib/jquery-ui-touch-punch/jquery.ui.touch-punch.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":95} +{"@t":"2018-11-12T08:39:18.9540902Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"0948fb64-6899-4c78-9ae9-374dfa47e528","RequestUrl":"http://localhost:8000/umbraco/lib/angular/angular.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":96} +{"@t":"2018-11-12T08:39:18.9570855Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"118cb536-2b3d-4bcc-bb06-58c1837a8d09","RequestUrl":"http://localhost:8000/umbraco/lib/underscore/underscore-min.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":97} +{"@t":"2018-11-12T08:39:18.9590959Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"c39e6ce4-14de-4cc5-864c-e22a814bb1e0","RequestUrl":"http://localhost:8000/umbraco/lib/moment/moment.min.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":33,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":98} +{"@t":"2018-11-12T08:39:18.9620681Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"4b69ff9f-48c9-4ae4-82b5-4c2984c68068","RequestUrl":"http://localhost:8000/umbraco/lib/animejs/anime.min.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":99} +{"@t":"2018-11-12T08:39:18.9690496Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"45f7cd6a-4703-46d4-a019-ed529efaad16","RequestUrl":"http://localhost:8000/umbraco/lib/angular-route/angular-route.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":100} +{"@t":"2018-11-12T08:39:18.9720421Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"ca49266d-0016-4838-a9a1-a33aa729f36d","RequestUrl":"http://localhost:8000/umbraco/lib/angular-cookies/angular-cookies.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":36,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":101} +{"@t":"2018-11-12T08:39:18.9780261Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"589a05a8-6fa7-4fa2-9842-dbc714bccd4d","RequestUrl":"http://localhost:8000/umbraco/lib/angular-touch/angular-touch.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":102} +{"@t":"2018-11-12T08:39:18.9800216Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"f5b7506b-42d1-4b48-ad4d-4ae87c983ce6","RequestUrl":"http://localhost:8000/umbraco/lib/angular-sanitize/angular-sanitize.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":103} +{"@t":"2018-11-12T08:39:18.9810181Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"b71cf9d2-902c-48b3-900b-5fe154e1e21c","RequestUrl":"http://localhost:8000/umbraco/lib/angular-animate/angular-animate.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":104} +{"@t":"2018-11-12T08:39:18.9870020Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"ca1661b9-3eb0-4620-9132-4acfce37b62a","RequestUrl":"http://localhost:8000/umbraco/lib/angular-messages/angular-messages.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":105} +{"@t":"2018-11-12T08:39:18.9870020Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"7e69d36c-f469-4af3-9713-4de2afaab362","RequestUrl":"http://localhost:8000/umbraco/lib/angular-ui-sortable/sortable.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":33,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":106} +{"@t":"2018-11-12T08:39:18.9949813Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"977abc11-e4c5-4853-88e3-9092060188b3","RequestUrl":"http://localhost:8000/umbraco/lib/angular-dynamic-locale/tmhDynamicLocale.min.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":107} +{"@t":"2018-11-12T08:39:18.9989715Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"674dcee6-79db-4ea9-9700-302ea34a4e6c","RequestUrl":"http://localhost:8000/umbraco/lib/ng-file-upload/ng-file-upload.min.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":108} +{"@t":"2018-11-12T08:39:18.9999676Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"b038a3c4-fa83-428f-ab1d-d9bec8d908cb","RequestUrl":"http://localhost:8000/umbraco/lib/angular-local-storage/angular-local-storage.min.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":33,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":109} +{"@t":"2018-11-12T08:39:19.0069579Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"4dcd04df-bf71-4364-a826-db893f53abec","RequestUrl":"http://localhost:8000/umbraco/lib/umbraco/Extensions.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":110} +{"@t":"2018-11-12T08:39:19.0069579Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"6624e7b2-5bd5-418a-834a-980757286362","RequestUrl":"http://localhost:8000/umbraco/lib/bootstrap/js/bootstrap.2.3.2.min.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":111} +{"@t":"2018-11-12T08:39:19.0109380Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"02f90e2a-7773-4cfd-97e5-aec5c84118ac","RequestUrl":"http://localhost:8000/umbraco/lib/umbraco/NamespaceManager.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":112} +{"@t":"2018-11-12T08:39:19.0159249Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"77008b8b-9967-4377-a263-88015235617c","RequestUrl":"http://localhost:8000/umbraco/lib/umbraco/LegacyUmbClientMgr.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":113} +{"@t":"2018-11-12T08:39:19.0159249Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"b68ac813-0f2f-44bd-9fda-d32fd18e7f3c","RequestUrl":"http://localhost:8000/umbraco/lib/umbraco/LegacySpeechBubble.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":33,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":114} +{"@t":"2018-11-12T08:39:19.0288903Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"4f749b6f-42e9-404d-a5d2-24e676d9c0fd","RequestUrl":"http://localhost:8000/umbraco/js/app.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":115} +{"@t":"2018-11-12T08:39:19.0298875Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"42e16ea8-bdde-4ee7-9f17-34786a6103a3","RequestUrl":"http://localhost:8000/umbraco/js/umbraco.resources.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":33,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":116} +{"@t":"2018-11-12T08:39:19.0308842Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"2a0d4e64-539b-43ce-90d5-0e813eaec095","RequestUrl":"http://localhost:8000/umbraco/js/umbraco.directives.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":117} +{"@t":"2018-11-12T08:39:19.0338769Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"d2987330-541c-4764-8e94-3fb83222c8d1","RequestUrl":"http://localhost:8000/umbraco/js/umbraco.filters.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":118} +{"@t":"2018-11-12T08:39:19.0378658Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"7c35b922-910a-439d-ba99-f46ae0224343","RequestUrl":"http://localhost:8000/umbraco/js/umbraco.services.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":119} +{"@t":"2018-11-12T08:39:19.0428527Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"c45dc39b-3f96-4fc1-b0cf-93bb04c7b722","RequestUrl":"http://localhost:8000/umbraco/js/umbraco.interceptors.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":33,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":120} +{"@t":"2018-11-12T08:39:19.0438500Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"8a7953bd-3d49-4e0f-9cba-993d6e432c3b","RequestUrl":"http://localhost:8000/umbraco/js/umbraco.controllers.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":121} +{"@t":"2018-11-12T08:39:19.0618024Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"e434d0c0-a2f6-4ced-94c6-317d4895d6c0","RequestUrl":"http://localhost:8000/umbraco/js/routes.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":122} +{"@t":"2018-11-12T08:39:19.0837430Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"211066a0-e8c1-4c33-b2e3-6c8e3c6ea488","RequestUrl":"http://localhost:8000/umbraco/js/init.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":36,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":123} +{"@t":"2018-11-12T08:39:19.0877368Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"11f817fa-0d16-4c98-a48d-097c0ac9c126","RequestUrl":"http://localhost:8000/App_Plugins/ModelsBuilder/modelsbuilder.controller.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":124} +{"@t":"2018-11-12T08:39:19.1036907Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"5869796d-30e0-4c0d-b185-2ef9d78fd281","RequestUrl":"http://localhost:8000/App_Plugins/ModelsBuilder/modelsbuilder.resource.js?cdv=1","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":33,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":125} +{"@t":"2018-11-12T08:39:19.1804849Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"8c7e32b1-7d5d-4eb8-87d9-142eea40c172","RequestUrl":"http://localhost:8000/umbraco/assets/fonts/lato/LatoLatin-Regular.woff","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":126} +{"@t":"2018-11-12T08:39:19.3939140Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"f8abc43d-f029-43f1-8279-39919c83e1f3","RequestUrl":"http://localhost:8000/umbraco/lib/angular-dynamic-locale/tmhDynamicLocale.min.js.map","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":127} +{"@t":"2018-11-12T08:39:19.3998995Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"bb68735d-ecb0-441d-bc5b-14d3bb3f2543","RequestUrl":"http://localhost:8000/umbraco/lib/angular-local-storage/angular-local-storage.min.js.map","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":128} +{"@t":"2018-11-12T08:39:19.5594716Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"8c6c79c0-5d60-49c8-952a-6afa6ed554a5","RequestUrl":"http://localhost:8000/umbraco/views/components/application/umb-app-header.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":129} +{"@t":"2018-11-12T08:39:19.5594716Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"2d726ed6-f0b2-4d68-820b-b53ab3eefba5","RequestUrl":"http://localhost:8000/umbraco/views/components/application/umb-navigation.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":130} +{"@t":"2018-11-12T08:39:19.5644587Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"e7cacfd4-cf4c-45ab-babe-fb2e0a28f691","RequestUrl":"http://localhost:8000/umbraco/views/components/editor/umb-editors.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":131} +{"@t":"2018-11-12T08:39:19.5654550Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"b94e3f94-a0a8-4e93-b357-094fbee46781","RequestUrl":"http://localhost:8000/umbraco/views/components/notifications/umb-notifications.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":132} +{"@t":"2018-11-12T08:39:19.5744314Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"379c4ac5-5f25-478b-83fc-293a684bada1","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/IsAuthenticated","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":133} +{"@t":"2018-11-12T08:39:19.5854042Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"379c4ac5-5f25-478b-83fc-293a684bada1","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/IsAuthenticated","Duration":8.9777,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":133} +{"@t":"2018-11-12T08:39:19.6463208Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"bc8878e1-96ef-498f-827a-ccedbe724d45","RequestUrl":"http://localhost:8000/umbraco/views/components/umb-avatar.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":134} +{"@t":"2018-11-12T08:39:19.6802317Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"53e2c17c-f4ad-492f-a202-5ddd2917406f","RequestUrl":"http://localhost:8000/umbraco/views/components/tree/umb-tree.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":135} +{"@t":"2018-11-12T08:39:19.6822250Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"4c88cfd5-5552-4bc5-843c-1f7964cbba76","RequestUrl":"http://localhost:8000/umbraco/views/components/application/umb-contextmenu.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":136} +{"@t":"2018-11-12T08:39:19.7011741Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"3c5bcff2-7487-4cba-a966-667505524a94","RequestUrl":"http://localhost:8000/umbraco/ServerVariables?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":137} +{"@t":"2018-11-12T08:39:19.7400697Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"45552a18-4951-467d-a04c-ac8b712fdc31","RequestUrl":"http://localhost:8000/umbraco/assets/img/application/logo.png","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":138} +{"@t":"2018-11-12T08:39:19.7510410Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"3c5bcff2-7487-4cba-a966-667505524a94","RequestUrl":"http://localhost:8000/umbraco/ServerVariables?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","Duration":49.8669,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":137} +{"@t":"2018-11-12T08:39:19.7879438Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"5e556b17-9de2-4e5a-92a6-32a4ccc8b147","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetCurrentUser","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":139} +{"@t":"2018-11-12T08:39:19.7899413Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"b355644f-9168-4a3c-a6be-29fd6c24a3ba","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetCurrentUser","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":33,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":140} +{"@t":"2018-11-12T08:39:19.7999106Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"ded13097-517f-4588-a9d9-758dcf032233","RequestUrl":"http://localhost:8000/favicon.ico","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":141} +{"@t":"2018-11-12T08:39:19.8527688Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"b355644f-9168-4a3c-a6be-29fd6c24a3ba","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetCurrentUser","Duration":61.8312,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":33,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":140} +{"@t":"2018-11-12T08:39:19.8617454Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"785c0164-da5c-4142-b85f-abc70e616071","RequestUrl":"http://localhost:8000/umbraco/lib/angular-i18n/angular-locale_en-US.js","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":33,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":142} +{"@t":"2018-11-12T08:39:19.8617454Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"5391b542-c0e4-40ea-8e68-4c90d896d0d8","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/UpdateCheck/GetCheck","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":143} +{"@t":"2018-11-12T08:39:19.8647369Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"dcd1fa67-95a7-42d5-b957-bafddd4add35","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Tour/GetTours","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":144} +{"@t":"2018-11-12T08:39:19.8777039Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"805c8a1b-5660-477f-b504-9b1b84239053","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Content/AllowsCultureVariation","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":145} +{"@t":"2018-11-12T08:39:19.8777039Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"bb22cf40-04c0-4e39-b320-4bc4d6fd11c9","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Section/GetSections","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":146} +{"@t":"2018-11-12T08:39:19.8787030Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"f632ab10-fe6b-4c25-aa7c-793e7a96eda5","RequestUrl":"http://localhost:8000/umbraco/views/components/application/umb-sections.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":36,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":147} +{"@t":"2018-11-12T08:39:19.8906682Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"f1fa8a51-fd1d-43b6-8484-ceeea7ee2860","RequestUrl":"http://localhost:8000/umbraco/assets/fonts/helveticons/helveticons.ttf","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":37,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":148} +{"@t":"2018-11-12T08:39:19.9185933Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"8cfe2e95-89dc-4d54-a7d6-ce6c0b9a10ee","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Section/GetSections","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":36,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":149} +{"@t":"2018-11-12T08:39:19.9455216Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"bb22cf40-04c0-4e39-b320-4bc4d6fd11c9","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Section/GetSections","Duration":66.8186,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":146} +{"@t":"2018-11-12T08:39:19.9485129Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"dcd1fa67-95a7-42d5-b957-bafddd4add35","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Tour/GetTours","Duration":82.7786,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":144} +{"@t":"2018-11-12T08:39:19.9594831Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"86fd9067-7c84-4cbf-9567-1312dc87341b","RequestUrl":"http://localhost:8000/umbraco/views/common/dashboard.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":33,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":150} +{"@t":"2018-11-12T08:39:19.9774356Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"805c8a1b-5660-477f-b504-9b1b84239053","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Content/AllowsCultureVariation","Duration":99.7317,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":145} +{"@t":"2018-11-12T08:39:19.9794303Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"9263cef7-1a74-498f-814b-1b1a05da259a","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/CurrentUser/GetUserTours","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":37,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":151} +{"@t":"2018-11-12T08:39:19.9914043Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"9740b246-0675-4235-a0d1-ee45e9b8545c","RequestUrl":"http://localhost:8000/umbraco/assets/img/loader.gif","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":152} +{"@t":"2018-11-12T08:39:19.9963857Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"9263cef7-1a74-498f-814b-1b1a05da259a","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/CurrentUser/GetUserTours","Duration":16.9554,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":37,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":151} +{"@t":"2018-11-12T08:39:20.0023700Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"5e43f2c1-ac86-4a7d-af5b-9ca09716fc24","RequestUrl":"http://localhost:8000/umbraco/views/components/umb-load-indicator.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":33,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":153} +{"@t":"2018-11-12T08:39:20.0043643Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"9d76010b-10d0-4052-929d-c8a7efc7c14c","RequestUrl":"http://localhost:8000/umbraco/LocalizedText","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":154} +{"@t":"2018-11-12T08:39:20.0063584Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"a2cc7d8d-9cdb-401b-9ffc-9b19aa153ef8","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Dashboard/GetDashboard?section=content","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":155} +{"@t":"2018-11-12T08:39:20.0143369Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"a2cc7d8d-9cdb-401b-9ffc-9b19aa153ef8","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Dashboard/GetDashboard?section=content","Duration":6.9774,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":155} +{"@t":"2018-11-12T08:39:20.0163316Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"9d76010b-10d0-4052-929d-c8a7efc7c14c","RequestUrl":"http://localhost:8000/umbraco/LocalizedText","Duration":11.9673,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":154} +{"@t":"2018-11-12T08:39:20.0282988Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"181a966b-d54a-4172-a8b9-2f6aae6059cc","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoTrees/ApplicationTree/GetApplicationTrees?application=content&tree=&isDialog=false","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":156} +{"@t":"2018-11-12T08:39:20.0472495Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"80381514-04bd-415e-a72b-d0df69a1db5e","RequestUrl":"http://localhost:8000/umbraco/views/components/tabs/umb-tabs-nav.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":157} +{"@t":"2018-11-12T08:39:20.0492442Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"af2cbaa8-587d-4891-b840-1566f4c9cb36","RequestUrl":"http://localhost:8000/umbraco/views/components/tabs/umb-tab-content.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":158} +{"@t":"2018-11-12T08:39:20.0502410Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"8cfe2e95-89dc-4d54-a7d6-ce6c0b9a10ee","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Section/GetSections","Duration":131.64770000000002,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":36,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":149} +{"@t":"2018-11-12T08:39:20.0652008Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"5e556b17-9de2-4e5a-92a6-32a4ccc8b147","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetCurrentUser","Duration":276.2572,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":139} +{"@t":"2018-11-12T08:39:20.1080858Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"1502e814-50f3-4226-b95f-faab6a7f2811","RequestUrl":"http://localhost:8000/umbraco/views/dashboard/default/startupdashboardintro.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":159} +{"@t":"2018-11-12T08:39:20.1190590Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"3ac0e625-70af-4d03-b7ed-2673818cde37","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/BackOfficeAssets/GetSupportedMomentLocales","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":160} +{"@t":"2018-11-12T08:39:20.1300274Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"9a76f436-e828-4369-8635-a276c008ef29","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Dashboard/GetRemoteDashboardCss?section=content&umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":161} +{"@t":"2018-11-12T08:39:20.1340248Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"ff350a2a-d052-4d12-9c5e-7b9732bfae4e","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Dashboard/GetRemoteDashboardContent?section=content","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":162} +{"@t":"2018-11-12T08:39:20.1350146Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"fe0d4cbc-9651-408e-aada-72b5323cfb66","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/CurrentUser/GetUserTours","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":33,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":163} +{"@t":"2018-11-12T08:39:20.1400011Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"3ac0e625-70af-4d03-b7ed-2673818cde37","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/BackOfficeAssets/GetSupportedMomentLocales","Duration":19.9465,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":160} +{"@t":"2018-11-12T08:39:20.1509721Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"fe0d4cbc-9651-408e-aada-72b5323cfb66","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/CurrentUser/GetUserTours","Duration":15.957500000000001,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":33,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":163} +{"@t":"2018-11-12T08:39:20.1629404Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"5391b542-c0e4-40ea-8e68-4c90d896d0d8","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/UpdateCheck/GetCheck","Duration":301.195,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":143} +{"@t":"2018-11-12T08:39:20.2676590Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"181a966b-d54a-4172-a8b9-2f6aae6059cc","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoTrees/ApplicationTree/GetApplicationTrees?application=content&tree=&isDialog=false","Duration":239.36020000000002,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":156} +{"@t":"2018-11-12T08:39:20.2786309Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"42077644-ed25-4b1e-867f-a6b4bc650599","RequestUrl":"http://localhost:8000/umbraco/views/components/tree/umb-tree-item.html?umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":164} +{"@t":"2018-11-12T08:39:20.2856114Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"8ec94766-22ec-4ab4-9dc2-1faedca078f7","RequestUrl":"http://localhost:8000/umbraco/assets/fonts/lato/LatoLatin-Bold.woff","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":165} +{"@t":"2018-11-12T08:39:20.3464487Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"9a76f436-e828-4369-8635-a276c008ef29","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Dashboard/GetRemoteDashboardCss?section=content&umb__rnd=708cf4cddc451d0bcd0581e9a01b49f7","Duration":216.4213,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":161} +{"@t":"2018-11-12T08:39:20.3933226Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"ff350a2a-d052-4d12-9c5e-7b9732bfae4e","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Dashboard/GetRemoteDashboardContent?section=content","Duration":259.2978,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":162} +{"@t":"2018-11-12T08:39:23.2018152Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"ed67ead","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:23.2367219Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":34,"TimingId":"ed67ead","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:23.2367219Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":6,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:28.2513127Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"b113ade","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:28.2862301Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":34,"TimingId":"b113ade","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:28.2862301Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:33.2958165Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"8a1e23c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:33.3366825Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":40,"TimingId":"8a1e23c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:33.3366825Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:38.3524102Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"4fbbb44","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":37,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:38.4480092Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":95,"TimingId":"4fbbb44","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":37,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:38.4480092Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":37,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:43.4496384Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"24a55ee","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:43.5304213Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":80,"TimingId":"24a55ee","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:43.5304213Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:48.5453412Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"dacc0f8","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:48.5921815Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":47,"TimingId":"dacc0f8","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:48.5921815Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:50.1300765Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"abefec3a-5c38-4899-b516-3a44d5a4ba37","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":166} +{"@t":"2018-11-12T08:39:50.1390909Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"abefec3a-5c38-4899-b516-3a44d5a4ba37","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":8.0204,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":33,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":166} +{"@t":"2018-11-12T08:39:53.5969438Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"47f343b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:53.6666142Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":69,"TimingId":"47f343b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:53.6676221Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:58.6682789Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"72ca08e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:58.7380549Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":70,"TimingId":"72ca08e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:39:58.7390543Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:03.7397336Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"3506f5d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:03.7985246Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":58,"TimingId":"3506f5d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:03.7985246Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:08.8082528Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"3f1703b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:08.8839275Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":75,"TimingId":"3f1703b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:08.8839275Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:13.8845933Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"259fcf4","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:13.9294440Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":45,"TimingId":"259fcf4","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:13.9304418Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:18.2159936Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"9d76e68","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:18.2229673Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":7,"TimingId":"9d76e68","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:18.2229673Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:18.3067451Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:18.4054875Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":28,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:18.9370544Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"19fb8dc","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:18.9819354Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":44,"TimingId":"19fb8dc","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:18.9819354Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:23.9825715Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"5866b8e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:24.0882861Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":105,"TimingId":"5866b8e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:24.0882861Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:24.8821629Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"605bec0b-5272-4901-91e7-6218cd653edc","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":167} +{"@t":"2018-11-12T08:40:25.0347518Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"605bec0b-5272-4901-91e7-6218cd653edc","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":151.5918,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":167} +{"@t":"2018-11-12T08:40:29.0889380Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"3743a38","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:29.1218346Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":33,"TimingId":"3743a38","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:29.1218346Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:34.1365640Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"1321744","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:34.1982524Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":62,"TimingId":"1321744","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:34.1982524Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":27,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:39.2000173Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"efcb667","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:39.2687033Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":68,"TimingId":"efcb667","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:39.2687033Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:44.2693262Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"1367a26","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:44.3212038Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":51,"TimingId":"1367a26","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:44.3212038Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:49.3228889Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"b4aee20","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":28,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:49.3986122Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":75,"TimingId":"b4aee20","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":28,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:49.3986122Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":28,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:54.3995122Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"8bf0cd0","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:54.4354195Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":36,"TimingId":"8bf0cd0","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:54.4363792Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":7,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:55.1564556Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"bab0eee0-5896-4aa1-a2bd-62ddb2309309","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":168} +{"@t":"2018-11-12T08:40:55.1624375Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"bab0eee0-5896-4aa1-a2bd-62ddb2309309","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":4.9844,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":33,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":168} +{"@t":"2018-11-12T08:40:59.4379755Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"cba0f9e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:59.5127036Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":75,"TimingId":"cba0f9e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:40:59.5127036Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:04.5134713Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"9e0ec3a","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:04.5768092Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":63,"TimingId":"9e0ec3a","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:04.5768092Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:09.5900537Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"f8c4871","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:09.6657149Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":75,"TimingId":"f8c4871","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:09.6657149Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:14.6676123Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"4aa3e77","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:14.7562355Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":89,"TimingId":"4aa3e77","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:14.7572333Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:18.2321373Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"b23a358","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:18.2322992Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"b23a358","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:18.2322992Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:18.4256270Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:18.5810079Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":24,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:19.7622388Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"ebb8186","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:19.8011483Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":39,"TimingId":"ebb8186","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:19.8011483Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:24.8036513Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"5aabd60","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:24.8594736Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":55,"TimingId":"5aabd60","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:24.8594736Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:29.8714293Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"a8c0b61","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:29.8973556Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"4a28c479-9612-4296-a659-4eceb68bf586","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":24,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":169} +{"@t":"2018-11-12T08:41:29.9332575Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":61,"TimingId":"a8c0b61","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:29.9332575Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:30.0250125Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"4a28c479-9612-4296-a659-4eceb68bf586","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":126.6597,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":22,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":169} +{"@t":"2018-11-12T08:41:34.9463209Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"b56c4c2","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:34.9973282Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":50,"TimingId":"b56c4c2","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:34.9973282Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:40.0104531Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"6dc5c6f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:40.0493592Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":39,"TimingId":"6dc5c6f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:40.0503475Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:45.0522779Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"c5fe1bb","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:45.1250528Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":72,"TimingId":"c5fe1bb","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:45.1250528Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:50.1357379Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e221f49","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:50.2036167Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":67,"TimingId":"e221f49","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:50.2036167Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:55.2054153Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"b076c2a","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:55.2804702Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":74,"TimingId":"b076c2a","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:41:55.2804702Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:00.2948589Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"fca23f2","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:00.3756538Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":81,"TimingId":"fca23f2","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:00.3756538Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:01.2192197Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"327aaf7c-ca3e-448f-9b2f-b1e9219a3ffb","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":25,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":170} +{"@t":"2018-11-12T08:42:01.2232089Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"327aaf7c-ca3e-448f-9b2f-b1e9219a3ffb","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":2.9915000000000003,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":24,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":170} +{"@t":"2018-11-12T08:42:05.3890698Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"2dca930","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:05.4509002Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":62,"TimingId":"2dca930","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:05.4509002Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:10.4523098Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"5799997","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:10.5061843Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":53,"TimingId":"5799997","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:10.5061843Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:15.5073021Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"7295026","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:15.5960212Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":88,"TimingId":"7295026","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:15.5960212Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":26,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:18.2338810Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"d5c8918","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":23,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:18.2338810Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"d5c8918","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":23,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:18.2338810Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":23,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:18.5316857Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":22,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:18.7540166Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":23,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:20.6068363Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"0c10a8b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:20.6696335Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":62,"TimingId":"0c10a8b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:20.6696335Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:25.6723576Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"450b3fa","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:25.7576247Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":85,"TimingId":"450b3fa","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:25.7576247Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:30.7666537Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"2508556","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:30.8390391Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":72,"TimingId":"2508556","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:30.8399924Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:33.2326932Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"b8ed4461-c28d-41bd-ab6b-cc10af8a2fa1","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":23,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":171} +{"@t":"2018-11-12T08:42:33.4004470Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"b8ed4461-c28d-41bd-ab6b-cc10af8a2fa1","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":166.75650000000002,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":22,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":171} +{"@t":"2018-11-12T08:42:35.8558800Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"3a23491","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:35.9067410Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":50,"TimingId":"3a23491","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:35.9067410Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:40.9190487Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"24d758c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:40.9764305Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":57,"TimingId":"24d758c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:40.9764305Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:45.9776637Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"a47b636","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:46.0542795Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":76,"TimingId":"a47b636","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:46.0542795Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:51.0681448Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"3726c8d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:51.1575322Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":89,"TimingId":"3726c8d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:51.1575322Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:56.1581734Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"c6d5002","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:56.2520906Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":93,"TimingId":"c6d5002","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:42:56.2520906Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:01.2663872Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"2eb1c21","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:01.3335640Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":67,"TimingId":"2eb1c21","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:01.3335640Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:06.2192161Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"bd56ef59-bc6d-4463-9fba-1671c46e9c91","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":172} +{"@t":"2018-11-12T08:43:06.2262007Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"bd56ef59-bc6d-4463-9fba-1671c46e9c91","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":6.9846,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":22,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":172} +{"@t":"2018-11-12T08:43:06.3394781Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"5b2d6e4","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":11,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:06.4189988Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":79,"TimingId":"5b2d6e4","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":11,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:06.4189988Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":11,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:11.4322582Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"6353327","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:11.4940457Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":61,"TimingId":"6353327","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:11.4940457Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:16.4951588Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"3836b53","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:16.5745784Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":79,"TimingId":"3836b53","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:16.5745784Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:18.2356542Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"5e30c1a","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":22,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:18.2356542Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"5e30c1a","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":22,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:18.2356542Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":22,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:18.6293472Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":19,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:18.9123389Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":22,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:21.5900666Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"7fd52f1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:21.6810473Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":90,"TimingId":"7fd52f1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:21.6810473Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:26.6816874Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"a323dad","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:26.7769533Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":95,"TimingId":"a323dad","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:26.7769533Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:31.7771891Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"59be7d5","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:31.8385920Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":61,"TimingId":"59be7d5","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:31.8385920Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:36.8401603Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"5620402","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:36.9213397Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":81,"TimingId":"5620402","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:36.9213397Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:38.2419542Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"816df696-bbfd-4505-b6a8-d85eb7adcc7b","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":42,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":173} +{"@t":"2018-11-12T08:43:38.4416691Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"816df696-bbfd-4505-b6a8-d85eb7adcc7b","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":199.7149,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":12,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":173} +{"@t":"2018-11-12T08:43:41.9340053Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"5ed0dd6","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:41.9998352Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":66,"TimingId":"5ed0dd6","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:41.9998352Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:47.0025067Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"0a35314","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:47.0463900Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":43,"TimingId":"0a35314","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:47.0463900Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:52.0474101Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"4d5f612","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:52.1525713Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":105,"TimingId":"4d5f612","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:52.1535949Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:57.1556565Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"b9d3106","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:57.2124686Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":57,"TimingId":"b9d3106","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:43:57.2124686Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:02.2141455Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"b2adf1b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:02.2960416Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":82,"TimingId":"b2adf1b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:02.2960416Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:07.3080255Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"66e90b2","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:07.3568892Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":49,"TimingId":"66e90b2","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:07.3568892Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:10.2258830Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"f147294d-417f-446b-adb8-b3239b09f976","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":174} +{"@t":"2018-11-12T08:44:10.2328658Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"f147294d-417f-446b-adb8-b3239b09f976","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":6.9828,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":174} +{"@t":"2018-11-12T08:44:12.3707787Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"c68305c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:12.4792198Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":109,"TimingId":"c68305c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:12.4792198Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:17.4814361Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"18844b4","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:17.5612192Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":79,"TimingId":"18844b4","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:17.5612192Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:18.2141381Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Keep alive executing","TimingId":"e03d9f0","SourceContext":"Umbraco.Web.Scheduling.KeepAlive","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":42,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:18.2460539Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"568d1d8","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:18.2470646Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":1,"TimingId":"568d1d8","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:18.2480576Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:18.2540400Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"c8ba1bfa-8d26-4aa1-adfd-d91fac8b5691","RequestUrl":"http://localhost:8000/umbraco/ping.aspx","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":12,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":175} +{"@t":"2018-11-12T08:44:18.7351982Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:19.1011624Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:20.4235503Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"c8ba1bfa-8d26-4aa1-adfd-d91fac8b5691","RequestUrl":"http://localhost:8000/umbraco/ping.aspx","Duration":2168.5165,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":12,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":175} +{"@t":"2018-11-12T08:44:20.4275306Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Keep alive complete","Duration":2212,"TimingId":"e03d9f0","SourceContext":"Umbraco.Web.Scheduling.KeepAlive","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":44,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:20.4275306Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[KeepAlive] ","TaskType":"Umbraco.Web.Scheduling.KeepAlive","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":44,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:22.5732073Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"9777d31","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:22.6695911Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":96,"TimingId":"9777d31","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:22.6695911Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:27.6725034Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"708d40b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:27.7484653Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":75,"TimingId":"708d40b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:27.7484653Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:32.7490897Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"49031cb","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:32.8221930Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":73,"TimingId":"49031cb","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:32.8221930Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:37.8233050Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"186c18d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:37.8893721Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":66,"TimingId":"186c18d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:37.8893721Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:42.9028843Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"025a81e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:42.9663636Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":63,"TimingId":"025a81e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:42.9674180Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:43.2356843Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"874a29ce-55fb-492c-9810-e766d3bbdeda","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":40,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":176} +{"@t":"2018-11-12T08:44:43.4872369Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"874a29ce-55fb-492c-9810-e766d3bbdeda","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":249.55190000000002,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":176} +{"@t":"2018-11-12T08:44:47.9717460Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"796ad0c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:48.0491456Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":77,"TimingId":"796ad0c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:48.0491456Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:53.0635286Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"43d7bcb","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:53.1338036Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":70,"TimingId":"43d7bcb","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:53.1338036Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:58.1349340Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e688151","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:58.2037075Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":68,"TimingId":"e688151","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:44:58.2037075Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:03.2047946Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"7029b0c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:03.2665523Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":61,"TimingId":"7029b0c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:03.2665523Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:08.2800845Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"afd580f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:08.3584862Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":78,"TimingId":"afd580f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:08.3594882Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:13.3607061Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"6b4f6c6","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:13.4177357Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":56,"TimingId":"6b4f6c6","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:13.4177357Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:15.2269592Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"73aaee4f-aae1-41fd-b375-7f9ea92d6b1e","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":177} +{"@t":"2018-11-12T08:45:15.2349322Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"73aaee4f-aae1-41fd-b375-7f9ea92d6b1e","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":6.9295,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":51,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":177} +{"@t":"2018-11-12T08:45:18.2603001Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"9cdf943","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":12,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:18.2612622Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"9cdf943","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":12,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:18.2612622Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":12,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:18.4336521Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"1f4e799","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:18.5146694Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":80,"TimingId":"1f4e799","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:18.5146694Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:18.8256175Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":8,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:19.3061017Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":12,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:23.5176157Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"3a050dd","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:23.6325649Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":115,"TimingId":"3a050dd","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:23.6335613Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:28.6412300Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"cec8f1c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":12,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:28.7142864Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":73,"TimingId":"cec8f1c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":12,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:28.7142864Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":12,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:33.7152236Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"79fc3f8","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":12,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:33.8111200Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":95,"TimingId":"79fc3f8","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":12,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:33.8111200Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":12,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:38.8114685Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"401d15c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":12,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:38.8798164Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":68,"TimingId":"401d15c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":12,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:38.8798164Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":12,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:43.8814689Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"dcc2ff7","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:43.9914741Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":109,"TimingId":"dcc2ff7","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:43.9914741Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:47.2236660Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"80e323de-94c7-4ca8-b419-b502e49c005c","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":178} +{"@t":"2018-11-12T08:45:47.4076862Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"80e323de-94c7-4ca8-b419-b502e49c005c","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":183.02380000000002,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":47,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":178} +{"@t":"2018-11-12T08:45:49.0035043Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"545d3fe","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:49.0839433Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":81,"TimingId":"545d3fe","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:49.0839433Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:54.0854593Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"78c773b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:54.1567520Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":71,"TimingId":"78c773b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:54.1567520Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":16,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:59.1572171Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"620f786","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":8,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:59.2309690Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":74,"TimingId":"620f786","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":8,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:45:59.2319674Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":8,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:04.2450558Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"4078de4","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":56,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:04.3147837Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":69,"TimingId":"4078de4","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":56,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:04.3147837Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":56,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:09.3241923Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"fdbe982","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":58,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:09.3999846Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":75,"TimingId":"fdbe982","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":58,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:09.3999846Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":58,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:14.4010922Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"59a0d69","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:14.4689083Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":67,"TimingId":"59a0d69","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:14.4689083Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:18.2619994Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"817c2b3","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:18.2629985Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"817c2b3","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:18.2639869Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:18.9108503Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":54,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:19.2186305Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"7c03ed97-8bfe-4b01-b7cf-7e4b433db23d","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":58,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":179} +{"@t":"2018-11-12T08:46:19.2246141Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"7c03ed97-8bfe-4b01-b7cf-7e4b433db23d","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":4.9895000000000005,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":179} +{"@t":"2018-11-12T08:46:19.4699671Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"08fdd3e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:19.4774616Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":7,"TimingId":"08fdd3e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:19.4774616Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:19.4954137Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:24.4794930Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"a60db9e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:24.5333477Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":53,"TimingId":"a60db9e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:24.5333477Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:29.5422634Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"9f7db4b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":58,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:29.6091134Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":67,"TimingId":"9f7db4b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":58,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:29.6091134Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":58,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:34.6214896Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"0e77caf","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":56,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:34.7057911Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":84,"TimingId":"0e77caf","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":56,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:34.7057911Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":56,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:39.7138023Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e924699","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":55,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:39.7606574Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":47,"TimingId":"e924699","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":55,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:39.7616533Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":55,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:44.7632637Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"d76c3d2","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:44.8221025Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":58,"TimingId":"d76c3d2","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:44.8221025Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:49.8240656Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"a5cad16","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:49.9178409Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":94,"TimingId":"a5cad16","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:49.9178409Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:51.2212806Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"7a47a801-cede-4258-be96-c77ccbbf4424","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":56,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":180} +{"@t":"2018-11-12T08:46:51.3697071Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"7a47a801-cede-4258-be96-c77ccbbf4424","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":147.39350000000002,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":180} +{"@t":"2018-11-12T08:46:54.9219734Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"6408036","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:54.9708677Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":48,"TimingId":"6408036","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:54.9708677Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:46:59.9828884Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"a5cc147","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:00.0706007Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":87,"TimingId":"a5cc147","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:00.0706007Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:05.0846392Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"81dc199","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:05.1775675Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":93,"TimingId":"81dc199","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:05.1785655Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:10.1885592Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"9fd28cf","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:10.2437164Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":55,"TimingId":"9fd28cf","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:10.2437164Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:15.2460984Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e2f2cef","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:15.3168802Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":70,"TimingId":"e2f2cef","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:15.3168802Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:18.2796545Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"e0b5152","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:18.2796545Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"e0b5152","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:18.2796545Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":10,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:19.0193601Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:19.6783167Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":48,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:20.3268546Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"0fe2374","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":54,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:20.4069876Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":80,"TimingId":"0fe2374","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":54,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:20.4069876Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":54,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:23.2239184Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"4f0368c0-d576-485f-97ef-7adab4dbc0de","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":181} +{"@t":"2018-11-12T08:47:23.2354072Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"4f0368c0-d576-485f-97ef-7adab4dbc0de","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":10.5083,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":54,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":181} +{"@t":"2018-11-12T08:47:25.4144570Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"4c3b8ac","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:25.4905633Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":76,"TimingId":"4c3b8ac","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:25.4915519Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:30.4950645Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"bd9eb15","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:30.5902308Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":94,"TimingId":"bd9eb15","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:30.5902308Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:35.5944901Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"9a5d863","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:35.6708218Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":76,"TimingId":"9a5d863","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:35.6708218Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:40.6711509Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e9e0570","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:40.7579003Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":86,"TimingId":"e9e0570","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:40.7579003Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:45.7591631Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"c38e9e6","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:45.8267580Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":67,"TimingId":"c38e9e6","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:45.8267580Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:50.8266973Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"2ca58ed","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:50.8663505Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":39,"TimingId":"2ca58ed","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:50.8663505Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:55.2250403Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"e4ffa09e-89bf-4790-9f1a-450b20f72f2b","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":182} +{"@t":"2018-11-12T08:47:55.4018019Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"e4ffa09e-89bf-4790-9f1a-450b20f72f2b","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":175.7032,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":61,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":182} +{"@t":"2018-11-12T08:47:55.8706540Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"349b2bf","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:55.9084805Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":37,"TimingId":"349b2bf","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:47:55.9084805Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:00.9176751Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"a92f47d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:01.0084310Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":90,"TimingId":"a92f47d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:01.0084310Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:06.0212826Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"0604666","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:06.0771260Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":55,"TimingId":"0604666","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:06.0771260Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:11.0779740Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e32b4aa","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:11.1532729Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":75,"TimingId":"e32b4aa","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:11.1532729Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:16.1544794Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"d8fba60","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:16.1932364Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":38,"TimingId":"d8fba60","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:16.1932364Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:18.2927716Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"4b83bed","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":55,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:18.2938315Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":1,"TimingId":"4b83bed","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":55,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:18.2947843Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":55,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:19.0977126Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":48,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:19.8564006Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":54,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:21.2054807Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"8ee60dd","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:21.3231662Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":117,"TimingId":"8ee60dd","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:21.3231662Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:26.3273118Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"55ec233","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:26.3654481Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":38,"TimingId":"55ec233","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:26.3654481Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:28.2240228Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"47cd1199-b729-4f76-b08c-80e13f8127bf","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":183} +{"@t":"2018-11-12T08:48:28.2280069Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"47cd1199-b729-4f76-b08c-80e13f8127bf","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":3.9841,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":48,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":183} +{"@t":"2018-11-12T08:48:31.3774195Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"88acdd9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:31.4492466Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":71,"TimingId":"88acdd9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:31.4492466Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:36.4500595Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"cce888e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:36.5302558Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":79,"TimingId":"cce888e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:36.5302558Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:41.5508095Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"97c775d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:41.6450838Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":93,"TimingId":"97c775d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:41.6450838Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:46.6474900Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"5edb756","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:46.7237252Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":76,"TimingId":"5edb756","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:46.7247231Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:51.7377184Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"5ff50a9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:51.7922907Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":53,"TimingId":"5ff50a9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:51.7922907Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:56.7941856Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"39f1eeb","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:56.9080418Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":113,"TimingId":"39f1eeb","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:48:56.9080418Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:00.2277217Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"6bac05e9-6ba0-4d26-9a8e-0b0c27bc54e0","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":184} +{"@t":"2018-11-12T08:49:00.4632057Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"6bac05e9-6ba0-4d26-9a8e-0b0c27bc54e0","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":235.484,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":184} +{"@t":"2018-11-12T08:49:01.9093343Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"81276b6","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:01.9683287Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":58,"TimingId":"81276b6","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:01.9683287Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:06.9693350Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"363f976","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:07.0495275Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":79,"TimingId":"363f976","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:07.0495275Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:12.0593760Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"474d471","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:12.1387379Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":79,"TimingId":"474d471","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:12.1396897Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:17.1405111Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"5bb01c8","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:17.1978157Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":57,"TimingId":"5bb01c8","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:17.1978157Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:18.2963560Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"40eed8b","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:18.2973029Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"40eed8b","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:18.2983028Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:19.2194903Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:20.0775699Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":68,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:20.4428890Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Keep alive executing","TimingId":"41e6426","SourceContext":"Umbraco.Web.Scheduling.KeepAlive","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:20.4538611Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"8e92079d-98a0-4d03-a45a-a1136c07ac31","RequestUrl":"http://localhost:8000/umbraco/ping.aspx","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":185} +{"@t":"2018-11-12T08:49:20.4692964Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"8e92079d-98a0-4d03-a45a-a1136c07ac31","RequestUrl":"http://localhost:8000/umbraco/ping.aspx","Duration":14.378400000000001,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":185} +{"@t":"2018-11-12T08:49:20.4732656Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Keep alive complete","Duration":30,"TimingId":"41e6426","SourceContext":"Umbraco.Web.Scheduling.KeepAlive","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":49,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:20.4742466Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[KeepAlive] ","TaskType":"Umbraco.Web.Scheduling.KeepAlive","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":49,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:22.2003162Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"617a37a","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:22.2826329Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":82,"TimingId":"617a37a","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:22.2836193Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:27.2844842Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"21ac31b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:27.3562900Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":72,"TimingId":"21ac31b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:27.3572884Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:32.2195568Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"24c18465-254d-4668-9024-df6380ee2f44","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":186} +{"@t":"2018-11-12T08:49:32.2285307Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"24c18465-254d-4668-9024-df6380ee2f44","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":7.9735000000000005,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":186} +{"@t":"2018-11-12T08:49:32.3617577Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"5d6d3fb","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":66,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:32.4406780Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":78,"TimingId":"5d6d3fb","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":66,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:32.4406780Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":66,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:37.4479262Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"73a109b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:37.5550240Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":106,"TimingId":"73a109b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:37.5550240Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:42.5658755Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e1322a8","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:42.6496490Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":84,"TimingId":"e1322a8","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:42.6496490Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:47.6510499Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"9ad5525","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:47.7308358Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":79,"TimingId":"9ad5525","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:47.7308358Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:52.7330701Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"62abc49","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:52.7962727Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":63,"TimingId":"62abc49","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:52.7962727Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:57.7983386Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"591101d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:57.8721341Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":73,"TimingId":"591101d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:49:57.8721341Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:02.8720873Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"bf7faa5","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:02.9099952Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":38,"TimingId":"bf7faa5","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:02.9099952Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:04.2248108Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"c20bd228-2592-4c45-bea9-23b4b1555f03","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":72,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":187} +{"@t":"2018-11-12T08:50:04.4458507Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"c20bd228-2592-4c45-bea9-23b4b1555f03","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":219.9999,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":187} +{"@t":"2018-11-12T08:50:07.9190539Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"524f3d9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:07.9881735Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":70,"TimingId":"524f3d9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:07.9881735Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:13.0029101Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"877801a","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:13.0647119Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":61,"TimingId":"877801a","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:13.0647119Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:18.0673942Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"97aa0b1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:18.1777138Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":110,"TimingId":"97aa0b1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:18.1777138Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:18.3084003Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"e19357c","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:18.3084003Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"e19357c","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:18.3084003Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:19.3581410Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":84,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:20.7167692Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:23.1854529Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"d57c512","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:23.2803821Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":95,"TimingId":"d57c512","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:23.2813788Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:28.2872461Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"a7ddd96","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:28.4118392Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":124,"TimingId":"a7ddd96","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:28.4128705Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:33.4183748Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"af8a17e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":74,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:33.4733079Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":55,"TimingId":"af8a17e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":74,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:33.4733079Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":74,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:36.2270268Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"a9af04ac-9c9e-4be8-962f-ddc3ef07124e","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":188} +{"@t":"2018-11-12T08:50:36.2379923Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"a9af04ac-9c9e-4be8-962f-ddc3ef07124e","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":9.9583000000000013,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":77,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":188} +{"@t":"2018-11-12T08:50:38.4796984Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"8a4aeee","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:38.5215789Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":41,"TimingId":"8a4aeee","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:38.5215789Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:43.5294088Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"d0855d0","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:43.6377487Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":108,"TimingId":"d0855d0","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:43.6377487Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:48.6526265Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"c6b7b12","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":75,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:48.7477287Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":95,"TimingId":"c6b7b12","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":75,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:48.7487289Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":75,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:53.7528721Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"f54e563","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:53.8256721Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":72,"TimingId":"f54e563","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:53.8256721Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:58.8398682Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"9cead5f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":81,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:58.9201687Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":80,"TimingId":"9cead5f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":81,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:50:58.9201687Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":81,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:03.9213677Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"fa81641","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":77,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:04.0081341Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":86,"TimingId":"fa81641","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":77,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:04.0081341Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":77,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:08.2209720Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"7b5dc970-b689-4daa-95ac-bb8ea39d82c5","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":189} +{"@t":"2018-11-12T08:51:08.3895813Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"7b5dc970-b689-4daa-95ac-bb8ea39d82c5","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":167.60940000000002,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":79,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":189} +{"@t":"2018-11-12T08:51:09.0152646Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"56c5087","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":77,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:09.0870693Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":72,"TimingId":"56c5087","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":77,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:09.0870693Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":77,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:14.0890610Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"d7eb525","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:14.1542306Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":65,"TimingId":"d7eb525","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:14.1552271Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:18.3097478Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"0b59756","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":74,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:18.3097478Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"0b59756","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":74,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:18.3097478Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":74,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:19.1568426Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"2ffad7d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":76,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:19.2402540Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":83,"TimingId":"2ffad7d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":76,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:19.2402540Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":76,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:19.4467118Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":77,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:20.8878084Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:24.2463865Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"04fbf4c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:24.3328088Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":86,"TimingId":"04fbf4c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:24.3328088Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:29.3419380Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"04f306b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":77,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:29.4237465Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":81,"TimingId":"04f306b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":77,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:29.4237465Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":77,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:34.4246595Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"ddfbff1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":77,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:34.5454261Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":121,"TimingId":"ddfbff1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":77,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:34.5454261Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":77,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:39.5608326Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"64adca7","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":76,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:39.6621618Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":101,"TimingId":"64adca7","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":76,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:39.6621618Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":76,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:41.2263000Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"2035f334-9b80-4c2a-a723-55a215704101","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":190} +{"@t":"2018-11-12T08:51:41.2362740Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"2035f334-9b80-4c2a-a723-55a215704101","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":8.9659000000000013,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":76,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":190} +{"@t":"2018-11-12T08:51:44.6672184Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"6d14892","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:44.7553026Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":88,"TimingId":"6d14892","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:44.7553026Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:49.7667187Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e1528da","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":82,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:49.8364962Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":69,"TimingId":"e1528da","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":82,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:49.8364962Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":82,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:54.8373823Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"3a03851","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:54.9133350Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":75,"TimingId":"3a03851","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:54.9133350Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:59.9219102Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"a2f78fe","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:59.9865851Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":64,"TimingId":"a2f78fe","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:51:59.9865851Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:04.9875103Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"b65938e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:05.0658313Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":77,"TimingId":"b65938e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:05.0668306Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:10.0680207Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"29f4ad9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":82,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:10.1198956Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":51,"TimingId":"29f4ad9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":82,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:10.1198956Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":82,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:13.2260805Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"80ef415f-7961-41d0-b9e2-de362679abcc","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":191} +{"@t":"2018-11-12T08:52:13.4076449Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"80ef415f-7961-41d0-b9e2-de362679abcc","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":180.56220000000002,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":82,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":191} +{"@t":"2018-11-12T08:52:15.1261954Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"d4bd387","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:15.2089334Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":83,"TimingId":"d4bd387","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:15.2099446Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:18.3150606Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"019eadc","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:18.3150606Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"019eadc","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:18.3150606Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:19.5649575Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:20.2166627Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"819cae6","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":82,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:20.2894190Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":72,"TimingId":"819cae6","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":82,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:20.2894190Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":82,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:21.0760178Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:25.2920632Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"f36d37c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:25.3976747Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":105,"TimingId":"f36d37c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:25.3986719Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:30.4137509Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"87be5d5","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:30.5174179Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":103,"TimingId":"87be5d5","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:30.5174179Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:35.5269987Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"67dfc72","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:35.6117228Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":84,"TimingId":"67dfc72","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:35.6117228Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:40.6263389Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"f1178af","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:40.7036720Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":77,"TimingId":"f1178af","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:40.7036720Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:45.7062391Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"cd3f8b9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:45.7770610Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":70,"TimingId":"cd3f8b9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:45.7770610Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:46.2273863Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"b5e03353-a8b9-49e1-a9f0-055c74c2d825","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":86,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":192} +{"@t":"2018-11-12T08:52:46.2333709Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"b5e03353-a8b9-49e1-a9f0-055c74c2d825","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":4.9809,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":86,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":192} +{"@t":"2018-11-12T08:52:50.7766385Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"07b1059","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:50.8475145Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":70,"TimingId":"07b1059","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:50.8475145Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:55.8497333Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"7df3d3f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:55.9295182Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":79,"TimingId":"7df3d3f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:52:55.9295182Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:00.9413908Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"80eabb7","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:01.0102006Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":67,"TimingId":"80eabb7","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:01.0102006Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:06.0123926Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"3107a36","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:06.0819652Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":69,"TimingId":"3107a36","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:06.0819652Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:11.0894307Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"2106336","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:11.1641802Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":74,"TimingId":"2106336","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:11.1641802Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:16.1657720Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"ef147cc","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:16.2466170Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":80,"TimingId":"ef147cc","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:16.2466170Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:18.2216488Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"31d8e937-8d77-4013-ba61-1cd8c6dd6f80","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":98,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":193} +{"@t":"2018-11-12T08:53:18.3263684Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"52ff92a","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:18.3263684Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"52ff92a","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:18.3263684Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:18.4186977Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"31d8e937-8d77-4013-ba61-1cd8c6dd6f80","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":197.0489,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":99,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":193} +{"@t":"2018-11-12T08:53:19.6641053Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":99,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:21.2510340Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"8507dc6","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":92,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:21.2669087Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:21.2818743Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":30,"TimingId":"8507dc6","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":92,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:21.2818743Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":92,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:26.2829539Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"dcc3f93","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:26.3994759Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":116,"TimingId":"dcc3f93","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:26.4004732Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:31.4022449Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"5b4591b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:31.4868723Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":84,"TimingId":"5b4591b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:31.4868723Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:36.4960933Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"8020319","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:36.5832041Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":86,"TimingId":"8020319","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:36.5832041Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:41.5955368Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"d79e348","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:41.6593613Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":63,"TimingId":"d79e348","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:41.6593613Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:46.6615047Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"8eb5eb4","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:46.7446065Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":82,"TimingId":"8eb5eb4","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:46.7446065Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:49.2327011Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"f304be6b-b1a1-49ca-8de3-2f953e67ef4f","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":100,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":194} +{"@t":"2018-11-12T08:53:49.2416463Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"f304be6b-b1a1-49ca-8de3-2f953e67ef4f","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":7.9452000000000007,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":194} +{"@t":"2018-11-12T08:53:51.7470244Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"35b9d14","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:51.8407786Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":93,"TimingId":"35b9d14","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:51.8407786Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:56.8416683Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"57d66e8","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:56.9120976Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":70,"TimingId":"57d66e8","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:53:56.9120976Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":90,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:01.9224922Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"f3ee118","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:02.0142444Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":92,"TimingId":"f3ee118","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:02.0142444Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:07.0259937Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"91fe00d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:07.1277278Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":101,"TimingId":"91fe00d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:07.1277278Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:12.1368940Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"4df7c64","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:12.1852733Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":48,"TimingId":"4df7c64","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:12.1852733Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:17.1891201Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"bef6ae0","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:17.2475411Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":58,"TimingId":"bef6ae0","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:17.2475411Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:18.3304707Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"124e19a","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":102,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:18.3304707Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"124e19a","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":102,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:18.3304707Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":102,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:19.7726494Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":106,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:20.4768668Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Keep alive executing","TimingId":"bf2f2a5","SourceContext":"Umbraco.Web.Scheduling.KeepAlive","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":105,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:20.4857963Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"42eb7b61-693e-41e2-8cfb-8d015abedfd2","RequestUrl":"http://localhost:8000/umbraco/ping.aspx","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":195} +{"@t":"2018-11-12T08:54:20.4908084Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"42eb7b61-693e-41e2-8cfb-8d015abedfd2","RequestUrl":"http://localhost:8000/umbraco/ping.aspx","Duration":5.0121,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":195} +{"@t":"2018-11-12T08:54:20.4917763Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Keep alive complete","Duration":14,"TimingId":"bf2f2a5","SourceContext":"Umbraco.Web.Scheduling.KeepAlive","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":85,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:20.4917763Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[KeepAlive] ","TaskType":"Umbraco.Web.Scheduling.KeepAlive","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":85,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:21.2181042Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"851c81c3-4497-43b0-ac5e-9dc7221546cf","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":196} +{"@t":"2018-11-12T08:54:21.3118582Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"851c81c3-4497-43b0-ac5e-9dc7221546cf","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":93.754,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":104,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":196} +{"@t":"2018-11-12T08:54:21.3378044Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:22.2493305Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"a9160cb","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":102,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:22.3211027Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":72,"TimingId":"a9160cb","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":102,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:22.3211027Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":102,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:27.3229250Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"c37ff62","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:27.4021435Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":78,"TimingId":"c37ff62","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:27.4021435Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:32.4037168Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"89c5729","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:32.4954893Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":92,"TimingId":"89c5729","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:32.4964776Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:37.4980489Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"18dfc25","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:37.5742304Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":76,"TimingId":"18dfc25","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:37.5742304Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:42.5896361Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"32d33fc","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:42.6714272Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":81,"TimingId":"32d33fc","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:42.6714272Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:47.6721710Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"f3476b3","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:47.7220382Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":49,"TimingId":"f3476b3","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:47.7220382Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:52.7296009Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"4fd621c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:52.8059582Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":76,"TimingId":"4fd621c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:52.8059582Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:54.2243727Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"6b73466a-f1d9-4e91-a357-12647a238706","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":102,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":197} +{"@t":"2018-11-12T08:54:54.2323402Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"6b73466a-f1d9-4e91-a357-12647a238706","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":6.9544000000000006,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":197} +{"@t":"2018-11-12T08:54:57.8099966Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"226fd61","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:57.8618160Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":51,"TimingId":"226fd61","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:54:57.8618160Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:02.8706812Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"0a645a8","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:02.9604444Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":89,"TimingId":"0a645a8","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:02.9604444Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:07.9753262Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"50662c1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:08.0494173Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":74,"TimingId":"50662c1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:08.0494173Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:13.0620596Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"dccd425","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:13.1617506Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":99,"TimingId":"dccd425","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:13.1617506Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:18.1679363Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"671c00e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":106,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:18.2763131Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":108,"TimingId":"671c00e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":106,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:18.2773049Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":106,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:18.3421307Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"a1f4d7a","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":105,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:18.3421307Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"a1f4d7a","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":105,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:18.3421307Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":105,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:19.8691382Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:21.4963900Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:23.2801944Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"954ae98","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:23.4355115Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":155,"TimingId":"954ae98","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:23.4365078Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:25.2353635Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"cf72485c-82c8-4140-8600-03895b9b6adf","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":198} +{"@t":"2018-11-12T08:55:25.4390291Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"cf72485c-82c8-4140-8600-03895b9b6adf","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":203.6656,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":96,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":198} +{"@t":"2018-11-12T08:55:28.4430821Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"68be015","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:28.5138094Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":70,"TimingId":"68be015","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:28.5138094Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:33.5150489Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"436b798","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:33.5967669Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":81,"TimingId":"436b798","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:33.5967669Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:38.6059594Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"88d21c1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:38.6547780Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":49,"TimingId":"88d21c1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:38.6547780Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:43.6670057Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"6eb434d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:43.7497791Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":82,"TimingId":"6eb434d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:43.7507789Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:48.7519860Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"32fd630","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":96,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:48.8277524Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":76,"TimingId":"32fd630","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":96,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:48.8277524Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":96,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:53.8280454Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"fa761ec","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:53.8973027Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":69,"TimingId":"fa761ec","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:53.8973027Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:57.2197604Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"22e90599-76d9-4d22-9801-7bd6908d5fc6","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":199} +{"@t":"2018-11-12T08:55:57.2267438Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"22e90599-76d9-4d22-9801-7bd6908d5fc6","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":5.9860000000000007,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":199} +{"@t":"2018-11-12T08:55:58.9704325Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"8ba74eb","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:59.0697205Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":99,"TimingId":"8ba74eb","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:55:59.0697205Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:04.0783406Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e0c7e0b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":96,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:04.1526577Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":74,"TimingId":"e0c7e0b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":96,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:04.1526577Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":96,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:09.1666326Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"84802f3","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":96,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:09.2413801Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":74,"TimingId":"84802f3","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":96,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:09.2413801Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":96,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:14.2424363Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"16461ec","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:14.3082700Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":66,"TimingId":"16461ec","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:14.3092680Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:18.3433612Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"4fbb1f0","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:18.3433612Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"4fbb1f0","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:18.3433612Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:19.3099967Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"87a9f33","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":104,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:19.3558819Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":45,"TimingId":"87a9f33","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":104,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:19.3558819Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":104,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:19.9452286Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":96,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:21.7370030Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:24.3705762Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"ec63b87","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:24.4699585Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":99,"TimingId":"ec63b87","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:24.4709556Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:29.2210651Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"4f1d8135-732a-40ad-a45b-aaf99e11f4df","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":104,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":200} +{"@t":"2018-11-12T08:56:29.4264756Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"4f1d8135-732a-40ad-a45b-aaf99e11f4df","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":205.4105,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":200} +{"@t":"2018-11-12T08:56:29.4760878Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"eeb50bf","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":119,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:29.5188606Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":43,"TimingId":"eeb50bf","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":119,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:29.5198577Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":119,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:34.5305638Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e6ce1cb","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":96,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:34.6682770Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":137,"TimingId":"e6ce1cb","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":96,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:34.6682770Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":96,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:39.6687072Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"42dfee2","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":113,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:39.7664460Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":98,"TimingId":"42dfee2","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":113,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:39.7674451Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":113,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:44.7678910Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"2310b8f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:44.8757442Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":107,"TimingId":"2310b8f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:44.8757442Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:49.8878513Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"83f7af5","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:49.9596571Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":71,"TimingId":"83f7af5","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:49.9606533Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:54.9619537Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"f0974bc","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:55.0153714Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":53,"TimingId":"f0974bc","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:56:55.0153714Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:00.0158680Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"bde5972","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:00.0746693Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":59,"TimingId":"bde5972","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:00.0757049Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:01.2359881Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"d3ae02c6-d199-434a-bd99-d057368f64dc","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":121,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":201} +{"@t":"2018-11-12T08:57:01.2419679Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"d3ae02c6-d199-434a-bd99-d057368f64dc","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":4.9822000000000006,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":201} +{"@t":"2018-11-12T08:57:05.0765469Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"0fa996c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:05.1383846Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":62,"TimingId":"0fa996c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:05.1383846Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:10.1544932Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"ae77d49","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":113,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:10.2251620Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":70,"TimingId":"ae77d49","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":113,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:10.2261596Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":113,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:15.2279603Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"8b3a342","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:15.2777571Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":49,"TimingId":"8b3a342","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:15.2807527Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:18.3564088Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"1f88a6f","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":122,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:18.3564088Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"1f88a6f","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":122,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:18.3564088Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":122,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:20.0314761Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:20.2822244Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"13e1fdd","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":121,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:20.3495889Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":67,"TimingId":"13e1fdd","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":121,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:20.3495889Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":121,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:21.9173522Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:25.3585010Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"3af112c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:25.4724393Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":113,"TimingId":"3af112c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:25.4724393Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:30.4843617Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"583b942","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:30.5342266Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":50,"TimingId":"583b942","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:30.5342266Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:34.2206698Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"a1af3b5a-3c2a-4e92-871e-ce88201bef35","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":113,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":202} +{"@t":"2018-11-12T08:57:34.4315179Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"a1af3b5a-3c2a-4e92-871e-ce88201bef35","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":210.84810000000002,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":202} +{"@t":"2018-11-12T08:57:35.5433527Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"6675cc1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:35.6112054Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":68,"TimingId":"6675cc1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:35.6112054Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:40.6257530Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"c2a1065","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:40.6883611Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":62,"TimingId":"c2a1065","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:40.6883611Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:45.6890517Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"f8ea12f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:45.7439925Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":55,"TimingId":"f8ea12f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:45.7439925Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:50.7461512Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"b7b91f5","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:50.8105138Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":63,"TimingId":"b7b91f5","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:50.8105138Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:55.8108913Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"ee58aff","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:55.8777691Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":67,"TimingId":"ee58aff","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:57:55.8787663Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:00.8903615Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"c14e45f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:00.9488863Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":58,"TimingId":"c14e45f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:00.9488863Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:05.9493641Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"b113445","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:06.0411207Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":92,"TimingId":"b113445","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:06.0411207Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:06.2267438Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"a54c04e0-a8c2-499f-85d3-0ef5c6863daa","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":126,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":203} +{"@t":"2018-11-12T08:58:06.2317302Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"a54c04e0-a8c2-499f-85d3-0ef5c6863daa","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":3.9896000000000003,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":114,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":203} +{"@t":"2018-11-12T08:58:11.0573789Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"aa5c0d2","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:11.1402398Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":82,"TimingId":"aa5c0d2","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:11.1402398Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:16.1435361Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"9636332","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:16.2118782Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":68,"TimingId":"9636332","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:16.2128775Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:18.3614615Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"6f9bbba","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:18.3614615Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"6f9bbba","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:18.3614615Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:20.1784400Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:21.2145309Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"ea4d2c9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":126,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:21.3009562Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":86,"TimingId":"ea4d2c9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":126,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:21.3009562Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":126,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:22.1293080Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":125,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:26.3133152Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"9706e93","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:26.4000815Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":86,"TimingId":"9706e93","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:26.4000815Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:31.4144399Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"fe5d568","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:31.5002120Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":85,"TimingId":"fe5d568","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:31.5012113Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:36.5122898Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"9fde0de","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:36.6151508Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":102,"TimingId":"9fde0de","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:36.6151508Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:38.2286682Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"66be5ef3-070e-4751-836a-f0f54d91ce36","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":204} +{"@t":"2018-11-12T08:58:38.4263893Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"66be5ef3-070e-4751-836a-f0f54d91ce36","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":197.7211,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":114,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":204} +{"@t":"2018-11-12T08:58:41.6281232Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"13f20db","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:41.6731147Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":45,"TimingId":"13f20db","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:41.6731147Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:46.6754268Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"eaf2a7c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:46.7942074Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":118,"TimingId":"eaf2a7c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:46.7942074Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:51.7966396Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"be907f5","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:51.8769755Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":80,"TimingId":"be907f5","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:51.8769755Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:56.8790830Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"72dfc57","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:56.9548814Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":75,"TimingId":"72dfc57","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:58:56.9548814Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:01.9560510Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"d4cbae8","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:01.9999242Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":44,"TimingId":"d4cbae8","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:02.0009226Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:07.0109020Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"b557c3e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:07.0956060Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":83,"TimingId":"b557c3e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:07.0956060Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:11.2163444Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"65cb423c-a32e-42af-8bc5-dab9a5f2cddb","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":205} +{"@t":"2018-11-12T08:59:11.2193333Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"65cb423c-a32e-42af-8bc5-dab9a5f2cddb","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":1.9889000000000001,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":114,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":205} +{"@t":"2018-11-12T08:59:12.1056038Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e7efe74","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:12.1794057Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":73,"TimingId":"e7efe74","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:12.1794057Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:17.1806398Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"c16010a","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:17.2236364Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":42,"TimingId":"c16010a","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:17.2236364Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:18.3718434Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"38f208f","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":139,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:18.3728808Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":1,"TimingId":"38f208f","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":139,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:18.3738326Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":139,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:20.2756620Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:20.4963867Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Keep alive executing","TimingId":"0b665fb","SourceContext":"Umbraco.Web.Scheduling.KeepAlive","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":139,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:20.5172806Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"9a2fa6cd-d878-4692-92bb-977eb856f031","RequestUrl":"http://localhost:8000/umbraco/ping.aspx","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":206} +{"@t":"2018-11-12T08:59:20.5232687Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"9a2fa6cd-d878-4692-92bb-977eb856f031","RequestUrl":"http://localhost:8000/umbraco/ping.aspx","Duration":5.9881,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":206} +{"@t":"2018-11-12T08:59:20.5262606Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Keep alive complete","Duration":29,"TimingId":"0b665fb","SourceContext":"Umbraco.Web.Scheduling.KeepAlive","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":59,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:20.5262606Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[KeepAlive] ","TaskType":"Umbraco.Web.Scheduling.KeepAlive","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":59,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:22.2302255Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"6ad12f3","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":137,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:22.2481927Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":17,"TimingId":"6ad12f3","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":137,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:22.2481927Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":137,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:22.2890736Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:27.2509478Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"6a39270","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:27.3167686Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":65,"TimingId":"6a39270","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:27.3167686Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:32.3239937Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e4ae6b9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:32.3987969Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":74,"TimingId":"e4ae6b9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:32.3987969Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:37.4131434Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"25d0041","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:37.5300253Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":116,"TimingId":"25d0041","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:37.5300253Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:42.2309245Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"fa0d39ee-3674-4760-b29d-70f16046719e","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":207} +{"@t":"2018-11-12T08:59:42.4536305Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"fa0d39ee-3674-4760-b29d-70f16046719e","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":209.74550000000002,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":138,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":207} +{"@t":"2018-11-12T08:59:42.5444406Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"fc54a28","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:42.5907681Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":46,"TimingId":"fc54a28","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:42.5907681Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:47.5924466Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"24d6390","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:47.6735738Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":81,"TimingId":"24d6390","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:47.6735738Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:52.6894148Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"6dbb418","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:52.7591241Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":70,"TimingId":"6dbb418","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:52.7591241Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:57.7606168Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"553b7cb","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:57.8313095Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":70,"TimingId":"553b7cb","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T08:59:57.8313095Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:02.8424877Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"09c6795","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:02.9202699Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":77,"TimingId":"09c6795","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:02.9202699Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:07.9330078Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"2ec91c0","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:08.0127847Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":79,"TimingId":"2ec91c0","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:08.0127847Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:13.0285534Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e68ac90","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:13.0873907Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":58,"TimingId":"e68ac90","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:13.0873907Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:14.2207894Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"d6766634-46d0-4131-a211-a689d9be2b46","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":138,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":208} +{"@t":"2018-11-12T09:00:14.2267698Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"d6766634-46d0-4131-a211-a689d9be2b46","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":4.9865,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":137,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":208} +{"@t":"2018-11-12T09:00:18.0917095Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"c3adcc6","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:18.1525561Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":60,"TimingId":"c3adcc6","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:18.1525561Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:18.3863877Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"436aa15","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":139,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:18.3863877Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"436aa15","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":139,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:18.3863877Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":139,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:20.3553069Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:22.4815804Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:23.1672996Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"b40ba49","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":146,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:23.2321111Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":64,"TimingId":"b40ba49","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":146,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:23.2321111Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":146,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:28.2342760Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"fde1e1e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:28.3278582Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":93,"TimingId":"fde1e1e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:28.3278582Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:33.3286633Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"7e05ff6","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:33.4379503Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":109,"TimingId":"7e05ff6","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:33.4379503Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:38.4477942Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"00d7888","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:38.5167097Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":68,"TimingId":"00d7888","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:38.5167097Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:43.5294362Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"0b09ca4","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:43.6072115Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":78,"TimingId":"0b09ca4","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:43.6082122Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:46.2295060Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"7a0ce4bd-9851-437d-a2f3-afb692228367","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":209} +{"@t":"2018-11-12T09:00:46.4554698Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"7a0ce4bd-9851-437d-a2f3-afb692228367","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":224.9636,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":133,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":209} +{"@t":"2018-11-12T09:00:48.6132709Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"f90af7e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":133,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:48.6727580Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":59,"TimingId":"f90af7e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":133,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:48.6727580Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":133,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:53.6843656Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e0ee1a7","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:53.7476728Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":63,"TimingId":"e0ee1a7","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:53.7476728Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:58.7617290Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"987815b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":134,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:58.8405445Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":78,"TimingId":"987815b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":134,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:00:58.8405445Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":134,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:03.8554079Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"aa69ead","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":133,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:03.9201985Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":65,"TimingId":"aa69ead","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":133,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:03.9201985Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":133,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:08.9232158Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"94e3a93","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:09.0039579Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":81,"TimingId":"94e3a93","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:09.0049551Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:14.0152956Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"8ee143f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:14.0885756Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":73,"TimingId":"8ee143f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:14.0905934Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:18.2163922Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"961e7140-1a73-4c38-91f1-b78934da9eaf","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":146,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":210} +{"@t":"2018-11-12T09:01:18.2193852Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"961e7140-1a73-4c38-91f1-b78934da9eaf","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":2.9930000000000003,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":134,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":210} +{"@t":"2018-11-12T09:01:18.4027525Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"efcffea","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":133,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:18.4027525Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"efcffea","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":133,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:18.4027525Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":133,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:19.0902264Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e4686bf","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":59,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:19.1727410Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":82,"TimingId":"e4686bf","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":59,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:19.1727410Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":59,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:20.4737175Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:22.7435468Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:24.1840929Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"5f54e60","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:24.3153754Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":131,"TimingId":"5f54e60","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:24.3153754Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:29.3279671Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"5844ce8","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":147,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:29.3916916Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":63,"TimingId":"5844ce8","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":147,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:29.3916916Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":147,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:34.4064768Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"8618f93","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":146,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:34.4892462Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":83,"TimingId":"8618f93","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":146,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:34.4892462Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":146,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:39.5011720Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"f2faf48","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:39.6015251Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":99,"TimingId":"f2faf48","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:39.6015251Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:44.6050224Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"06eddc2","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:44.6653570Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":59,"TimingId":"06eddc2","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:44.6653570Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:49.6690655Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"441a272","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":144,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:49.7569997Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":88,"TimingId":"441a272","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":144,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:49.7569997Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":144,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:51.2262987Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"0fba5f05-3083-431c-be11-550443c3e9d8","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":211} +{"@t":"2018-11-12T09:01:51.4826000Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"0fba5f05-3083-431c-be11-550443c3e9d8","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":256.3013,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":146,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":211} +{"@t":"2018-11-12T09:01:54.7608772Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"691f7d5","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:54.8364598Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":75,"TimingId":"691f7d5","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:54.8364598Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:59.8409363Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"3023fa8","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":126,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:59.9129833Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":71,"TimingId":"3023fa8","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":126,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:01:59.9129833Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":126,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:04.9265257Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"217c145","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":128,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:04.9883590Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":62,"TimingId":"217c145","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":128,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:04.9883590Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":128,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:09.9894179Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"c957481","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":126,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:10.0750896Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":85,"TimingId":"c957481","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":126,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:10.0750896Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":126,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:15.0765168Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"46a900f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:15.1172041Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":41,"TimingId":"46a900f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:15.1172041Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:18.4052820Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"ce99f98","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:18.4052820Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"ce99f98","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:18.4052820Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:20.1291317Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"c461c88","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:20.1959083Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":66,"TimingId":"c461c88","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:20.1969064Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:20.5489143Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:22.9011150Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:23.2248607Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"e45b9626-e469-4a34-a93b-002c8375d594","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":212} +{"@t":"2018-11-12T09:02:23.2328388Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"e45b9626-e469-4a34-a93b-002c8375d594","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":6.9695,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":118,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":212} +{"@t":"2018-11-12T09:02:25.2029999Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"13c2d73","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:25.2537817Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":50,"TimingId":"13c2d73","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:25.2537817Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:30.2539099Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"47e9381","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:30.3531510Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":99,"TimingId":"47e9381","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:30.3531510Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:35.3561768Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"ca55908","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:35.4393948Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":82,"TimingId":"ca55908","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:35.4393948Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:40.4509619Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"2d4461b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:40.5438986Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":92,"TimingId":"2d4461b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:40.5438986Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:45.5463512Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"bf0339c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:45.6394585Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":93,"TimingId":"bf0339c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:45.6404563Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:50.6558895Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"796a1d4","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:50.7441965Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":88,"TimingId":"796a1d4","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:50.7441965Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:55.2218977Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"671afacb-43d4-4c83-8880-9ae4ef244282","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":213} +{"@t":"2018-11-12T09:02:55.4165941Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"671afacb-43d4-4c83-8880-9ae4ef244282","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":194.6964,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":118,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":213} +{"@t":"2018-11-12T09:02:55.7508167Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"0140a14","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":125,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:55.8118049Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":61,"TimingId":"0140a14","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":125,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:02:55.8118049Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":125,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:00.8129741Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"3054254","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:00.8856233Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":72,"TimingId":"3054254","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:00.8856233Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:05.8861304Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"ffd94c1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:05.9839869Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":97,"TimingId":"ffd94c1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:05.9839869Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:10.9853565Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"1807183","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:11.0611261Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":75,"TimingId":"1807183","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:11.0611261Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:16.0625933Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"431880b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:16.1149153Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":52,"TimingId":"431880b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:16.1159129Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":116,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:18.4189821Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"4aea461","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:18.4189821Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"4aea461","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:18.4189821Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:20.6450199Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:21.1277357Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"834fa3f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":119,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:21.1855805Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":58,"TimingId":"834fa3f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":119,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:21.1855805Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":119,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:23.1169807Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:26.1884079Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"24fdb91","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:26.2816537Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":93,"TimingId":"24fdb91","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:26.2826507Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:27.2264618Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"7b7e5468-36bb-4905-9c93-5bb3c090618f","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":120,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":214} +{"@t":"2018-11-12T09:03:27.2334384Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"7b7e5468-36bb-4905-9c93-5bb3c090618f","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":6.9766,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":214} +{"@t":"2018-11-12T09:03:31.2952698Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"20b2cf3","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:31.3591652Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":63,"TimingId":"20b2cf3","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:31.3591652Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:36.3725146Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"5694711","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:36.4263657Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":54,"TimingId":"5694711","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:36.4273631Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:41.4405918Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"229e8d8","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:41.5492448Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":108,"TimingId":"229e8d8","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:41.5492448Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:46.5516163Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"7af3888","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:46.6529793Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":101,"TimingId":"7af3888","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:46.6529793Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:51.6524405Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"cdd9f54","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:51.7537190Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":101,"TimingId":"cdd9f54","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:51.7547162Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:56.7557247Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"dea1210","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:56.8026036Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":47,"TimingId":"dea1210","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:03:56.8035973Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:00.2205493Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"1d24b56d-27c9-4f75-b7a6-7f04af6ab40d","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":215} +{"@t":"2018-11-12T09:04:00.4300031Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"1d24b56d-27c9-4f75-b7a6-7f04af6ab40d","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":209.4538,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":119,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":215} +{"@t":"2018-11-12T09:04:01.8177895Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"b7c5135","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:01.8951867Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":77,"TimingId":"b7c5135","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:01.8951867Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:06.9084357Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"1730a08","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:07.0156263Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":108,"TimingId":"1730a08","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:07.0166280Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:12.0176286Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"0b38692","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:12.0953976Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":77,"TimingId":"0b38692","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:12.0953976Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:17.0975314Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"d54603a","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:17.1583977Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":60,"TimingId":"d54603a","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:17.1583977Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":129,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:18.4212186Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"f9d3b5b","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":119,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:18.4212186Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"f9d3b5b","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":119,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:18.4212186Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":119,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:20.5272189Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Keep alive executing","TimingId":"638868d","SourceContext":"Umbraco.Web.Scheduling.KeepAlive","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:20.5401235Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"b69d1b3b-b8f5-47b0-a15d-aa29a4bf5448","RequestUrl":"http://localhost:8000/umbraco/ping.aspx","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":216} +{"@t":"2018-11-12T09:04:20.5500955Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"b69d1b3b-b8f5-47b0-a15d-aa29a4bf5448","RequestUrl":"http://localhost:8000/umbraco/ping.aspx","Duration":8.9571,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":216} +{"@t":"2018-11-12T09:04:20.5520914Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Keep alive complete","Duration":24,"TimingId":"638868d","SourceContext":"Umbraco.Web.Scheduling.KeepAlive","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":142,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:20.5520914Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[KeepAlive] ","TaskType":"Umbraco.Web.Scheduling.KeepAlive","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":142,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:20.8183340Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":113,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:22.1607686Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e6665b1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:22.2689723Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":107,"TimingId":"e6665b1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:22.2689723Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:23.4608476Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":120,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:27.2821707Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"1f122b4","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:27.3409760Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":59,"TimingId":"1f122b4","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:27.3419716Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:32.2200269Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"2529dffb-98da-4f97-ae59-149d132ef2f1","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":217} +{"@t":"2018-11-12T09:04:32.2250132Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"2529dffb-98da-4f97-ae59-149d132ef2f1","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":4.9863,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":217} +{"@t":"2018-11-12T09:04:32.3556604Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"093844c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":113,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:32.4184961Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":63,"TimingId":"093844c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":113,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:32.4184961Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":113,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:37.4200662Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"6b2986b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:37.5018386Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":81,"TimingId":"6b2986b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:37.5018386Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:42.5167388Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"23cd9df","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:42.6015085Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":85,"TimingId":"23cd9df","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:42.6025045Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:47.6033507Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"7029b7b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:47.7446002Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":141,"TimingId":"7029b7b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:47.7455951Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:52.7463543Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"5aaa953","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:52.8486803Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":102,"TimingId":"5aaa953","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:52.8495960Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:57.8517027Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"bfd6c4d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:57.9202211Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":68,"TimingId":"bfd6c4d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:04:57.9212403Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:02.9355211Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"bf55ed6","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:03.0303477Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":94,"TimingId":"bf55ed6","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:03.0303477Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:04.2273144Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"e0a3e454-8a90-4d99-bc63-0e918e36683e","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":111,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":218} +{"@t":"2018-11-12T09:05:04.4185630Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"e0a3e454-8a90-4d99-bc63-0e918e36683e","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":191.2486,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":218} +{"@t":"2018-11-12T09:05:08.0455183Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"08234b7","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:08.4193070Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":373,"TimingId":"08234b7","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:08.4193070Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:13.4202267Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"74ac50f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:13.5167767Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":96,"TimingId":"74ac50f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:13.5167767Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:18.4359177Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"ede2898","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:18.4359177Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"ede2898","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:18.4359177Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:18.5283647Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"97252a4","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":119,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:18.6051081Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":76,"TimingId":"97252a4","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":119,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:18.6051081Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":119,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:20.8924236Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:23.6076194Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"261e891","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":119,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:23.6295625Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":22,"TimingId":"261e891","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":119,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:23.6295625Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":119,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:23.7119024Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:28.6308188Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"0cffd72","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:28.7215463Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":90,"TimingId":"0cffd72","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:28.7215463Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:33.7217320Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"7eb4a26","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:33.8091701Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":87,"TimingId":"7eb4a26","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:33.8091701Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:36.2275049Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"aa50d2f9-1ccb-4246-b9eb-c945131641a6","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":219} +{"@t":"2018-11-12T09:05:36.2344930Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"aa50d2f9-1ccb-4246-b9eb-c945131641a6","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":5.9887000000000006,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":119,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":219} +{"@t":"2018-11-12T09:05:38.8118925Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"9af418a","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:38.8916716Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":79,"TimingId":"9af418a","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:38.8916716Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:43.9051291Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"aa6c06d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:44.1842661Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":279,"TimingId":"aa6c06d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:44.1842661Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:49.1852741Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"c653516","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":111,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:49.2919218Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":106,"TimingId":"c653516","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":111,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:49.2919218Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":111,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:54.2931543Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"5397ab1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:54.3330341Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":40,"TimingId":"5397ab1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:54.3340312Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:59.3391328Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"0697e4b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:59.4069102Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":68,"TimingId":"0697e4b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:05:59.4079091Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:04.4183383Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"b1adc67","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":111,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:04.4986011Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":80,"TimingId":"b1adc67","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":111,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:04.5015899Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":111,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:08.2233292Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"9b0de306-f879-4af2-99d0-1ae0a05b1cbf","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":220} +{"@t":"2018-11-12T09:06:08.4286690Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"9b0de306-f879-4af2-99d0-1ae0a05b1cbf","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":205.3398,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":105,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":220} +{"@t":"2018-11-12T09:06:09.5126271Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"f180382","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":115,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:09.5525152Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":40,"TimingId":"f180382","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":115,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:09.5525152Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":115,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:14.5534896Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"c5ea294","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:14.6223326Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":68,"TimingId":"c5ea294","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:14.6232747Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:18.4371331Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"3532562","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:18.4371331Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"3532562","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:18.4371331Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:19.6396488Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"95a9dea","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":93,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:19.6905090Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":50,"TimingId":"95a9dea","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":93,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:19.6905090Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":93,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:20.9975891Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:23.9077684Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:24.7031366Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"39b0f41","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":111,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:24.8123276Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":108,"TimingId":"39b0f41","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":111,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:24.8123276Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":111,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:29.8236476Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"613d5c3","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":115,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:29.9034278Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":79,"TimingId":"613d5c3","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":115,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:29.9034278Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":115,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:34.9171104Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"44f1261","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":111,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:35.0378252Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":120,"TimingId":"44f1261","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":111,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:35.0378252Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":111,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:40.0495810Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"bff8fb3","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":115,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:40.1393347Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":89,"TimingId":"bff8fb3","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":115,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:40.1403450Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":115,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:40.2261037Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"1ca34a02-6ebd-42e6-bc85-1a586c34169b","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":221} +{"@t":"2018-11-12T09:06:40.2330877Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"1ca34a02-6ebd-42e6-bc85-1a586c34169b","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":5.9441000000000006,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":105,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":221} +{"@t":"2018-11-12T09:06:45.1427294Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"934d3aa","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:45.2075181Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":64,"TimingId":"934d3aa","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:45.2075181Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:50.2204722Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"6eb0d3e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":107,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:50.2811251Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":61,"TimingId":"6eb0d3e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":107,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:50.2811251Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":107,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:55.2831457Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"eeeb934","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:55.3489719Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":66,"TimingId":"eeeb934","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:06:55.3489719Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:00.3548866Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"5463341","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:00.4085825Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":53,"TimingId":"5463341","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:00.4085825Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:05.4182499Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"708477b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:05.4760126Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":57,"TimingId":"708477b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:05.4760126Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:10.4861661Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"520ea0c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":106,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:10.5902914Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":103,"TimingId":"520ea0c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":106,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:10.5902914Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":106,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:12.2250173Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"4c171b7c-fd19-46b8-ada4-15036499c66c","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":222} +{"@t":"2018-11-12T09:07:12.3981422Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"4c171b7c-fd19-46b8-ada4-15036499c66c","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":172.1276,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":115,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":222} +{"@t":"2018-11-12T09:07:15.5931443Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e1da2a3","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:15.6688996Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":75,"TimingId":"e1da2a3","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:15.6688996Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:18.4478747Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"85bde26","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:18.4478747Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"85bde26","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:18.4478747Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:20.6714549Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e5e3cc9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:20.7672002Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":96,"TimingId":"e5e3cc9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:20.7672002Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:21.1029759Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":102,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:24.1045268Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:25.7772588Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"7db6eeb","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:25.8639889Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":86,"TimingId":"7db6eeb","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:25.8639889Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:30.8752911Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"1b8db5b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:30.9992701Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":123,"TimingId":"1b8db5b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:30.9992701Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:35.9994712Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"13a6ac9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:36.0822604Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":82,"TimingId":"13a6ac9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:36.0822604Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:41.0832547Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"c926b95","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:41.1510234Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":67,"TimingId":"c926b95","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:41.1510234Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:44.2238063Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"e656863a-e9b5-4ef3-b59e-67010ddb8afa","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":223} +{"@t":"2018-11-12T09:07:44.2277950Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"e656863a-e9b5-4ef3-b59e-67010ddb8afa","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":3.9887,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":99,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":223} +{"@t":"2018-11-12T09:07:46.1533612Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"dcd8212","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:46.2431216Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":89,"TimingId":"dcd8212","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:46.2431216Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:51.2447088Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"42eebe3","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:51.3632485Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":118,"TimingId":"42eebe3","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:51.3632485Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:56.3644176Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"a56022b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:56.4564083Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":92,"TimingId":"a56022b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:07:56.4564083Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:01.4635361Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"2edc380","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:01.5573137Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":93,"TimingId":"2edc380","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:01.5573137Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:06.5595487Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"d7fa24c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:06.6761053Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":116,"TimingId":"d7fa24c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:06.6761053Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:11.6874624Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"80b1417","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:11.7543661Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":66,"TimingId":"80b1417","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:11.7543661Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:16.7557165Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"d7f9bc5","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:16.8285038Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":72,"TimingId":"d7f9bc5","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:16.8285038Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:17.2261536Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"204a3ad7-c718-474f-93dc-2cb411fc2be2","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":102,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":224} +{"@t":"2018-11-12T09:08:17.4021957Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"204a3ad7-c718-474f-93dc-2cb411fc2be2","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":176.0421,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":99,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":224} +{"@t":"2018-11-12T09:08:18.4515600Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"9a46635","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:18.4525564Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"9a46635","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:18.4525564Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":123,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:21.1925872Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:21.8412454Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"903faee","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":100,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:21.9290010Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":87,"TimingId":"903faee","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":100,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:21.9290010Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":100,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:24.2925862Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:26.9326143Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"47b3ed9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:27.0323586Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":100,"TimingId":"47b3ed9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:27.0343624Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:32.0483052Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"a64b559","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:32.1010701Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":52,"TimingId":"a64b559","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:32.1010701Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:37.1142549Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"f23459c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:37.2491365Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":135,"TimingId":"f23459c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:37.2491365Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:42.2497612Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"1d53abb","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:42.3550188Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":105,"TimingId":"1d53abb","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:42.3550188Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:47.3566730Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"af11266","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:47.4416820Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":85,"TimingId":"af11266","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:47.4416820Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:49.2243134Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"bd4e1035-1134-4e11-8cda-a40258f3d49f","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":225} +{"@t":"2018-11-12T09:08:49.2302813Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"bd4e1035-1134-4e11-8cda-a40258f3d49f","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":5.9679,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":97,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":225} +{"@t":"2018-11-12T09:08:52.4532373Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"7b0b692","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:52.4950983Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":42,"TimingId":"7b0b692","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:52.4960986Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:57.4967735Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"b00900e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:57.7629618Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":266,"TimingId":"b00900e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:08:57.7629618Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:02.7626588Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"cf6aed0","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:02.8323614Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":69,"TimingId":"cf6aed0","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:02.8323614Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:07.8399584Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"1684ad0","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:07.9067177Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":66,"TimingId":"1684ad0","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:07.9067177Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:12.9209382Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"ae83e77","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:12.9972664Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":76,"TimingId":"ae83e77","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:12.9972664Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:18.0000703Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"575c7b8","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:18.0725994Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":72,"TimingId":"575c7b8","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:18.0725994Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:18.4641850Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"b46a05f","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":94,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:18.4641850Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"b46a05f","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":94,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:18.4641850Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":94,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:20.5575033Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Keep alive executing","TimingId":"381fd6f","SourceContext":"Umbraco.Web.Scheduling.KeepAlive","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:20.5654761Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"b3b18a59-1502-43fa-b2b2-83050ccb2d0c","RequestUrl":"http://localhost:8000/umbraco/ping.aspx","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":226} +{"@t":"2018-11-12T09:09:20.5714746Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"b3b18a59-1502-43fa-b2b2-83050ccb2d0c","RequestUrl":"http://localhost:8000/umbraco/ping.aspx","Duration":5.9985,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":226} +{"@t":"2018-11-12T09:09:20.5764945Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Keep alive complete","Duration":18,"TimingId":"381fd6f","SourceContext":"Umbraco.Web.Scheduling.KeepAlive","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":108,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:20.5764945Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[KeepAlive] ","TaskType":"Umbraco.Web.Scheduling.KeepAlive","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":108,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:21.2310482Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"b0f4aea8-8a47-49cc-bee4-dbfd61ae0497","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":95,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":227} +{"@t":"2018-11-12T09:09:21.3005224Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"b0f4aea8-8a47-49cc-bee4-dbfd61ae0497","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":68.489,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":101,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":227} +{"@t":"2018-11-12T09:09:21.3364428Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":100,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:23.0793159Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"930053b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:23.2186531Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":139,"TimingId":"930053b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:23.2186531Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:24.5534549Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":100,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:28.2295730Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"cf6ee76","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:28.2884146Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":58,"TimingId":"cf6ee76","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:28.2884146Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:33.2991970Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"055a8d8","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:33.3849353Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":85,"TimingId":"055a8d8","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:33.3849353Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:38.3969676Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"dfd03e5","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:38.4539649Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":57,"TimingId":"dfd03e5","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:38.4539649Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:43.4662404Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"843dea0","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:43.5380563Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":71,"TimingId":"843dea0","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:43.5380563Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:48.5489429Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"8c8ce49","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":99,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:48.6107784Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":61,"TimingId":"8c8ce49","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":99,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:48.6107784Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":99,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:53.2302896Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"0b269ea1-e66e-46f1-a469-b561649d15ab","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":228} +{"@t":"2018-11-12T09:09:53.2352718Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"0b269ea1-e66e-46f1-a469-b561649d15ab","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":3.9843,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":95,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":228} +{"@t":"2018-11-12T09:09:53.6127185Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"c808954","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:53.7202909Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":107,"TimingId":"c808954","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:53.7202909Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:58.7355804Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"fdfb977","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":95,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:58.8006867Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":65,"TimingId":"fdfb977","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":95,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:09:58.8016873Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":95,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:03.8122213Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"82bb2e9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":99,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:03.8680673Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":56,"TimingId":"82bb2e9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":99,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:03.8680673Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":99,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:08.8808815Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"345ee4b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:08.9472240Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":66,"TimingId":"345ee4b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:08.9492185Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:13.9517272Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"61b20ee","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:14.0326276Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":80,"TimingId":"61b20ee","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:14.0326276Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:18.4679546Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"43b25ef","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:18.4679546Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"43b25ef","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:18.4679546Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:19.0454797Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"6a9a9dd","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":87,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:19.1213890Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":75,"TimingId":"6a9a9dd","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":87,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:19.1213890Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":87,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:21.4295489Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:24.1243770Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"61d23ab","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:24.1711995Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":46,"TimingId":"61d23ab","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:24.1711995Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:24.7256826Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":95,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:25.2279335Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"6f7c7bc6-8890-479f-89e5-5fd80bd358c3","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":100,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":229} +{"@t":"2018-11-12T09:10:25.4138153Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"6f7c7bc6-8890-479f-89e5-5fd80bd358c3","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":184.88160000000002,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":229} +{"@t":"2018-11-12T09:10:29.1800455Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"bad96b5","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:29.2797933Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":99,"TimingId":"bad96b5","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:29.2797933Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:34.2803541Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"53cebee","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":100,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:34.3441628Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":63,"TimingId":"53cebee","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":100,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:34.3441628Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":100,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:39.3558468Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"ea4eeaf","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:39.4307690Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":75,"TimingId":"ea4eeaf","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:39.4317673Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:44.4340789Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"498b27d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:44.5158517Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":80,"TimingId":"498b27d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:44.5158517Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:49.5260092Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"39bffc1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:49.6286023Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":102,"TimingId":"39bffc1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:49.6315987Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:54.6421861Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"7b50abd","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:54.7249780Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":83,"TimingId":"7b50abd","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:54.7259533Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:58.2311703Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"30f635a0-107f-40c0-96fd-7aea69e0fbec","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":103,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":230} +{"@t":"2018-11-12T09:10:58.2361555Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"30f635a0-107f-40c0-96fd-7aea69e0fbec","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":3.9895,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":99,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":230} +{"@t":"2018-11-12T09:10:59.7323205Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"abb3c21","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":84,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:59.8061934Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":73,"TimingId":"abb3c21","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":84,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:10:59.8061934Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":84,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:04.8077886Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"c7f7ccd","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":88,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:04.8625516Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":54,"TimingId":"c7f7ccd","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":88,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:04.8625516Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":88,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:09.8711472Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"5281a33","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":98,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:09.9718246Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":100,"TimingId":"5281a33","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":98,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:09.9718246Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":98,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:14.9732674Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"c7075f1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:15.0660380Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":93,"TimingId":"c7075f1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:15.0670340Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:18.4723915Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"756ec53","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":88,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:18.4723915Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"756ec53","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":88,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:18.4723915Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":88,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:20.0729366Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e6f55da","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":80,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:20.1385661Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":66,"TimingId":"e6f55da","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":80,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:20.1385661Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":80,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:21.5293036Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:24.8829099Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:25.1538633Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"6383ced","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":87,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:25.2337244Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":80,"TimingId":"6383ced","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":87,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:25.2337244Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":87,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:30.2232256Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"978d2b36-2a95-4aa5-9e72-43c8f2d72195","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":87,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":231} +{"@t":"2018-11-12T09:11:30.2451673Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"a0077aa","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:30.2790757Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"978d2b36-2a95-4aa5-9e72-43c8f2d72195","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":55.850100000000005,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":88,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":231} +{"@t":"2018-11-12T09:11:30.3260195Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":81,"TimingId":"a0077aa","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:30.3260195Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:35.3390505Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"fb9e0fc","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":88,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:35.4053854Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":66,"TimingId":"fb9e0fc","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":88,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:35.4053854Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":88,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:40.4171110Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"b9450ba","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":88,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:40.4749042Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":58,"TimingId":"b9450ba","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":88,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:40.4749042Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":88,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:45.4779773Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"bddff0c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:45.5555632Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":77,"TimingId":"bddff0c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:45.5555632Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:50.5724989Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"c705acf","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:50.6922236Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":119,"TimingId":"c705acf","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:50.6922236Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:55.6956409Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"862e089","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:55.8384851Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":142,"TimingId":"862e089","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:11:55.8384851Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:00.8395307Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"b3b2e8f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:00.9528100Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":113,"TimingId":"b3b2e8f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:00.9528100Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:02.2284993Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"ebb5762f-be7b-45e8-b090-2cc46f5a8050","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":87,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":232} +{"@t":"2018-11-12T09:12:02.2324913Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"ebb5762f-be7b-45e8-b090-2cc46f5a8050","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":3.992,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":80,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":232} +{"@t":"2018-11-12T09:12:05.9660361Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"a5d8c2d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:06.0490150Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":83,"TimingId":"a5d8c2d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:06.0500091Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:11.0506584Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e48bf67","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":88,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:11.1306198Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":80,"TimingId":"e48bf67","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":88,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:11.1306198Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":88,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:16.1337997Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"6e8df33","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:16.1925079Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":58,"TimingId":"6e8df33","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:16.1925079Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:18.4786798Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"f8eb27b","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:18.4786798Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"f8eb27b","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:18.4796783Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":91,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:21.1930942Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"a179d34","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:21.3194419Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":126,"TimingId":"a179d34","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:21.3194419Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:21.6086625Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":85,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:25.0581109Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:26.3237387Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"989db5f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":85,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:26.4090752Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":85,"TimingId":"989db5f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":85,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:26.4090752Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":85,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:31.4098163Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"07d4e15","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:31.4917124Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":81,"TimingId":"07d4e15","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:31.4917124Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:35.2341729Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"5da5d4c5-3148-4b49-9dd0-e84c0dced323","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":79,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":233} +{"@t":"2018-11-12T09:12:35.4835316Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"5da5d4c5-3148-4b49-9dd0-e84c0dced323","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":248.3579,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":233} +{"@t":"2018-11-12T09:12:36.5085629Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"2e54a96","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:36.5574290Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":49,"TimingId":"2e54a96","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:36.5574290Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:41.5588489Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"d8a29bb","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:41.6266344Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":67,"TimingId":"d8a29bb","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:41.6266344Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:46.6277163Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"4c8b9fc","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:46.6887232Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":61,"TimingId":"4c8b9fc","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:46.6887232Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:51.6987725Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"1c13f1b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:51.7682999Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":69,"TimingId":"1c13f1b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:51.7682999Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:56.7704838Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"ebf76f3","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:56.8463071Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":75,"TimingId":"ebf76f3","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:12:56.8473048Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:01.8609052Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"966e7c3","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:01.9434369Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":82,"TimingId":"966e7c3","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:01.9444350Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:06.9565052Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"213093c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:07.0480172Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":91,"TimingId":"213093c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:07.0490201Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:07.2286819Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"78e8683d-eeaa-402a-8027-3a568a5da49d","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":85,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":234} +{"@t":"2018-11-12T09:13:07.2326711Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"78e8683d-eeaa-402a-8027-3a568a5da49d","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":3.9892000000000003,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":84,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":234} +{"@t":"2018-11-12T09:13:12.0622794Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"0e82acf","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:12.1211193Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":59,"TimingId":"0e82acf","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:12.1211193Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:17.1225467Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"5ad16ba","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:17.2073227Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":84,"TimingId":"5ad16ba","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:17.2073227Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:18.4834577Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"5e441f8","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":79,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:18.4834577Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"5e441f8","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":79,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:18.4834577Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":79,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:21.7164734Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:22.2157624Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"5833bac","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":85,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:22.2795445Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":64,"TimingId":"5833bac","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":85,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:22.2805530Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":85,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:25.2185296Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:27.2922351Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"7a6326a","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:27.3434348Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":51,"TimingId":"7a6326a","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:27.3444305Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:32.3568586Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"000df40","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:32.4356823Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":79,"TimingId":"000df40","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:32.4356823Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:37.4481116Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"949081d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:37.5149023Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":66,"TimingId":"949081d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:37.5149023Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:39.2301985Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"31c8f195-8a04-477f-a21f-19c92c0f6cef","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":68,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":235} +{"@t":"2018-11-12T09:13:39.4567349Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"31c8f195-8a04-477f-a21f-19c92c0f6cef","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":226.53640000000002,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":84,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":235} +{"@t":"2018-11-12T09:13:42.5307545Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"d05113b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:42.5835742Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":52,"TimingId":"d05113b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:42.5835742Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:47.5863555Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"f4107dc","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:47.6707142Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":84,"TimingId":"f4107dc","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:47.6707142Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:52.6723949Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"6af7b30","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:52.7392126Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":66,"TimingId":"6af7b30","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:52.7392126Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:57.7401422Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"de1a351","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:57.8239910Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":83,"TimingId":"de1a351","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:13:57.8239910Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:02.8246653Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"03f5bfe","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:02.8881436Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":62,"TimingId":"03f5bfe","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:02.8881436Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:07.9018286Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"f8f590d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:08.0278869Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":125,"TimingId":"f8f590d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:08.0278869Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:11.2257746Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"47539fd8-606a-4c3b-acab-b62d42783b0f","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":236} +{"@t":"2018-11-12T09:14:11.2297627Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"47539fd8-606a-4c3b-acab-b62d42783b0f","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":2.9885,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":82,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":236} +{"@t":"2018-11-12T09:14:13.0281889Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"214f4c6","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:13.1303644Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":102,"TimingId":"214f4c6","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:13.1313630Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:18.1319917Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"591ba6f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:18.2164626Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":84,"TimingId":"591ba6f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:18.2164626Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:18.4860800Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"85534ee","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":82,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:18.4860800Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"85534ee","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":82,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:18.4860800Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":82,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:20.5769522Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Keep alive executing","TimingId":"0b60a5d","SourceContext":"Umbraco.Web.Scheduling.KeepAlive","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":72,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:20.5927987Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"b152b1a3-f9cd-492c-afd6-1544031613a6","RequestUrl":"http://localhost:8000/umbraco/ping.aspx","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":237} +{"@t":"2018-11-12T09:14:20.5967790Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"b152b1a3-f9cd-492c-afd6-1544031613a6","RequestUrl":"http://localhost:8000/umbraco/ping.aspx","Duration":3.9803,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":237} +{"@t":"2018-11-12T09:14:20.5987742Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Keep alive complete","Duration":21,"TimingId":"0b60a5d","SourceContext":"Umbraco.Web.Scheduling.KeepAlive","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":66,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:20.5987742Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[KeepAlive] ","TaskType":"Umbraco.Web.Scheduling.KeepAlive","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":66,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:21.7865730Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:23.2187099Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"c653e5c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":82,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:23.3084576Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":89,"TimingId":"c653e5c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":82,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:23.3084576Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":82,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:25.3686558Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:28.3098072Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e8ef556","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:28.3641892Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":54,"TimingId":"e8ef556","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:28.3641892Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:33.3772034Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"5a987f1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:33.4322252Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":55,"TimingId":"5a987f1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:33.4322252Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:38.4490156Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"45035bc","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:38.5287704Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":80,"TimingId":"45035bc","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:38.5287704Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:43.2195879Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"52e47926-3da4-45e9-ab80-2c9d965e2a65","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":238} +{"@t":"2018-11-12T09:14:43.4363284Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"52e47926-3da4-45e9-ab80-2c9d965e2a65","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":216.7405,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":84,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":238} +{"@t":"2018-11-12T09:14:43.5303817Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"aed43d1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:43.5871833Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":57,"TimingId":"aed43d1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:43.5871833Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:48.5902408Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"d2d22ce","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":84,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:48.6626763Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":72,"TimingId":"d2d22ce","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":84,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:48.6626763Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":84,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:53.6729000Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"5a69208","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:53.7156931Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":42,"TimingId":"5a69208","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:53.7156931Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:58.7167080Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"ed24b59","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:58.7797415Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":62,"TimingId":"ed24b59","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:14:58.7797415Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":78,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:03.7813241Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"a52c22b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:03.8696754Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":87,"TimingId":"a52c22b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:03.8696754Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:08.8705046Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e41fefd","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:08.9444135Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":73,"TimingId":"e41fefd","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:08.9444135Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:13.9543548Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"2468c17","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:14.0181762Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":64,"TimingId":"2468c17","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:14.0181762Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:16.2330376Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"51fb41e4-bfe2-414f-be49-93c73e60a9c4","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":239} +{"@t":"2018-11-12T09:15:16.2390128Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"51fb41e4-bfe2-414f-be49-93c73e60a9c4","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":5.9752,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":68,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":239} +{"@t":"2018-11-12T09:15:18.4959170Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"0e6dfcd","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:18.4969636Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"0e6dfcd","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:18.4969636Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:19.0315308Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"0eec633","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:19.1063294Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":74,"TimingId":"0eec633","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:19.1063294Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:21.8745848Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:24.1070193Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e6e4971","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:24.2104245Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":103,"TimingId":"e6e4971","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:24.2104245Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:25.5534027Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:29.2239894Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"a341634","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:29.3164090Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":92,"TimingId":"a341634","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:29.3164090Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:34.3228129Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"d0f2fc9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":62,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:34.3874484Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":64,"TimingId":"d0f2fc9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":62,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:34.3874484Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":62,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:39.4028488Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"b6b8fff","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:39.4703689Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":67,"TimingId":"b6b8fff","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:39.4703689Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:44.4805014Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"9f59c2d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:44.5408013Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":60,"TimingId":"9f59c2d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:44.5408013Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:49.2207094Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"9481df12-85d8-4f89-8780-3a040e8c0bad","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":240} +{"@t":"2018-11-12T09:15:49.4144111Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"9481df12-85d8-4f89-8780-3a040e8c0bad","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":193.70170000000002,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":240} +{"@t":"2018-11-12T09:15:49.5433534Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"6f7f62b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":57,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:49.5902271Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":46,"TimingId":"6f7f62b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":57,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:49.5902271Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":57,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:54.6050203Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"1bf256e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:54.7165050Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":111,"TimingId":"1bf256e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:54.7165050Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:59.7290738Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"d46d218","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":62,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:59.9502958Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":221,"TimingId":"d46d218","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":62,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:15:59.9512675Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":62,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:04.9656428Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"5ebaac4","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":58,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:05.0454813Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":80,"TimingId":"5ebaac4","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":58,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:05.0464790Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":58,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:10.0594387Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"421b0fc","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:10.1239817Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":65,"TimingId":"421b0fc","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:10.1239817Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:15.1266339Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"8c9c195","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:15.2004713Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":74,"TimingId":"8c9c195","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:15.2004713Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:18.4984899Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"7267d91","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:18.4984899Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"7267d91","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:18.4984899Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:20.2027340Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"435ba48","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:20.2745425Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":71,"TimingId":"435ba48","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:20.2745425Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:21.9648555Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:22.2174515Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"2ffe6cb7-b350-4fc4-bf03-f4edada7455e","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":241} +{"@t":"2018-11-12T09:16:22.2194460Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"2ffe6cb7-b350-4fc4-bf03-f4edada7455e","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":1.9945000000000002,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":64,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":241} +{"@t":"2018-11-12T09:16:25.2903904Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"b8e0ce0","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:25.3627514Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":71,"TimingId":"b8e0ce0","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:25.3627514Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:25.7105838Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":64,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:30.3716588Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"d19d74b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":64,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:30.4654573Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":93,"TimingId":"d19d74b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":64,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:30.4654573Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":64,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:35.4657211Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"22be072","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:35.5589219Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":92,"TimingId":"22be072","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:35.5589219Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":65,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:40.5592442Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e901ada","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":44,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:40.6575771Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":98,"TimingId":"e901ada","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":44,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:40.6575771Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":44,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:45.6597790Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"292cda9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:45.7116339Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":51,"TimingId":"292cda9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:45.7116339Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:50.7204127Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"497e9da","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":60,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:50.7867111Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":66,"TimingId":"497e9da","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":60,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:50.7867111Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":60,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:55.2345826Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"2818a3d9-077f-437b-8090-65d7cf1c2744","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":242} +{"@t":"2018-11-12T09:16:55.4501574Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"2818a3d9-077f-437b-8090-65d7cf1c2744","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":215.5748,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":48,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":242} +{"@t":"2018-11-12T09:16:55.7993531Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e77e47e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:55.8655791Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":65,"TimingId":"e77e47e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:16:55.8655791Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:00.8762210Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"3bb03db","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:00.9329846Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":56,"TimingId":"3bb03db","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:00.9329846Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:05.9334172Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"0ba4d01","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:05.9919624Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":58,"TimingId":"0ba4d01","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:05.9919624Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:11.0064774Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"6e933ac","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":51,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:11.1031647Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":96,"TimingId":"6e933ac","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":51,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:11.1031647Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":51,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:16.1054087Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e35636c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:16.1753916Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":69,"TimingId":"e35636c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:16.1753916Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:18.5115687Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"60313d8","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":51,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:18.5115687Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"60313d8","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":51,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:18.5115687Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":51,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:21.1848258Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"c3027b2","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:21.2746398Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":90,"TimingId":"c3027b2","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:21.2746398Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:22.0427003Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":56,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:25.8934665Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:26.2775164Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"58d2fa1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":56,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:26.3323734Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":54,"TimingId":"58d2fa1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":56,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:26.3323734Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":56,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:28.2273720Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"d34fb5aa-8f61-4f49-b79b-f4b6df949207","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":243} +{"@t":"2018-11-12T09:17:28.2325173Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"d34fb5aa-8f61-4f49-b79b-f4b6df949207","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":4.4782,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":243} +{"@t":"2018-11-12T09:17:31.3431351Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"6866d7d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:31.4290257Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":85,"TimingId":"6866d7d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:31.4290257Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:36.4296843Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"01f803d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:36.4844873Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":54,"TimingId":"01f803d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:36.4844873Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:41.4851692Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"44e2d85","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:41.5818596Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":96,"TimingId":"44e2d85","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:41.5818596Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:46.5844836Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"20658a6","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:46.6702526Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":85,"TimingId":"20658a6","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:46.6702526Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:51.6838806Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"0a3b893","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:51.7267398Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":43,"TimingId":"0a3b893","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:51.7267398Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:56.7285251Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"7188efd","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:56.7931883Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":64,"TimingId":"7188efd","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:17:56.7931883Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:01.8087830Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"b6e2a25","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:01.8855733Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":76,"TimingId":"b6e2a25","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:01.8855733Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:02.2236713Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"a18dc76e-06ba-4385-b133-6167b33d6e5d","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":244} +{"@t":"2018-11-12T09:18:02.3632954Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"a18dc76e-06ba-4385-b133-6167b33d6e5d","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":138.6206,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":51,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":244} +{"@t":"2018-11-12T09:18:06.8872113Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"b459d5e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:06.9550171Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":67,"TimingId":"b459d5e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:06.9550171Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:11.9637799Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"ad5e563","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:12.0364361Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":72,"TimingId":"ad5e563","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:12.0364361Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:17.0391043Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e138f24","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:17.1278228Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":88,"TimingId":"e138f24","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:17.1278228Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:18.5161527Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"4ba6303","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:18.5161527Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"4ba6303","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:18.5161527Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:22.1294471Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:22.1394458Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"64fe31a","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":56,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:22.1743259Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":35,"TimingId":"64fe31a","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":56,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:22.1743259Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":56,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:26.0679155Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:27.1839664Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"ae8b82c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":56,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:27.2238299Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":39,"TimingId":"ae8b82c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":56,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:27.2238299Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":56,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:32.2334411Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"46c9e35","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:32.3162104Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":82,"TimingId":"46c9e35","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:32.3162104Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:34.2211206Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"0b5412f3-6936-489b-b9a0-ea348a514871","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":245} +{"@t":"2018-11-12T09:18:34.2251070Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"0b5412f3-6936-489b-b9a0-ea348a514871","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":2.9881,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":53,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":245} +{"@t":"2018-11-12T09:18:37.3259770Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"a8cead2","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:37.3996194Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":73,"TimingId":"a8cead2","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:37.3996194Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":69,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:42.4152232Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"744ce31","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:42.4810433Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":65,"TimingId":"744ce31","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:42.4810433Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:47.4826657Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"9424121","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:47.5654414Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":82,"TimingId":"9424121","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:47.5654414Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:52.5662220Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e81c243","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:52.6169348Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":51,"TimingId":"e81c243","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:52.6169348Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:57.6187295Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"19fc0b2","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:57.6784006Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":59,"TimingId":"19fc0b2","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:18:57.6784006Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:02.6920074Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"54bfddc","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:02.7667992Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":74,"TimingId":"54bfddc","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:02.7667992Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:07.2228869Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"e17fd926-4fbc-4725-94c3-6098696c594a","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":246} +{"@t":"2018-11-12T09:19:07.3994097Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"e17fd926-4fbc-4725-94c3-6098696c594a","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":175.52720000000002,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":43,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":246} +{"@t":"2018-11-12T09:19:07.7764765Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"d0dd6ef","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:07.8502039Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":73,"TimingId":"d0dd6ef","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:07.8502039Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:12.8638412Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"487b45f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:12.9595518Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":95,"TimingId":"487b45f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:12.9595518Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:17.9612313Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"5fd419c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:18.0299877Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":68,"TimingId":"5fd419c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:18.0299877Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:18.5266667Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"600a146","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":8,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:18.5266667Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"600a146","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":8,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:18.5266667Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":8,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:20.6090909Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Keep alive executing","TimingId":"77806c8","SourceContext":"Umbraco.Web.Scheduling.KeepAlive","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":13,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:20.6180724Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"ded929b4-8b7a-47c1-85b9-9b2ca84e4a2d","RequestUrl":"http://localhost:8000/umbraco/ping.aspx","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":247} +{"@t":"2018-11-12T09:19:20.6250763Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"ded929b4-8b7a-47c1-85b9-9b2ca84e4a2d","RequestUrl":"http://localhost:8000/umbraco/ping.aspx","Duration":7.0039000000000007,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":247} +{"@t":"2018-11-12T09:19:20.6260489Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Keep alive complete","Duration":17,"TimingId":"77806c8","SourceContext":"Umbraco.Web.Scheduling.KeepAlive","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":104,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:20.6260489Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[KeepAlive] ","TaskType":"Umbraco.Web.Scheduling.KeepAlive","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":104,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:22.2317522Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:23.0317570Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"c93a131","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":43,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:23.1004296Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":68,"TimingId":"c93a131","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":43,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:23.1004296Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":43,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:26.2141180Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:28.1120963Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"56ed3fe","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:28.1918552Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":79,"TimingId":"56ed3fe","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:28.1918552Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:33.1984312Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"ce94462","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:33.2632585Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":64,"TimingId":"ce94462","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:33.2642551Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:38.2758619Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"f490e5d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:38.3406840Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":64,"TimingId":"f490e5d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:38.3406840Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:41.2219809Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"49ecf103-6dc7-4fa0-9672-a81c6bc36a39","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":40,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":248} +{"@t":"2018-11-12T09:19:41.2299622Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"49ecf103-6dc7-4fa0-9672-a81c6bc36a39","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":6.9768,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":46,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":248} +{"@t":"2018-11-12T09:19:43.3453466Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"e340aec","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:43.4121244Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":66,"TimingId":"e340aec","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:43.4131212Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:48.4137561Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"76e6c66","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:48.4815736Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":68,"TimingId":"76e6c66","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:48.4815736Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:53.4833370Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"43675d6","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:53.5490348Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":65,"TimingId":"43675d6","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:53.5490348Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:58.5616230Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"ade7a7b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":46,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:58.6354209Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":74,"TimingId":"ade7a7b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":46,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:19:58.6354209Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":46,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:03.6362795Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"fff674b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":46,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:03.6899076Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":53,"TimingId":"fff674b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":46,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:03.6899076Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":46,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:08.6905431Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"44febae","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:08.7643392Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":73,"TimingId":"44febae","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:08.7643392Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:13.2244167Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"2b916335-35c9-4ca2-9b94-8f2b84ab208f","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":249} +{"@t":"2018-11-12T09:20:13.3750161Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"2b916335-35c9-4ca2-9b94-8f2b84ab208f","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":149.5932,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":45,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":249} +{"@t":"2018-11-12T09:20:13.7760693Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"df73f68","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:13.8427616Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":66,"TimingId":"df73f68","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:13.8427616Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:18.5423961Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"a5da4bd","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:18.5423961Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"a5da4bd","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:18.5423961Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":31,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:18.8554955Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"08b31bb","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":45,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:18.9301586Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":74,"TimingId":"08b31bb","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":45,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:18.9301586Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":45,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:22.3240865Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:23.9428979Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"5aa6ea2","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:24.0165594Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":73,"TimingId":"5aa6ea2","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:24.0165594Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:26.3383511Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:29.0261980Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"1d92203","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:29.0620709Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":35,"TimingId":"1d92203","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:29.0620709Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:34.0628380Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"30d3924","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:34.1295239Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":66,"TimingId":"30d3924","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:34.1295239Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:39.1381745Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"be4f8aa","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:39.1879955Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":49,"TimingId":"be4f8aa","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:39.1879955Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:44.1986051Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"ceea4b7","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:44.2753953Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":76,"TimingId":"ceea4b7","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:44.2753953Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:47.2195272Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"6c32d6dd-b50a-4fa5-bf85-08c5a248b79a","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":250} +{"@t":"2018-11-12T09:20:47.2235132Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"6c32d6dd-b50a-4fa5-bf85-08c5a248b79a","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":2.9877000000000002,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":250} +{"@t":"2018-11-12T09:20:49.2771469Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"95046bf","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:49.3548143Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":76,"TimingId":"95046bf","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:49.3548143Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:54.3544853Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"00f8b85","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:54.3893637Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":35,"TimingId":"00f8b85","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:54.3893637Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:59.4019826Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"a99ebd0","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":63,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:59.4358678Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":33,"TimingId":"a99ebd0","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":63,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:20:59.4358678Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":63,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:04.4484629Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"96d6b82","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":48,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:04.5402154Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":91,"TimingId":"96d6b82","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":48,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:04.5402154Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":48,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:09.5535031Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"68c8aac","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:09.6022163Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":48,"TimingId":"68c8aac","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:09.6022163Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:14.6153853Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"9ac4060","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:14.6871931Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":71,"TimingId":"9ac4060","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:14.6871931Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:18.5479557Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"6ec3ec8","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:18.5479557Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"6ec3ec8","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:18.5479557Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:19.2241462Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"64db50e3-4260-40ca-bed8-d3a51a4157cb","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":251} +{"@t":"2018-11-12T09:21:19.3847124Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"64db50e3-4260-40ca-bed8-d3a51a4157cb","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":159.5624,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":48,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":251} +{"@t":"2018-11-12T09:21:19.6978772Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"90bcdee","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":57,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:19.7676888Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":70,"TimingId":"90bcdee","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":57,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:19.7676888Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":57,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:22.4235891Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:24.7773413Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"1286b61","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:24.8590779Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":81,"TimingId":"1286b61","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:24.8590779Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:26.4667786Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:29.8708262Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"a440c2f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:29.9424870Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":71,"TimingId":"a440c2f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:29.9434868Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:34.9552487Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"eee2e67","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":57,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:35.0268925Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":71,"TimingId":"eee2e67","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":57,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:35.0268925Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":57,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:40.0306629Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"2c8a479","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:40.1272539Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":96,"TimingId":"2c8a479","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:40.1272539Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:45.1398543Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"5e29e96","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:45.2076727Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":67,"TimingId":"5e29e96","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:45.2076727Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:50.2192734Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"8d14c3e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":58,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:50.2691411Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":49,"TimingId":"8d14c3e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":58,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:50.2691411Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":58,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:51.2235876Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"5f1869e7-a660-4145-85a7-4205e3790159","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":252} +{"@t":"2018-11-12T09:21:51.2315691Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"5f1869e7-a660-4145-85a7-4205e3790159","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":6.9312000000000005,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":50,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":252} +{"@t":"2018-11-12T09:21:55.2797832Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"ecd7387","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:55.3236262Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":43,"TimingId":"ecd7387","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:21:55.3236262Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:00.3293478Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"6f216d6","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:00.3621532Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":32,"TimingId":"6f216d6","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:00.3621532Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:05.3639312Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"2821c58","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:05.4266129Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":63,"TimingId":"2821c58","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:05.4276100Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:10.4362559Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"65fea57","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":62,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:10.4930654Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":56,"TimingId":"65fea57","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":62,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:10.4930654Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":62,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:15.4938978Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"7348572","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:15.5626686Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":68,"TimingId":"7348572","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:15.5626686Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:18.5506835Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"e1ebf08","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:18.5506835Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"e1ebf08","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:18.5506835Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:20.5634173Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"68e0748","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":72,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:20.6371022Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":73,"TimingId":"68e0748","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":72,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:20.6371022Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":72,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:22.2288480Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"5fab8b8c-e0dc-4097-9953-3690019400d1","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":253} +{"@t":"2018-11-12T09:22:22.3874218Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"5fab8b8c-e0dc-4097-9953-3690019400d1","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":158.5738,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":253} +{"@t":"2018-11-12T09:22:22.4771851Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:25.6514496Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"b4955a2","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:25.6943435Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":42,"TimingId":"b4955a2","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:25.6943435Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:26.6174489Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:30.7038126Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"1ec865c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":62,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:30.7764888Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":72,"TimingId":"1ec865c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":62,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:30.7764888Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":62,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:35.7774395Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"b18fb97","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":62,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:35.8411552Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":63,"TimingId":"b18fb97","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":62,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:35.8411552Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":62,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:40.8565524Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"ac70150","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:40.9190813Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":73,"TimingId":"ac70150","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:40.9190813Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:45.9319603Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"f1d07d1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:46.0098302Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":82,"TimingId":"f1d07d1","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:46.0098302Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:51.0207400Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"df8133d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":73,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:51.0875388Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":66,"TimingId":"df8133d","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":73,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:51.0875388Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":73,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:55.2171584Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"ceb5b934-51d5-4389-bea6-b64c9d24e878","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":254} +{"@t":"2018-11-12T09:22:55.2191539Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"ceb5b934-51d5-4389-bea6-b64c9d24e878","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":1.9955,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":71,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":254} +{"@t":"2018-11-12T09:22:56.0889922Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"3cb2c99","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:56.1746183Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":85,"TimingId":"3cb2c99","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:22:56.1746183Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":17,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:01.1850970Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"9c758fe","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:01.2589107Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":73,"TimingId":"9c758fe","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:01.2589107Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:06.2725726Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"684f4e9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:06.3243527Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":52,"TimingId":"684f4e9","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:06.3243527Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:11.3257179Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"86ce17c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:11.3702180Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":51,"TimingId":"86ce17c","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:11.3702180Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:16.3839185Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"ae59c4f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:16.4692637Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":98,"TimingId":"ae59c4f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:16.4692637Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:18.5516577Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"76f703a","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:18.5516577Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"76f703a","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:18.5516577Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:21.4865579Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"9aa9f1b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:21.5538277Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":80,"TimingId":"9aa9f1b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:21.5538277Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:22.5651589Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":72,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:26.5687851Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"153f963","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:26.6000283Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":43,"TimingId":"153f963","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:26.6000283Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:26.7776739Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":72,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:28.2288188Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"d73da838-06d4-4318-9077-71e09632b43e","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":255} +{"@t":"2018-11-12T09:23:28.3834019Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"d73da838-06d4-4318-9077-71e09632b43e","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":153.5856,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":255} +{"@t":"2018-11-12T09:23:31.6009933Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"fd0733b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:31.6536878Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":66,"TimingId":"fd0733b","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:31.6536878Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:36.6541428Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"888ee80","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:36.7163956Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":73,"TimingId":"888ee80","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:36.7163956Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:41.7320661Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"f0bf6f2","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:41.7929865Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":60,"TimingId":"f0bf6f2","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:41.7929865Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:46.7950007Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"6a5296f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:46.8418766Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":47,"TimingId":"6a5296f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:46.8418766Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:51.8527184Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"11c4f20","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:51.9149970Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":66,"TimingId":"11c4f20","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:51.9149970Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:56.9316351Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"59a29f5","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:56.9785300Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":53,"TimingId":"59a29f5","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:23:56.9785300Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":67,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:24:00.2230318Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"d487e362-4a2f-4256-87f7-84e26f37991d","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":66,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":256} +{"@t":"2018-11-12T09:24:00.2320087Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"d487e362-4a2f-4256-87f7-84e26f37991d","RequestUrl":"http://localhost:8000/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds","Duration":7.9779,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":77,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":256} +{"@t":"2018-11-12T09:24:01.9896344Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"7f7352f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:24:02.0405050Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":50,"TimingId":"7f7352f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:24:02.0405050Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:24:07.0415529Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"b6c6588","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:24:07.1004561Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":72,"TimingId":"b6c6588","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:24:07.1004561Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:24:12.1155752Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"a387c0e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:24:12.1949596Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":79,"TimingId":"a387c0e","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:24:12.1959573Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:24:17.1972614Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"cfa4524","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:24:17.2749925Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":77,"TimingId":"cfa4524","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:24:17.2749925Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":70,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:24:18.5613436Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Scheduled tasks executing","TimingId":"4fc90ac","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":77,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:24:18.5613436Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Scheduled tasks complete","Duration":0,"TimingId":"4fc90ac","SourceContext":"Umbraco.Web.Scheduling.ScheduledTasks","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":77,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:24:18.5613436Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledTasks] ","TaskType":"Umbraco.Web.Scheduling.ScheduledTasks","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":77,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:24:20.6378988Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Keep alive executing","TimingId":"650ff0c","SourceContext":"Umbraco.Web.Scheduling.KeepAlive","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":64,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:24:20.6378988Z","@mt":"Begin request [{HttpRequestId}]: {RequestUrl}","@l":"Verbose","HttpRequestId":"350537e3-31c3-44c0-8c8e-a14aa7e40a45","RequestUrl":"http://localhost:8000/umbraco/ping.aspx","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":72,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":257} +{"@t":"2018-11-12T09:24:20.6378988Z","@mt":"End request [{HttpRequestId}]: {RequestUrl} took {Duration}ms","@l":"Verbose","HttpRequestId":"350537e3-31c3-44c0-8c8e-a14aa7e40a45","RequestUrl":"http://localhost:8000/umbraco/ping.aspx","Duration":0,"SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":72,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"ALL ","HttpRequestNumber":257} +{"@t":"2018-11-12T09:24:20.6532756Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Keep alive complete","Duration":19,"TimingId":"650ff0c","SourceContext":"Umbraco.Web.Scheduling.KeepAlive","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":48,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:24:20.6532756Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[KeepAlive] ","TaskType":"Umbraco.Web.Scheduling.KeepAlive","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":48,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:24:22.2760303Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"df6e94f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":72,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:24:22.3259059Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":49,"TimingId":"df6e94f","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":72,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:24:22.3259059Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":72,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:24:22.6590076Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerRegistration] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+TouchServerTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":61,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:24:26.8981241Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ScheduledPublishing] ","TaskType":"Umbraco.Web.Scheduling.ScheduledPublishing","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":72,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:24:27.3269877Z","@mt":"{StartMessage} [Timing {TimingId}]","@l":"Debug","StartMessage":"Syncing from database...","TimingId":"63ae611","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":61,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:24:27.4047607Z","@mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","@l":"Debug","EndMessage":"Completed.","Duration":78,"TimingId":"63ae611","SourceContext":"Umbraco.Core.Sync.DatabaseServerMessenger","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":61,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} +{"@t":"2018-11-12T09:24:27.4057583Z","@mt":"{LogPrefix} Task added {TaskType}","@l":"Debug","LogPrefix":"[ServerInstProcess] ","TaskType":"Umbraco.Web.Components.DatabaseServerRegistrarAndMessengerComponent+InstructionProcessTask","SourceContext":"Umbraco.Web.Scheduling.BackgroundTaskRunner","ProcessId":27004,"ProcessName":"iisexpress","ThreadId":61,"AppDomainId":2,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"DELLBOOK","Log4NetLevel":"DEBUG"} diff --git a/src/Umbraco.Tests/Logging/logviewer.searches.config.js b/src/Umbraco.Tests/Logging/logviewer.searches.config.js new file mode 100644 index 0000000000..25ee9b2242 --- /dev/null +++ b/src/Umbraco.Tests/Logging/logviewer.searches.config.js @@ -0,0 +1,42 @@ +[ + { + "name": "Find all logs where the Level is NOT Verbose and NOT Debug", + "query": "Not(@Level='Verbose') and Not(@Level='Debug')" + }, + { + "name": "Find all logs that has an exception property (Warning, Error & Critical with Exceptions)", + "query": "Has(@Exception)" + }, + { + "name": "Find all logs that have the property 'Duration'", + "query": "Has(Duration)" + }, + { + "name": "Find all logs that have the property 'Duration' and the duration is greater than 1000ms", + "query": "Has(Duration) and Duration > 1000" + }, + { + "name": "Find all logs that are from the namespace 'Umbraco.Core'", + "query": "StartsWith(SourceContext, 'Umbraco.Core')" + }, + { + "name": "Find all logs that use a specific log message template", + "query": "@MessageTemplate = '[Timing {TimingId}] {EndMessage} ({TimingDuration}ms)'" + }, + { + "name": "Find logs where one of the items in the SortedComponentTypes property array is equal to", + "query": "SortedComponentTypes[?] = 'Umbraco.Web.Search.ExamineComponent'" + }, + { + "name": "Find logs where one of the items in the SortedComponentTypes property array contains", + "query": "Contains(SortedComponentTypes[?], 'DatabaseServer')" + }, + { + "name": "Find all logs that the message has localhost in it with SQL like", + "query": "@Message like '%localhost%'" + }, + { + "name": "Find all logs that the message that starts with 'end' in it with SQL like", + "query": "@Message like 'end%'" + } +] diff --git a/src/Umbraco.Tests/Umbraco.Tests.csproj b/src/Umbraco.Tests/Umbraco.Tests.csproj index 156bc06a14..0e9d1e3cc0 100644 --- a/src/Umbraco.Tests/Umbraco.Tests.csproj +++ b/src/Umbraco.Tests/Umbraco.Tests.csproj @@ -119,6 +119,7 @@ + @@ -514,6 +515,9 @@ + + Always + Designer @@ -563,6 +567,9 @@ Designer Always + + Always + From b8409cdd2ec7e6ea0eac73cbde7426748ffd3dac Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Fri, 16 Nov 2018 13:44:29 +0000 Subject: [PATCH 075/437] Forgot to commit the test class file in previous commit But now we have our first test running, checking that it failed & it now passes as expected --- src/Umbraco.Tests/Logging/LogviewerTests.cs | 65 +++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 src/Umbraco.Tests/Logging/LogviewerTests.cs diff --git a/src/Umbraco.Tests/Logging/LogviewerTests.cs b/src/Umbraco.Tests/Logging/LogviewerTests.cs new file mode 100644 index 0000000000..6909083d08 --- /dev/null +++ b/src/Umbraco.Tests/Logging/LogviewerTests.cs @@ -0,0 +1,65 @@ +using NUnit.Framework; +using System; +using System.IO; +using Umbraco.Core.IO; +using Umbraco.Core.Logging.Viewer; + +namespace Umbraco.Tests.Logging +{ + [TestFixture] + public class LogviewerTests + { + private ILogViewer _logViewer; + + const string _logfileName = "UmbracoTraceLog.UNITTEST.20181112.json"; + const string _searchfileName = "logviewer.searches.config.js"; + + private string _newLogfilePath; + private string _newLogfileDirPath; + + private string _newSearchfilePath; + private string _newSearchfileDirPath; + + private DateTimeOffset _startDate = new DateTime(year: 2018, month: 11, day: 12, hour:0, minute:0, second:0); + private DateTimeOffset _endDate = new DateTime(year: 2018, month: 11, day: 13, hour: 0, minute: 0, second: 0); + + [OneTimeSetUp] + public void Setup() + { + //Create an example JSON log file to check results + //As a one time setup for all tets in this class/fixture + + var exampleLogfilePath = Path.Combine(TestContext.CurrentContext.TestDirectory, @"Logging\", _logfileName); + _newLogfileDirPath = Path.Combine(TestContext.CurrentContext.TestDirectory, @"App_Data\Logs\"); + _newLogfilePath = Path.Combine(_newLogfileDirPath, _logfileName); + + var exampleSearchfilePath = Path.Combine(TestContext.CurrentContext.TestDirectory, @"Logging\", _searchfileName); + _newSearchfileDirPath = Path.Combine(TestContext.CurrentContext.TestDirectory, @"Config\"); + _newSearchfilePath = Path.Combine(_newSearchfileDirPath, _searchfileName); + + //Create/ensure Directory exists + IOHelper.EnsurePathExists(_newLogfileDirPath); + IOHelper.EnsurePathExists(_newSearchfileDirPath); + + //Copy the sample files + File.Copy(exampleLogfilePath, _newLogfilePath, true); + File.Copy(exampleSearchfilePath, _newSearchfilePath, true); + + _logViewer = new JsonLogViewer(logsPath: _newLogfileDirPath, searchPath: _newSearchfilePath); + } + + [OneTimeTearDown] + public void TearDown() + { + //Cleanup & delete the example log & search files off disk + //Once all tests in this class/fixture have run + if (File.Exists(_newLogfilePath)) + File.Delete(_newLogfilePath); + + if (File.Exists(_newSearchfilePath)) + File.Delete(_newSearchfilePath); + } + + + } +} From 1d093b4ecb4e6555692bed1a66cbd6d32f2e6617 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Fri, 16 Nov 2018 13:45:34 +0000 Subject: [PATCH 076/437] Im clearly not with it today - heres that missing unit test --- src/Umbraco.Tests/Logging/LogviewerTests.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Umbraco.Tests/Logging/LogviewerTests.cs b/src/Umbraco.Tests/Logging/LogviewerTests.cs index 6909083d08..231f940022 100644 --- a/src/Umbraco.Tests/Logging/LogviewerTests.cs +++ b/src/Umbraco.Tests/Logging/LogviewerTests.cs @@ -60,6 +60,15 @@ namespace Umbraco.Tests.Logging File.Delete(_newSearchfilePath); } + [Test] + public void Logs_Contain_Correct_Error_Count() + { + var numberOfErrors = _logViewer.GetNumberOfErrors(startDate: _startDate, endDate: _endDate); + + //Our dummy log should contain 2 errors + Assert.AreEqual(2, numberOfErrors); + } + } } From c62f25c9a8b482a4eec4282fa453a6df724d53f3 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Fri, 16 Nov 2018 14:26:56 +0000 Subject: [PATCH 077/437] Adds two more new tests - perisistance with the saved search file & checking log counts are what we expect --- src/Umbraco.Tests/Logging/LogviewerTests.cs | 45 +++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/src/Umbraco.Tests/Logging/LogviewerTests.cs b/src/Umbraco.Tests/Logging/LogviewerTests.cs index 231f940022..8a0c7a5463 100644 --- a/src/Umbraco.Tests/Logging/LogviewerTests.cs +++ b/src/Umbraco.Tests/Logging/LogviewerTests.cs @@ -1,6 +1,7 @@ using NUnit.Framework; using System; using System.IO; +using System.Linq; using Umbraco.Core.IO; using Umbraco.Core.Logging.Viewer; @@ -69,6 +70,50 @@ namespace Umbraco.Tests.Logging Assert.AreEqual(2, numberOfErrors); } + [Test] + public void Logs_Contain_Correct_Log_Level_Counts() + { + var logCounts = _logViewer.GetLogLevelCounts(startDate: _startDate, endDate: _endDate); + + Assert.AreEqual(1954, logCounts.Debug); + Assert.AreEqual(2, logCounts.Error); + Assert.AreEqual(0, logCounts.Fatal); + Assert.AreEqual(62, logCounts.Information); + Assert.AreEqual(7, logCounts.Warning); + } + + [Test] + public void Log_Search_Can_Persist() + { + //Add a new search + _logViewer.AddSavedSearch("Unit Test Example", "Has(UnitTest)"); + + var searches = _logViewer.GetSavedSearches(); + + var savedSearch = new SavedLogSearch + { + Name = "Unit Test Example", + Query = "Has(UnitTest)" + }; + + //Check if we can find the newly added item from the results we get back + var findItem = searches.Where(x => x.Name == "Unit Test Example" && x.Query == "Has(UnitTest)"); + + Assert.IsNotNull(findItem, "We should have found the saved search, but get no results"); + Assert.AreEqual(1, findItem.Count(), "Our list of searches should only contain one result"); + + //TODO: Need someone to help me find out why these don't work + //CollectionAssert.Contains(searches, savedSearch, "Can not find the new search that was saved"); + //Assert.That(searches, Contains.Item(savedSearch)); + + //Remove the search from above & ensure it no longer exists + _logViewer.DeleteSavedSearch("Unit Test Example", "Has(UnitTest)"); + + searches = _logViewer.GetSavedSearches(); + findItem = searches.Where(x => x.Name == "Unit Test Example" && x.Query == "Has(UnitTest)"); + Assert.IsEmpty(findItem, "The search item should no longer exist"); + } + } } From f6b0b35ff797d14a57d8d06a6a5a58f6284cff1d Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Fri, 16 Nov 2018 15:16:18 +0000 Subject: [PATCH 078/437] Couple more tests for logviewer --- src/Umbraco.Tests/Logging/LogviewerTests.cs | 30 +++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/Umbraco.Tests/Logging/LogviewerTests.cs b/src/Umbraco.Tests/Logging/LogviewerTests.cs index 8a0c7a5463..55b96cc04b 100644 --- a/src/Umbraco.Tests/Logging/LogviewerTests.cs +++ b/src/Umbraco.Tests/Logging/LogviewerTests.cs @@ -82,6 +82,36 @@ namespace Umbraco.Tests.Logging Assert.AreEqual(7, logCounts.Warning); } + [Test] + public void Logs_Contains_Correct_Message_Templates() + { + var templates = _logViewer.GetMessageTemplates(startDate: _startDate, endDate: _endDate); + + //Count no of templates + Assert.AreEqual(43, templates.Count()); + + //Verify all templates & counts are unique + CollectionAssert.AllItemsAreUnique(templates); + + //Ensure the collection contains LogTemplate objects + CollectionAssert.AllItemsAreInstancesOfType(templates, typeof(LogTemplate)); + + //Get first item & verify its template & count are what we expect + var popularTemplate = templates.FirstOrDefault(); + + Assert.IsNotNull(popularTemplate); + Assert.AreEqual("{LogPrefix} Task added {TaskType}", popularTemplate.MessageTemplate); + Assert.AreEqual(689, popularTemplate.Count); + } + + [Test] + public void Logs_Can_Open_As_Small_File() + { + //We are just testing a return value (as we know the example file is less than 200MB) + //But this test method does not test/check that + var canOpenLogs = _logViewer.CheckCanOpenLogs(startDate: _startDate, endDate: _endDate); + Assert.IsTrue(canOpenLogs); + } [Test] public void Log_Search_Can_Persist() { From 28fa60ea46d6ab1173f58d48c8f9144b80aa7ca1 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Mon, 19 Nov 2018 14:22:29 +0000 Subject: [PATCH 079/437] Fix when querying logs with invalid log level passed in as a string filter - now checks its valid/part of the enum --- .../Logging/Viewer/LogViewerSourceBase.cs | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs index aede942ce0..59994a64a6 100644 --- a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs +++ b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs @@ -114,15 +114,29 @@ namespace Umbraco.Core.Logging.Viewer var filteredLogs = GetLogs(startDate, endDate, expression, 0, int.MaxValue); //This is user used the checkbox UI to toggle which log levels they wish to see - //If an empty array - its implied all levels to be viewed - if (logLevels.Length > 0) + //If an empty array or null - its implied all levels to be viewed + if (logLevels?.Length > 0) { var logsAfterLevelFilters = new List(); + bool validLogType = true; foreach (var level in logLevels) { - logsAfterLevelFilters.AddRange(filteredLogs.Where(x => x.Level.ToString() == level)); + //Check if level string is part of the LogEventLevel enum + if(Enum.IsDefined(typeof(LogEventLevel), level)) + { + validLogType = true; + logsAfterLevelFilters.AddRange(filteredLogs.Where(x => x.Level.ToString().ToLowerInvariant() == level.ToLowerInvariant())); + } + else + { + validLogType = false; + } + } + + if (validLogType) + { + filteredLogs = logsAfterLevelFilters; } - filteredLogs = logsAfterLevelFilters; } long totalRecords = filteredLogs.Count(); From 1452a702e07aa7dfa916ad4efbe2ef71ecb1f13c Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Mon, 19 Nov 2018 14:23:07 +0000 Subject: [PATCH 080/437] More tests for LogViewer around fetching logs & getting the results we expect back --- src/Umbraco.Tests/Logging/LogviewerTests.cs | 71 ++++++++++++++++++++- 1 file changed, 68 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Tests/Logging/LogviewerTests.cs b/src/Umbraco.Tests/Logging/LogviewerTests.cs index 55b96cc04b..2feac2ae5f 100644 --- a/src/Umbraco.Tests/Logging/LogviewerTests.cs +++ b/src/Umbraco.Tests/Logging/LogviewerTests.cs @@ -4,6 +4,7 @@ using System.IO; using System.Linq; using Umbraco.Core.IO; using Umbraco.Core.Logging.Viewer; +using Umbraco.Core.Persistence.DatabaseModelDefinitions; namespace Umbraco.Tests.Logging { @@ -74,7 +75,7 @@ namespace Umbraco.Tests.Logging public void Logs_Contain_Correct_Log_Level_Counts() { var logCounts = _logViewer.GetLogLevelCounts(startDate: _startDate, endDate: _endDate); - + Assert.AreEqual(1954, logCounts.Debug); Assert.AreEqual(2, logCounts.Error); Assert.AreEqual(0, logCounts.Fatal); @@ -112,6 +113,72 @@ namespace Umbraco.Tests.Logging var canOpenLogs = _logViewer.CheckCanOpenLogs(startDate: _startDate, endDate: _endDate); Assert.IsTrue(canOpenLogs); } + + [Test] + public void Logs_Can_Be_Queried() + { + //Should get me the most 100 recent log entries & using default overloads for remaining params + var allLogs = _logViewer.GetLogs(startDate: _startDate, endDate: _endDate, pageNumber: 1); + + //Check we get 100 results back for a page & total items all good :) + Assert.AreEqual(100, allLogs.Items.Count()); + Assert.AreEqual(2410, allLogs.TotalItems); + Assert.AreEqual(25, allLogs.TotalPages); + + //Check collection all contain same object type + CollectionAssert.AllItemsAreInstancesOfType(allLogs.Items, typeof(LogMessage)); + + //Check first item is newest + var newestItem = allLogs.Items.First(); + DateTimeOffset newDate; + DateTimeOffset.TryParse("2018-11-12T09:24:27.4057583Z", out newDate); + Assert.AreEqual(newDate, newestItem.Timestamp); + + + //Check we call method again with a smaller set of results & in ascending + var smallQuery = _logViewer.GetLogs(startDate: _startDate, endDate: _endDate, pageNumber: 1, pageSize: 10, orderDirection: Direction.Ascending); + Assert.AreEqual(10, smallQuery.Items.Count()); + Assert.AreEqual(241, smallQuery.TotalPages); + + //Check first item is oldest + var oldestItem = smallQuery.Items.First(); + DateTimeOffset oldDate; + DateTimeOffset.TryParse("2018-11-12T08:34:45.8371142Z", out oldDate); + Assert.AreEqual(oldDate, oldestItem.Timestamp); + + + //Check invalid log levels + //Rather than expect 0 items - get all items back & ignore the invalid levels + string[] invalidLogLevels = { "Invalid", "NotALevel" }; + var queryWithInvalidLevels = _logViewer.GetLogs(startDate: _startDate, endDate: _endDate, pageNumber: 1, logLevels: invalidLogLevels); + Assert.AreEqual(2410, queryWithInvalidLevels.TotalItems); + + //Check we can call method with an array of logLevel (error & warning) + string [] logLevels = { "Warning", "Error" }; + var queryWithLevels = _logViewer.GetLogs(startDate: _startDate, endDate: _endDate, pageNumber: 1, logLevels: logLevels); + Assert.AreEqual(9, queryWithLevels.TotalItems); + + //Query @Level='Warning' BUT we pass in array of LogLevels for Debug & Info (Expect to get 0 results) + string[] logLevelMismatch = { "Debug", "Information" }; + var filterLevelQuery = _logViewer.GetLogs(startDate: _startDate, endDate: _endDate, pageNumber: 1, filterExpression: "@Level='Warning'", logLevels: logLevelMismatch); ; + Assert.AreEqual(0, filterLevelQuery.TotalItems); + } + + [TestCase("", 2410)] + [TestCase("Has(@Exception)", 2)] + [TestCase("Has(Duration) and Duration > 1000", 13)] + [TestCase("Not(@Level = 'Verbose') and Not(@Level= 'Debug')", 71)] + [TestCase("StartsWith(SourceContext, 'Umbraco.Core')", 1183)] + [TestCase("@MessageTemplate = '{EndMessage} ({Duration}ms) [Timing {TimingId}]'", 622)] + [TestCase("SortedComponentTypes[?] = 'Umbraco.Web.Search.ExamineComponent'", 1)] + [TestCase("Contains(SortedComponentTypes[?], 'DatabaseServer')", 1)] + [Test] + public void Logs_Can_Query_With_Expressions(string queryToVerify, int expectedCount) + { + var testQuery = _logViewer.GetLogs(startDate: _startDate, endDate: _endDate, pageNumber: 1, filterExpression: queryToVerify); + Assert.AreEqual(expectedCount, testQuery.TotalItems); + } + [Test] public void Log_Search_Can_Persist() { @@ -143,7 +210,5 @@ namespace Umbraco.Tests.Logging findItem = searches.Where(x => x.Name == "Unit Test Example" && x.Query == "Has(UnitTest)"); Assert.IsEmpty(findItem, "The search item should no longer exist"); } - - } } From e8818b36bd80160ccfdd350bfed9a53a6ac2b7b9 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 26 Nov 2018 07:49:32 +0100 Subject: [PATCH 081/437] Media could not be moved to the root (The root was not available as target) --- src/Umbraco.Web/Models/Trees/TreeNode.cs | 1 + src/Umbraco.Web/Trees/ApplicationTreeController.cs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Models/Trees/TreeNode.cs b/src/Umbraco.Web/Models/Trees/TreeNode.cs index 01aa78ca36..fa1f8be310 100644 --- a/src/Umbraco.Web/Models/Trees/TreeNode.cs +++ b/src/Umbraco.Web/Models/Trees/TreeNode.cs @@ -35,6 +35,7 @@ namespace Umbraco.Web.Models.Trees CssClasses = new List(); //default Icon = "icon-folder-close"; + Path = "-1"; } [DataMember(Name = "parentId", IsRequired = true)] diff --git a/src/Umbraco.Web/Trees/ApplicationTreeController.cs b/src/Umbraco.Web/Trees/ApplicationTreeController.cs index c1192b6909..dd5e38e5fa 100644 --- a/src/Umbraco.Web/Trees/ApplicationTreeController.cs +++ b/src/Umbraco.Web/Trees/ApplicationTreeController.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Globalization; using System.Linq; using System.Net; @@ -21,7 +22,7 @@ namespace Umbraco.Web.Trees [AngularJsonOnlyConfiguration] [PluginController("UmbracoTrees")] public class ApplicationTreeController : UmbracoAuthorizedApiController - { + { /// /// Returns the tree nodes for an application /// @@ -184,6 +185,7 @@ namespace Umbraco.Web.Trees //assign the route path based on the root node, this means it will route there when the section is navigated to //and no dashboards will be available for this section sectionRoot.RoutePath = rootNode.Result.RoutePath; + sectionRoot.Path = rootNode.Result.Path; foreach (var d in rootNode.Result.AdditionalData) { From a50a46f9fa233dc4deb6a8015ef52f696f382b44 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 26 Nov 2018 07:50:15 +0100 Subject: [PATCH 082/437] Alt of "close dialog" buttons was not functioning on the success message --- src/Umbraco.Web.UI.Client/src/views/content/copy.html | 2 +- src/Umbraco.Web.UI.Client/src/views/content/move.html | 6 +++--- src/Umbraco.Web.UI.Client/src/views/documenttypes/copy.html | 2 +- src/Umbraco.Web.UI.Client/src/views/documenttypes/move.html | 2 +- src/Umbraco.Web.UI.Client/src/views/media/move.html | 4 ++-- src/Umbraco.Web.UI.Client/src/views/media/restore.html | 2 +- src/Umbraco.Web.UI.Client/src/views/mediatypes/copy.html | 2 +- src/Umbraco.Web.UI.Client/src/views/mediatypes/move.html | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/content/copy.html b/src/Umbraco.Web.UI.Client/src/views/content/copy.html index 03a024c439..14ea54cf42 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/copy.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/copy.html @@ -14,7 +14,7 @@ {{currentNode.name}} was copied to {{target.name}}
- +

diff --git a/src/Umbraco.Web.UI.Client/src/views/content/move.html b/src/Umbraco.Web.UI.Client/src/views/content/move.html index 708c3d3f82..c713bd90e7 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/move.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/move.html @@ -13,13 +13,13 @@

{{currentNode.name}} was moved underneath {{target.name}}
- +

Choose where to move {{currentNode.name}} - to in the tree structure below + to in the tree structure below

@@ -29,7 +29,7 @@
- {{currentNode.name}} was copied underneath {{target.name}}
- +
diff --git a/src/Umbraco.Web.UI.Client/src/views/documenttypes/move.html b/src/Umbraco.Web.UI.Client/src/views/documenttypes/move.html index af0ce58227..aada5193ec 100644 --- a/src/Umbraco.Web.UI.Client/src/views/documenttypes/move.html +++ b/src/Umbraco.Web.UI.Client/src/views/documenttypes/move.html @@ -22,7 +22,7 @@
{{currentNode.name}} was moved underneath {{target.name}}
- +
diff --git a/src/Umbraco.Web.UI.Client/src/views/media/move.html b/src/Umbraco.Web.UI.Client/src/views/media/move.html index 6d93eb4e22..15d38a6130 100644 --- a/src/Umbraco.Web.UI.Client/src/views/media/move.html +++ b/src/Umbraco.Web.UI.Client/src/views/media/move.html @@ -13,7 +13,7 @@
{{currentNode.name}} was moved underneath {{target.name}}
- +

@@ -23,7 +23,7 @@

- +

{{currentNode.name}} was moved underneath {{target.name}}

- +
diff --git a/src/Umbraco.Web.UI.Client/src/views/mediatypes/copy.html b/src/Umbraco.Web.UI.Client/src/views/mediatypes/copy.html index 3d8c3b0845..2f2fe336b0 100644 --- a/src/Umbraco.Web.UI.Client/src/views/mediatypes/copy.html +++ b/src/Umbraco.Web.UI.Client/src/views/mediatypes/copy.html @@ -22,7 +22,7 @@
{{currentNode.name}} was copied underneath {{target.name}}
- +
diff --git a/src/Umbraco.Web.UI.Client/src/views/mediatypes/move.html b/src/Umbraco.Web.UI.Client/src/views/mediatypes/move.html index 1ae686f5d5..2230f4a1a8 100644 --- a/src/Umbraco.Web.UI.Client/src/views/mediatypes/move.html +++ b/src/Umbraco.Web.UI.Client/src/views/mediatypes/move.html @@ -22,7 +22,7 @@
{{currentNode.name}} was moved underneath {{target.name}}
- +
From ec24ebf93c67db5214c4cde2a9cb0c9508713b61 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Tue, 11 Dec 2018 17:00:43 +0100 Subject: [PATCH 083/437] Fix media type copying and move media type service unit tests to a separate class --- src/Umbraco.Core/Models/ContentType.cs | 3 + src/Umbraco.Core/Models/ContentTypeBase.cs | 4 +- src/Umbraco.Core/Models/MediaType.cs | 26 +-- ...peServiceBaseOfTRepositoryTItemTService.cs | 4 +- .../Services/ContentTypeServiceTests.cs | 116 +---------- .../Services/MediaTypeServiceTests.cs | 195 ++++++++++++++++++ src/Umbraco.Tests/Umbraco.Tests.csproj | 1 + 7 files changed, 209 insertions(+), 140 deletions(-) create mode 100644 src/Umbraco.Tests/Services/MediaTypeServiceTests.cs diff --git a/src/Umbraco.Core/Models/ContentType.cs b/src/Umbraco.Core/Models/ContentType.cs index e6439acade..4b9831682c 100644 --- a/src/Umbraco.Core/Models/ContentType.cs +++ b/src/Umbraco.Core/Models/ContentType.cs @@ -160,5 +160,8 @@ namespace Umbraco.Core.Models return result; } + + /// + IContentType IContentType.DeepCloneWithResetIdentities(string newAlias) => (IContentType)DeepCloneWithResetIdentities(newAlias); } } diff --git a/src/Umbraco.Core/Models/ContentTypeBase.cs b/src/Umbraco.Core/Models/ContentTypeBase.cs index caa63d7526..79c2d4218b 100644 --- a/src/Umbraco.Core/Models/ContentTypeBase.cs +++ b/src/Umbraco.Core/Models/ContentTypeBase.cs @@ -492,9 +492,9 @@ namespace Umbraco.Core.Models } } - public IContentType DeepCloneWithResetIdentities(string alias) + public ContentTypeBase DeepCloneWithResetIdentities(string alias) { - var clone = (ContentType)DeepClone(); + var clone = (ContentTypeBase)DeepClone(); clone.Alias = alias; clone.Key = Guid.Empty; foreach (var propertyGroup in clone.PropertyGroups) diff --git a/src/Umbraco.Core/Models/MediaType.cs b/src/Umbraco.Core/Models/MediaType.cs index 4ae2fd190c..83e1acfbc0 100644 --- a/src/Umbraco.Core/Models/MediaType.cs +++ b/src/Umbraco.Core/Models/MediaType.cs @@ -44,29 +44,7 @@ namespace Umbraco.Core.Models /// public override bool IsPublishing => IsPublishingConst; - /// - /// Creates a deep clone of the current entity with its identity/alias and it's property identities reset - /// - /// - public new IMediaType DeepCloneWithResetIdentities(string alias) - { - var clone = (MediaType)DeepClone(); - clone.Alias = alias; - clone.Key = Guid.Empty; - foreach (var propertyGroup in clone.PropertyGroups) - { - propertyGroup.ResetIdentity(); - propertyGroup.ResetDirtyProperties(false); - } - foreach (var propertyType in clone.PropertyTypes) - { - propertyType.ResetIdentity(); - propertyType.ResetDirtyProperties(false); - } - - clone.ResetIdentity(); - clone.ResetDirtyProperties(false); - return clone; - } + /// + IMediaType IMediaType.DeepCloneWithResetIdentities(string newAlias) => (IMediaType)DeepCloneWithResetIdentities(newAlias); } } diff --git a/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs b/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs index b74abc03f7..feff81978c 100644 --- a/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs +++ b/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs @@ -594,7 +594,7 @@ namespace Umbraco.Core.Services.Implement //var originalb = (ContentTypeCompositionBase)original; // but we *know* it has to be a ContentTypeCompositionBase anyways var originalb = (ContentTypeCompositionBase) (object) original; - var clone = (TItem) originalb.DeepCloneWithResetIdentities(alias); + var clone = (TItem) (object) originalb.DeepCloneWithResetIdentities(alias); clone.Name = name; @@ -645,7 +645,7 @@ namespace Umbraco.Core.Services.Implement //var copyingb = (ContentTypeCompositionBase) copying; // but we *know* it has to be a ContentTypeCompositionBase anyways var copyingb = (ContentTypeCompositionBase) (object)copying; - copy = (TItem) copyingb.DeepCloneWithResetIdentities(alias); + copy = (TItem) (object) copyingb.DeepCloneWithResetIdentities(alias); copy.Name = copy.Name + " (copy)"; // might not be unique diff --git a/src/Umbraco.Tests/Services/ContentTypeServiceTests.cs b/src/Umbraco.Tests/Services/ContentTypeServiceTests.cs index bc0854bdb7..30067b3c5a 100644 --- a/src/Umbraco.Tests/Services/ContentTypeServiceTests.cs +++ b/src/Umbraco.Tests/Services/ContentTypeServiceTests.cs @@ -376,46 +376,6 @@ namespace Umbraco.Tests.Services Assert.IsNull(doc2.GetValue("title", "en-US")); } - [Test] - public void Deleting_Media_Type_With_Hierarchy_Of_Media_Items_Moves_Orphaned_Media_To_Recycle_Bin() - { - IMediaType contentType1 = MockedContentTypes.CreateSimpleMediaType("test1", "Test1"); - ServiceContext.MediaTypeService.Save(contentType1); - IMediaType contentType2 = MockedContentTypes.CreateSimpleMediaType("test2", "Test2"); - ServiceContext.MediaTypeService.Save(contentType2); - IMediaType contentType3 = MockedContentTypes.CreateSimpleMediaType("test3", "Test3"); - ServiceContext.MediaTypeService.Save(contentType3); - - var contentTypes = new[] { contentType1, contentType2, contentType3 }; - var parentId = -1; - - var ids = new List(); - - for (int i = 0; i < 2; i++) - { - for (var index = 0; index < contentTypes.Length; index++) - { - var contentType = contentTypes[index]; - var contentItem = MockedMedia.CreateSimpleMedia(contentType, "MyName_" + index + "_" + i, parentId); - ServiceContext.MediaService.Save(contentItem); - parentId = contentItem.Id; - - ids.Add(contentItem.Id); - } - } - - //delete the first content type, all other content of different content types should be in the recycle bin - ServiceContext.MediaTypeService.Delete(contentTypes[0]); - - var found = ServiceContext.MediaService.GetByIds(ids); - - Assert.AreEqual(4, found.Count()); - foreach (var content in found) - { - Assert.IsTrue(content.Trashed); - } - } - [Test] public void Deleting_Content_Type_With_Hierarchy_Of_Content_Items_Moves_Orphaned_Content_To_Recycle_Bin() { @@ -460,60 +420,6 @@ namespace Umbraco.Tests.Services } } - [Test] - public void Deleting_Media_Types_With_Hierarchy_Of_Media_Items_Doesnt_Raise_Trashed_Event_For_Deleted_Items() - { - MediaService.Trashed += MediaServiceOnTrashed; - - try - { - IMediaType contentType1 = MockedContentTypes.CreateSimpleMediaType("test1", "Test1"); - ServiceContext.MediaTypeService.Save(contentType1); - IMediaType contentType2 = MockedContentTypes.CreateSimpleMediaType("test2", "Test2"); - ServiceContext.MediaTypeService.Save(contentType2); - IMediaType contentType3 = MockedContentTypes.CreateSimpleMediaType("test3", "Test3"); - ServiceContext.MediaTypeService.Save(contentType3); - - var contentTypes = new[] { contentType1, contentType2, contentType3 }; - var parentId = -1; - - var ids = new List(); - - for (int i = 0; i < 2; i++) - { - for (var index = 0; index < contentTypes.Length; index++) - { - var contentType = contentTypes[index]; - var contentItem = MockedMedia.CreateSimpleMedia(contentType, "MyName_" + index + "_" + i, parentId); - ServiceContext.MediaService.Save(contentItem); - parentId = contentItem.Id; - - ids.Add(contentItem.Id); - } - } - - foreach (var contentType in contentTypes.Reverse()) - { - ServiceContext.MediaTypeService.Delete(contentType); - } - } - finally - { - MediaService.Trashed -= MediaServiceOnTrashed; - } - } - - private void MediaServiceOnTrashed(IMediaService sender, MoveEventArgs e) - { - foreach (var item in e.MoveInfoCollection) - { - //if this item doesn't exist then Fail! - var exists = ServiceContext.MediaService.GetById(item.Entity.Id); - if (exists == null) - Assert.Fail("The item doesn't exist"); - } - } - [Test] public void Deleting_Content_Types_With_Hierarchy_Of_Content_Items_Doesnt_Raise_Trashed_Event_For_Deleted_Items_1() { @@ -1078,12 +984,13 @@ namespace Umbraco.Tests.Services var metaContentType = MockedContentTypes.CreateMetaContentType(); service.Save(metaContentType); - var simpleContentType = MockedContentTypes.CreateSimpleContentType("category", "Category", metaContentType); + var simpleContentType = MockedContentTypes.CreateSimpleContentType("category", "Category", metaContentType) as IContentType; service.Save(simpleContentType); var categoryId = simpleContentType.Id; // Act var sut = simpleContentType.DeepCloneWithResetIdentities("newcategory"); + Assert.IsNotNull(sut); service.Save(sut); // Assert @@ -1115,11 +1022,12 @@ namespace Umbraco.Tests.Services var parentContentType2 = MockedContentTypes.CreateSimpleContentType("parent2", "Parent2", null, true); service.Save(parentContentType2); - var simpleContentType = MockedContentTypes.CreateSimpleContentType("category", "Category", parentContentType1, true); + var simpleContentType = MockedContentTypes.CreateSimpleContentType("category", "Category", parentContentType1, true) as IContentType; service.Save(simpleContentType); // Act var clone = simpleContentType.DeepCloneWithResetIdentities("newcategory"); + Assert.IsNotNull(clone); clone.RemoveContentType("parent1"); clone.AddContentType(parentContentType2); clone.ParentId = parentContentType2.Id; @@ -2068,22 +1976,6 @@ namespace Umbraco.Tests.Services Assert.IsNull(contentType2.Description); } - [Test] - public void Empty_Description_Is_Always_Null_After_Saving_Media_Type() - { - var service = ServiceContext.MediaTypeService; - var mediaType = MockedContentTypes.CreateSimpleMediaType("mediaType", "Media Type"); - mediaType.Description = null; - service.Save(mediaType); - - var mediaType2 = MockedContentTypes.CreateSimpleMediaType("mediaType2", "Media Type 2"); - mediaType2.Description = string.Empty; - service.Save(mediaType2); - - Assert.IsNull(mediaType.Description); - Assert.IsNull(mediaType2.Description); - } - [Test] public void Variations_In_Compositions() { diff --git a/src/Umbraco.Tests/Services/MediaTypeServiceTests.cs b/src/Umbraco.Tests/Services/MediaTypeServiceTests.cs new file mode 100644 index 0000000000..915dc5ceec --- /dev/null +++ b/src/Umbraco.Tests/Services/MediaTypeServiceTests.cs @@ -0,0 +1,195 @@ +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using NUnit.Framework; +using Umbraco.Core.Events; +using Umbraco.Core.Models; +using Umbraco.Core.Services; +using Umbraco.Core.Services.Implement; +using Umbraco.Tests.TestHelpers.Entities; +using Umbraco.Tests.Testing; + +namespace Umbraco.Tests.Services +{ + [TestFixture] + [Apartment(ApartmentState.STA)] + [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest, PublishedRepositoryEvents = true)] + public class MediaTypeServiceTests : TestWithSomeContentBase + { + [Test] + public void Empty_Description_Is_Always_Null_After_Saving_Media_Type() + { + var mediaType = MockedContentTypes.CreateSimpleMediaType("mediaType", "Media Type"); + mediaType.Description = null; + ServiceContext.MediaTypeService.Save(mediaType); + + var mediaType2 = MockedContentTypes.CreateSimpleMediaType("mediaType2", "Media Type 2"); + mediaType2.Description = string.Empty; + ServiceContext.MediaTypeService.Save(mediaType2); + + Assert.IsNull(mediaType.Description); + Assert.IsNull(mediaType2.Description); + } + + [Test] + public void Deleting_Media_Type_With_Hierarchy_Of_Media_Items_Moves_Orphaned_Media_To_Recycle_Bin() + { + IMediaType contentType1 = MockedContentTypes.CreateSimpleMediaType("test1", "Test1"); + ServiceContext.MediaTypeService.Save(contentType1); + IMediaType contentType2 = MockedContentTypes.CreateSimpleMediaType("test2", "Test2"); + ServiceContext.MediaTypeService.Save(contentType2); + IMediaType contentType3 = MockedContentTypes.CreateSimpleMediaType("test3", "Test3"); + ServiceContext.MediaTypeService.Save(contentType3); + + var contentTypes = new[] { contentType1, contentType2, contentType3 }; + var parentId = -1; + + var ids = new List(); + + for (int i = 0; i < 2; i++) + { + for (var index = 0; index < contentTypes.Length; index++) + { + var contentType = contentTypes[index]; + var contentItem = MockedMedia.CreateSimpleMedia(contentType, "MyName_" + index + "_" + i, parentId); + ServiceContext.MediaService.Save(contentItem); + parentId = contentItem.Id; + + ids.Add(contentItem.Id); + } + } + + //delete the first content type, all other content of different content types should be in the recycle bin + ServiceContext.MediaTypeService.Delete(contentTypes[0]); + + var found = ServiceContext.MediaService.GetByIds(ids); + + Assert.AreEqual(4, found.Count()); + foreach (var content in found) + { + Assert.IsTrue(content.Trashed); + } + } + + [Test] + public void Deleting_Media_Types_With_Hierarchy_Of_Media_Items_Doesnt_Raise_Trashed_Event_For_Deleted_Items() + { + MediaService.Trashed += MediaServiceOnTrashed; + + try + { + IMediaType contentType1 = MockedContentTypes.CreateSimpleMediaType("test1", "Test1"); + ServiceContext.MediaTypeService.Save(contentType1); + IMediaType contentType2 = MockedContentTypes.CreateSimpleMediaType("test2", "Test2"); + ServiceContext.MediaTypeService.Save(contentType2); + IMediaType contentType3 = MockedContentTypes.CreateSimpleMediaType("test3", "Test3"); + ServiceContext.MediaTypeService.Save(contentType3); + + var contentTypes = new[] { contentType1, contentType2, contentType3 }; + var parentId = -1; + + var ids = new List(); + + for (int i = 0; i < 2; i++) + { + for (var index = 0; index < contentTypes.Length; index++) + { + var contentType = contentTypes[index]; + var contentItem = MockedMedia.CreateSimpleMedia(contentType, "MyName_" + index + "_" + i, parentId); + ServiceContext.MediaService.Save(contentItem); + parentId = contentItem.Id; + + ids.Add(contentItem.Id); + } + } + + foreach (var contentType in contentTypes.Reverse()) + { + ServiceContext.MediaTypeService.Delete(contentType); + } + } + finally + { + MediaService.Trashed -= MediaServiceOnTrashed; + } + } + + private void MediaServiceOnTrashed(IMediaService sender, MoveEventArgs e) + { + foreach (var item in e.MoveInfoCollection) + { + //if this item doesn't exist then Fail! + var exists = ServiceContext.MediaService.GetById(item.Entity.Id); + if (exists == null) + Assert.Fail("The item doesn't exist"); + } + } + + [Test] + public void Can_Copy_MediaType_By_Performing_Clone() + { + // Arrange + var mediaType = MockedContentTypes.CreateImageMediaType("Image2") as IMediaType; + ServiceContext.MediaTypeService.Save(mediaType); + + // Act + var sut = mediaType.DeepCloneWithResetIdentities("Image2_2"); + Assert.IsNotNull(sut); + ServiceContext.MediaTypeService.Save(sut); + + // Assert + Assert.That(sut.HasIdentity, Is.True); + Assert.AreEqual(mediaType.ParentId, sut.ParentId); + Assert.AreEqual(mediaType.Level, sut.Level); + Assert.AreEqual(mediaType.PropertyTypes.Count(), sut.PropertyTypes.Count()); + Assert.AreNotEqual(mediaType.Id, sut.Id); + Assert.AreNotEqual(mediaType.Key, sut.Key); + Assert.AreNotEqual(mediaType.Path, sut.Path); + Assert.AreNotEqual(mediaType.SortOrder, sut.SortOrder); + Assert.AreNotEqual(mediaType.PropertyTypes.First(x => x.Alias.Equals("umbracoFile")).Id, sut.PropertyTypes.First(x => x.Alias.Equals("umbracoFile")).Id); + Assert.AreNotEqual(mediaType.PropertyGroups.First(x => x.Name.Equals("Media")).Id, sut.PropertyGroups.First(x => x.Name.Equals("Media")).Id); + } + + [Test] + public void Can_Copy_MediaType_To_New_Parent_By_Performing_Clone() + { + // Arrange + var parentMediaType1 = MockedContentTypes.CreateSimpleMediaType("parent1", "Parent1"); + ServiceContext.MediaTypeService.Save(parentMediaType1); + var parentMediaType2 = MockedContentTypes.CreateSimpleMediaType("parent2", "Parent2", null, true); + ServiceContext.MediaTypeService.Save(parentMediaType2); + var mediaType = MockedContentTypes.CreateImageMediaType("Image2") as IMediaType; + ServiceContext.MediaTypeService.Save(mediaType); + + // Act + var clone = mediaType.DeepCloneWithResetIdentities("newcategory"); + Assert.IsNotNull(clone); + clone.RemoveContentType("parent1"); + clone.AddContentType(parentMediaType2); + clone.ParentId = parentMediaType2.Id; + ServiceContext.MediaTypeService.Save(clone); + + // Assert + Assert.That(clone.HasIdentity, Is.True); + + var clonedMediaType = ServiceContext.MediaTypeService.Get(clone.Id); + var originalMediaType = ServiceContext.MediaTypeService.Get(mediaType.Id); + + Assert.That(clonedMediaType.CompositionAliases().Any(x => x.Equals("parent2")), Is.True); + Assert.That(clonedMediaType.CompositionAliases().Any(x => x.Equals("parent1")), Is.False); + + Assert.AreEqual(clonedMediaType.Path, "-1," + parentMediaType2.Id + "," + clonedMediaType.Id); + Assert.AreEqual(clonedMediaType.PropertyTypes.Count(), originalMediaType.PropertyTypes.Count()); + + Assert.AreNotEqual(clonedMediaType.ParentId, originalMediaType.ParentId); + Assert.AreEqual(clonedMediaType.ParentId, parentMediaType2.Id); + + Assert.AreNotEqual(clonedMediaType.Id, originalMediaType.Id); + Assert.AreNotEqual(clonedMediaType.Key, originalMediaType.Key); + Assert.AreNotEqual(clonedMediaType.Path, originalMediaType.Path); + + Assert.AreNotEqual(clonedMediaType.PropertyTypes.First(x => x.Alias.StartsWith("umbracoFile")).Id, originalMediaType.PropertyTypes.First(x => x.Alias.StartsWith("umbracoFile")).Id); + Assert.AreNotEqual(clonedMediaType.PropertyGroups.First(x => x.Name.StartsWith("Media")).Id, originalMediaType.PropertyGroups.First(x => x.Name.StartsWith("Media")).Id); + } + } +} diff --git a/src/Umbraco.Tests/Umbraco.Tests.csproj b/src/Umbraco.Tests/Umbraco.Tests.csproj index 7147cc8453..1286248b86 100644 --- a/src/Umbraco.Tests/Umbraco.Tests.csproj +++ b/src/Umbraco.Tests/Umbraco.Tests.csproj @@ -132,6 +132,7 @@ + From 8304ada5287f416b9495aa638dbe45523c31351d Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Fri, 4 Jan 2019 11:39:33 +0100 Subject: [PATCH 084/437] #3417 added create view --- src/Umbraco.Web.UI.Client/src/views/macros/create.html | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 src/Umbraco.Web.UI.Client/src/views/macros/create.html diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/create.html b/src/Umbraco.Web.UI.Client/src/views/macros/create.html new file mode 100644 index 0000000000..337ebfdaa5 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/macros/create.html @@ -0,0 +1,3 @@ +
+

Create view

+
From bb6848dd0372110be227bc9918c3ff45afc7b3ba Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Fri, 4 Jan 2019 11:44:23 +0100 Subject: [PATCH 085/437] #3417 renamed existing macrocontroller to macro rendering controller --- src/Umbraco.Web/Editors/BackOfficeServerVariables.cs | 2 +- .../{MacroController.cs => MacroRenderingController.cs} | 4 ++-- src/Umbraco.Web/Umbraco.Web.csproj | 2 +- src/Umbraco.Web/umbraco.presentation/page.cs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename src/Umbraco.Web/Editors/{MacroController.cs => MacroRenderingController.cs} (97%) diff --git a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs index 5bc01fa534..aab5f13479 100644 --- a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs +++ b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs @@ -169,7 +169,7 @@ namespace Umbraco.Web.Editors controller => controller.GetAllowedChildren(0)) }, { - "macroApiBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl( + "macroApiBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl( controller => controller.GetMacroParameters(0)) }, { diff --git a/src/Umbraco.Web/Editors/MacroController.cs b/src/Umbraco.Web/Editors/MacroRenderingController.cs similarity index 97% rename from src/Umbraco.Web/Editors/MacroController.cs rename to src/Umbraco.Web/Editors/MacroRenderingController.cs index 3c576befb9..e585f28c09 100644 --- a/src/Umbraco.Web/Editors/MacroController.cs +++ b/src/Umbraco.Web/Editors/MacroRenderingController.cs @@ -27,11 +27,11 @@ namespace Umbraco.Web.Editors /// Session, we don't want it to throw null reference exceptions. /// [PluginController("UmbracoApi")] - public class MacroController : UmbracoAuthorizedJsonController, IRequiresSessionState + public class MacroRenderingController : UmbracoAuthorizedJsonController, IRequiresSessionState { private readonly IVariationContextAccessor _variationContextAccessor; - public MacroController(IVariationContextAccessor variationContextAccessor) + public MacroRenderingController(IVariationContextAccessor variationContextAccessor) { _variationContextAccessor = variationContextAccessor; } diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 17c2a54d81..16fbd6aa29 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -751,7 +751,7 @@ - + diff --git a/src/Umbraco.Web/umbraco.presentation/page.cs b/src/Umbraco.Web/umbraco.presentation/page.cs index 219e2101be..a2ccc1e094 100644 --- a/src/Umbraco.Web/umbraco.presentation/page.cs +++ b/src/Umbraco.Web/umbraco.presentation/page.cs @@ -102,7 +102,7 @@ namespace umbraco /// Initializes a new instance of the page for a content. ///
/// The content. - /// This is for usage only. + /// This is for usage only. internal page(IContent content, IVariationContextAccessor variationContextAccessor) : this(new PagePublishedContent(content, variationContextAccessor)) { } From e1906113b969d728f6671aac15ee0e0749c545ac Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Fri, 4 Jan 2019 12:31:58 +0100 Subject: [PATCH 086/437] #3417 added macro api controller and create method --- src/Umbraco.Web/Editors/MacrosController.cs | 64 +++++++++++++++++++++ src/Umbraco.Web/Umbraco.Web.csproj | 1 + 2 files changed, 65 insertions(+) create mode 100644 src/Umbraco.Web/Editors/MacrosController.cs diff --git a/src/Umbraco.Web/Editors/MacrosController.cs b/src/Umbraco.Web/Editors/MacrosController.cs new file mode 100644 index 0000000000..0adada0a2b --- /dev/null +++ b/src/Umbraco.Web/Editors/MacrosController.cs @@ -0,0 +1,64 @@ +using System; +using System.Net; +using System.Net.Http; +using System.Web.Http; + +using Umbraco.Core; +using Umbraco.Core.Logging; +using Umbraco.Core.Models; +using Umbraco.Web.Mvc; +using Umbraco.Web.WebApi; +using Umbraco.Web.WebApi.Filters; + +using Constants = Umbraco.Core.Constants; + +namespace Umbraco.Web.Editors +{ + /// + /// The API controller used for editing dictionary items + /// + [PluginController("UmbracoApi")] + [UmbracoTreeAuthorize(Constants.Trees.Macros)] + public class MacrosController : BackOfficeNotificationsController + { + /// + /// Creates a new macro + /// + /// + /// The name. + /// + /// + /// The . + /// + [HttpPost] + public HttpResponseMessage Create(string name) + { + if (string.IsNullOrWhiteSpace(name)) + return Request + .CreateNotificationValidationErrorResponse("Name can not be empty;"); + + var alias = name.ToSafeAlias(); + + var existingMacro = this.Services.MacroService.GetByAlias(alias); + + if (existingMacro != null) + { + return Request.CreateNotificationValidationErrorResponse("Macro with this name already exists"); + } + + try + { + var macro = new Macro { Alias = alias, Name = name }; + + this.Services.MacroService.Save(macro, this.Security.CurrentUser.Id); + + return Request.CreateResponse(HttpStatusCode.OK, macro.Id); + } + catch (Exception exception) + { + this.Logger.Error(exception, "Error creating macro"); + return Request.CreateNotificationValidationErrorResponse("Error creating dictionary item"); + } + } + } +} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 16fbd6aa29..7186835ba8 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -117,6 +117,7 @@ + From c61b5f947dae03e456e1ef0ba976153768f7476b Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Fri, 4 Jan 2019 13:49:03 +0100 Subject: [PATCH 087/437] #3417 renamed server variable --- .../src/common/resources/macro.resource.js | 6 +++--- src/Umbraco.Web/Editors/BackOfficeServerVariables.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js index dde887776e..07ad58bb78 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js @@ -24,7 +24,7 @@ function macroResource($q, $http, umbRequestHelper) { return umbRequestHelper.resourcePromise( $http.get( umbRequestHelper.getApiUrl( - "macroApiBaseUrl", + "macroRenderingApiBaseUrl", "GetMacroParameters", [{ macroId: macroId }])), 'Failed to retrieve macro parameters for macro with id ' + macroId); @@ -48,7 +48,7 @@ function macroResource($q, $http, umbRequestHelper) { return umbRequestHelper.resourcePromise( $http.post( umbRequestHelper.getApiUrl( - "macroApiBaseUrl", + "macroRenderingApiBaseUrl", "GetMacroResultAsHtmlForEditor"), { macroAlias: macroAlias, pageId: pageId, @@ -67,7 +67,7 @@ function macroResource($q, $http, umbRequestHelper) { return umbRequestHelper.resourcePromise( $http.post( umbRequestHelper.getApiUrl( - "macroApiBaseUrl", + "macroRenderingApiBaseUrl", "CreatePartialViewMacroWithFile"), { virtualPath: virtualPath, filename: filename diff --git a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs index aab5f13479..1550161ff0 100644 --- a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs +++ b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs @@ -169,7 +169,7 @@ namespace Umbraco.Web.Editors controller => controller.GetAllowedChildren(0)) }, { - "macroApiBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl( + "macroRenderingApiBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl( controller => controller.GetMacroParameters(0)) }, { From 03ce92212420d89f5a54f93631e8b35d796bee5c Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Fri, 4 Jan 2019 17:10:53 +0100 Subject: [PATCH 088/437] #3417 register new api url in server variables --- src/Umbraco.Web/Editors/BackOfficeServerVariables.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs index 1550161ff0..52cfc1bdec 100644 --- a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs +++ b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs @@ -172,6 +172,10 @@ namespace Umbraco.Web.Editors "macroRenderingApiBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl( controller => controller.GetMacroParameters(0)) }, + { + "macroApiBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl( + controller => controller.Create(null)) + }, { "authenticationApiBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl( controller => controller.PostLogin(null)) From d7af9d9fca9ec0760dfa88fb7a710fe5359a4e36 Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Fri, 4 Jan 2019 17:36:42 +0100 Subject: [PATCH 089/437] #3417 added method to macro resource to create a macro --- .../src/common/resources/macro.resource.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js index 07ad58bb78..d0c6af2497 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js @@ -76,6 +76,19 @@ function macroResource($q, $http, umbRequestHelper) { 'Failed to create macro "' + filename + '"' ); + }, + + createMacro: function(name) { + return umbRequestHelper.resourcePromise( + $http.post( + umbRequestHelper.getApiUrl( + "macroApiBaseUrl", + "Create"), { + name : name, + } + ), + 'Failed to create macro "' + name + '"' + ); } }; } From 2ca7bb0cf3751077a35af9a61995df171e7274e9 Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Mon, 7 Jan 2019 08:28:50 +0100 Subject: [PATCH 090/437] #3417 implemented create dialog for macros --- .../src/common/resources/macro.resource.js | 4 +- .../src/views/macros/create.html | 20 ++++++++- .../views/macros/macros.create.controller.js | 44 +++++++++++++++++++ src/Umbraco.Web/Editors/MacrosController.cs | 2 +- 4 files changed, 64 insertions(+), 6 deletions(-) create mode 100644 src/Umbraco.Web.UI.Client/src/views/macros/macros.create.controller.js diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js index d0c6af2497..9f22465757 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js @@ -83,9 +83,7 @@ function macroResource($q, $http, umbRequestHelper) { $http.post( umbRequestHelper.getApiUrl( "macroApiBaseUrl", - "Create"), { - name : name, - } + "Create?name=" + name) ), 'Failed to create macro "' + name + '"' ); diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/create.html b/src/Umbraco.Web.UI.Client/src/views/macros/create.html index 337ebfdaa5..a72cd373b2 100644 --- a/src/Umbraco.Web.UI.Client/src/views/macros/create.html +++ b/src/Umbraco.Web.UI.Client/src/views/macros/create.html @@ -1,3 +1,19 @@ -
-

Create view

+
+ +
+
Create an item under {{currentNode.name}}
+
+ +
+
+ + + + + + + +
diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/macros.create.controller.js b/src/Umbraco.Web.UI.Client/src/views/macros/macros.create.controller.js new file mode 100644 index 0000000000..1745b7b7f6 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/macros/macros.create.controller.js @@ -0,0 +1,44 @@ +/** + * @ngdoc controller + * @name Umbraco.Editors.Macros.CreateController + * @function + * + * @description + * The controller for creating macro items + */ +function MacrosCreateController($scope, $location, macroResource, navigationService, notificationsService, formHelper, appState) { + var vm = this; + + vm.itemKey = ""; + + function createItem() { + + var node = $scope.currentNode; + + macroResource.createMacro(vm.itemKey).then(function (data) { + navigationService.hideMenu(); + + // set new item as active in tree + var currPath = node.path ? node.path : "-1"; + navigationService.syncTree({ tree: "macros", path: currPath + "," + data, forceReload: true, activate: true }); + + // reset form state + formHelper.resetForm({ scope: $scope }); + + // navigate to edit view + var currentSection = appState.getSectionState("currentSection"); + $location.path("/" + currentSection + "/macros/edit/" + data); + + + }, function (err) { + if (err.data && err.data.message) { + notificationsService.error(err.data.message); + navigationService.hideMenu(); + } + }); + } + + vm.createItem = createItem; +} + +angular.module("umbraco").controller("Umbraco.Editors.Macros.CreateController", MacrosCreateController); diff --git a/src/Umbraco.Web/Editors/MacrosController.cs b/src/Umbraco.Web/Editors/MacrosController.cs index 0adada0a2b..f1d949231e 100644 --- a/src/Umbraco.Web/Editors/MacrosController.cs +++ b/src/Umbraco.Web/Editors/MacrosController.cs @@ -48,7 +48,7 @@ namespace Umbraco.Web.Editors try { - var macro = new Macro { Alias = alias, Name = name }; + var macro = new Macro { Alias = alias, Name = name, MacroSource = string.Empty}; this.Services.MacroService.Save(macro, this.Security.CurrentUser.Id); From edd2adc8a00db041b2ee7f073969ea0b5c58bdb9 Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Mon, 7 Jan 2019 08:31:06 +0100 Subject: [PATCH 091/437] #3417 changed path of macro tree item to use angular view instead of webform --- src/Umbraco.Web/Trees/MacrosTreeController.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Umbraco.Web/Trees/MacrosTreeController.cs b/src/Umbraco.Web/Trees/MacrosTreeController.cs index 0649378aaa..f16cfe09d4 100644 --- a/src/Umbraco.Web/Trees/MacrosTreeController.cs +++ b/src/Umbraco.Web/Trees/MacrosTreeController.cs @@ -42,10 +42,7 @@ namespace Umbraco.Web.Trees queryStrings, macro.Name, "icon-settings-alt", - false, - //TODO: Rebuild the macro editor in angular, then we dont need to have this at all (which is just a path to the legacy editor) - "/" + queryStrings.GetValue("application") + "/framed/" + - Uri.EscapeDataString("/umbraco/developer/macros/editMacro.aspx?macroID=" + macro.Id))); + false)); } } From b9d779e921a116dd86a04df25ff7ce3252a3269b Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Tue, 8 Jan 2019 08:34:46 +0100 Subject: [PATCH 092/437] #3417 prototyped the UI for settings of the macro --- .../src/views/macros/edit.html | 31 +++++++ .../views/macros/macros.edit.controller.js | 87 +++++++++++++++++++ .../src/views/macros/views/parameters.html | 3 + .../src/views/macros/views/settings.html | 33 +++++++ 4 files changed, 154 insertions(+) create mode 100644 src/Umbraco.Web.UI.Client/src/views/macros/edit.html create mode 100644 src/Umbraco.Web.UI.Client/src/views/macros/macros.edit.controller.js create mode 100644 src/Umbraco.Web.UI.Client/src/views/macros/views/parameters.html create mode 100644 src/Umbraco.Web.UI.Client/src/views/macros/views/settings.html diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/edit.html b/src/Umbraco.Web.UI.Client/src/views/macros/edit.html new file mode 100644 index 0000000000..911dcf0c9e --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/macros/edit.html @@ -0,0 +1,31 @@ +
+ + +
+ + + + + + + + + + + + + + + + + +
diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/macros.edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/macros/macros.edit.controller.js new file mode 100644 index 0000000000..ef65c77e1d --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/macros/macros.edit.controller.js @@ -0,0 +1,87 @@ +/** + * @ngdoc controller + * @name Umbraco.Editors.Macros.EditController + * @function + * + * @description + * The controller for editing macros. + */ +function MacrosEditController($scope, $routeParams, macroResource, editorState, navigationService, dateHelper, userService, entityResource, formHelper, contentEditingHelper, localizationService) { + + var vm = this; + + vm.page = {}; + vm.page.loading = false; + vm.page.saveButtonState = "init"; + vm.page.menu = {} + + vm.save = saveMacro; + vm.toggle = toggleValue; + + init(); + + function init() { + vm.page.loading = true; + + + vm.page.navigation = [ + { + "name": "Settings", + "alias": "settings", + "icon": "icon-settings", + "view": "views/macros/views/settings.html", + "active": true + }, + { + "name": "Parameters", + "alias": "parameters", + "icon": "icon-list", + "view": "views/macros/views/parameters.html" + } + ]; + + vm.macro = { + "name": "Test macro", + "alias": "testMacro", + "id": 1, + "key": "unique key goes here", + "useInEditor": true, + "renderInEditor": false, + "cachePeriod": 2400, + "cacheByPage": true, + "cacheByUser": false, + "view" : "Second" + } + + vm.views = ['First', 'Second', 'Third']; + + vm.page.loading = false; + } + + function toggleValue(key) { + vm.macro[key] = !vm.macro[key]; + } + + function saveMacro() { + vm.page.saveButtonState = "busy"; + + if (formHelper.submitForm({ scope: $scope, statusMessage: "Saving..." })) { + console.log(vm.macro); + //relationTypeResource.save(vm.relationType).then(function (data) { + // formHelper.resetForm({ scope: $scope, notifications: data.notifications }); + // bindRelationType(data); + // vm.page.saveButtonState = "success"; + //}, function (error) { + // contentEditingHelper.handleSaveError({ + // redirectOnFailure: false, + // err: error + // }); + + // notificationsService.error(error.data.message); + // vm.page.saveButtonState = "error"; + //}); + } + } +} + +angular.module("umbraco").controller("Umbraco.Editors.Macros.EditController", MacrosEditController); diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/views/parameters.html b/src/Umbraco.Web.UI.Client/src/views/macros/views/parameters.html new file mode 100644 index 0000000000..6a10d4f80b --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/macros/views/parameters.html @@ -0,0 +1,3 @@ + + + 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 new file mode 100644 index 0000000000..51e83a9134 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/macros/views/settings.html @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From f02bd4bca4be58dc34cc078f3dae3a032766c842 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Fri, 11 Jan 2019 11:46:23 +0100 Subject: [PATCH 093/437] #3668 - Generate v8 code from "insert value" --- .../insertfield/insertfield.controller.js | 118 +++------------ .../insertfield/insertfield.html | 134 +----------------- 2 files changed, 23 insertions(+), 229 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/insertfield/insertfield.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/insertfield/insertfield.controller.js index db3e16f8b6..f2cc0dbecb 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/insertfield/insertfield.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/insertfield/insertfield.controller.js @@ -2,32 +2,14 @@ "use strict"; function InsertFieldController($scope, contentTypeResource, localizationService) { - + var vm = this; vm.field; - vm.altField; - vm.altText; - vm.insertBefore; - vm.insertAfter; + vm.defaultValue; vm.recursive = false; - vm.properties = []; - vm.standardFields = []; - vm.date = false; - vm.dateTime = false; - vm.dateTimeSeparator = ""; - vm.casingUpper = false; - vm.casingLower = false; - vm.encodeHtml = false; - vm.encodeUrl = false; - vm.convertLinebreaks = false; + vm.showDefaultValue = false; - vm.showAltField = false; - vm.showAltText = false; - - vm.setDateOption = setDateOption; - vm.setCasingOption = setCasingOption; - vm.setEncodingOption = setEncodingOption; vm.generateOutputSample = generateOutputSample; vm.submit = submit; vm.close = close; @@ -50,93 +32,29 @@ contentTypeResource.getAllStandardFields().then(function (array) { vm.standardFields = array; }); - - } - // date formatting - function setDateOption(option) { - - if (option === 'date') { - if(vm.date) { - vm.date = false; - } else { - vm.date = true; - vm.dateTime = false; - } - } - - if (option === 'dateWithTime') { - if(vm.dateTime) { - vm.dateTime = false; - } else { - vm.date = false; - vm.dateTime = true; - } - } - - } - - // casing formatting - function setCasingOption(option) { - if (option === 'uppercase') { - if(vm.casingUpper) { - vm.casingUpper = false; - } else { - vm.casingUpper = true; - vm.casingLower = false; - } - } - - if (option === 'lowercase') { - if(vm.casingLower) { - vm.casingLower = false; - } else { - vm.casingUpper = false; - vm.casingLower = true; - } - } - } - - // encoding formatting - function setEncodingOption(option) { - if (option === 'html') { - if(vm.encodeHtml) { - vm.encodeHtml = false; - } else { - vm.encodeHtml = true; - vm.encodeUrl = false; - } - } - - if (option === 'url') { - if (vm.encodeUrl) { - vm.encodeUrl = false; - } else { - vm.encodeHtml = false; - vm.encodeUrl = true; - } - } } function generateOutputSample() { - var pageField = (vm.field !== undefined ? '@Umbraco.Field("' + vm.field + '"' : "") - + (vm.altField !== undefined ? ', altFieldAlias:"' + vm.altField + '"' : "") - + (vm.altText !== undefined ? ', altText:"' + vm.altText + '"' : "") - + (vm.insertBefore !== undefined ? ', insertBefore:"' + vm.insertBefore + '"' : "") - + (vm.insertAfter !== undefined ? ', insertAfter:"' + vm.insertAfter + '"' : "") - + (vm.recursive !== false ? ', recursive: ' + vm.recursive : "") - + (vm.date !== false ? ', formatAsDate: ' + vm.date : "") - + (vm.dateTime !== false ? ', formatAsDateWithTimeSeparator:"' + vm.dateTimeSeparator + '"' : "") - + (vm.casingUpper !== false ? ', casing: ' + "RenderFieldCaseType.Upper" : "") - + (vm.casingLower !== false ? ', casing: ' + "RenderFieldCaseType.Lower" : "") - + (vm.encodeHtml !== false ? ', encoding: ' + "RenderFieldEncodingType.Html" : "") - + (vm.encodeUrl !== false ? ', encoding: ' + "RenderFieldEncodingType.Url" : "") - + (vm.convertLinebreaks !== false ? ', convertLineBreaks: ' + "true" : "") + var fallback; + + if(vm.recursive !== false && vm.defaultValue !== undefined){ + fallback = "Fallback.To(Fallback.Ancestors, Fallback.DefaultValue)"; + }else if(vm.recursive !== false){ + fallback = "Fallback.ToAncestors"; + }else if(vm.defaultValue !== undefined){ + fallback = "Fallback.ToDefaultValue"; + } + + var pageField = (vm.field !== undefined ? '@Model.Value("' + vm.field + '"' : "") + + (fallback !== undefined? ', fallback: ' + fallback : "") + + (vm.defaultValue !== undefined ? ', defaultValue: new HtmlString("' + vm.defaultValue + '")' : "") + + (vm.field ? ')' : ""); $scope.model.umbracoField = pageField; - + return pageField; } diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/insertfield/insertfield.html b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/insertfield/insertfield.html index 56bd498fd1..c5becb0944 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/insertfield/insertfield.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/insertfield/insertfield.html @@ -31,46 +31,18 @@
-
- - -
- - -
- - Add fallback field - -
-
- -
- -
-
-
-
-
-
-
+
- +
@@ -83,7 +55,7 @@ -
-
Format and encoding
- - -
-
-
-
- -
- Date only - Date and time - -
-
-
- - -
-
-
-
- -
- Uppercase - Lowercase -
-
-
- - -
-
-
-
- -
- HTML - URL -
-
-
- -
Modify output
- - -
-
- -
- -
-
-
- - -
-
- -
- -
-
-
- - -
-
-
-
- -
- -
-
-
-
From b6f4ec3cbce41511358e8a863e0b18da64a7843b Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Fri, 11 Jan 2019 11:47:42 +0100 Subject: [PATCH 094/437] #3668 - Handle fallback strategy with default value and ancestor + Handle fallback strategy when the ancestor is invariant and the item is variant --- .../PublishedValueFallback.cs | 41 ++++++++++++++----- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/src/Umbraco.Web/Models/PublishedContent/PublishedValueFallback.cs b/src/Umbraco.Web/Models/PublishedContent/PublishedValueFallback.cs index d0218b6639..691744d6df 100644 --- a/src/Umbraco.Web/Models/PublishedContent/PublishedValueFallback.cs +++ b/src/Umbraco.Web/Models/PublishedContent/PublishedValueFallback.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using Umbraco.Core; using Umbraco.Core.Models.PublishedContent; using Umbraco.Core.Services; @@ -117,6 +118,7 @@ namespace Umbraco.Web.Models.PublishedContent // looking at languages at each level - should someone need it... they'll have // to implement it. + foreach (var f in fallback) { switch (f) @@ -131,14 +133,29 @@ namespace Umbraco.Web.Models.PublishedContent return true; break; case Fallback.Ancestors: - if (TryGetValueWithRecursiveFallback(content, alias, culture, segment, defaultValue, out value)) + IPublishedProperty noValueProperty; + if (TryGetValueWithRecursiveFallback(content, alias, culture, segment, defaultValue, out value, + out noValueProperty)) + { return true; + } + + // if we found a property, even though with no value, return that property value + // because the converter may want to handle the missing value. ie if defaultValue is default, + // either specified or by default, the converter may want to substitute something else. + if (noValueProperty != null) + { + value = noValueProperty.Value(culture, segment, fallback.Contains(Fallback.DefaultValue) ? Fallback.ToDefaultValue : Fallback.To(), defaultValue: defaultValue); + return true; + } break; default: throw NotSupportedFallbackMethod(f, "content"); } } + + value = defaultValue; return false; } @@ -149,13 +166,23 @@ namespace Umbraco.Web.Models.PublishedContent } // tries to get a value, recursing the tree - private static bool TryGetValueWithRecursiveFallback(IPublishedContent content, string alias, string culture, string segment, T defaultValue, out T value) + private bool TryGetValueWithRecursiveFallback(IPublishedContent content, string alias, string culture, string segment, T defaultValue, out T value, out IPublishedProperty noValueProperty) { IPublishedProperty property = null; // if we are here, content's property has no value - IPublishedProperty noValueProperty = null; + noValueProperty = null; do { content = content.Parent; + + var propertyType = content?.ContentType.GetPropertyType(alias); + + if (propertyType != null) + { + culture = null; + segment = null; + _variationContextAccessor.ContextualizeVariation(propertyType.Variations, ref culture, ref segment); + } + property = content?.GetProperty(alias); if (property != null) { @@ -171,14 +198,6 @@ namespace Umbraco.Web.Models.PublishedContent return true; } - // if we found a property, even though with no value, return that property value - // because the converter may want to handle the missing value. ie if defaultValue is default, - // either specified or by default, the converter may want to substitute something else. - if (noValueProperty != null) - { - value = noValueProperty.Value(culture, segment, defaultValue: defaultValue); - return true; - } value = defaultValue; return false; From 4566b88e37a086488c2b5eaae9e896c607f37b66 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Fri, 11 Jan 2019 14:21:03 +0100 Subject: [PATCH 095/437] #3668 - Fixed test that was failing due to wrong setup --- .../PublishedContentLanguageVariantTests.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Tests/PublishedContent/PublishedContentLanguageVariantTests.cs b/src/Umbraco.Tests/PublishedContent/PublishedContentLanguageVariantTests.cs index 7a96f670e6..7bb249a652 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedContentLanguageVariantTests.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedContentLanguageVariantTests.cs @@ -4,6 +4,7 @@ using System.Collections.ObjectModel; using System.Linq; using Moq; using NUnit.Framework; +using Umbraco.Core.Composing; using Umbraco.Core.Models; using Umbraco.Core.Models.PublishedContent; using Umbraco.Core.Services; @@ -59,9 +60,9 @@ namespace Umbraco.Tests.PublishedContent internal override void PopulateCache(PublishedContentTypeFactory factory, SolidPublishedContentCache cache) { - var prop1Type = factory.CreatePropertyType("prop1", 1); - var welcomeType = factory.CreatePropertyType("welcomeText", 1); - var welcome2Type = factory.CreatePropertyType("welcomeText2", 1); + var prop1Type = factory.CreatePropertyType("prop1", 1, variations: ContentVariation.Culture); + var welcomeType = factory.CreatePropertyType("welcomeText", 1, variations: ContentVariation.Culture); + var welcome2Type = factory.CreatePropertyType("welcomeText2", 1, variations: ContentVariation.Culture); var props = new[] { prop1Type, @@ -214,7 +215,9 @@ namespace Umbraco.Tests.PublishedContent [Test] public void Can_Get_Content_With_Recursive_Priority() { + Current.VariationContextAccessor.VariationContext = new VariationContext("nl"); var content = UmbracoContext.Current.ContentCache.GetAtRoot().First().Children.First(); + var value = content.Value("welcomeText", "nl", fallback: Fallback.To(Fallback.Ancestors, Fallback.Language)); // No Dutch value is directly assigned. Check has fallen back to Dutch value from parent. From 29390a3624bb275d829da5d12af0eeb424b3fb75 Mon Sep 17 00:00:00 2001 From: Robert Date: Fri, 11 Jan 2019 15:15:59 +0100 Subject: [PATCH 096/437] Fixes string to int conversion error --- .../PropertyEditors/MultiNodePickerConfigurationTreeSource.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/PropertyEditors/MultiNodePickerConfigurationTreeSource.cs b/src/Umbraco.Web/PropertyEditors/MultiNodePickerConfigurationTreeSource.cs index ffedf6c7dc..65115afc63 100644 --- a/src/Umbraco.Web/PropertyEditors/MultiNodePickerConfigurationTreeSource.cs +++ b/src/Umbraco.Web/PropertyEditors/MultiNodePickerConfigurationTreeSource.cs @@ -15,6 +15,6 @@ namespace Umbraco.Web.PropertyEditors public string StartNodeQuery {get;set;} [JsonProperty("id")] - public int? StartNodeId {get;set;} + public string StartNodeId {get;set;} } } From 8f41fe8d3840cccb5235ba632a6d69a2f8efbcc4 Mon Sep 17 00:00:00 2001 From: Robert Date: Fri, 11 Jan 2019 15:17:29 +0100 Subject: [PATCH 097/437] Fixes MNTP only being able to open contentPicker --- .../contentpicker/contentpicker.controller.js | 45 ++++++++++++------- .../contentpicker/contentpicker.html | 2 +- 2 files changed, 30 insertions(+), 17 deletions(-) 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 af3ce50609..e084d7116a 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 @@ -52,18 +52,18 @@ function contentPickerController($scope, entityResource, editorState, iconHelper } function startWatch() { - + //due to the way angular-sortable works, it needs to update a model, we don't want it to update renderModel since renderModel //is updated based on changes to model.value so if we bound angular-sortable to that and put a watch on it we'd end up in a //infinite loop. Instead we have a custom array model for angular-sortable and we'll watch that which we'll use to sync the model.value //which in turn will sync the renderModel. - $scope.$watchCollection("sortableModel", function(newVal, oldVal) { + $scope.$watchCollection("sortableModel", function (newVal, oldVal) { $scope.model.value = newVal.join(); }); //if the underlying model changes, update the view model, this ensures that the view is always consistent with the underlying //model if it changes (i.e. based on server updates, or if used in split view, etc...) - $scope.$watch("model.value", function(newVal, oldVal) { + $scope.$watch("model.value", function (newVal, oldVal) { if (newVal !== oldVal) { syncRenderModel(); } @@ -195,25 +195,38 @@ function contentPickerController($scope, entityResource, editorState, iconHelper } //dialog - $scope.openContentPicker = function () { - $scope.contentPicker = dialogOptions; + $scope.openCurrentPicker = function () { + $scope.currentPicker = dialogOptions; - $scope.contentPicker.submit = function (model) { + $scope.currentPicker.submit = function (model) { if (angular.isArray(model.selection)) { _.each(model.selection, function (item, i) { $scope.add(item); }); - angularHelper.getCurrentForm($scope).$setDirty(); + angularHelper.getCurrentForm($scope).$setDirty(); } angularHelper.getCurrentForm($scope).$setDirty(); editorService.close(); } - $scope.contentPicker.close = function () { + $scope.currentPicker.close = function () { editorService.close(); } - editorService.contentPicker($scope.contentPicker); + //open the correct editor based on the entity type + switch (entityType) { + case "Document": + editorService.contentPicker($scope.currentPicker); + break; + case "Media": + editorService.mediaPicker($scope.currentPicker); + break; + case "Member": + editorService.memberGroupPicker($scope.currentPicker); + break; + + default: + } }; @@ -256,7 +269,7 @@ function contentPickerController($scope, entityResource, editorState, iconHelper $scope.model.value = null; }; - $scope.openContentEditor = function (node)  { + $scope.openContentEditor = function (node) { var contentEditor = { id: node.id, submit: function (model) { @@ -296,7 +309,7 @@ function contentPickerController($scope, entityResource, editorState, iconHelper if (valueIds.length > 0) { //need to determine which items we already have loaded - var renderModelIds = _.map($scope.renderModel, function(d) { + var renderModelIds = _.map($scope.renderModel, function (d) { return $scope.model.config.idType === "udi" ? d.udi : d.id; }); @@ -313,11 +326,11 @@ function contentPickerController($scope, entityResource, editorState, iconHelper var missingIds = _.difference(valueIds, renderModelIds); if (missingIds.length > 0) { - return entityResource.getByIds(missingIds, entityType).then(function(data) { + return entityResource.getByIds(missingIds, entityType).then(function (data) { _.each(valueIds, - function(id, i) { - var entity = _.find(data, function(d) { + function (id, i) { + var entity = _.find(data, function (d) { return $scope.model.config.idType === "udi" ? (d.udi == id) : (d.id == id); }); @@ -330,7 +343,7 @@ function contentPickerController($scope, entityResource, editorState, iconHelper if (doValidation) { validate(); } - + setSortingState($scope.renderModel); return $q.when(true); }); @@ -342,7 +355,7 @@ function contentPickerController($scope, entityResource, editorState, iconHelper $scope.renderModel = []; for (var k = 0; k < valueIds.length; k++) { var id = valueIds[k]; - var found = _.find(current, function(d) { + var found = _.find(current, function (d) { return $scope.model.config.idType === "udi" ? (d.udi == id) : (d.id == id); }); if (found) { 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 2f1303077c..a589cf8947 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 @@ -22,7 +22,7 @@ Add From aaedfe0309b16daed46a0824b975eb5f4f9da3ec Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 14 Jan 2019 08:14:10 +0100 Subject: [PATCH 098/437] Added access to the dictionary tree with we have access to the templates tree. --- src/Umbraco.Web/Trees/DictionaryTreeController.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web/Trees/DictionaryTreeController.cs b/src/Umbraco.Web/Trees/DictionaryTreeController.cs index 49bed23ed9..6c8f576732 100644 --- a/src/Umbraco.Web/Trees/DictionaryTreeController.cs +++ b/src/Umbraco.Web/Trees/DictionaryTreeController.cs @@ -9,8 +9,13 @@ using Umbraco.Web.WebApi.Filters; namespace Umbraco.Web.Trees { - - [UmbracoTreeAuthorize(Constants.Trees.Dictionary)] + + [UmbracoTreeAuthorize( + Constants.Trees.Dictionary, + Constants.Trees.Templates + // We are allowed to see the dictionary tree, if we are allowed to manage templates, such that se can use the + // dictionary items in templates, even when we dont have authorization to manage the dictionary items + )] [Mvc.PluginController("UmbracoTrees")] [CoreTree(TreeGroup = Constants.Trees.Groups.Settings)] [Tree(Constants.Applications.Translation, Constants.Trees.Dictionary, null)] From 2ce3249c5e99fc27656f2af84b014bec937ea412 Mon Sep 17 00:00:00 2001 From: Robert Date: Mon, 14 Jan 2019 13:23:00 +0100 Subject: [PATCH 099/437] Renaming variable to allow MNTP media selection --- .../src/common/services/tinymce.service.js | 2 +- .../linkpicker/linkpicker.controller.js | 2 +- .../mediapicker/mediapicker.controller.js | 24 +++++++++---------- .../prevalueeditors/imagepicker.controller.js | 2 +- .../grid/editors/media.controller.js | 2 +- .../markdowneditor.controller.js | 2 +- .../mediapicker/mediapicker.controller.js | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js b/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js index 3fc11f8225..97d939bac1 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js @@ -1316,7 +1316,7 @@ function tinyMceService($rootScope, $q, imageHelper, $locale, $http, $timeout, s startNodeId: userData.startMediaIds.length !== 1 ? -1 : userData.startMediaIds[0], startNodeIsVirtual: userData.startMediaIds.length !== 1, submit: function (model) { - self.insertMediaInEditor(args.editor, model.selectedImages[0]); + self.insertMediaInEditor(args.editor, model.selection[0]); editorService.close(); }, close: function () { diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/linkpicker/linkpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/linkpicker/linkpicker.controller.js index 81dfcfd5d3..4faa5fd03a 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/linkpicker/linkpicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/linkpicker/linkpicker.controller.js @@ -118,7 +118,7 @@ angular.module("umbraco").controller("Umbraco.Editors.LinkPickerController", startNodeId: userData.startMediaIds.length !== 1 ? -1 : userData.startMediaIds[0], startNodeIsVirtual: userData.startMediaIds.length !== 1, submit: function (model) { - var media = model.selectedImages[0]; + var media = model.selection[0]; $scope.model.target.id = media.id; $scope.model.target.udi = media.udi; 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 a274c25287..7b3d13937f 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 @@ -41,7 +41,7 @@ angular.module("umbraco") $scope.maxFileSize = umbracoSettings.maxFileSize + "KB"; - $scope.model.selectedImages = []; + $scope.model.selection = []; $scope.acceptedMediatypes = []; mediaTypeHelper.getAllowedImagetypes($scope.startNodeId) @@ -145,7 +145,7 @@ angular.module("umbraco") $scope.gotoFolder = function(folder) { if (!$scope.multiPicker) { - deselectAllImages($scope.model.selectedImages); + deselectAllImages($scope.model.selection); } if (!folder) { @@ -212,19 +212,19 @@ angular.module("umbraco") function selectImage(image) { if (image.selected) { - for (var i = 0; $scope.model.selectedImages.length > i; i++) { - var imageInSelection = $scope.model.selectedImages[i]; + for (var i = 0; $scope.model.selection.length > i; i++) { + var imageInSelection = $scope.model.selection[i]; if (image.key === imageInSelection.key) { image.selected = false; - $scope.model.selectedImages.splice(i, 1); + $scope.model.selection.splice(i, 1); } } } else { if (!$scope.multiPicker) { - deselectAllImages($scope.model.selectedImages); + deselectAllImages($scope.model.selection); } image.selected = true; - $scope.model.selectedImages.push(image); + $scope.model.selection.push(image); } } @@ -238,7 +238,7 @@ angular.module("umbraco") $scope.onUploadComplete = function(files) { $scope.gotoFolder($scope.currentFolder).then(function() { - if (files.length === 1 && $scope.model.selectedImages.length === 0) { + if (files.length === 1 && $scope.model.selection.length === 0) { var image = $scope.images[$scope.images.length - 1]; $scope.target = image; $scope.target.url = mediaHelper.resolveFile(image); @@ -275,7 +275,7 @@ angular.module("umbraco") $scope.mediaPickerDetailsOverlay.show = true; $scope.mediaPickerDetailsOverlay.submit = function(model) { - $scope.model.selectedImages.push($scope.target); + $scope.model.selection.push($scope.target); $scope.model.submit($scope.model); $scope.mediaPickerDetailsOverlay.show = false; @@ -384,11 +384,11 @@ angular.module("umbraco") var folderImage = $scope.images[folderImageIndex]; var imageIsSelected = false; - if ($scope.model && angular.isArray($scope.model.selectedImages)) { + if ($scope.model && angular.isArray($scope.model.selection)) { for (var selectedImageIndex = 0; - selectedImageIndex < $scope.model.selectedImages.length; + selectedImageIndex < $scope.model.selection.length; selectedImageIndex++) { - var selectedImage = $scope.model.selectedImages[selectedImageIndex]; + var selectedImage = $scope.model.selection[selectedImageIndex]; if (folderImage.key === selectedImage.key) { imageIsSelected = true; diff --git a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/imagepicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/imagepicker.controller.js index 6e7071a7e4..fc3da3510e 100644 --- a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/imagepicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/imagepicker.controller.js @@ -7,7 +7,7 @@ function imageFilePickerController($scope) { onlyImages: true, show: true, submit: function (model) { - $scope.model.value = model.selectedImages[0].image; + $scope.model.value = model.selection[0].image; $scope.mediaPickerOverlay.show = false; $scope.mediaPickerOverlay = null; }, diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/media.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/media.controller.js index c240d6b37d..e267133cf4 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/media.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/media.controller.js @@ -27,7 +27,7 @@ angular.module("umbraco") disableFolderSelect: true, onlyImages: true, submit: function(model) { - var selectedImage = model.selectedImages[0]; + var selectedImage = model.selection[0]; $scope.control.value = { focalPoint: selectedImage.focalPoint, diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/markdowneditor/markdowneditor.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/markdowneditor/markdowneditor.controller.js index b3c014f54a..67a5630909 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/markdowneditor/markdowneditor.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/markdowneditor/markdowneditor.controller.js @@ -16,7 +16,7 @@ function MarkdownEditorController($scope, $element, assetsService, editorService var mediaPicker = { disableFolderSelect: true, submit: function(model) { - var selectedImagePath = model.selectedImages[0].image; + var selectedImagePath = model.selection[0].image; callback(selectedImagePath); editorService.close(); }, 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 361354c524..bac8eb903a 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 @@ -176,7 +176,7 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl editorService.close(); - _.each(model.selectedImages, function (media, i) { + _.each(model.selection, function (media, i) { // if there is no thumbnail, try getting one if the media is not a placeholder item if (!media.thumbnail && media.id && media.metaData) { media.thumbnail = mediaHelper.resolveFileFromEntity(media, true); From 1ac8bbc570ab4a3a9d7f5ee24c66f0ad8a5dee85 Mon Sep 17 00:00:00 2001 From: Robert Date: Mon, 14 Jan 2019 13:23:57 +0100 Subject: [PATCH 100/437] Fixes MNTP member selection tree --- .../propertyeditors/contentpicker/contentpicker.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 e084d7116a..b72d81f16d 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 @@ -222,7 +222,7 @@ function contentPickerController($scope, entityResource, editorState, iconHelper editorService.mediaPicker($scope.currentPicker); break; case "Member": - editorService.memberGroupPicker($scope.currentPicker); + editorService.treePicker($scope.currentPicker); break; default: From 8e4090fb84d40b8aa3efa3d45119b4c8e3fa9692 Mon Sep 17 00:00:00 2001 From: Robert Date: Mon, 14 Jan 2019 14:00:17 +0100 Subject: [PATCH 101/437] Added proper memberPicker in the editorService --- .../src/common/services/editor.service.js | 26 ++++++++++++++++++- .../contentpicker/contentpicker.controller.js | 2 +- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/services/editor.service.js b/src/Umbraco.Web.UI.Client/src/common/services/editor.service.js index 0d6432b01f..6cdb8fd0f3 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/editor.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/editor.service.js @@ -748,6 +748,29 @@ When building a custom infinite editor view you can use the same components as a open(editor); } + /** + * @ngdoc method + * @name umbraco.services.editorService#memberPicker + * @methodOf umbraco.services.editorService + * + * @description + * Opens a member picker in infinite editing, the submit callback returns an array of selected items + * + * @param {Object} editor rendering options + * @param {Boolean} editor.multiPicker Pick one or multiple items + * @param {Function} editor.submit Callback function when the submit button is clicked. Returns the editor model object + * @param {Function} editor.close Callback function when the close button is clicked. + * + * @returns {Object} editor object + */ + function memberPicker(editor) { + editor.view = "views/common/infiniteeditors/treepicker/treepicker.html"; + editor.size = "small"; + editor.section = "member"; + editor.treeAlias = "member"; + open(editor); + } + /////////////////////// /** @@ -824,7 +847,8 @@ When building a custom infinite editor view you can use the same components as a userPicker: userPicker, itemPicker: itemPicker, macroPicker: macroPicker, - memberGroupPicker: memberGroupPicker + memberGroupPicker: memberGroupPicker, + memberPicker: memberPicker }; return service; 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 b72d81f16d..37a97e928c 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 @@ -222,7 +222,7 @@ function contentPickerController($scope, entityResource, editorState, iconHelper editorService.mediaPicker($scope.currentPicker); break; case "Member": - editorService.treePicker($scope.currentPicker); + editorService.memberPicker($scope.currentPicker); break; default: From 862d5227587039969f3f06c52acad9a7c9d170c9 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Mon, 14 Jan 2019 22:53:19 +0100 Subject: [PATCH 102/437] Fix the styling of the search box on the redirect url management dashboard --- .../src/views/dashboard/content/redirecturls.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/dashboard/content/redirecturls.html b/src/Umbraco.Web.UI.Client/src/views/dashboard/content/redirecturls.html index 837c24cb0c..a06984f31e 100644 --- a/src/Umbraco.Web.UI.Client/src/views/dashboard/content/redirecturls.html +++ b/src/Umbraco.Web.UI.Client/src/views/dashboard/content/redirecturls.html @@ -29,7 +29,7 @@ - +
- +
From 2e782a4f114c44184f5076a07fbe3c94b5104524 Mon Sep 17 00:00:00 2001 From: Robert Date: Tue, 15 Jan 2019 15:10:50 +0100 Subject: [PATCH 103/437] Mapping IsContainer into AdditionalData using IEntitySlim to EntityBasic mapper --- src/Umbraco.Web/Editors/EntityController.cs | 2 +- src/Umbraco.Web/Models/Mapping/EntityMapperProfile.cs | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Web/Editors/EntityController.cs b/src/Umbraco.Web/Editors/EntityController.cs index 993489855f..500b25ab2e 100644 --- a/src/Umbraco.Web/Editors/EntityController.cs +++ b/src/Umbraco.Web/Editors/EntityController.cs @@ -769,7 +769,7 @@ namespace Umbraco.Web.Editors { throw new HttpResponseException(HttpStatusCode.NotFound); } - return Mapper.Map(found); + return Mapper.Map(found); } //now we need to convert the unknown ones switch (entityType) diff --git a/src/Umbraco.Web/Models/Mapping/EntityMapperProfile.cs b/src/Umbraco.Web/Models/Mapping/EntityMapperProfile.cs index 178027857c..ff7fcfc0b0 100644 --- a/src/Umbraco.Web/Models/Mapping/EntityMapperProfile.cs +++ b/src/Umbraco.Web/Models/Mapping/EntityMapperProfile.cs @@ -16,7 +16,7 @@ namespace Umbraco.Web.Models.Mapping { internal class EntityMapperProfile : Profile { - private static string GetContentTypeIcon(EntitySlim entity) + private static string GetContentTypeIcon(IEntitySlim entity) => entity is ContentEntitySlim contentEntity ? contentEntity.ContentTypeIcon : null; public EntityMapperProfile() @@ -24,7 +24,7 @@ namespace Umbraco.Web.Models.Mapping // create, capture, cache var contentTypeUdiResolver = new ContentTypeUdiResolver(); - CreateMap() + CreateMap() .ForMember(dest => dest.Name, opt => opt.ResolveUsing()) .ForMember(dest => dest.Udi, opt => opt.MapFrom(src => Udi.Create(ObjectTypes.GetUdiType(src.NodeObjectType), src.Key))) .ForMember(dest => dest.Icon, opt => opt.MapFrom(src => GetContentTypeIcon(src))) @@ -36,6 +36,8 @@ namespace Umbraco.Web.Models.Mapping { dest.Icon = "icon-user"; } + + dest.AdditionalData.Add("IsContainer", src.IsContainer); }); CreateMap() @@ -186,9 +188,9 @@ namespace Umbraco.Web.Models.Mapping /// /// Resolves the name for a content item/content variant /// - private class NameResolver : IValueResolver + private class NameResolver : IValueResolver { - public string Resolve(EntitySlim source, EntityBasic destination, string destMember, ResolutionContext context) + public string Resolve(IEntitySlim source, EntityBasic destination, string destMember, ResolutionContext context) { if (!(source is DocumentEntitySlim doc)) return source.Name; From 5ebf51e6df64419c6676051624237a6a7ca8bcc7 Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Wed, 16 Jan 2019 08:40:00 +0100 Subject: [PATCH 104/437] #3417 added mockup of parameter editing --- .../src/views/macros/edit.html | 5 +- .../infiniteeditors/parameter.controller.js | 27 +++++++ .../macros/infiniteeditors/parameter.html | 58 ++++++++++++++ .../views/macros/macros.edit.controller.js | 30 ++++++- .../views/macro.parameters.controller.js | 78 +++++++++++++++++++ .../src/views/macros/views/parameters.html | 31 +++++++- 6 files changed, 223 insertions(+), 6 deletions(-) create mode 100644 src/Umbraco.Web.UI.Client/src/views/macros/infiniteeditors/parameter.controller.js create mode 100644 src/Umbraco.Web.UI.Client/src/views/macros/infiniteeditors/parameter.html create mode 100644 src/Umbraco.Web.UI.Client/src/views/macros/views/macro.parameters.controller.js diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/edit.html b/src/Umbraco.Web.UI.Client/src/views/macros/edit.html index 911dcf0c9e..ddb5f98781 100644 --- a/src/Umbraco.Web.UI.Client/src/views/macros/edit.html +++ b/src/Umbraco.Web.UI.Client/src/views/macros/edit.html @@ -1,7 +1,6 @@ -
- - +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ' + + + + +
diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/macros.edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/macros/macros.edit.controller.js index ef65c77e1d..81c699a05f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/macros/macros.edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/macros/macros.edit.controller.js @@ -6,7 +6,7 @@ * @description * The controller for editing macros. */ -function MacrosEditController($scope, $routeParams, macroResource, editorState, navigationService, dateHelper, userService, entityResource, formHelper, contentEditingHelper, localizationService) { +function MacrosEditController($scope, $routeParams, macroResource, editorState, navigationService, dateHelper, userService, entityResource, formHelper, contentEditingHelper, localizationService, angularHelper) { var vm = this; @@ -17,6 +17,7 @@ function MacrosEditController($scope, $routeParams, macroResource, editorState, vm.save = saveMacro; vm.toggle = toggleValue; + init(); @@ -50,11 +51,25 @@ function MacrosEditController($scope, $routeParams, macroResource, editorState, "cachePeriod": 2400, "cacheByPage": true, "cacheByUser": false, - "view" : "Second" + "view": "Second", + "parameters": [ + { + "key": "title", + "label": "Label", + "editor": "editor" + }, + { + "key": "link", + "label": "Link", + "editor": "Link picker" + } + ] } vm.views = ['First', 'Second', 'Third']; + vm.parameterEditors = ['editor', 'Link picker', 'Image picker']; + vm.page.loading = false; } @@ -82,6 +97,17 @@ function MacrosEditController($scope, $routeParams, macroResource, editorState, //}); } } + + function setFormDirty() { + var currentForm = angularHelper.getCurrentForm($scope); + + if (currentForm) { + + currentForm.$setDirty(); + } + } + + vm.setDirty = setFormDirty; } angular.module("umbraco").controller("Umbraco.Editors.Macros.EditController", MacrosEditController); diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/views/macro.parameters.controller.js b/src/Umbraco.Web.UI.Client/src/views/macros/views/macro.parameters.controller.js new file mode 100644 index 0000000000..851b537c3b --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/macros/views/macro.parameters.controller.js @@ -0,0 +1,78 @@ +/** + * @ngdoc controller + * @name Umbraco.Editors.Macros.ParametersController + * @function + * + * @description + * The controller for editing macros parameters + */ +function MacrosParametersController($scope, editorService) { + + $scope.sortableOptions = { + axis: 'y', + containment: 'parent', + cursor: 'move', + items: 'div.umb-stylesheet-rules__listitem', + handle: '.handle', + tolerance: 'pointer', + update: function (e, ui) { + $scope.model.setDirty(); + } + }; + + + $scope.remove = function (parameter, evt) { + evt.preventDefault(); + + $scope.model.macro.parameters = _.without($scope.model.macro.parameters, parameter); + $scope.model.setDirty(); + } + + $scope.add = function (evt) { + evt.preventDefault(); + + openOverlay({}, 'Add parameter', (newParameter) => { + if (!$scope.model.macro.parameters) { + $scope.model.macro.parameters = []; + } + $scope.model.macro.parameters.push(newParameter); + $scope.model.setDirty(); + }); + } + + $scope.edit = function (parameter, evt) { + evt.preventDefault(); + + openOverlay(parameter,'Edit parameter', (newParameter) => { + parameter.key = newParameter.key; + parameter.label = newParameter.label; + parameter.editor = newParameter.editor; + parameter.editor = newParameter.editor; + $scope.model.setDirty(); + }); + } + + function openOverlay(parameter, title, onSubmit) { + + const ruleDialog = { + title: title, + parameter: _.clone(parameter), + editors : $scope.model.parameterEditors, + view: "views/macros/infiniteeditors/parameter.html", + size: "small", + submit: function (model) { + onSubmit(model.parameter); + editorService.close(); + }, + close: function () { + editorService.close(); + } + }; + + editorService.open(ruleDialog); + + } + +} + +angular.module("umbraco").controller("Umbraco.Editors.Macros.ParametersController", MacrosParametersController); diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/views/parameters.html b/src/Umbraco.Web.UI.Client/src/views/macros/views/parameters.html index 6a10d4f80b..91231a49b7 100644 --- a/src/Umbraco.Web.UI.Client/src/views/macros/views/parameters.html +++ b/src/Umbraco.Web.UI.Client/src/views/macros/views/parameters.html @@ -1,3 +1,32 @@  - + +
+
+
Parameters
+ Define the parameters hat should be available when using his macro +
+
+
+
+
+ +
+ {{parameter.label}} +
+
+ Remove +
+
+
+ + +
+
+
+ +
From 31545db91ed33ad59a4049a91792d11edbee02a6 Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 16 Jan 2019 19:29:42 +1100 Subject: [PATCH 105/437] Fixes routing with the packages section --- src/Umbraco.Web.UI.Client/src/routes.js | 13 ++++++++--- .../src/views/packages/edit.controller.js | 4 ++-- .../src/views/packages/overview.controller.js | 22 +++++++++---------- .../Trees/PackagesTreeController.cs | 2 +- 4 files changed, 24 insertions(+), 17 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/routes.js b/src/Umbraco.Web.UI.Client/src/routes.js index 2d8ad46371..64bddb16e2 100644 --- a/src/Umbraco.Web.UI.Client/src/routes.js +++ b/src/Umbraco.Web.UI.Client/src/routes.js @@ -149,14 +149,21 @@ app.config(function ($routeProvider) { .when('/:section/:tree/:method?', { //This allows us to dynamically change the template for this route since you cannot inject services into the templateUrl method. template: "
", - //This controller will execute for this route, then we replace the template dynamnically based on the current tree. - controller: function ($scope, $route, $routeParams, treeService) { + //This controller will execute for this route, then we replace the template dynamically based on the current tree. + controller: function ($scope, $routeParams, treeService) { if (!$routeParams.method) { $scope.templateUrl = "views/common/dashboard.html"; + return; } - // Here we need to figure out if this route is for a package tree and if so then we need + //special case for the package section + if ($routeParams.section.toLowerCase() === "packages" && $routeParams.tree.toLowerCase() === "packages" && $routeParams.method !== "edit") { + $scope.templateUrl = "views/packages/overview.html"; + return; + } + + // Here we need to figure out if this route is for a user's package tree and if so then we need // to change it's convention view path to: // /App_Plugins/{mypackage}/backoffice/{treetype}/{method}.html diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js index 4afe62786e..29d871c0b1 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js @@ -130,7 +130,7 @@ } function back() { - $location.path("packages/packages/overview").search('create', null);; + $location.path("packages/packages/created").search("create", null); } function createOrUpdatePackage(editPackageForm) { @@ -148,7 +148,7 @@ if (create) { //if we are creating, then redirect to the correct url and reload - $location.path("packages/packages/edit/" + vm.package.id).search("subview", "created").search("create", null); + $location.path("packages/packages/edit/" + vm.package.id).search("create", null); //don't add a browser history for this $location.replace(); } diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/packages/overview.controller.js index ccd86c6f6c..59fa79dc26 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/overview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/packages/overview.controller.js @@ -1,7 +1,7 @@ (function () { "use strict"; - function PackagesOverviewController($scope, $location, localStorageService) { + function PackagesOverviewController($scope, $location, $routeParams, localStorageService) { //Hack! // if there is a cookie value for packageInstallUri then we need to redirect there, @@ -10,7 +10,7 @@ // we will refresh and then navigate there. let installPackageUri = localStorageService.get("packageInstallUri"); - let packageUri = $location.search().subview; + let packageUri = $routeParams.method; if (installPackageUri) { localStorageService.remove("packageInstallUri"); @@ -33,10 +33,10 @@ "name": "Packages", "icon": "icon-cloud", "view": "views/packages/views/repo.html", - "active": !packageUri || packageUri === "navigation", + "active": !packageUri || packageUri === "repo", "alias": "umbPackages", - "action": function() { - $location.search("subview", "navigation"); + "action": function () { + $location.path("/packages/packages/repo"); } }, { @@ -45,8 +45,8 @@ "view": "views/packages/views/installed.html", "active": packageUri === "installed", "alias": "umbInstalled", - "action": function() { - $location.search("subview", "installed"); + "action": function () { + $location.path("/packages/packages/installed"); } }, { @@ -55,8 +55,8 @@ "view": "views/packages/views/install-local.html", "active": packageUri === "local", "alias": "umbInstallLocal", - "action": function() { - $location.search("subview", "local"); + "action": function () { + $location.path("/packages/packages/local"); } }, { @@ -65,8 +65,8 @@ "view": "views/packages/views/created.html", "active": packageUri === "created", "alias": "umbCreatedPackages", - "action": function() { - $location.search("subview", "created"); + "action": function () { + $location.path("/packages/packages/created"); } } ]; diff --git a/src/Umbraco.Web/Trees/PackagesTreeController.cs b/src/Umbraco.Web/Trees/PackagesTreeController.cs index fdc5294aa2..68b67f9fe2 100644 --- a/src/Umbraco.Web/Trees/PackagesTreeController.cs +++ b/src/Umbraco.Web/Trees/PackagesTreeController.cs @@ -22,7 +22,7 @@ namespace Umbraco.Web.Trees var root = base.CreateRootNode(queryStrings); //this will load in a custom UI instead of the dashboard for the root node - root.RoutePath = $"{Constants.Applications.Packages}/{Constants.Trees.Packages}/overview"; + root.RoutePath = $"{Constants.Applications.Packages}/{Constants.Trees.Packages}/repo"; root.Icon = "icon-box"; root.HasChildren = false; From 572c6989ceadb4edccfad2238ca1258510be4d1e Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 16 Jan 2019 19:30:07 +1100 Subject: [PATCH 106/437] Changes control to view for the package view --- .../Models/Packaging/CompiledPackage.cs | 2 +- .../Models/Packaging/IPackageInfo.cs | 7 +++- .../Models/Packaging/PackageDefinition.cs | 41 +++---------------- .../Packaging/CompiledPackageXmlParser.cs | 2 +- .../Packaging/PackageDefinitionXmlParser.cs | 4 +- .../Packaging/PackagesRepository.cs | 6 +-- .../src/views/packages/edit.controller.js | 14 +++---- .../src/views/packages/edit.html | 6 +-- .../Editors/PackageInstallController.cs | 7 ++-- 9 files changed, 32 insertions(+), 57 deletions(-) diff --git a/src/Umbraco.Core/Models/Packaging/CompiledPackage.cs b/src/Umbraco.Core/Models/Packaging/CompiledPackage.cs index a852fcc997..f14fe47bfe 100644 --- a/src/Umbraco.Core/Models/Packaging/CompiledPackage.cs +++ b/src/Umbraco.Core/Models/Packaging/CompiledPackage.cs @@ -23,7 +23,7 @@ namespace Umbraco.Core.Models.Packaging public string Author { get; set; } public string AuthorUrl { get; set; } public string Readme { get; set; } - public string Control { get; set; } + public string PackageView { get; set; } public string IconUrl { get; set; } public string Actions { get; set; } //fixme: Should we make this strongly typed to IEnumerable ? diff --git a/src/Umbraco.Core/Models/Packaging/IPackageInfo.cs b/src/Umbraco.Core/Models/Packaging/IPackageInfo.cs index 8722ee7811..eea56549f1 100644 --- a/src/Umbraco.Core/Models/Packaging/IPackageInfo.cs +++ b/src/Umbraco.Core/Models/Packaging/IPackageInfo.cs @@ -13,7 +13,12 @@ namespace Umbraco.Core.Models.Packaging string Author { get; } string AuthorUrl { get; } string Readme { get; } - string Control { get; } //fixme - this needs to be an angular view + + /// + /// This is the angular view path that will be loaded when the package installs + /// + string PackageView { get; } + string IconUrl { get; } } } diff --git a/src/Umbraco.Core/Models/Packaging/PackageDefinition.cs b/src/Umbraco.Core/Models/Packaging/PackageDefinition.cs index c068c57b08..8c0ef79d0b 100644 --- a/src/Umbraco.Core/Models/Packaging/PackageDefinition.cs +++ b/src/Umbraco.Core/Models/Packaging/PackageDefinition.cs @@ -25,7 +25,7 @@ namespace Umbraco.Core.Models.Packaging Actions = compiled.Actions, Author = compiled.Author, AuthorUrl = compiled.AuthorUrl, - Control = compiled.Control, + PackageView = compiled.PackageView, IconUrl = compiled.IconUrl, License = compiled.License, LicenseUrl = compiled.LicenseUrl, @@ -115,9 +115,9 @@ namespace Umbraco.Core.Models.Packaging [DataMember(Name = "files")] public IList Files { get; set; } = new List(); - //fixme: Change this to angular view - [DataMember(Name = "loadControl")] - public string Control { get; set; } = string.Empty; + /// + [DataMember(Name = "packageView")] + public string PackageView { get; set; } = string.Empty; [DataMember(Name = "actions")] public string Actions { get; set; } = ""; @@ -127,38 +127,7 @@ namespace Umbraco.Core.Models.Packaging [DataMember(Name = "iconUrl")] public string IconUrl { get; set; } = string.Empty; - - public PackageDefinition Clone() - { - return new PackageDefinition - { - Id = Id, - PackagePath = PackagePath, - Name = Name, - Files = new List(Files), - UmbracoVersion = (Version) UmbracoVersion.Clone(), - Version = Version, - Url = Url, - Readme = Readme, - AuthorUrl = AuthorUrl, - Author = Author, - LicenseUrl = LicenseUrl, - Actions = Actions, - PackageId = PackageId, - Control = Control, - DataTypes = new List(DataTypes), - IconUrl = IconUrl, - License = License, - Templates = new List(Templates), - Languages = new List(Languages), - Macros = new List(Macros), - Stylesheets = new List(Stylesheets), - DocumentTypes = new List(DocumentTypes), - DictionaryItems = new List(DictionaryItems), - ContentNodeId = ContentNodeId, - ContentLoadChildNodes = ContentLoadChildNodes - }; - } + } diff --git a/src/Umbraco.Core/Packaging/CompiledPackageXmlParser.cs b/src/Umbraco.Core/Packaging/CompiledPackageXmlParser.cs index 0d533cfbc2..7f62f4fd27 100644 --- a/src/Umbraco.Core/Packaging/CompiledPackageXmlParser.cs +++ b/src/Umbraco.Core/Packaging/CompiledPackageXmlParser.cs @@ -51,7 +51,7 @@ namespace Umbraco.Core.Packaging IconUrl = package.Element("iconUrl")?.Value, UmbracoVersion = new Version((int)requirements.Element("major"), (int)requirements.Element("minor"), (int)requirements.Element("patch")), UmbracoVersionRequirementsType = requirements.AttributeValue("type").IsNullOrWhiteSpace() ? RequirementsType.Legacy : Enum.Parse(requirements.AttributeValue("type"), true), - Control = package.Element("control")?.Value, + PackageView = package.Element("view")?.Value, Actions = xml.Root.Element("Actions")?.ToString(SaveOptions.None) ?? "", //take the entire outer xml value Files = xml.Root.Element("files")?.Elements("file")?.Select(CompiledPackageFile.Create).ToList() ?? new List(), Macros = xml.Root.Element("Macros")?.Elements("macro") ?? Enumerable.Empty(), diff --git a/src/Umbraco.Core/Packaging/PackageDefinitionXmlParser.cs b/src/Umbraco.Core/Packaging/PackageDefinitionXmlParser.cs index 45e6fd9845..00255fa43a 100644 --- a/src/Umbraco.Core/Packaging/PackageDefinitionXmlParser.cs +++ b/src/Umbraco.Core/Packaging/PackageDefinitionXmlParser.cs @@ -50,7 +50,7 @@ namespace Umbraco.Core.Packaging DictionaryItems = xml.Element("dictionaryitems")?.Value.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList() ?? new List(), DataTypes = xml.Element("datatypes")?.Value.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList() ?? new List(), Files = xml.Element("files")?.Elements("file").Select(x => x.Value).ToList() ?? new List(), - Control = xml.Element("loadcontrol")?.Value ?? string.Empty + PackageView = xml.Element("view")?.Value ?? string.Empty }; return retVal; @@ -101,7 +101,7 @@ namespace Umbraco.Core.Packaging new XElement("files", (def.Files ?? Array.Empty()).Where(x => !x.IsNullOrWhiteSpace()).Select(x => new XElement("file", x))), new XElement("languages", string.Join(",", def.Languages ?? Array.Empty())), new XElement("dictionaryitems", string.Join(",", def.DictionaryItems ?? Array.Empty())), - new XElement("loadcontrol", def.Control ?? string.Empty)); //fixme: no more loadcontrol, needs to be an angular view + new XElement("view", def.PackageView ?? string.Empty)); return packageXml; } diff --git a/src/Umbraco.Core/Packaging/PackagesRepository.cs b/src/Umbraco.Core/Packaging/PackagesRepository.cs index 249d02a320..5531e05705 100644 --- a/src/Umbraco.Core/Packaging/PackagesRepository.cs +++ b/src/Umbraco.Core/Packaging/PackagesRepository.cs @@ -180,10 +180,10 @@ namespace Umbraco.Core.Packaging AppendFileToManifest(fileName, temporaryPath, filesXml); //Load control on install... - if (!string.IsNullOrEmpty(definition.Control)) + if (!string.IsNullOrEmpty(definition.PackageView)) { - var control = new XElement("control", definition.Control); - AppendFileToManifest(definition.Control, temporaryPath, filesXml); + var control = new XElement("view", definition.PackageView); + AppendFileToManifest(definition.PackageView, temporaryPath, filesXml); manifestRoot.Add(control); } diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js index 29d871c0b1..ca20b33a3e 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js @@ -19,8 +19,8 @@ vm.openContentPicker = openContentPicker; vm.openFilePicker = openFilePicker; vm.removeFile = removeFile; - vm.openControlPicker = openControlPicker; - vm.removeControl = removeControl; + vm.openViewPicker = openViewPicker; + vm.removePackageView = removePackageView; vm.downloadFile = downloadFile; const packageId = $routeParams.id; @@ -220,16 +220,16 @@ vm.package.files.splice(index, 1); } - function openControlPicker() { + function openViewPicker() { const controlPicker = { - title: "Select control", + title: "Select view", section: "settings", treeAlias: "files", entityType: "file", onlyInitialized: false, select: function(node) { const id = unescape(node.id); - vm.package.loadControl = id; + vm.package.packageView = id; editorService.close(); }, close: function() { @@ -239,8 +239,8 @@ editorService.treePicker(controlPicker); } - function removeControl() { - vm.package.loadControl = null; + function removePackageView() { + vm.package.packageView = null; } onInit(); diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/edit.html b/src/Umbraco.Web.UI.Client/src/views/packages/edit.html index 8ed1a43e8a..5163fadfb5 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/edit.html +++ b/src/Umbraco.Web.UI.Client/src/views/packages/edit.html @@ -264,14 +264,14 @@ name="vm.package.loadControl" allow-edit="true" allow-remove="true" - on-edit="vm.openControlPicker()" - on-remove="vm.removeControl()"> + on-edit="vm.openViewPicker()" + on-remove="vm.removePackageView()"> Add diff --git a/src/Umbraco.Web/Editors/PackageInstallController.cs b/src/Umbraco.Web/Editors/PackageInstallController.cs index dd7c4302c5..544a871720 100644 --- a/src/Umbraco.Web/Editors/PackageInstallController.cs +++ b/src/Umbraco.Web/Editors/PackageInstallController.cs @@ -376,10 +376,11 @@ namespace Umbraco.Web.Editors zipFile.Delete(); var redirectUrl = ""; - if (packageInfo.Control.IsNullOrWhiteSpace() == false) + if (!packageInfo.PackageView.IsNullOrWhiteSpace()) { - //fixme: this needs to be replaced with an angular view the installer.aspx no longer exists. - //redirectUrl = string.Format("/developer/framed/{0}", + //fixme! + throw new NotImplementedException(); + //redirectUrl = string.Format("/packages/framed/{0}", // Uri.EscapeDataString( // string.Format("/umbraco/developer/Packages/installer.aspx?installing=custominstaller&dir={0}&pId={1}&customControl={2}&customUrl={3}", tempDir, model.Id, ins.Control, ins.Url))); } From c4418185ec2e83d48c335d1ca6860b27f427dba5 Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 16 Jan 2019 21:27:14 +1100 Subject: [PATCH 107/437] Gets the angular view loading and allows navigating back to the view, cleans up non used lang keys --- .../Packaging/CompiledPackageXmlParser.cs | 2 +- .../Packaging/PackageDefinitionXmlParser.cs | 8 +- .../Packaging/PackagesRepository.cs | 86 +++++++++---------- .../mocks/services/localization.mocks.js | 7 -- .../src/common/resources/package.resource.js | 12 ++- src/Umbraco.Web.UI.Client/src/routes.js | 3 +- .../src/views/packages/edit.html | 10 +-- .../src/views/packages/options.controller.js | 43 ++++++++++ .../src/views/packages/options.html | 40 +++++++++ .../src/views/packages/overview.controller.js | 3 +- .../packages/views/installed.controller.js | 5 ++ .../src/views/packages/views/installed.html | 19 ++-- src/Umbraco.Web.UI/Umbraco/config/lang/cs.xml | 7 -- src/Umbraco.Web.UI/Umbraco/config/lang/da.xml | 7 -- src/Umbraco.Web.UI/Umbraco/config/lang/de.xml | 7 -- src/Umbraco.Web.UI/Umbraco/config/lang/en.xml | 7 -- .../Umbraco/config/lang/en_us.xml | 7 -- src/Umbraco.Web.UI/Umbraco/config/lang/es.xml | 8 -- src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml | 7 -- src/Umbraco.Web.UI/Umbraco/config/lang/he.xml | 7 -- src/Umbraco.Web.UI/Umbraco/config/lang/it.xml | 7 -- src/Umbraco.Web.UI/Umbraco/config/lang/ja.xml | 7 -- src/Umbraco.Web.UI/Umbraco/config/lang/ko.xml | 7 -- src/Umbraco.Web.UI/Umbraco/config/lang/nb.xml | 7 -- src/Umbraco.Web.UI/Umbraco/config/lang/nl.xml | 7 -- src/Umbraco.Web.UI/Umbraco/config/lang/pl.xml | 7 -- src/Umbraco.Web.UI/Umbraco/config/lang/pt.xml | 7 -- src/Umbraco.Web.UI/Umbraco/config/lang/ru.xml | 7 -- src/Umbraco.Web.UI/Umbraco/config/lang/sv.xml | 7 -- src/Umbraco.Web.UI/Umbraco/config/lang/tr.xml | 7 -- src/Umbraco.Web.UI/Umbraco/config/lang/zh.xml | 7 -- .../Umbraco/config/lang/zh_tw.xml | 7 -- src/Umbraco.Web.UI/umbraco/config/lang/nb.xml | 7 -- .../umbraco/config/lang/zh_tw.xml | 7 -- src/Umbraco.Web/Editors/PackageController.cs | 22 ++--- .../Editors/PackageInstallController.cs | 11 +-- .../ContentEditing/InstalledPackageModel.cs | 39 --------- src/Umbraco.Web/Umbraco.Web.csproj | 1 - 38 files changed, 180 insertions(+), 286 deletions(-) create mode 100644 src/Umbraco.Web.UI.Client/src/views/packages/options.controller.js create mode 100644 src/Umbraco.Web.UI.Client/src/views/packages/options.html delete mode 100644 src/Umbraco.Web/Models/ContentEditing/InstalledPackageModel.cs diff --git a/src/Umbraco.Core/Packaging/CompiledPackageXmlParser.cs b/src/Umbraco.Core/Packaging/CompiledPackageXmlParser.cs index 7f62f4fd27..9e6339178e 100644 --- a/src/Umbraco.Core/Packaging/CompiledPackageXmlParser.cs +++ b/src/Umbraco.Core/Packaging/CompiledPackageXmlParser.cs @@ -51,7 +51,7 @@ namespace Umbraco.Core.Packaging IconUrl = package.Element("iconUrl")?.Value, UmbracoVersion = new Version((int)requirements.Element("major"), (int)requirements.Element("minor"), (int)requirements.Element("patch")), UmbracoVersionRequirementsType = requirements.AttributeValue("type").IsNullOrWhiteSpace() ? RequirementsType.Legacy : Enum.Parse(requirements.AttributeValue("type"), true), - PackageView = package.Element("view")?.Value, + PackageView = xml.Root.Element("view")?.Value, Actions = xml.Root.Element("Actions")?.ToString(SaveOptions.None) ?? "", //take the entire outer xml value Files = xml.Root.Element("files")?.Elements("file")?.Select(CompiledPackageFile.Create).ToList() ?? new List(), Macros = xml.Root.Element("Macros")?.Elements("macro") ?? Enumerable.Empty(), diff --git a/src/Umbraco.Core/Packaging/PackageDefinitionXmlParser.cs b/src/Umbraco.Core/Packaging/PackageDefinitionXmlParser.cs index 00255fa43a..b66cdb095c 100644 --- a/src/Umbraco.Core/Packaging/PackageDefinitionXmlParser.cs +++ b/src/Umbraco.Core/Packaging/PackageDefinitionXmlParser.cs @@ -34,6 +34,7 @@ namespace Umbraco.Core.Packaging PackageId = xml.AttributeValue("packageGuid"), IconUrl = xml.AttributeValue("iconUrl") ?? string.Empty, UmbracoVersion = xml.AttributeValue("umbVersion"), + PackageView = xml.AttributeValue("view") ?? string.Empty, License = xml.Element("license")?.Value ?? string.Empty, LicenseUrl = xml.Element("license")?.AttributeValue("url") ?? string.Empty, Author = xml.Element("author")?.Value ?? string.Empty, @@ -49,8 +50,7 @@ namespace Umbraco.Core.Packaging Languages = xml.Element("languages")?.Value.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList() ?? new List(), DictionaryItems = xml.Element("dictionaryitems")?.Value.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList() ?? new List(), DataTypes = xml.Element("datatypes")?.Value.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList() ?? new List(), - Files = xml.Element("files")?.Elements("file").Select(x => x.Value).ToList() ?? new List(), - PackageView = xml.Element("view")?.Value ?? string.Empty + Files = xml.Element("files")?.Elements("file").Select(x => x.Value).ToList() ?? new List() }; return retVal; @@ -77,6 +77,7 @@ namespace Umbraco.Core.Packaging new XAttribute("iconUrl", def.IconUrl ?? string.Empty), new XAttribute("umbVersion", def.UmbracoVersion), new XAttribute("packageGuid", def.PackageId), + new XAttribute("view", def.PackageView ?? string.Empty), new XElement("license", new XCData(def.License ?? string.Empty), @@ -100,8 +101,7 @@ namespace Umbraco.Core.Packaging new XElement("macros", string.Join(",", def.Macros ?? Array.Empty())), new XElement("files", (def.Files ?? Array.Empty()).Where(x => !x.IsNullOrWhiteSpace()).Select(x => new XElement("file", x))), new XElement("languages", string.Join(",", def.Languages ?? Array.Empty())), - new XElement("dictionaryitems", string.Join(",", def.DictionaryItems ?? Array.Empty())), - new XElement("view", def.PackageView ?? string.Empty)); + new XElement("dictionaryitems", string.Join(",", def.DictionaryItems ?? Array.Empty()))); return packageXml; } diff --git a/src/Umbraco.Core/Packaging/PackagesRepository.cs b/src/Umbraco.Core/Packaging/PackagesRepository.cs index 5531e05705..1df232f62d 100644 --- a/src/Umbraco.Core/Packaging/PackagesRepository.cs +++ b/src/Umbraco.Core/Packaging/PackagesRepository.cs @@ -161,30 +161,30 @@ namespace Umbraco.Core.Packaging try { //Init package file - var packageManifest = CreatePackageManifest(out var manifestRoot, out var filesXml); + var compiledPackageXml = CreateCompiledPackageXml(out var root, out var filesXml); //Info section - manifestRoot.Add(GetPackageInfoXml(definition)); + root.Add(GetPackageInfoXml(definition)); - PackageDocumentsAndTags(definition, manifestRoot); - PackageDocumentTypes(definition, manifestRoot); - PackageTemplates(definition, manifestRoot); - PackageStylesheets(definition, manifestRoot); - PackageMacros(definition, manifestRoot, filesXml, temporaryPath); - PackageDictionaryItems(definition, manifestRoot); - PackageLanguages(definition, manifestRoot); - PackageDataTypes(definition, manifestRoot); + PackageDocumentsAndTags(definition, root); + PackageDocumentTypes(definition, root); + PackageTemplates(definition, root); + PackageStylesheets(definition, root); + PackageMacros(definition, root, filesXml, temporaryPath); + PackageDictionaryItems(definition, root); + PackageLanguages(definition, root); + PackageDataTypes(definition, root); //Files foreach (var fileName in definition.Files) - AppendFileToManifest(fileName, temporaryPath, filesXml); + AppendFileToPackage(fileName, temporaryPath, filesXml); - //Load control on install... + //Load view on install... if (!string.IsNullOrEmpty(definition.PackageView)) { var control = new XElement("view", definition.PackageView); - AppendFileToManifest(definition.PackageView, temporaryPath, filesXml); - manifestRoot.Add(control); + AppendFileToPackage(definition.PackageView, temporaryPath, filesXml); + root.Add(control); } //Actions @@ -196,20 +196,20 @@ namespace Umbraco.Core.Packaging //this will be formatted like a full xml block like ... and we want the child nodes var parsed = XElement.Parse(definition.Actions); actionsXml.Add(parsed.Elements()); - manifestRoot.Add(actionsXml); + root.Add(actionsXml); } catch (Exception e) { - _logger.Warn(e, "Could not add package actions to the package manifest, the xml did not parse"); + _logger.Warn(e, "Could not add package actions to the package, the xml did not parse"); } } - var manifestFileName = temporaryPath + "/package.xml"; + var packageXmlFileName = temporaryPath + "/package.xml"; - if (File.Exists(manifestFileName)) - File.Delete(manifestFileName); + if (File.Exists(packageXmlFileName)) + File.Delete(packageXmlFileName); - packageManifest.Save(manifestFileName); + compiledPackageXml.Save(packageXmlFileName); // check if there's a packages directory below media @@ -242,7 +242,7 @@ namespace Umbraco.Core.Packaging throw new InvalidOperationException("Validation failed, there is invalid data on the model: " + string.Join(", ", results.Select(x => x.ErrorMessage))); } - private void PackageDataTypes(PackageDefinition definition, XContainer manifestRoot) + private void PackageDataTypes(PackageDefinition definition, XContainer root) { var dataTypes = new XElement("DataTypes"); foreach (var dtId in definition.DataTypes) @@ -252,10 +252,10 @@ namespace Umbraco.Core.Packaging if (dataType == null) continue; dataTypes.Add(_serializer.Serialize(dataType)); } - manifestRoot.Add(dataTypes); + root.Add(dataTypes); } - private void PackageLanguages(PackageDefinition definition, XContainer manifestRoot) + private void PackageLanguages(PackageDefinition definition, XContainer root) { var languages = new XElement("Languages"); foreach (var langId in definition.Languages) @@ -265,10 +265,10 @@ namespace Umbraco.Core.Packaging if (lang == null) continue; languages.Add(_serializer.Serialize(lang)); } - manifestRoot.Add(languages); + root.Add(languages); } - private void PackageDictionaryItems(PackageDefinition definition, XContainer manifestRoot) + private void PackageDictionaryItems(PackageDefinition definition, XContainer root) { var dictionaryItems = new XElement("DictionaryItems"); foreach (var dictionaryId in definition.DictionaryItems) @@ -278,10 +278,10 @@ namespace Umbraco.Core.Packaging if (di == null) continue; dictionaryItems.Add(_serializer.Serialize(di, false)); } - manifestRoot.Add(dictionaryItems); + root.Add(dictionaryItems); } - private void PackageMacros(PackageDefinition definition, XContainer manifestRoot, XContainer filesXml, string temporaryPath) + private void PackageMacros(PackageDefinition definition, XContainer root, XContainer filesXml, string temporaryPath) { var macros = new XElement("Macros"); foreach (var macroId in definition.Macros) @@ -291,14 +291,14 @@ namespace Umbraco.Core.Packaging var macroXml = GetMacroXml(outInt, out var macro); if (macroXml == null) continue; macros.Add(macroXml); - //if the macro has a file copy it to the manifest + //if the macro has a file copy it to the xml if (!string.IsNullOrEmpty(macro.MacroSource)) - AppendFileToManifest(macro.MacroSource, temporaryPath, filesXml); + AppendFileToPackage(macro.MacroSource, temporaryPath, filesXml); } - manifestRoot.Add(macros); + root.Add(macros); } - private void PackageStylesheets(PackageDefinition definition, XContainer manifestRoot) + private void PackageStylesheets(PackageDefinition definition, XContainer root) { var stylesheetsXml = new XElement("Stylesheets"); foreach (var stylesheetName in definition.Stylesheets) @@ -308,10 +308,10 @@ namespace Umbraco.Core.Packaging if (xml != null) stylesheetsXml.Add(xml); } - manifestRoot.Add(stylesheetsXml); + root.Add(stylesheetsXml); } - private void PackageTemplates(PackageDefinition definition, XContainer manifestRoot) + private void PackageTemplates(PackageDefinition definition, XContainer root) { var templatesXml = new XElement("Templates"); foreach (var templateId in definition.Templates) @@ -321,10 +321,10 @@ namespace Umbraco.Core.Packaging if (template == null) continue; templatesXml.Add(_serializer.Serialize(template)); } - manifestRoot.Add(templatesXml); + root.Add(templatesXml); } - private void PackageDocumentTypes(PackageDefinition definition, XContainer manifestRoot) + private void PackageDocumentTypes(PackageDefinition definition, XContainer root) { var contentTypes = new HashSet(); var docTypesXml = new XElement("DocumentTypes"); @@ -338,10 +338,10 @@ namespace Umbraco.Core.Packaging foreach (var contentType in contentTypes) docTypesXml.Add(_serializer.Serialize(contentType)); - manifestRoot.Add(docTypesXml); + root.Add(docTypesXml); } - private void PackageDocumentsAndTags(PackageDefinition definition, XContainer manifestRoot) + private void PackageDocumentsAndTags(PackageDefinition definition, XContainer root) { //Documents and tags if (string.IsNullOrEmpty(definition.ContentNodeId) == false && int.TryParse(definition.ContentNodeId, out var contentNodeId)) @@ -356,7 +356,7 @@ namespace Umbraco.Core.Packaging //Create the Documents/DocumentSet node - manifestRoot.Add( + root.Add( new XElement("Documents", new XElement("DocumentSet", new XAttribute("importMode", "root"), @@ -438,12 +438,12 @@ namespace Umbraco.Core.Packaging } /// - /// Appends a file to package manifest and copies the file to the correct folder. + /// Appends a file to package and copies the file to the correct folder. /// /// The path. /// The package directory. /// The files xml node - private static void AppendFileToManifest(string path, string packageDirectory, XContainer filesXml) + private static void AppendFileToPackage(string path, string packageDirectory, XContainer filesXml) { if (!path.StartsWith("~/") && !path.StartsWith("/")) path = "~/" + path; @@ -584,12 +584,12 @@ namespace Umbraco.Core.Packaging return info; } - private static XDocument CreatePackageManifest(out XElement root, out XElement files) + private static XDocument CreateCompiledPackageXml(out XElement root, out XElement files) { files = new XElement("files"); root = new XElement("umbPackage", files); - var packageManifest = new XDocument(root); - return packageManifest; + var compiledPackageXml = new XDocument(root); + return compiledPackageXml; } private XDocument EnsureStorage(out string packagesFile) diff --git a/src/Umbraco.Web.UI.Client/src/common/mocks/services/localization.mocks.js b/src/Umbraco.Web.UI.Client/src/common/mocks/services/localization.mocks.js index ec1175ab6c..87955739fb 100644 --- a/src/Umbraco.Web.UI.Client/src/common/mocks/services/localization.mocks.js +++ b/src/Umbraco.Web.UI.Client/src/common/mocks/services/localization.mocks.js @@ -453,13 +453,11 @@ angular.module('umbraco.mocks'). "notifications_notifications": "Notifications", "packager_chooseLocalPackageText": " Choose Package from your machine, by clicking the Browse
button and locating the package. Umbraco packages usually have a '.umb' or '.zip' extension. ", "packager_packageAuthor": "Author", - "packager_packageDemonstration": "Demonstration", "packager_packageDocumentation": "Documentation", "packager_packageMetaData": "Package meta data", "packager_packageName": "Package name", "packager_packageNoItemsHeader": "Package doesn't contain any items", "packager_packageNoItemsText": "This package file doesn't contain any items to uninstall.

You can safely remove this from the system by clicking 'uninstall package' below.", - "packager_packageNoUpgrades": "No upgrades available", "packager_packageOptions": "Package options", "packager_packageReadme": "Package readme", "packager_packageRepository": "Package repository", @@ -468,12 +466,7 @@ angular.module('umbraco.mocks'). "packager_packageUninstalledText": "The package was successfully uninstalled", "packager_packageUninstallHeader": "Uninstall package", "packager_packageUninstallText": "You can unselect items you do not wish to remove, at this time, below. When you click 'confirm uninstall' all checked-off items will be removed.
Notice: any documents, media etc depending on the items you remove, will stop working, and could lead to system instability, so uninstall with caution. If in doubt, contact the package author.", - "packager_packageUpgradeDownload": "Download update from the repository", - "packager_packageUpgradeHeader": "Upgrade package", - "packager_packageUpgradeInstructions": "Upgrade instructions", - "packager_packageUpgradeText": " There's an upgrade available for this package. You can download it directly from the Umbraco package repository.", "packager_packageVersion": "Package version", - "packager_viewPackageWebsite": "View package website", "paste_doNothing": "Paste with full formatting (Not recommended)", "paste_errorMessage": "The text you're trying to paste contains special characters or formatting. This could be caused by copying text from Microsoft Word. Umbraco can remove special characters or formatting automatically, so the pasted content will be more suitable for the web.", "paste_removeAll": "Paste as raw text without any formatting at all", diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/package.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/package.resource.js index 0d74d0fdd3..7519341327 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/package.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/package.resource.js @@ -175,7 +175,17 @@ function packageResource($q, $http, umbDataFormatter, umbRequestHelper) { umbRequestHelper.getApiUrl( "packageApiBaseUrl", "GetCreatedPackageById", - [{ id: id }])), + { id: id })), + 'Failed to get package'); + }, + + getInstalledById: function (id) { + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "packageApiBaseUrl", + "GetInstalledPackageById", + { id: id })), 'Failed to get package'); }, diff --git a/src/Umbraco.Web.UI.Client/src/routes.js b/src/Umbraco.Web.UI.Client/src/routes.js index 64bddb16e2..c2d3ea2df8 100644 --- a/src/Umbraco.Web.UI.Client/src/routes.js +++ b/src/Umbraco.Web.UI.Client/src/routes.js @@ -158,7 +158,8 @@ app.config(function ($routeProvider) { } //special case for the package section - if ($routeParams.section.toLowerCase() === "packages" && $routeParams.tree.toLowerCase() === "packages" && $routeParams.method !== "edit") { + var packagePages = ["edit", "options"]; + if ($routeParams.section.toLowerCase() === "packages" && $routeParams.tree.toLowerCase() === "packages" && packagePages.indexOf($routeParams.method.toLowerCase()) === -1) { $scope.templateUrl = "views/packages/overview.html"; return; } diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/edit.html b/src/Umbraco.Web.UI.Client/src/views/packages/edit.html index 5163fadfb5..5ad5ac2522 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/edit.html +++ b/src/Umbraco.Web.UI.Client/src/views/packages/edit.html @@ -255,13 +255,13 @@ + label="Package options view" + description="Load this view after installation (ex: App_Plugins/MyApp/MyPackageOptions.html). It can be used to configure your package at any time by clicking Options on the installed package listing"> diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/options.controller.js b/src/Umbraco.Web.UI.Client/src/views/packages/options.controller.js new file mode 100644 index 0000000000..8ffd282e0d --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/packages/options.controller.js @@ -0,0 +1,43 @@ +(function () { + "use strict"; + + function OptionsController($scope, $location, $routeParams, packageResource, umbRequestHelper) { + + const vm = this; + + vm.showBackButton = true; + vm.loading = true; + vm.back = back; + + const packageId = $routeParams.id; + + function onInit() { + + packageResource.getInstalledById(packageId).then(pck => { + vm.package = pck; + vm.loading = false; + + //make sure the packageView is formatted as a virtual path + pck.packageView = pck.packageView.startsWith("/~") + ? pck.packageView + : pck.packageView.startsWith("/") + ? "~" + pck.packageView + : "~/" + pck.packageView; + + pck.packageView = umbRequestHelper.convertVirtualToAbsolutePath(pck.packageView); + + }); + } + + function back() { + $location.path("packages/packages/installed"); + } + + + onInit(); + + } + + angular.module("umbraco").controller("Umbraco.Editors.Packages.OptionsController", OptionsController); + +})(); diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/options.html b/src/Umbraco.Web.UI.Client/src/views/packages/options.html new file mode 100644 index 0000000000..d75604d094 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/packages/options.html @@ -0,0 +1,40 @@ +
+ +
+ + + + + + + + + + +

+ This package has no configuration view +

+ +
+ +
+ + + + +
+ + + +
diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/packages/overview.controller.js index 59fa79dc26..f4c1ab9de4 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/overview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/packages/overview.controller.js @@ -17,8 +17,7 @@ } if (installPackageUri && installPackageUri !== "installed") { - //navigate to the custom installer screen, if it is just "installed", then we'll - //show the installed view + //navigate to the custom installer screen, if it is just "installed" it means there is no custom installer screen $location.path(installPackageUri).search(""); } else { diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/views/installed.controller.js b/src/Umbraco.Web.UI.Client/src/views/packages/views/installed.controller.js index 5265897708..3b6422ace4 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/views/installed.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/packages/views/installed.controller.js @@ -7,6 +7,7 @@ vm.confirmUninstall = confirmUninstall; vm.uninstallPackage = uninstallPackage; + vm.packageOptions = packageOptions; vm.state = "list"; vm.installState = { status: "" @@ -34,6 +35,10 @@ }); } + function packageOptions(pck) { + $location.path("packages/packages/options/" + pck.id); + } + function confirmUninstall(pck) { vm.state = "packageDetails"; vm.package = pck; diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/views/installed.html b/src/Umbraco.Web.UI.Client/src/views/packages/views/installed.html index 3c443e0bac..888bf02c4e 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/views/installed.html +++ b/src/Umbraco.Web.UI.Client/src/views/packages/views/installed.html @@ -23,12 +23,19 @@
diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/cs.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/cs.xml index f3b16def54..db780bb358 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/cs.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/cs.xml @@ -617,14 +617,12 @@ a výběrem balíčku. Balíčky umbraco mají obvykle přípony ".umb" nebo ".zip". ]]> Autor - Ukázka Dokumentace Meta data balíčku Název balíčku Balíček neobsahuje žádné položky
Můžete jej ze systému bezpečně odstranit kliknutím na "odebrat balíček" níže.]]>
- Žádné aktualizace nejsou dostupné Možnosti balíčku Čti mě balíčku Úložiště balíčku @@ -635,12 +633,7 @@ Upozornění: všechny dokumenty, media atd. závislé na položkách, které odstraníte, přestanou pracovat a mohou vést k nestabilitě systému, takže odinstalovávejte opatrně. Jste-li na pochybách, kontaktujte autora balíčku.]]> - Stáhnout aktualizaci z úložiště - Balíček s aktualizací - Pokyny pro aktualizaci - Pro tento balíček je dostupná aktualizace. Můžete si ji stáhnout přímo z úložiště balíčků umbraco. Verze balíčku - Zobrazit web balíčku Vložit s úplným formatováním (nedoporučeno) diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml index 523531947a..39e1341f37 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml @@ -840,13 +840,11 @@ Mange hilsner fra Umbraco robotten Denne pakke er kompatibel med de følgende versioner af Umbraco, som rapporteret af community-medlemmer. Fuld kompatibilitet kan ikke garanteres for versioner rapporteret nedenfor 100% Eksterne kilder Forfatter - Demonstration Dokumentation Pakke meta data Pakkenavn Pakken indeholder ingen elementer
Du kan roligt fjerne denne fra systemet ved at klikke på "Fjern pakke" nedenfor.]]>
- Ingen opdateringer tilgængelige Pakkevalg Pakke læs mig Pakke opbevaringsbase @@ -856,12 +854,7 @@ Mange hilsner fra Umbraco robotten Afinstallér pakke Bemærk: at dokumenter og medier som afhænger af denne pakke vil muligvis holde op med at virke, så vær forsigtig. Hvis i tvivl, kontakt personen som har udviklet pakken.]]> - Download opdatering fra opbevaringsbasen - Opdatér pakke - Opdateringsinstrukser - Der er en tilgængelig opdatering til denne pakke. Du kan downloade den direkte fra Umbracos pakke opbevaringsbase. Pakke version - Se pakkeudviklerens website Pakke allerede installeret Denne pakke kan ikke installeres, den kræver en minimum Umbraco version af Afinstallerer... diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/de.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/de.xml index 915b25208e..1be81fb10f 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/de.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/de.xml @@ -610,13 +610,11 @@ Wenn Sie sich für Runway entscheiden, können Sie optional Blöcke nutzen, die Wählen Sie ein Paket auf Ihrem lokalen Computer über "Datei auswählen" aus. <br />Umbraco-Pakete besitzen üblicherweise die Dateiendungen ".umb" oder ".zip". Autor - Demonstration Dokumentation Paket-Meta-Daten Name des Pakets Paket enthält keine Elemente Die Paket-Datei enthält keine Elemente die deinstalliert werden können.<br/><br/>Sie können das Paket ohne Gefahr deinstallieren indem Sie "Paket deinstallieren" anklicken. - Keine Updates für das Paket verfügbar Paket-Optionen Informationen zum Paket Paket-Repository @@ -625,12 +623,7 @@ Wenn Sie sich für Runway entscheiden, können Sie optional Blöcke nutzen, die Das Paket wurde erfolgreich deinstalliert Paket deinstallieren Sie können einzelne Elemente, die Sie nicht deinstallieren möchten, unten abwählen. Wenn Sie "Deinstallation bestätigen" klicken, werden alle markierten Elemente entfernt.<br /><span style="color: Red; font-weight: bold;">Achtung:</span> alle Dokumente, Medien, etc, die von den zu entfernenden Elementen abhängen, werden nicht mehr funktionieren und im Zweifelsfall kann dass gesamte CMS instabil werden. Bitte deinstallieren Sie also mit Vorsicht. Falls Sie unsicher sind, kontaktieren Sie den Autor des Pakets. - Update vom Paket-Repository herunterladen - Paket-Update - Hinweise für die Durchführung des Updates - Es ist ein Update für dieses Paket verfügbar. Sie können es direkt vom Umbraco-Paket-Repository herunterladen. Version des Pakets - Paket-Webseite aufrufen Einfügen mit Formatierung (Nicht empfohlen) diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml index dad27d99fe..d50cac4ac4 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml @@ -1090,14 +1090,12 @@ To manage your website, simply open the Umbraco back office and start adding con This package is compatible with the following versions of Umbraco, as reported by community members. Full compatability cannot be gauranteed for versions reported below 100% External sources Author - Demonstration Documentation Package meta data Package name Package doesn't contain any items
You can safely remove this from the system by clicking "uninstall package" below.]]>
- No upgrades available Package options Package readme Package repository @@ -1108,12 +1106,7 @@ To manage your website, simply open the Umbraco back office and start adding con Notice: any documents, media etc depending on the items you remove, will stop working, and could lead to system instability, so uninstall with caution. If in doubt, contact the package author.]]> - Download update from the repository - Upgrade package - Upgrade instructions - There's an upgrade available for this package. You can download it directly from the Umbraco package repository. Package version - View package website Package already installed This package cannot be installed, it requires a minimum Umbraco version of Uninstalling... 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 ab37cf8025..23efe8047e 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml @@ -1117,14 +1117,12 @@ To manage your website, simply open the Umbraco back office and start adding con This package is compatible with the following versions of Umbraco, as reported by community members. Full compatability cannot be gauranteed for versions reported below 100% External sources Author - Demonstration Documentation Package meta data Package name Package doesn't contain any items
You can safely remove this from the system by clicking "uninstall package" below.]]>
- No upgrades available Package options Package readme Package repository @@ -1135,13 +1133,8 @@ To manage your website, simply open the Umbraco back office and start adding con Notice: any documents, media etc depending on the items you remove, will stop working, and could lead to system instability, so uninstall with caution. If in doubt, contact the package author.]]> - Download update from the repository - Upgrade package - Upgrade instructions - There's an upgrade available for this package. You can download it directly from the Umbraco package repository. Package version Upgrading from version - View package website Package already installed This package cannot be installed, it requires a minimum Umbraco version of Uninstalling... diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/es.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/es.xml index 7f35e90083..090ecc875e 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/es.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/es.xml @@ -863,14 +863,11 @@ Este paquete es compatible con las siguientes versiones de Umbraco, declaradas según miembros de la comunidad. No se puede garantizar compatibilidad completa para versiones declaradas debajo del 100% Fuentes externas Autor - Documentación Meta datos del paquete Nombre del paquete El paquete no contiene ningún elemento
Puedes eliminarlo del sistema de forma segura seleccionando la opción "desinstalar paquete" de abajo.]]>
- No hay actualizaciones disponibles Opciones del paquete Léeme del paquete Repositorio de paquetes @@ -879,12 +876,7 @@ El paquete se ha desinstalado correctamente Desinstalar paquete Nota: cualquier documento, archivo etc dependiente de los elementos eliminados, dejará de funcionar, y puede conllevar inestabilidad en el sistema, por lo que lleva cuidado al desinstalar elementos. En caso de duda, contacta con el autor del paquete.]]> - Descargar actualización del repositorio - Actualizar paquete - Instrucciones de actualización - Hay una actualización disponible para este paquete. Puedes descargarla directamente del repositorio de paquetes de Umbraco. Versión del paquete - Ver página web del paquete Paquete ya instalado Este paquete no se puede instalar, requiere un versión mínima de Umbraco de Desinstalando... diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml index 04b2cea4df..b6c23d7b63 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml @@ -1025,14 +1025,12 @@ Pour gérer votre site, ouvrez simplement le backoffice Umbraco et commencez à Ce package est compatible avec les versions suivantes de Umbraco, selon les rapports des membres de la communauté. Une compatibilité complète ne peut pas être garantie pour les versions rapportées sous 100% Sources externes Auteur - Démo Documentation Meta data du package Nom du package Le package ne contient aucun élément
Vous pouvez supprimer tranquillement ce package de votre installation en cliquant sur "Désinstaller le package" ci-dessous.]]>
- Aucune mise à jour disponible Options du package Package readme Repository des packages @@ -1043,12 +1041,7 @@ Pour gérer votre site, ouvrez simplement le backoffice Umbraco et commencez à Remarque : tous les documents, media etc. dépendant des éléments que vous supprimez vont cesser de fonctionner, ce qui peut provoquer une instabilité du système, désinstallez donc avec prudence. En cas de doute, contactez l'auteur du package.]]> - Télécharger la mise à jour depuis le repository - Mettre à jour le package - Instructions de mise à jour - Il y a une mise à jour disponible pour ce package. Vous pouvez la télécharger directement depuis le repository des packages Umbraco. Version du package - Voir le site internet du package Package déjà installé Ce package ne peut pas être installé, il nécessite au minimum la version Umbraco %0% Désinstallation... diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/he.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/he.xml index 011745ac0f..8d3822943a 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/he.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/he.xml @@ -548,14 +548,12 @@ To manage your website, simply open the Umbraco back office and start adding con ויש לבחור את החבילה הרצויה. לחבילות Umbraco יש בד"כ יש סיומות בשם ".umb" או ".zip". ]]> יוצר החבילה - הדגמה תיעוד מטה דטה עבור החבילה שם החבילה החבילה לא מכילה אף פריט
ניתן למחוק בבטיחות רבה את החבילה מהמערכת על ידי לחיצה על "הסר חבילה".]]>
- אין עידכונים זמינים אפשרויות חבילה תיאור החבילה מאגר חבילות @@ -566,12 +564,7 @@ To manage your website, simply open the Umbraco back office and start adding con הערה:כל מסמך, מדיה וכו' התלוים בפריטים שהסרת יפסיקו לעבוד, ויכולים להביא למצב של אי יציבות למערכת, יש למחוק קבצים עם זהירות יתרה, אם יש ספק יש לפנות ליוצר החבילה.]]> - הורד עידכון מהמאגר - שידרוג חבילה - הורדות שידרוג - קיים עידכון זמין עבור חבילה זו. ניתן להוריד אותו ישירות ממאגר החבילות של אומברקו. גירסת החבילה - צפה באתר החבילה שמור עיצוב בהדבקה (לא מומלץ) diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/it.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/it.xml index a55c626625..6796fdfc3c 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/it.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/it.xml @@ -524,14 +524,12 @@ Per gestire il tuo sito web, è sufficiente aprire il back office di Umbraco e i e selezionando il pacchetto. I pacchetti Umbraco generalmente hanno l'estensione ".umb" o ".zip". ]]> Autore - Dimostrazione Documentazione Meta dati pacchetto Nome del pacchetto Il pacchetto non contiene tutti gli elementi
E' possibile rimuovere questo pacchetto dal sistema cliccando "rimuovi pacchetto" in basso.]]>
- Non ci sono aggiornamenti disponibili Opzioni pacchetto Pacchetto leggimi Pacchetto repository @@ -542,12 +540,7 @@ Per gestire il tuo sito web, è sufficiente aprire il back office di Umbraco e i Avviso: tutti i documenti, i media, etc a seconda degli elementi che rimuoverai, smetteranno di funzionare, e potrebbero portare a un'instabilità del sistema, perciò disinstalla con cautela. In caso di dubbio contattare l'autore del pacchetto.]]> - - Aggiorna pacchetto - - Versione del pacchetto - Vedi sito web pacchetto diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/ja.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/ja.xml index 993a99ceec..ae30fde3c4 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/ja.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/ja.xml @@ -692,14 +692,12 @@ Runwayをインストールして作られた新しいウェブサイトがど パッケージを選択できます。Umbracoのパッケージは概ね".zip"ないしは".umb"といった拡張子です。 ]]> 作成者 - デモ ヘルプ パッケージのメタデータ パッケージ名 パッケージには何も含まれません
"パッケージのアンインストール"をクリックしてシステムから安全に削除できます。]]>
- 更新はありません パッケージのオプション パッケージの取扱説明書 パッケージリポジトリ @@ -710,12 +708,7 @@ Runwayをインストールして作られた新しいウェブサイトがど 注意: 全ての、文書やメディアなどに依存したアイテムを削除する場合はそれらの作業を一端止めてからアンインストールしなければシステムが不安定になる恐れがあります。 疑問点などあればパッケージの作者へ連絡してください。]]> - リポジトリからアップデートをダウンロード - パッケージのアップグレード - 更新の手順 - このパッケージの更新があります。Umbracoのパッケージリポジトリから直接ダウンロードできます。 パッケージのバージョン - パッケージのウェブサイトを見る 完全な書式を含んだまま貼り付け (非推奨) diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/ko.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/ko.xml index 7a46ea81c8..7507ca07e8 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/ko.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/ko.xml @@ -532,14 +532,12 @@ Umbraco 패키지는 보통 ".umb" 나 ".zip" 확장자를 가집니다. ]]> 저자 - 데모 문서화 패키지 메타데이터 패키지 이름 패키지가 포함한 아이템이 없습니다.
아래 "패키지 삭제"를 클릭하시면 안전하게 시스템에서 삭제하실 수 있습니다.]]>
- 업그레이드할 패키지가 없습니다. 패키지 옵션 패키지 정보 패키지 저장소 @@ -550,12 +548,7 @@ 알림: 문서, 미디어등 삭제항목에 관련된 모든 항목이 삭제됩니다, 작업을 중단하면 시스템이 불안정적으로 동작할 수 있습니다. 삭제는 매우 주의를 요하기 때문에 의심스러운항목은 패키지 제작자에게 문의하시기 바랍니다.]]> - 저장소에서 업데이트 다운로드 - 업그레이드 패키지 - 업그레이드 지시사항 - 업그레이드할 패키지가 없습니다. Umbraco패키지 저장소에서 직접다운로드하실 수 있습니다. 패키지 버전 - 패키지 웹사이트 보기 포맷을 포함여하 붙여넣기(권장하지 않음) diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/nb.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/nb.xml index a3c8abb946..39f4dd9560 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/nb.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/nb.xml @@ -589,13 +589,11 @@ Vennlig hilsen Umbraco roboten Umbraco-pakker har vanligvis endelsen ".umb" eller ".zip".]]> Utvikler - Demonstrasjon Dokumentasjon Metadata Pakkenavn Pakken inneholder ingen elementer
Du kan trygt fjerne pakken fra systemet ved å klikke "avinstaller pakke" nedenfor.]]>
- Ingen oppdateringer tilgjengelig Alternativer for pakke Lesmeg for pakke Pakkebrønn @@ -604,12 +602,7 @@ Vennlig hilsen Umbraco roboten Pakken ble vellykket avinstallert Avinstaller pakke Advarsel: alle dokumenter, media, etc. som som er avhengig av elementene du sletter, vil slutte å virke, noe som kan føre til ustabilitet, så avinstaller med forsiktighet. Hvis du er i tvil, kontakt pakkeutvikleren.]]> - Last ned oppdatering fra pakkeregisteret - Oppgrader pakke - Oppgraderingsinstrukser - Det er en oppdatering tilgjengelig for denne pakken. Du kan laste den ned direkte fra pakkebrønnen. Pakkeversjon - Se pakkens nettsted Lim inn med full formattering (Anbefales ikke) diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/nl.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/nl.xml index 8189be9429..4722abb557 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/nl.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/nl.xml @@ -698,7 +698,6 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je Kies een package op je computer door op "Bladeren" te klikken en de package te selecteren. Umbraco packages hebben meestal ".umb" of ".zip" als extensie. Auteur - Demonstratie Documentatie Package meta data Package naam @@ -706,7 +705,6 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je
Je kunt deze package veilig verwijderen door op 'verwijder package' te klikken. ]]>
- Geen upgrades beschikbaar Package opties Package lees mij Package repository @@ -718,12 +716,7 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je Waarschuwing: alle documenten, media etc, die afhankelijk zijn van de items die je verwijderd, zullen niet meer werken en kan leiden tot een instabiele installatie, wees dus voorzichtig met verwijderen. Als je het niet zeker weet, neem dan contact op met de auteur van de package. ]]> - Download update uit de repository - Upgrade package - Upgrade instructies - Er is een upgrade beschikbaar voor deze package. Je kunt het direct downloaden uit de Umbraco package repository. Package versie - Bekijk de package website Package reeds geinstalleerd Deze package kan niet worden geinstalleerd omdat minimaal Umbraco versie %0% benodigd is. Aan het deinstalleren... diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/pl.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/pl.xml index 1f64a5ab21..788afd3c1a 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/pl.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/pl.xml @@ -859,14 +859,12 @@ Naciśnij przycisk instaluj, aby zainstalować bazę danych Umb Według raportów członków społeczności, ten pakiet jest zgodny z następującymi wersjami Umbraco. Pełna zgodność nie może być zagwarantowana dla wersji zaraportowanych poniżej 100% Zewnętrzne źródła Autor - Demonstracja Dokumentacja Metadane pakietu Nazwa pakietu Pakiet nie zawiera żadnych elementów
Możesz bezpiecznie go usunąć z systemu poprzez kliknięcie na przycisku "odinstaluj pakiet"]]>
- Nie ma dostępnych aktualizacji Opcje pakietu Opis pakietu Repozytorium pakietu @@ -877,12 +875,7 @@ Naciśnij przycisk instaluj, aby zainstalować bazę danych Umb Uwaga: wszystkie elementy, media, itp. w zależności od elementów, które usuwasz, przestaną działać i mogą spowodować niestabilność systemu, więc odinstalowuj z uwagą. W przypadku problemów skontaktuj się z autorem pakietu.]]> - Pobierz aktualizację z repozytorium - Aktualizuj pakiet - Instrukcja aktualizacji - Jest dostępna aktualizacja dla tego pakietu. Możesz ją pobrać wprost z repozytorium pakietów Umbraco. Wersja pakietu - Odwiedź stronę pakietu Pakiet jest już zainstalowany Ten pakiet nie może być zainstalowany, ponieważ wymaga Umbraco w wersji przynajmniej %0% Odinstalowywanie... diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/pt.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/pt.xml index cff6009bb4..56297d23df 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/pt.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/pt.xml @@ -522,14 +522,12 @@ Vá até http://%4%/#/content/content/edit/%5% para editar. e localizando o pacote. Pacotes Umbraco tem extensão ".umb" ou ".zip".]]> Autor - Demonstração Documentação Dado meta do pacote Nome do pacote Pacote não contém nenhum item
Você pode remover com segurança do seu sistema clicando em "desinstalar pacote" abaixo.]]>
- Nenhuma atualização disponível Oções do pacote Leia-me do pacote Repositório do pacote @@ -539,12 +537,7 @@ Você pode remover com segurança do seu sistema clicando em "desinstalar pacote Desinstalar pacote Aviso: quaisquer documentos, mídia, etc dependentes dos itens que forem removidos vão parar de funcionar e podem levar à instabilidade do sistema. Então desinstale com cuidado. Se tiver dúvidas, contate o autor do pacote]]> - Baixar atualização pelo repositório - Atualizar pacote - Instruções de atualização - Há uma atualizaçào disponível para este pacote. Você pode baixá-lo diretamente do repositório de pacotes do Umbraco. Versão do pacote - Ver website do pacote Colar com formatação completa (Não recomendado) diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/ru.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/ru.xml index 61c42d9d6d..1744d19581 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/ru.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/ru.xml @@ -1182,14 +1182,12 @@ Этот пакет совместим со следующими версиями Umbraco, по сообщениям участников сообщества. Полная совместимость не гарантируется для версий со значением ниже 100% Внешние источники Автор - Демонстрация Документация (описание) Мета-данные пакета Название пакета Пакет ничего не содержит
Вы можете безопасно удалить данный пакет из системы, нажав на кнопку "Деинсталлировать пакет".]]>
- Нет доступных обновлений Опции пакета Краткий обзор пакета Репозиторий пакета @@ -1200,12 +1198,7 @@ Обратите внимание: все документы, медиа-файлы и другой контент, зависящий от этого пакета, перестанет нормально работать, что может привести к нестабильному поведению системы, поэтому удаляйте пакеты очень осторожно. При наличии сомнений, свяжитесь с автором пакета.]]> - Скачать обновление из репозитория - Обновление пакета - Руководство по обновлению - Для данного пакета доступно обновление. Вы можете загрузить это обновление непосредственно из центрального репозитория пакетов Umbraco. Версия пакета - Перейти на веб-сайт пакета Этот пакет уже установлен в системе Этот пакет не может быть установлен, он требует наличия Umbraco версии как минимум Удаление... diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/sv.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/sv.xml index 05c6dc927d..625caa0432 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/sv.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/sv.xml @@ -544,13 +544,11 @@ och leta upp paketet. Umbracos installationspaket har oftast filändelsen ".umb" eller ".zip".]]> Utvecklare - Demonstration Dokumentation Paket metadata Paketnamn Paketet innehåller inga poster
Det är säkert att ta bort den ur systemet genom att klicka på "avinstallera paket" nedan.]]>
- Inga uppdateringar tillgängliga Paketalternativ Paket läsmig Paketvalv @@ -559,12 +557,7 @@ Paketet har avinstallerats utan problem Avinstallera paket OBS! dokument, media osv som använder de borttagna posterna kommer sluta fungera vilket kan leda till att systemet blir instabilt. Avinstallera därför med försiktighet. Om du är osäker, kontakta personen som skapat paketet.]]> - Hämta uppdatering från paketvalvet - Uppdatera paket - Uppdateringsinstruktioner - Det finns an uppdaterad version av paketet. Du kan hämta den direkt från Umbracos paketvalv. Paketversion - Besök paketets webbplats Klistra in med helt bibehållen formatering (rekommenderas ej) diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/tr.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/tr.xml index 4ff9d22c86..053430d68d 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/tr.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/tr.xml @@ -609,14 +609,12 @@ To manage your website, simply open the Umbraco back office and start adding con button and locating the package. Umbraco packages usually have a ".umb" or ".zip" extension. ]]> Author - Demonstration Documentation Package meta data Package name Package doesn't contain any items
You can safely remove this from the system by clicking "uninstall package" below.]]>
- No upgrades available Package options Package readme Package repository @@ -627,12 +625,7 @@ To manage your website, simply open the Umbraco back office and start adding con Notice: any documents, media etc depending on the items you remove, will stop working, and could lead to system instability, so uninstall with caution. If in doubt, contact the package author.]]> - Download update from the repository - Upgrade package - Upgrade instructions - There's an upgrade available for this package. You can download it directly from the Umbraco package repository. Package version - View package website Paste with full formatting (Not recommended) diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/zh.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/zh.xml index 7286c3f914..227e40cf94 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/zh.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/zh.xml @@ -728,14 +728,12 @@ 选择 ".umb" 或者 ".zip" 文件 ]]> 作者 - 演示 文档 元数据 名称 扩展包不含任何项
点击下面的“卸载”,您可以安全的删除。]]>
- 无可用更新 选项 说明 程序库 @@ -746,12 +744,7 @@ 注意: 卸载包将导致所有依赖该包的东西失效,请确认。 ]]> - 从程序库下载更新 - 更新扩展包 - 更新说明 - 此软件包有一个可用的升级。您可以直接从 Umbraco 软件包存储库下载。 版本 - 访问扩展包网站 已安装软件包 此软件包无法安装, 它需要一个最小的 Umbraco 版本的%0% 卸载中... 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 b61e1154b8..23da0c817c 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/zh_tw.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/zh_tw.xml @@ -714,14 +714,12 @@ 按鈕並點選該檔案。Umbraco擴展包通常有「.zip」的副檔名。 ]]> 作者 - 演示 文檔 中繼資料 名稱 擴展包不含任何項
您可以點選下方「移除擴展包」來安全地移除此項目。]]>
- 無可用更新 選項 說明 程式庫 @@ -732,12 +730,7 @@ 注意: 任何文檔,媒體或需要這些項目才能運作的物件將會停止運作,並可能使得系統不穩定, 請小心移除。若有疑慮,請聯絡擴展包作者。]]> - 從程式庫下載更新 - 更新擴展包 - 更新說明 - 擴展包有可用的更新,您可以從程式庫網站更新。 版本 - 訪問擴展包網站 擴展包已安裝 這個擴展包無法安裝,它需要Umbraco至少是版本 %0% 移除中... diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/nb.xml b/src/Umbraco.Web.UI/umbraco/config/lang/nb.xml index a3c8abb946..39f4dd9560 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/nb.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/nb.xml @@ -589,13 +589,11 @@ Vennlig hilsen Umbraco roboten Umbraco-pakker har vanligvis endelsen ".umb" eller ".zip".]]> Utvikler - Demonstrasjon Dokumentasjon Metadata Pakkenavn Pakken inneholder ingen elementer
Du kan trygt fjerne pakken fra systemet ved å klikke "avinstaller pakke" nedenfor.]]>
- Ingen oppdateringer tilgjengelig Alternativer for pakke Lesmeg for pakke Pakkebrønn @@ -604,12 +602,7 @@ Vennlig hilsen Umbraco roboten Pakken ble vellykket avinstallert Avinstaller pakke Advarsel: alle dokumenter, media, etc. som som er avhengig av elementene du sletter, vil slutte å virke, noe som kan føre til ustabilitet, så avinstaller med forsiktighet. Hvis du er i tvil, kontakt pakkeutvikleren.]]> - Last ned oppdatering fra pakkeregisteret - Oppgrader pakke - Oppgraderingsinstrukser - Det er en oppdatering tilgjengelig for denne pakken. Du kan laste den ned direkte fra pakkebrønnen. Pakkeversjon - Se pakkens nettsted Lim inn med full formattering (Anbefales ikke) 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 b61e1154b8..23da0c817c 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/zh_tw.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/zh_tw.xml @@ -714,14 +714,12 @@ 按鈕並點選該檔案。Umbraco擴展包通常有「.zip」的副檔名。 ]]> 作者 - 演示 文檔 中繼資料 名稱 擴展包不含任何項
您可以點選下方「移除擴展包」來安全地移除此項目。]]>
- 無可用更新 選項 說明 程式庫 @@ -732,12 +730,7 @@ 注意: 任何文檔,媒體或需要這些項目才能運作的物件將會停止運作,並可能使得系統不穩定, 請小心移除。若有疑慮,請聯絡擴展包作者。]]> - 從程式庫下載更新 - 更新擴展包 - 更新說明 - 擴展包有可用的更新,您可以從程式庫網站更新。 版本 - 訪問擴展包網站 擴展包已安裝 這個擴展包無法安裝,它需要Umbraco至少是版本 %0% 移除中... diff --git a/src/Umbraco.Web/Editors/PackageController.cs b/src/Umbraco.Web/Editors/PackageController.cs index 4814a8000a..c60d035562 100644 --- a/src/Umbraco.Web/Editors/PackageController.cs +++ b/src/Umbraco.Web/Editors/PackageController.cs @@ -115,11 +115,18 @@ namespace Umbraco.Web.Editors return response; } + public PackageDefinition GetInstalledPackageById(int id) + { + var pack = Services.PackagingService.GetInstalledPackageById(id); + if (pack == null) throw new HttpResponseException(HttpStatusCode.NotFound); + return pack; + } + /// /// Returns all installed packages - only shows their latest versions /// /// - public IEnumerable GetInstalled() + public IEnumerable GetInstalled() { return Services.PackagingService.GetAllInstalledPackages() .GroupBy( @@ -136,19 +143,6 @@ namespace Umbraco.Web.Editors //only return the first package with this version return grouping.First(x => x.version == maxVersion).package; }) - .Select(pack => new InstalledPackageModel - { - Name = pack.Name, - Id = pack.Id, - Author = pack.Author, - Version = pack.Version, - Url = pack.Url, - License = pack.License, - LicenseUrl = pack.LicenseUrl, - Files = pack.Files, - IconUrl = pack.IconUrl, - Readme = pack.Readme - }) .ToList(); } } diff --git a/src/Umbraco.Web/Editors/PackageInstallController.cs b/src/Umbraco.Web/Editors/PackageInstallController.cs index 544a871720..f87f323df8 100644 --- a/src/Umbraco.Web/Editors/PackageInstallController.cs +++ b/src/Umbraco.Web/Editors/PackageInstallController.cs @@ -369,20 +369,17 @@ namespace Umbraco.Web.Editors var packageInfo = Services.PackagingService.GetCompiledPackageInfo(zipFile); + zipFile.Delete(); + + //bump cdf to be safe var clientDependencyConfig = new ClientDependencyConfiguration(Logger); var clientDependencyUpdated = clientDependencyConfig.UpdateVersionNumber( UmbracoVersion.SemanticVersion, DateTime.UtcNow, "yyyyMMdd"); - zipFile.Delete(); - var redirectUrl = ""; if (!packageInfo.PackageView.IsNullOrWhiteSpace()) { - //fixme! - throw new NotImplementedException(); - //redirectUrl = string.Format("/packages/framed/{0}", - // Uri.EscapeDataString( - // string.Format("/umbraco/developer/Packages/installer.aspx?installing=custominstaller&dir={0}&pId={1}&customControl={2}&customUrl={3}", tempDir, model.Id, ins.Control, ins.Url))); + redirectUrl = $"/packages/packages/options/{model.Id}"; } return new PackageInstallResult diff --git a/src/Umbraco.Web/Models/ContentEditing/InstalledPackageModel.cs b/src/Umbraco.Web/Models/ContentEditing/InstalledPackageModel.cs deleted file mode 100644 index 67bfe6fe53..0000000000 --- a/src/Umbraco.Web/Models/ContentEditing/InstalledPackageModel.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace Umbraco.Web.Models.ContentEditing -{ - [DataContract] - public class InstalledPackageModel - { - [DataMember(Name = "id")] - public int Id { get; set; } - - [DataMember(Name = "name")] - public string Name { get; set; } - - [DataMember(Name = "author")] - public string Author { get; set; } - - [DataMember(Name = "files")] - public IEnumerable Files { get; set; } - - [DataMember(Name = "version")] - public string Version { get; set; } - - [DataMember(Name = "url")] - public string Url { get; set; } - - [DataMember(Name = "license")] - public string License { get; set; } - - [DataMember(Name = "licenseUrl")] - public string LicenseUrl { get; set; } - - [DataMember(Name = "iconUrl")] - public string IconUrl { get; set; } - - [DataMember(Name = "readme")] - public string Readme { get; set; } - } -} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index b0142771d2..62a7d6175c 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -596,7 +596,6 @@ - From e924a8ef83bf53f6108f7292686078d39f6d36a7 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Wed, 16 Jan 2019 13:04:46 +0100 Subject: [PATCH 108/437] Only return element types for the NC configuration --- src/Umbraco.Web/PropertyEditors/NestedContentController.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Umbraco.Web/PropertyEditors/NestedContentController.cs b/src/Umbraco.Web/PropertyEditors/NestedContentController.cs index 103967d20a..8d144c5904 100644 --- a/src/Umbraco.Web/PropertyEditors/NestedContentController.cs +++ b/src/Umbraco.Web/PropertyEditors/NestedContentController.cs @@ -12,6 +12,7 @@ namespace Umbraco.Web.PropertyEditors public IEnumerable GetContentTypes() { return Services.ContentTypeService.GetAll() + .Where(x => x.IsElement) .OrderBy(x => x.SortOrder) .Select(x => new { From 93f991b140a7fc8c66068ef9081987e931e65884 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Wed, 16 Jan 2019 13:05:16 +0100 Subject: [PATCH 109/437] Only allow element types in the NC editor --- .../nestedcontent/nestedcontent.controller.js | 41 ++++++++++--------- 1 file changed, 22 insertions(+), 19 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 79e00fa453..d6cc35bacd 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 @@ -285,28 +285,31 @@ angular.module("umbraco").controller("Umbraco.PropertyEditors.NestedContent.Prop $scope.scaffolds = []; _.each($scope.model.config.contentTypes, function (contentType) { contentResource.getScaffold(-20, contentType.ncAlias).then(function (scaffold) { - // remove all tabs except the specified tab - var tabs = scaffold.variants[0].tabs; - var tab = _.find(tabs, function (tab) { - return tab.id != 0 && (tab.alias.toLowerCase() == contentType.ncTabAlias.toLowerCase() || contentType.ncTabAlias == ""); - }); - scaffold.tabs = []; - if (tab) { - scaffold.tabs.push(tab); + // make sure it's an element type before allowing the user to create new ones + if (scaffold.isElement) { + // remove all tabs except the specified tab + var tabs = scaffold.variants[0].tabs; + var tab = _.find(tabs, function (tab) { + return tab.id != 0 && (tab.alias.toLowerCase() == contentType.ncTabAlias.toLowerCase() || contentType.ncTabAlias == ""); + }); + scaffold.tabs = []; + if (tab) { + scaffold.tabs.push(tab); - angular.forEach(tab.properties, - function (property) { - if (_.find(notSupported, function (x) { return x === property.editor; })) { - property.notSupported = true; - //TODO: Not supported message to be replaced with 'content_nestedContentEditorNotSupported' dictionary key. Currently not possible due to async/timing quirk. - property.notSupportedMessage = "Property " + property.label + " uses editor " + property.editor + " which is not supported by Nested Content."; - } - }); + angular.forEach(tab.properties, + function (property) { + if (_.find(notSupported, function (x) { return x === property.editor; })) { + property.notSupported = true; + //TODO: Not supported message to be replaced with 'content_nestedContentEditorNotSupported' dictionary key. Currently not possible due to async/timing quirk. + property.notSupportedMessage = "Property " + property.label + " uses editor " + property.editor + " which is not supported by Nested Content."; + } + }); + } + + // Store the scaffold object + $scope.scaffolds.push(scaffold); } - // Store the scaffold object - $scope.scaffolds.push(scaffold); - scaffoldsLoaded++; initIfAllScaffoldsHaveLoaded(); }, function (error) { From 4303b4eb801b80736b3fdf07644f8d90882f46a7 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Wed, 16 Jan 2019 13:05:54 +0100 Subject: [PATCH 110/437] Ensure that all items passed to rendering are element types --- .../Models/PublishedContent/PublishedContentType.cs | 7 +++++++ .../ValueConverters/NestedContentValueConverterBase.cs | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs index f1937c1c0c..0de97fb987 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs @@ -31,6 +31,8 @@ namespace Umbraco.Core.Models.PublishedContent _propertyTypes = propertyTypes.ToArray(); + IsElement = contentType.IsElement; + InitializeIndexes(); } @@ -166,6 +168,11 @@ namespace Umbraco.Core.Models.PublishedContent return index >= 0 && index < _propertyTypes.Length ? _propertyTypes[index] : null; } + /// + /// Gets a value indicating whether this content type is for an element. + /// + public bool IsElement { get; } + #endregion } } diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/NestedContentValueConverterBase.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/NestedContentValueConverterBase.cs index 7e9b1dfe88..e3723e2221 100644 --- a/src/Umbraco.Web/PropertyEditors/ValueConverters/NestedContentValueConverterBase.cs +++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/NestedContentValueConverterBase.cs @@ -45,8 +45,9 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters if (string.IsNullOrEmpty(elementTypeAlias)) return null; + // only convert element types - content types will cause an exception when PublishedModelFactory creates the model var publishedContentType = _publishedSnapshotAccessor.PublishedSnapshot.Content.GetContentType(elementTypeAlias); - if (publishedContentType == null) + if (publishedContentType == null || publishedContentType.IsElement == false) return null; var propertyValues = sourceObject.ToObject>(); From ae97ec4277ae91b9a313e61ecd3d95c0b6aa9697 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Wed, 16 Jan 2019 13:16:41 +0100 Subject: [PATCH 111/437] Update the doctypes configuration help text --- src/Umbraco.Web/PropertyEditors/NestedContentConfiguration.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web/PropertyEditors/NestedContentConfiguration.cs b/src/Umbraco.Web/PropertyEditors/NestedContentConfiguration.cs index 44648ee859..3020a51902 100644 --- a/src/Umbraco.Web/PropertyEditors/NestedContentConfiguration.cs +++ b/src/Umbraco.Web/PropertyEditors/NestedContentConfiguration.cs @@ -8,7 +8,7 @@ namespace Umbraco.Web.PropertyEditors /// public class NestedContentConfiguration { - [ConfigurationField("contentTypes", "Doc Types", "views/propertyeditors/nestedcontent/nestedcontent.doctypepicker.html", Description = "Select the doc types to use as the data blueprint.")] + [ConfigurationField("contentTypes", "Document types", "views/propertyeditors/nestedcontent/nestedcontent.doctypepicker.html", Description = "Select the documebt types to use as the item blueprints. Only \"element\" types can be used.")] public ContentType[] ContentTypes { get; set; } [ConfigurationField("minItems", "Min Items", "number", Description = "Set the minimum number of items allowed.")] @@ -38,4 +38,4 @@ namespace Umbraco.Web.PropertyEditors public string Template { get; set; } } } -} \ No newline at end of file +} From 9ffeb3464344ef2b38ad76f74568dde4044d63c5 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Wed, 16 Jan 2019 13:17:14 +0100 Subject: [PATCH 112/437] Whoops. Spelling. --- src/Umbraco.Web/PropertyEditors/NestedContentConfiguration.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/PropertyEditors/NestedContentConfiguration.cs b/src/Umbraco.Web/PropertyEditors/NestedContentConfiguration.cs index 3020a51902..b904a2250d 100644 --- a/src/Umbraco.Web/PropertyEditors/NestedContentConfiguration.cs +++ b/src/Umbraco.Web/PropertyEditors/NestedContentConfiguration.cs @@ -8,7 +8,7 @@ namespace Umbraco.Web.PropertyEditors /// public class NestedContentConfiguration { - [ConfigurationField("contentTypes", "Document types", "views/propertyeditors/nestedcontent/nestedcontent.doctypepicker.html", Description = "Select the documebt types to use as the item blueprints. Only \"element\" types can be used.")] + [ConfigurationField("contentTypes", "Document types", "views/propertyeditors/nestedcontent/nestedcontent.doctypepicker.html", Description = "Select the document types to use as the item blueprints. Only \"element\" types can be used.")] public ContentType[] ContentTypes { get; set; } [ConfigurationField("minItems", "Min Items", "number", Description = "Set the minimum number of items allowed.")] From 7bb358888980bdcd8d605214b611ba7bd22c0712 Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 16 Jan 2019 23:53:10 +1100 Subject: [PATCH 113/437] Adds the whole package definition to the scope model for devs to use, adds a custom query string parameter when redirecting to the angular view after install (so devs know its a new install) --- .../src/views/packages/edit.controller.js | 2 +- .../src/views/packages/options.controller.js | 6 +++++- .../src/views/packages/overview.controller.js | 14 +++++++------- .../packages/views/install-local.controller.js | 10 ++-------- .../views/packages/views/installed.controller.js | 5 +++-- .../src/views/packages/views/repo.controller.js | 6 ++---- 6 files changed, 20 insertions(+), 23 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js index ca20b33a3e..bed3341c6b 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js @@ -130,7 +130,7 @@ } function back() { - $location.path("packages/packages/created").search("create", null); + $location.path("packages/packages/created").search("create", null).search("packageId", null); } function createOrUpdatePackage(editPackageForm) { diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/options.controller.js b/src/Umbraco.Web.UI.Client/src/views/packages/options.controller.js index 8ffd282e0d..4fdf6488a0 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/options.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/packages/options.controller.js @@ -15,6 +15,10 @@ packageResource.getInstalledById(packageId).then(pck => { vm.package = pck; + + //set the $scope too, packages can then access this if they wanted from their own scope or parent scope + $scope.package = pck; + vm.loading = false; //make sure the packageView is formatted as a virtual path @@ -30,7 +34,7 @@ } function back() { - $location.path("packages/packages/installed"); + $location.path("packages/packages/installed").search("packageId", null); } diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/packages/overview.controller.js index f4c1ab9de4..e48271aa23 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/overview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/packages/overview.controller.js @@ -4,26 +4,26 @@ function PackagesOverviewController($scope, $location, $routeParams, localStorageService) { //Hack! - // if there is a cookie value for packageInstallUri then we need to redirect there, + // if there is a local storage value for packageInstallData then we need to redirect there, // the issue is that we still have webforms and we cannot go to a hash location and then window.reload // because it will double load it. // we will refresh and then navigate there. - let installPackageUri = localStorageService.get("packageInstallUri"); + let packageInstallData = localStorageService.get("packageInstallData"); let packageUri = $routeParams.method; - if (installPackageUri) { - localStorageService.remove("packageInstallUri"); + if (packageInstallData) { + localStorageService.remove("packageInstallData"); } - if (installPackageUri && installPackageUri !== "installed") { + if (packageInstallData && packageInstallData !== "installed" && packageInstallData.postInstallationPath) { //navigate to the custom installer screen, if it is just "installed" it means there is no custom installer screen - $location.path(installPackageUri).search(""); + $location.path(packageInstallData.postInstallationPath).search("packageId", packageInstallData.id); } else { var vm = this; - packageUri = installPackageUri ? installPackageUri : packageUri; //use the path stored in storage over the one in the current path + packageUri = packageInstallData ? packageInstallData : packageUri; //use the path stored in storage over the one in the current path vm.page = {}; vm.page.name = "Packages"; diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/views/install-local.controller.js b/src/Umbraco.Web.UI.Client/src/views/packages/views/install-local.controller.js index 17b417de48..0d9341243b 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/views/install-local.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/packages/views/install-local.controller.js @@ -184,14 +184,8 @@ installError) .then(function (result) { - if (result.postInstallationPath) { - //Put the redirect Uri in a cookie so we can use after reloading - localStorageService.set("packageInstallUri", result.postInstallationPath); - } - else { - //set to a constant value so it knows to just go to the installed view - localStorageService.set("packageInstallUri", "installed"); - } + //Put the package data in local storage so we can use after reloading + localStorageService.set("packageInstallData", result); vm.installState.status = labels.installStateCompleted; vm.installCompleted = true; diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/views/installed.controller.js b/src/Umbraco.Web.UI.Client/src/views/packages/views/installed.controller.js index 3b6422ace4..ddfee19ac1 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/views/installed.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/packages/views/installed.controller.js @@ -36,7 +36,8 @@ } function packageOptions(pck) { - $location.path("packages/packages/options/" + pck.id); + $location.path("packages/packages/options/" + pck.id) + .search("packageId", null); //ensure the installId flag is gone, it's only available on first install } function confirmUninstall(pck) { @@ -56,7 +57,7 @@ vm.installState.progress = "100"; //set this flag so that on refresh it shows the installed packages list - localStorageService.set("packageInstallUri", "installed"); + localStorageService.set("packageInstallData", "installed"); //reload on next digest (after cookie) $timeout(function () { diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/views/repo.controller.js b/src/Umbraco.Web.UI.Client/src/views/packages/views/repo.controller.js index b77326d2fc..dc3e67db15 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/views/repo.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/packages/views/repo.controller.js @@ -257,10 +257,8 @@ error) .then(function (result) { - if (result.postInstallationPath) { - //Put the redirect Uri in a cookie so we can use after reloading - localStorageService.set("packageInstallUri", result.postInstallationPath); - } + //Put the package data in local storage so we can use after reloading + localStorageService.set("packageInstallData", result); vm.installState.status = labels.installStateCompleted; vm.installCompleted = true; From ddcead26582daa2d87b7eeaa74f5b5e475a57eb1 Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 17 Jan 2019 00:29:43 +1100 Subject: [PATCH 114/437] Updates EntityController to support stylesheets, languages and dictionary items GetAll so we can use it for the packager without worrying about security access to sections --- .../src/views/packages/edit.controller.js | 8 +-- .../Editors/DictionaryController.cs | 4 +- src/Umbraco.Web/Editors/EntityController.cs | 57 +++++++++++++++++-- .../ContentEditing/UmbracoEntityTypes.cs | 7 ++- .../Models/Mapping/CodeFileMapperProfile.cs | 12 ++++ .../Models/Mapping/DictionaryMapperProfile.cs | 12 ++++ .../Models/Mapping/LanguageMapperProfile.cs | 12 ++++ 7 files changed, 99 insertions(+), 13 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js index bed3341c6b..0a44192041 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js @@ -1,7 +1,7 @@ (function () { "use strict"; - function EditController($scope, $location, $routeParams, umbRequestHelper, entityResource, stylesheetResource, languageResource, packageResource, dictionaryResource, editorService, formHelper) { + function EditController($scope, $location, $routeParams, umbRequestHelper, entityResource, packageResource, editorService, formHelper) { const vm = this; @@ -73,7 +73,7 @@ }); // get all stylesheets - stylesheetResource.getAll().then(stylesheets => { + entityResource.getAll("Stylesheet").then(stylesheets => { vm.stylesheets = stylesheets; }); @@ -87,7 +87,7 @@ }); // get all languages - languageResource.getAll().then(languages => { + entityResource.getAll("Language").then(languages => { // a package stores the id as a string so we // need to convert all ids to string for comparison languages.forEach(language => { @@ -97,7 +97,7 @@ }); // get all dictionary items - dictionaryResource.getList().then(dictionaryItems => { + entityResource.getAll("DictionaryItem").then(dictionaryItems => { // a package stores the id as a string so we // need to convert all ids to string for comparison dictionaryItems.forEach(dictionaryItem => { diff --git a/src/Umbraco.Web/Editors/DictionaryController.cs b/src/Umbraco.Web/Editors/DictionaryController.cs index cd3141c7b9..9d01cc9d64 100644 --- a/src/Umbraco.Web/Editors/DictionaryController.cs +++ b/src/Umbraco.Web/Editors/DictionaryController.cs @@ -219,7 +219,7 @@ namespace Umbraco.Web.Editors /// /// The list. /// - private void GetChildItemsForList(IDictionaryItem dictionaryItem, int level, List list) + private void GetChildItemsForList(IDictionaryItem dictionaryItem, int level, ICollection list) { foreach (var childItem in Services.LocalizationService.GetDictionaryItemChildren(dictionaryItem.Key).OrderBy(ItemSort())) { @@ -231,6 +231,6 @@ namespace Umbraco.Web.Editors } } - private Func ItemSort() => item => item.ItemKey; + private static Func ItemSort() => item => item.ItemKey; } } diff --git a/src/Umbraco.Web/Editors/EntityController.cs b/src/Umbraco.Web/Editors/EntityController.cs index 993489855f..396615a339 100644 --- a/src/Umbraco.Web/Editors/EntityController.cs +++ b/src/Umbraco.Web/Editors/EntityController.cs @@ -839,8 +839,6 @@ namespace Umbraco.Web.Editors return UmbracoObjectTypes.MediaType; case UmbracoEntityTypes.DocumentType: return UmbracoObjectTypes.DocumentType; - case UmbracoEntityTypes.Stylesheet: - return UmbracoObjectTypes.Stylesheet; case UmbracoEntityTypes.Member: return UmbracoObjectTypes.Member; case UmbracoEntityTypes.DataType: @@ -912,13 +910,31 @@ namespace Umbraco.Web.Editors case UmbracoEntityTypes.User: - long total; - var users = Services.UserService.GetAll(0, int.MaxValue, out total); + var users = Services.UserService.GetAll(0, int.MaxValue, out _); var filteredUsers = ExecutePostFilter(users, postFilter, postFilterParams); return Mapper.Map, IEnumerable>(filteredUsers); - case UmbracoEntityTypes.Domain: + case UmbracoEntityTypes.Stylesheet: + + if (!postFilter.IsNullOrWhiteSpace() || (postFilterParams != null && postFilterParams.Count > 0)) + throw new NotSupportedException("Filtering on stylesheets is not currently supported"); + + return Services.FileService.GetStylesheets().Select(Mapper.Map); + case UmbracoEntityTypes.Language: + + if (!postFilter.IsNullOrWhiteSpace() || (postFilterParams != null && postFilterParams.Count > 0)) + throw new NotSupportedException("Filtering on languages is not currently supported"); + + return Services.LocalizationService.GetAllLanguages().Select(Mapper.Map); + case UmbracoEntityTypes.DictionaryItem: + + if (!postFilter.IsNullOrWhiteSpace() || (postFilterParams != null && postFilterParams.Count > 0)) + throw new NotSupportedException("Filtering on languages is not currently supported"); + + return GetAllDictionaryItems(); + + case UmbracoEntityTypes.Domain: default: throw new NotSupportedException("The " + typeof(EntityController) + " does not currently support data for the type " + entityType); } @@ -937,5 +953,36 @@ namespace Umbraco.Web.Editors } return entities; } + + + #region Methods to get all dictionary items + private IEnumerable GetAllDictionaryItems() + { + var list = new List(); + + foreach (var dictionaryItem in Services.LocalizationService.GetRootDictionaryItems().OrderBy(DictionaryItemSort())) + { + var item = Mapper.Map(dictionaryItem); + list.Add(item); + GetChildItemsForList(dictionaryItem, list); + } + + return list; + } + + private static Func DictionaryItemSort() => item => item.ItemKey; + + private void GetChildItemsForList(IDictionaryItem dictionaryItem, ICollection list) + { + foreach (var childItem in Services.LocalizationService.GetDictionaryItemChildren(dictionaryItem.Key).OrderBy(DictionaryItemSort())) + { + var item = Mapper.Map(childItem); + list.Add(item); + + GetChildItemsForList(childItem, list); + } + } + #endregion + } } diff --git a/src/Umbraco.Web/Models/ContentEditing/UmbracoEntityTypes.cs b/src/Umbraco.Web/Models/ContentEditing/UmbracoEntityTypes.cs index 04d06845d9..fcf7271673 100644 --- a/src/Umbraco.Web/Models/ContentEditing/UmbracoEntityTypes.cs +++ b/src/Umbraco.Web/Models/ContentEditing/UmbracoEntityTypes.cs @@ -86,8 +86,11 @@ namespace Umbraco.Web.Models.ContentEditing /// /// Property Group /// - PropertyGroup + PropertyGroup, - //TODO: Dictionary? + /// + /// Dictionary Item + /// + DictionaryItem } } diff --git a/src/Umbraco.Web/Models/Mapping/CodeFileMapperProfile.cs b/src/Umbraco.Web/Models/Mapping/CodeFileMapperProfile.cs index 94c43f8f11..b3f5f0374c 100644 --- a/src/Umbraco.Web/Models/Mapping/CodeFileMapperProfile.cs +++ b/src/Umbraco.Web/Models/Mapping/CodeFileMapperProfile.cs @@ -9,6 +9,18 @@ namespace Umbraco.Web.Models.Mapping { public CodeFileMapperProfile() { + CreateMap() + .ForMember(dest => dest.Id, opt => opt.MapFrom(sheet => sheet.Id)) + .ForMember(dest => dest.Alias, opt => opt.MapFrom(sheet => sheet.Alias)) + .ForMember(dest => dest.Key, opt => opt.MapFrom(sheet => sheet.Key)) + .ForMember(dest => dest.Name, opt => opt.MapFrom(sheet => sheet.Name)) + .ForMember(dest => dest.ParentId, opt => opt.UseValue(-1)) + .ForMember(dest => dest.Path, opt => opt.MapFrom(sheet => sheet.Path)) + .ForMember(dest => dest.Trashed, opt => opt.Ignore()) + .ForMember(dest => dest.AdditionalData, opt => opt.Ignore()) + .ForMember(dest => dest.Udi, opt => opt.Ignore()) + .ForMember(dest => dest.Icon, opt => opt.Ignore()); + CreateMap() .ForMember(dest => dest.FileType, opt => opt.Ignore()) .ForMember(dest => dest.Notifications, opt => opt.Ignore()) diff --git a/src/Umbraco.Web/Models/Mapping/DictionaryMapperProfile.cs b/src/Umbraco.Web/Models/Mapping/DictionaryMapperProfile.cs index ebd675f572..b3af04603c 100644 --- a/src/Umbraco.Web/Models/Mapping/DictionaryMapperProfile.cs +++ b/src/Umbraco.Web/Models/Mapping/DictionaryMapperProfile.cs @@ -17,6 +17,18 @@ namespace Umbraco.Web.Models.Mapping { public DictionaryMapperProfile(ILocalizationService localizationService) { + CreateMap() + .ForMember(dest => dest.Id, opt => opt.MapFrom(sheet => sheet.Id)) + .ForMember(dest => dest.Alias, opt => opt.MapFrom(sheet => sheet.ItemKey)) + .ForMember(dest => dest.Key, opt => opt.MapFrom(sheet => sheet.Key)) + .ForMember(dest => dest.Name, opt => opt.MapFrom(sheet => sheet.ItemKey)) + .ForMember(dest => dest.ParentId, opt => opt.Ignore()) + .ForMember(dest => dest.Path, opt => opt.Ignore()) + .ForMember(dest => dest.Trashed, opt => opt.Ignore()) + .ForMember(dest => dest.AdditionalData, opt => opt.Ignore()) + .ForMember(dest => dest.Udi, opt => opt.Ignore()) + .ForMember(dest => dest.Icon, opt => opt.Ignore()); + CreateMap() .ForMember(x => x.Translations, expression => expression.Ignore()) .ForMember(x => x.Notifications, expression => expression.Ignore()) diff --git a/src/Umbraco.Web/Models/Mapping/LanguageMapperProfile.cs b/src/Umbraco.Web/Models/Mapping/LanguageMapperProfile.cs index f820d5ae54..ea29b671a6 100644 --- a/src/Umbraco.Web/Models/Mapping/LanguageMapperProfile.cs +++ b/src/Umbraco.Web/Models/Mapping/LanguageMapperProfile.cs @@ -12,6 +12,18 @@ namespace Umbraco.Web.Models.Mapping { public LanguageMapperProfile() { + CreateMap() + .ForMember(dest => dest.Id, opt => opt.MapFrom(x => x.Id)) + .ForMember(dest => dest.Name, opt => opt.MapFrom(x => x.CultureName)) + .ForMember(dest => dest.Key, opt => opt.MapFrom(x => x.Key)) + .ForMember(dest => dest.Alias, opt => opt.MapFrom(x => x.IsoCode)) + .ForMember(dest => dest.ParentId, opt => opt.UseValue(-1)) + .ForMember(dest => dest.Path, opt => opt.Ignore()) + .ForMember(dest => dest.Trashed, opt => opt.Ignore()) + .ForMember(dest => dest.AdditionalData, opt => opt.Ignore()) + .ForMember(dest => dest.Udi, opt => opt.Ignore()) + .ForMember(dest => dest.Icon, opt => opt.Ignore()); + CreateMap() .ForMember(l => l.Name, expression => expression.MapFrom(x => x.CultureInfo.DisplayName)); From b6a8ad1b6e9827c0a211b51af28e67c98cc36c94 Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Wed, 16 Jan 2019 16:21:19 +0100 Subject: [PATCH 115/437] #3417 load available partial views from api --- .../src/common/resources/macro.resource.js | 7 + .../views/macros/macros.edit.controller.js | 144 +++++++++++------- src/Umbraco.Web/Editors/MacrosController.cs | 124 ++++++++++++++- 3 files changed, 215 insertions(+), 60 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js index 9f22465757..237a361f7e 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js @@ -87,6 +87,13 @@ function macroResource($q, $http, umbRequestHelper) { ), 'Failed to create macro "' + name + '"' ); + }, + + getPartialViews: function() { + return umbRequestHelper.resourcePromise( + $http.get(umbRequestHelper.getApiUrl("macroApiBaseUrl", "GetPartialViews"), + "Failed to get partial views") + ); } }; } diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/macros.edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/macros/macros.edit.controller.js index 81c699a05f..fa3a4e45a5 100644 --- a/src/Umbraco.Web.UI.Client/src/views/macros/macros.edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/macros/macros.edit.controller.js @@ -6,77 +6,25 @@ * @description * The controller for editing macros. */ -function MacrosEditController($scope, $routeParams, macroResource, editorState, navigationService, dateHelper, userService, entityResource, formHelper, contentEditingHelper, localizationService, angularHelper) { +function MacrosEditController($scope, $q, $routeParams, macroResource, editorState, navigationService, dateHelper, userService, entityResource, formHelper, contentEditingHelper, localizationService, angularHelper) { var vm = this; + vm.promises = {}; + vm.page = {}; vm.page.loading = false; vm.page.saveButtonState = "init"; vm.page.menu = {} - vm.save = saveMacro; - vm.toggle = toggleValue; - - - init(); - - function init() { - vm.page.loading = true; - - - vm.page.navigation = [ - { - "name": "Settings", - "alias": "settings", - "icon": "icon-settings", - "view": "views/macros/views/settings.html", - "active": true - }, - { - "name": "Parameters", - "alias": "parameters", - "icon": "icon-list", - "view": "views/macros/views/parameters.html" - } - ]; - - vm.macro = { - "name": "Test macro", - "alias": "testMacro", - "id": 1, - "key": "unique key goes here", - "useInEditor": true, - "renderInEditor": false, - "cachePeriod": 2400, - "cacheByPage": true, - "cacheByUser": false, - "view": "Second", - "parameters": [ - { - "key": "title", - "label": "Label", - "editor": "editor" - }, - { - "key": "link", - "label": "Link", - "editor": "Link picker" - } - ] - } - - vm.views = ['First', 'Second', 'Third']; - - vm.parameterEditors = ['editor', 'Link picker', 'Image picker']; - - vm.page.loading = false; - } + function toggleValue(key) { vm.macro[key] = !vm.macro[key]; } + vm.toggle = toggleValue; + function saveMacro() { vm.page.saveButtonState = "busy"; @@ -98,6 +46,8 @@ function MacrosEditController($scope, $routeParams, macroResource, editorState, } } + vm.save = saveMacro; + function setFormDirty() { var currentForm = angularHelper.getCurrentForm($scope); @@ -108,6 +58,84 @@ function MacrosEditController($scope, $routeParams, macroResource, editorState, } vm.setDirty = setFormDirty; + + function getPartialViews() { + var deferred = $q.defer(); + + macroResource.getPartialViews().then(function (data) { + deferred.resolve(data); + }, function () { + deferred.reject(); + }); + + return deferred.promise; + } + + function init() { + vm.page.loading = true; + + vm.promises['partialViews'] = getPartialViews(); + + $q.all(vm.promises).then(function (values) { + var keys = Object.keys(values); + + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + + if (keys[i] === 'partialViews') { + vm.views = values[key]; + } + } + + vm.page.loading = false; + }); + + + vm.page.navigation = [ + { + "name": "Settings", + "alias": "settings", + "icon": "icon-settings", + "view": "views/macros/views/settings.html", + "active": true + }, + { + "name": "Parameters", + "alias": "parameters", + "icon": "icon-list", + "view": "views/macros/views/parameters.html" + } + ]; + + vm.macro = { + "name": "Test macro", + "alias": "testMacro", + "id": 1, + "key": "unique key goes here", + "useInEditor": true, + "renderInEditor": false, + "cachePeriod": 2400, + "cacheByPage": true, + "cacheByUser": false, + "view": "Second", + "parameters": [ + { + "key": "title", + "label": "Label", + "editor": "editor" + }, + { + "key": "link", + "label": "Link", + "editor": "Link picker" + } + ] + } + + vm.parameterEditors = ['editor', 'Link picker', 'Image picker']; + } + + init(); } angular.module("umbraco").controller("Umbraco.Editors.Macros.EditController", MacrosEditController); diff --git a/src/Umbraco.Web/Editors/MacrosController.cs b/src/Umbraco.Web/Editors/MacrosController.cs index f1d949231e..553924c3e6 100644 --- a/src/Umbraco.Web/Editors/MacrosController.cs +++ b/src/Umbraco.Web/Editors/MacrosController.cs @@ -14,6 +14,12 @@ using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Editors { + using System.Collections.Generic; + using System.IO; + using System.Linq; + + using Umbraco.Core.IO; + /// /// The API controller used for editing dictionary items /// @@ -48,7 +54,7 @@ namespace Umbraco.Web.Editors try { - var macro = new Macro { Alias = alias, Name = name, MacroSource = string.Empty}; + var macro = new Macro { Alias = alias, Name = name, MacroSource = string.Empty }; this.Services.MacroService.Save(macro, this.Security.CurrentUser.Id); @@ -58,7 +64,121 @@ namespace Umbraco.Web.Editors { this.Logger.Error(exception, "Error creating macro"); return Request.CreateNotificationValidationErrorResponse("Error creating dictionary item"); - } + } + } + + /// + /// Gets a list of available macro partials + /// + /// + /// The . + /// + public HttpResponseMessage GetPartialViews() + { + var views = new List(); + + views.AddRange(this.FindPartialViewsFiles()); + + return this.Request.CreateResponse(HttpStatusCode.OK, views); + } + + /// + /// Finds all the macro partials + /// + /// + /// The . + /// + private IEnumerable FindPartialViewsFiles() + { + var files = new List(); + + files.AddRange(this.FindPartialViewFilesInViewsFolder()); + files.AddRange(this.FindPartialViewFilesInPluginFolders()); + + return files; + } + + /// + /// Finds all macro partials in the views folder + /// + /// + /// The . + /// + private IEnumerable FindPartialViewFilesInViewsFolder() + { + var partialsDir = IOHelper.MapPath(SystemDirectories.MacroPartials); + + return this.FindPartialViewFilesInFolder( + partialsDir, + partialsDir, + SystemDirectories.MacroPartials); + } + + /// + /// Finds partial view files in app plugin folders. + /// + /// + /// The . + /// + private IEnumerable FindPartialViewFilesInPluginFolders() + { + var files = new List(); + + var appPluginsFolder = new DirectoryInfo(IOHelper.MapPath(SystemDirectories.AppPlugins)); + + if (!appPluginsFolder.Exists) + { + return files; + } + + foreach (var directory in appPluginsFolder.GetDirectories()) + { + var viewsFolder = directory.GetDirectories("Views"); + if (viewsFolder.Any()) + { + var macroPartials = viewsFolder.First().GetDirectories("MacroPartials"); + if (macroPartials.Any()) + { + files.AddRange(this.FindPartialViewFilesInFolder(macroPartials.First().FullName, macroPartials.First().FullName, SystemDirectories.AppPlugins + "/" + directory.Name + "/Views/MacroPartials")); + } + } + } + + return files; + } + + /// + /// Finds all partial views in a folder and subfolders + /// + /// + /// The org path. + /// + /// + /// The path. + /// + /// + /// The prefix virtual path. + /// + /// + /// The . + /// + private IEnumerable FindPartialViewFilesInFolder(string orgPath, string path, string prefixVirtualPath) + { + var files = new List(); + var dirInfo = new DirectoryInfo(path); + + foreach (var dir in dirInfo.GetDirectories()) + { + files.AddRange(this.FindPartialViewFilesInFolder(orgPath, path + "/" + dir.Name, prefixVirtualPath)); + } + + var fileInfo = dirInfo.GetFiles("*.*"); + + files.AddRange( + fileInfo.Select(file => + prefixVirtualPath.TrimEnd('/') + "/" + (path.Replace(orgPath, string.Empty).Trim('/') + "/" + file.Name).Trim('/'))); + + return files; } } } From c0e62c4c5fa39ae3858eb5d74f0b3f417aeed10e Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Wed, 16 Jan 2019 16:37:33 +0100 Subject: [PATCH 116/437] #3417 retreive a list with parameter editors from API --- .../src/common/resources/macro.resource.js | 7 +++++++ .../macros/infiniteeditors/parameter.html | 2 +- .../views/macros/macros.edit.controller.js | 21 ++++++++++++++++--- src/Umbraco.Web/Editors/MacrosController.cs | 12 +++++++++++ 4 files changed, 38 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js index 237a361f7e..5313eadcaa 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js @@ -94,6 +94,13 @@ function macroResource($q, $http, umbRequestHelper) { $http.get(umbRequestHelper.getApiUrl("macroApiBaseUrl", "GetPartialViews"), "Failed to get partial views") ); + }, + + getParameterEditors: function () { + return umbRequestHelper.resourcePromise( + $http.get(umbRequestHelper.getApiUrl("macroApiBaseUrl", "GetParameterEditors"), + "Failed to get parameter editors") + ); } }; } diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/infiniteeditors/parameter.html b/src/Umbraco.Web.UI.Client/src/views/macros/infiniteeditors/parameter.html index ac01fa588e..bf9dbf86a3 100644 --- a/src/Umbraco.Web.UI.Client/src/views/macros/infiniteeditors/parameter.html +++ b/src/Umbraco.Web.UI.Client/src/views/macros/infiniteeditors/parameter.html @@ -26,7 +26,7 @@ - + diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/macros.edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/macros/macros.edit.controller.js index fa3a4e45a5..f8cde110e6 100644 --- a/src/Umbraco.Web.UI.Client/src/views/macros/macros.edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/macros/macros.edit.controller.js @@ -71,10 +71,23 @@ function MacrosEditController($scope, $q, $routeParams, macroResource, editorSta return deferred.promise; } + function getParameterEditors() { + var deferred = $q.defer(); + + macroResource.getParameterEditors().then(function (data) { + deferred.resolve(data); + }, function () { + deferred.reject(); + }); + + return deferred.promise; + } + function init() { vm.page.loading = true; vm.promises['partialViews'] = getPartialViews(); + vm.promises['parameterEditors'] = getParameterEditors(); $q.all(vm.promises).then(function (values) { var keys = Object.keys(values); @@ -85,6 +98,10 @@ function MacrosEditController($scope, $q, $routeParams, macroResource, editorSta if (keys[i] === 'partialViews') { vm.views = values[key]; } + + if (keys[i] === 'parameterEditors') { + vm.parameterEditors = values[key]; + } } vm.page.loading = false; @@ -130,9 +147,7 @@ function MacrosEditController($scope, $q, $routeParams, macroResource, editorSta "editor": "Link picker" } ] - } - - vm.parameterEditors = ['editor', 'Link picker', 'Image picker']; + } } init(); diff --git a/src/Umbraco.Web/Editors/MacrosController.cs b/src/Umbraco.Web/Editors/MacrosController.cs index 553924c3e6..6e2d032ad4 100644 --- a/src/Umbraco.Web/Editors/MacrosController.cs +++ b/src/Umbraco.Web/Editors/MacrosController.cs @@ -19,6 +19,7 @@ namespace Umbraco.Web.Editors using System.Linq; using Umbraco.Core.IO; + using Umbraco.Web.Composing; /// /// The API controller used for editing dictionary items @@ -82,6 +83,17 @@ namespace Umbraco.Web.Editors return this.Request.CreateResponse(HttpStatusCode.OK, views); } + /// + /// Gets the available parameter editors + /// + /// + /// The . + /// + public HttpResponseMessage GetParameterEditors() + { + return this.Request.CreateResponse(HttpStatusCode.OK, Current.ParameterEditors); + } + /// /// Finds all the macro partials /// From 355ac09d90f435f96a217c32ce9dbe93852a85bb Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 17 Jan 2019 13:20:19 +1100 Subject: [PATCH 117/437] WIP - moved out the tree and section service from Core, these are web only things, removes their xml parsing, fixes base controller ctor params with UmbracoContext, need to implement tree/section collections taking into account controllers and not scanning so much --- .../Composing/Composers/ServicesComposer.cs | 4 - src/Umbraco.Core/Models/ApplicationTree.cs | 170 ---- src/Umbraco.Core/Models/Section.cs | 22 - src/Umbraco.Core/Services/ISectionService.cs | 114 --- src/Umbraco.Core/Services/ServiceContext.cs | 20 +- src/Umbraco.Core/Umbraco.Core.csproj | 4 - .../Cache/DistributedCacheBinderTests.cs | 7 - .../Packages/Document_Type_Picker_1.1.zip | Bin 0 -> 6147 bytes .../Services/SectionServiceTests.cs | 17 +- .../TestControllerActivatorBase.cs | 3 +- .../TestHelpers/TestObjects-Mocks.cs | 2 - src/Umbraco.Tests/TestHelpers/TestObjects.cs | 6 +- .../TreesAndSections/ApplicationTreeTest.cs | 724 ++++++++--------- .../TreesAndSections/SectionTests.cs | 454 +++++------ .../Cache/ApplicationTreeCacheRefresher.cs | 68 +- .../Cache/DistributedCacheBinder_Handlers.cs | 72 +- .../Cache/DistributedCacheExtensions.cs | 24 +- .../{ => Controllers}/TagsController.cs | 6 +- .../Editors/AuthenticationController.cs | 4 +- .../Editors/BackOfficeServerVariables.cs | 4 +- .../Editors/ContentTypeController.cs | 4 +- .../Editors/ContentTypeControllerBase.cs | 3 +- .../Editors/DashboardController.cs | 4 +- src/Umbraco.Web/Editors/DashboardSecurity.cs | 1 + src/Umbraco.Web/Editors/Dashboards.cs | 1 + src/Umbraco.Web/Editors/EntityController.cs | 16 +- .../Editors/MediaTypeController.cs | 3 +- .../Editors/MemberTypeController.cs | 3 +- .../Editors/PackageInstallController.cs | 4 +- src/Umbraco.Web/Editors/SectionController.cs | 30 +- .../UmbracoAuthorizedJsonController.cs | 4 +- .../Models/ContentEditing/ApplicationTree.cs | 177 +++++ .../ContentEditing/IBackOfficeSection.cs | 15 + .../Models/Mapping/SectionMapperProfile.cs | 3 +- .../Models/Mapping/UserMapperProfile.cs | 1 + .../Models/Trees/ApplicationAttribute.cs | 30 - .../Models/Trees/ApplicationDefinitions.cs | 90 ++- src/Umbraco.Web/Models/Trees/IApplication.cs | 10 - .../Mvc/SurfaceControllerTypeCollection.cs | 2 + .../Runtime/WebRuntimeComponent.cs | 2 + src/Umbraco.Web/Runtime/WebRuntimeComposer.cs | 11 + .../Search/SearchableTreeCollection.cs | 1 + .../Services/ApplicationTreeService.cs | 747 +++++++++--------- .../Services/IApplicationTreeService.cs | 121 +-- src/Umbraco.Web/Services/ISectionService.cs | 116 +++ src/Umbraco.Web/Services/SectionService.cs | 443 +++++------ .../Trees/ApplicationTreeController.cs | 33 +- .../Trees/BackOfficeSectionCollection.cs | 21 + src/Umbraco.Web/Trees/TreeCollection.cs | 27 + src/Umbraco.Web/Trees/TreeController.cs | 34 +- src/Umbraco.Web/Trees/TreeControllerBase.cs | 98 +-- ...xtensions.cs => TreeControllerResolver.cs} | 106 ++- .../UI/Pages/UmbracoEnsuredPage.cs | 14 +- src/Umbraco.Web/Umbraco.Web.csproj | 13 +- src/Umbraco.Web/UrlHelperExtensions.cs | 1 - .../Filters/LegacyTreeAuthorizeAttribute.cs | 29 - .../Filters/UmbracoTreeAuthorizeAttribute.cs | 23 +- .../WebApi/UmbracoApiController.cs | 4 +- .../WebApi/UmbracoApiControllerBase.cs | 11 +- .../UmbracoApiControllerTypeCollection.cs | 2 + .../WebApi/UmbracoAuthorizedApiController.cs | 4 +- .../_Legacy/PackageActions/addApplication.cs | 106 +-- 62 files changed, 2043 insertions(+), 2050 deletions(-) delete mode 100644 src/Umbraco.Core/Models/ApplicationTree.cs delete mode 100644 src/Umbraco.Core/Models/Section.cs delete mode 100644 src/Umbraco.Core/Services/ISectionService.cs create mode 100644 src/Umbraco.Tests/Packaging/Packages/Document_Type_Picker_1.1.zip rename src/Umbraco.Web/{ => Controllers}/TagsController.cs (89%) create mode 100644 src/Umbraco.Web/Models/ContentEditing/ApplicationTree.cs create mode 100644 src/Umbraco.Web/Models/ContentEditing/IBackOfficeSection.cs delete mode 100644 src/Umbraco.Web/Models/Trees/ApplicationAttribute.cs delete mode 100644 src/Umbraco.Web/Models/Trees/IApplication.cs rename src/{Umbraco.Core => Umbraco.Web}/Services/IApplicationTreeService.cs (52%) create mode 100644 src/Umbraco.Web/Services/ISectionService.cs create mode 100644 src/Umbraco.Web/Trees/BackOfficeSectionCollection.cs create mode 100644 src/Umbraco.Web/Trees/TreeCollection.cs rename src/Umbraco.Web/Trees/{ApplicationTreeExtensions.cs => TreeControllerResolver.cs} (56%) delete mode 100644 src/Umbraco.Web/WebApi/Filters/LegacyTreeAuthorizeAttribute.cs diff --git a/src/Umbraco.Core/Composing/Composers/ServicesComposer.cs b/src/Umbraco.Core/Composing/Composers/ServicesComposer.cs index 8c9ccd1088..0b83373d99 100644 --- a/src/Umbraco.Core/Composing/Composers/ServicesComposer.cs +++ b/src/Umbraco.Core/Composing/Composers/ServicesComposer.cs @@ -73,10 +73,6 @@ namespace Umbraco.Core.Composing.Composers factory.GetInstance(), factory.GetInstance(), new DirectoryInfo(IOHelper.GetRootDirectorySafe()))); - //TODO: These are replaced in the web project - we need to declare them so that - // something is wired up, just not sure this is very nice but will work for now. - composition.RegisterUnique(); - composition.RegisterUnique(); return composition; } diff --git a/src/Umbraco.Core/Models/ApplicationTree.cs b/src/Umbraco.Core/Models/ApplicationTree.cs deleted file mode 100644 index ccdebea724..0000000000 --- a/src/Umbraco.Core/Models/ApplicationTree.cs +++ /dev/null @@ -1,170 +0,0 @@ -using System; -using System.Collections.Concurrent; -using System.Diagnostics; -using Umbraco.Core.Services; - -namespace Umbraco.Core.Models -{ - [DebuggerDisplay("Tree - {Title} ({ApplicationAlias})")] - public class ApplicationTree - { - private static readonly ConcurrentDictionary ResolvedTypes = new ConcurrentDictionary(); - - /// - /// Initializes a new instance of the class. - /// - public ApplicationTree() { } - - /// - /// Initializes a new instance of the class. - /// - /// if set to true [initialize]. - /// The sort order. - /// The application alias. - /// The tree alias. - /// The tree title. - /// The icon closed. - /// The icon opened. - /// The tree type. - public ApplicationTree(bool initialize, int sortOrder, string applicationAlias, string alias, string title, string iconClosed, string iconOpened, string type) - { - Initialize = initialize; - SortOrder = sortOrder; - ApplicationAlias = applicationAlias; - Alias = alias; - Title = title; - IconClosed = iconClosed; - IconOpened = iconOpened; - Type = type; - - } - - /// - /// Gets or sets a value indicating whether this should initialize. - /// - /// true if initialize; otherwise, false. - public bool Initialize { get; set; } - - /// - /// Gets or sets the sort order. - /// - /// The sort order. - public int SortOrder { get; set; } - - /// - /// Gets the application alias. - /// - /// The application alias. - public string ApplicationAlias { get; } - - /// - /// Gets the tree alias. - /// - /// The alias. - public string Alias { get; } - - /// - /// Gets or sets the tree title. - /// - /// The title. - public string Title { get; set; } - - /// - /// Gets or sets the icon closed. - /// - /// The icon closed. - public string IconClosed { get; set; } - - /// - /// Gets or sets the icon opened. - /// - /// The icon opened. - public string IconOpened { get; set; } - - /// - /// Gets or sets the tree type assembly name. - /// - /// The type. - public string Type { get; set; } - - /// - /// Returns the localized root node display name - /// - /// - /// - public string GetRootNodeDisplayName(ILocalizedTextService textService) - { - var label = $"[{Alias}]"; - - // try to look up a the localized tree header matching the tree alias - var localizedLabel = textService.Localize("treeHeaders/" + Alias); - - // if the localizedLabel returns [alias] then return the title attribute from the trees.config file, if it's defined - if (localizedLabel != null && localizedLabel.Equals(label, StringComparison.InvariantCultureIgnoreCase)) - { - if (string.IsNullOrEmpty(Title) == false) - label = Title; - } - else - { - // the localizedLabel translated into something that's not just [alias], so use the translation - label = localizedLabel; - } - - return label; - } - - private Type _runtimeType; - - /// - /// Returns the CLR type based on it's assembly name stored in the config - /// - /// - public Type GetRuntimeType() - { - return _runtimeType ?? (_runtimeType = System.Type.GetType(Type)); - } - - /// - /// Used to try to get and cache the tree type - /// - /// - /// - internal static Type TryGetType(string type) - { - try - { - return ResolvedTypes.GetOrAdd(type, s => - { - var result = System.Type.GetType(type); - if (result != null) - { - return result; - } - - //we need to implement a bit of a hack here due to some trees being renamed and backwards compat - var parts = type.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries); - if (parts.Length != 2) - throw new InvalidOperationException("Could not resolve type"); - if (parts[1].Trim() != "Umbraco.Web" || parts[0].StartsWith("Umbraco.Web.Trees") == false || parts[0].EndsWith("Controller")) - throw new InvalidOperationException("Could not resolve type"); - - //if it's one of our controllers but it's not suffixed with "Controller" then add it and try again - var tempType = parts[0] + "Controller, Umbraco.Web"; - - result = System.Type.GetType(tempType); - if (result != null) - return result; - - throw new InvalidOperationException("Could not resolve type"); - }); - } - catch (InvalidOperationException) - { - //swallow, this is our own exception, couldn't find the type - // fixme bad use of exceptions here! - return null; - } - } - } -} diff --git a/src/Umbraco.Core/Models/Section.cs b/src/Umbraco.Core/Models/Section.cs deleted file mode 100644 index 4b7f8309dd..0000000000 --- a/src/Umbraco.Core/Models/Section.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace Umbraco.Core.Models -{ - /// - /// Represents a section defined in the app.config file. - /// - public class Section - { - public Section(string name, string @alias, int sortOrder) - { - Name = name; - Alias = alias; - SortOrder = sortOrder; - } - - public Section() - { } - - public string Name { get; set; } - public string Alias { get; set; } - public int SortOrder { get; set; } - } -} diff --git a/src/Umbraco.Core/Services/ISectionService.cs b/src/Umbraco.Core/Services/ISectionService.cs deleted file mode 100644 index 899ae78245..0000000000 --- a/src/Umbraco.Core/Services/ISectionService.cs +++ /dev/null @@ -1,114 +0,0 @@ -using System.Collections.Generic; -using Umbraco.Core.Models; - -namespace Umbraco.Core.Services -{ - public interface ISectionService - { - /// - /// The cache storage for all applications - /// - IEnumerable
GetSections(); - - /// - /// Get the user group's allowed sections - /// - /// - /// - IEnumerable
GetAllowedSections(int userId); - - /// - /// Gets the application by its alias. - /// - /// The application alias. - /// - Section GetByAlias(string appAlias); - - /// - /// Creates a new applcation if no application with the specified alias is found. - /// - /// The application name. - /// The application alias. - /// The application icon, which has to be located in umbraco/images/tray folder. - void MakeNew(string name, string alias, string icon); - - /// - /// Makes the new. - /// - /// The name. - /// The alias. - /// The icon. - /// The sort order. - void MakeNew(string name, string alias, string icon, int sortOrder); - - /// - /// Deletes the section - /// - void DeleteSection(Section section); - } - - /// - /// Purely used to allow a service context to create the default services - /// - internal class EmptySectionService : ISectionService - { - /// - /// The cache storage for all applications - /// - public IEnumerable
GetSections() - { - throw new System.NotImplementedException(); - } - - /// - /// Get the user's allowed sections - /// - /// - /// - public IEnumerable
GetAllowedSections(int userId) - { - throw new System.NotImplementedException(); - } - - /// - /// Gets the application by its alias. - /// - /// The application alias. - /// - public Section GetByAlias(string appAlias) - { - throw new System.NotImplementedException(); - } - - /// - /// Creates a new applcation if no application with the specified alias is found. - /// - /// The application name. - /// The application alias. - /// The application icon, which has to be located in umbraco/images/tray folder. - public void MakeNew(string name, string alias, string icon) - { - throw new System.NotImplementedException(); - } - - /// - /// Makes the new. - /// - /// The name. - /// The alias. - /// The icon. - /// The sort order. - public void MakeNew(string name, string alias, string icon, int sortOrder) - { - throw new System.NotImplementedException(); - } - - /// - /// Deletes the section - /// - public void DeleteSection(Section section) - { - throw new System.NotImplementedException(); - } - } -} diff --git a/src/Umbraco.Core/Services/ServiceContext.cs b/src/Umbraco.Core/Services/ServiceContext.cs index 731d3a58c6..6d7ac8a5e7 100644 --- a/src/Umbraco.Core/Services/ServiceContext.cs +++ b/src/Umbraco.Core/Services/ServiceContext.cs @@ -25,8 +25,6 @@ namespace Umbraco.Core.Services private readonly Lazy _serverRegistrationService; private readonly Lazy _entityService; private readonly Lazy _relationService; - private readonly Lazy _treeService; - private readonly Lazy _sectionService; private readonly Lazy _macroService; private readonly Lazy _memberTypeService; private readonly Lazy _memberGroupService; @@ -38,7 +36,7 @@ namespace Umbraco.Core.Services /// /// Initializes a new instance of the class with lazy services. /// - public ServiceContext(Lazy publicAccessService, Lazy domainService, Lazy auditService, Lazy localizedTextService, Lazy tagService, Lazy contentService, Lazy userService, Lazy memberService, Lazy mediaService, Lazy contentTypeService, Lazy mediaTypeService, Lazy dataTypeService, Lazy fileService, Lazy localizationService, Lazy packagingService, Lazy serverRegistrationService, Lazy entityService, Lazy relationService, Lazy treeService, Lazy sectionService, Lazy macroService, Lazy memberTypeService, Lazy memberGroupService, Lazy notificationService, Lazy externalLoginService, Lazy redirectUrlService, Lazy consentService) + public ServiceContext(Lazy publicAccessService, Lazy domainService, Lazy auditService, Lazy localizedTextService, Lazy tagService, Lazy contentService, Lazy userService, Lazy memberService, Lazy mediaService, Lazy contentTypeService, Lazy mediaTypeService, Lazy dataTypeService, Lazy fileService, Lazy localizationService, Lazy packagingService, Lazy serverRegistrationService, Lazy entityService, Lazy relationService, Lazy macroService, Lazy memberTypeService, Lazy memberGroupService, Lazy notificationService, Lazy externalLoginService, Lazy redirectUrlService, Lazy consentService) { _publicAccessService = publicAccessService; _domainService = domainService; @@ -58,8 +56,6 @@ namespace Umbraco.Core.Services _serverRegistrationService = serverRegistrationService; _entityService = entityService; _relationService = relationService; - _treeService = treeService; - _sectionService = sectionService; _macroService = macroService; _memberTypeService = memberTypeService; _memberGroupService = memberGroupService; @@ -90,8 +86,6 @@ namespace Umbraco.Core.Services IMemberTypeService memberTypeService = null, IMemberService memberService = null, IUserService userService = null, - ISectionService sectionService = null, - IApplicationTreeService treeService = null, ITagService tagService = null, INotificationService notificationService = null, ILocalizedTextService localizedTextService = null, @@ -125,8 +119,6 @@ namespace Umbraco.Core.Services Lazy(serverRegistrationService), Lazy(entityService), Lazy(relationService), - Lazy(treeService), - Lazy(sectionService), Lazy(macroService), Lazy(memberTypeService), Lazy(memberGroupService), @@ -236,16 +228,6 @@ namespace Umbraco.Core.Services ///
public IMemberService MemberService => _memberService.Value; - /// - /// Gets the - /// - public ISectionService SectionService => _sectionService.Value; - - /// - /// Gets the - /// - public IApplicationTreeService ApplicationTreeService => _treeService.Value; - /// /// Gets the MemberTypeService /// diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 2236854351..8395dd9cb8 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -678,7 +678,6 @@ - @@ -875,7 +874,6 @@ - @@ -1390,7 +1388,6 @@ - @@ -1420,7 +1417,6 @@ - diff --git a/src/Umbraco.Tests/Cache/DistributedCacheBinderTests.cs b/src/Umbraco.Tests/Cache/DistributedCacheBinderTests.cs index 50b27da89f..3532a11c63 100644 --- a/src/Umbraco.Tests/Cache/DistributedCacheBinderTests.cs +++ b/src/Umbraco.Tests/Cache/DistributedCacheBinderTests.cs @@ -47,13 +47,6 @@ namespace Umbraco.Tests.Cache //Permission.Deleted += PermissionDeleted; //PermissionRepository.AssignedPermissions += CacheRefresherEventHandler_AssignedPermissions; - new EventDefinition(null, serviceContext.ApplicationTreeService, new EventArgs(), "Deleted"), - new EventDefinition(null, serviceContext.ApplicationTreeService, new EventArgs(), "Updated"), - new EventDefinition(null, serviceContext.ApplicationTreeService, new EventArgs(), "New"), - - new EventDefinition(null, serviceContext.SectionService, new EventArgs(), "Deleted"), - new EventDefinition(null, serviceContext.SectionService, new EventArgs(), "New"), - new EventDefinition>(null, serviceContext.UserService, new SaveEventArgs(Enumerable.Empty())), new EventDefinition>(null, serviceContext.UserService, new DeleteEventArgs(Enumerable.Empty())), new EventDefinition>(null, serviceContext.UserService, new SaveEventArgs(Enumerable.Empty())), diff --git a/src/Umbraco.Tests/Packaging/Packages/Document_Type_Picker_1.1.zip b/src/Umbraco.Tests/Packaging/Packages/Document_Type_Picker_1.1.zip new file mode 100644 index 0000000000000000000000000000000000000000..18449bd3735870c98e711525a7ea9883941e321f GIT binary patch literal 6147 zcma)=RZJWVl!bAp6qn)@DHL~ich`a9GDv|U9o*dqXP~$j8>HwIcc+6CcZxg3_Ww7V z%_f^o_TGmt_vYr@m-BSARFP4L5D*YB5dOwu%SOrHjmG{vav>nF{0m`zTP^`UD|RbO zJ{xvEJ{}u(VJ6 z>RqIdc64-an*}K5AZ-UAemx4uIqk2~WIP~j*f$8$!If+UInR2e$q(g!=FuH-F4L-4 z9dYM91Y;{#CsPV><>WPb+O>B}bWg&$d6f8SWagJ$DRHjNnOwXeRSe4r{pSursKP2+ z5*!Csj==m?xdmqNt(gZb?I}|u@T-17dXyRCfw)Zm+V*Ay#4LOW7g^5bn$2t^_RxbI zb~nFqnEJIPe82VAW1vgLGN5?NciA2C@u8*RO#64`l1El`KGb^eq{hBl4d;)_RN9|h z;2vSvnrG6N7_BRX3JZ;r19(S{2)`5E;kr~#Mr_~Kl~nJtaO8z|tn0FriIPLEk-0X6 zvkrodN)M#{Ib62%^qF1q_<~==kbKIOK6YgSp`>(Lk|N2qo8u_hSPg*eGz2WtsELJg z&i!U|fb7dz**KzB*2#Yx-xvl~W{KI5olssKlTbSoK4HwQbkz%LRT0Zs&^mDvdZM^f zaJ6-Hs!Z$PJ3v>ei2UT60fWv}du)Y_hI){-2L5Ct%oxT=k6UZvoJj>&I^!)jbKH&Z zn`AY%?Dat5!Xs-{1DBUi;|eN+y0ooBU9<+W zXtE^aR5vrFAIN4;N9Ijz8F;tVH*fW17b6FKG25!*j&7OkS`7Kf{_6PgnqvHT(@?hk zLv`$3uPtrWhuOD|xBV3K-Z=x^L*J84#xI&3h8UoEF81qz>!y#mJLY5D1@>wIkH3r( zKD4hMlFtyiV)%T#VfSo7!H3Sox<$um(_bE!wiwmw%hWWmIl0OA#aZY==|=ILqn824 zdZOgHV!5W3XWn)GHS;s9Br+0=)89}`$X;b0zt|G{kaO!YVoO;^U|9U?4*?C z!%|*r>zZj^}+;2PT53CIGVe$h&mj**Cis2A- z`8%{XPB83WbizI%%r;n-d1*hl?rK}yc6^H~msEv1`WhYfE;4vHO~yK60KQbPy+H~& z`rp(kJ4~kAZ*nz~nKy2r#MMU^21S{qW`tix;>?ZXUT`dLZ6bRY-q$g#o^Br|Ldz)_ zDg*O{d2CY7!@cjB=Op+FYx~N>fq<(Ap`nroe+W26+&nUTGK}0iDtO^=(%MYj)iRO# z?oT?0ZWTHZ_P``(^9-`JtTQyLdIA#NI|)c0!3Dc?);nWKZ{Cszq-_5F9y*io>5Hs_ zAnWq_~2s-hqXHNdHM>xV6h`*qRK!=$MrB=hXz+vHdBI$$LU=ggLL z^jO=a$aVtKjpt#M5lUhlQ9Qx@QXkS}vB$}6U~xu4-=rlJC}joEaE7=&(6 z-FR1gL)Z7leecjH^`_wsAd@Ib5u$uuuP82a*C4daRl_d$88oY z?qOz0+t3y^;Qp(6uXXmoj0;jop*I%skt<_q-YP(blUACHztsDilz|0Jd@ULU$sc+RLK@h*@r?;B}v z5IR{Rml=D#;)V+nRmdHtzuv~~FmDRVv)(rn+fk1Yzhcp14yw3Di#tW^85Hq1ZQVh1EGVb^Pax`C0-tS*wo!YH)*C?b4l>Vd)h$bQvM zNSz2P#E`kRXV;MRxn)F7ARMWiXcSQ(iu@Eq6X`bGc#i~zADH>Am4e1_OzOkKBI!m< z5joA{8()ep_|OZrSOWD$LqRZUQF*|}qFR(&V0a?+IQvVvdeiP8IhwTVglv`-h2`=uZ zwI0SrzXM<)cRy#(T3;a9U#glApBlWuG3yBb(Dk~5p$5_3H;wnI@2XOw=YrfS{!*7u z!a)pbk#MBP%1@F8K3KPxe-~fzp(YrDTIB`9&np ztMlJ}{Q*|$yDUgbRY&CGkDxUh_5?3`NWEGwS7;n+Y6(spup!c*h{@AP*SUfef@0ej zlCCAABKL2mkX~}vCOp`U((16TP~2 zxKU*Dd2$2VNmPQMwt~1_3Aj|k8m7@uWe7mq1%nXTy!oGrE^CkEty^Pbnro5D>Aspl ziUt=k7gWZqNu}1Qa&_*oo?Z2$e^eRLTjSg3$omYe6;Z8!i9pU+Of8oM{Iqvl_}wkRr_ix0&v0i6~@8!2pJC z0?yO1Lt}PzprseZS^620EvXAmX#;6|$gCV5aw66pHHh;7pohN53HJUgym11h0jGT- znJ#Tb$S;1B9Xh0Q7{kcJ_icsw*?<*Go{dAqDRdLD{m}#B1gZm$H28~O^a20@7UFd; z^36^G%h6?Y1+qrj_`+%8r5B+Oov?kBJsBZ})OR8HZny>6jN6V{zL7h7RpcaO z5gO`zz>0is7z+KjO(6iDFK#}CfU5I7l!)6=*Ub>G`aIq+tQvmPydGtaCD@oHL7j90pUrRf%j^&T{Jpd~)}G*FsWLG6xG|$2-QLDh zs_|#`jtveNrTh3?w*S(#Uy?=#qbF-XKV_X`86NIM@j3^XQuIuxS==-_^47lWv$vJq zAS-P47_7Qm>CT+iJm*k8G{$l8J-3y)##sctTD3kLG_*=!qr&g1_QQB(#59Eb%crLV zyB0Zy2en_nt@k~(T!~f6Jdu38;wfg|vSD{Jz{iU_vPH+URQobavCM`S`ojBP9;v#WL= z>Z>yLbwtLvJL$L%%hHAtZ)_WxxdjDH?IaWh#|7-DgT4f|^*0Mk?5N0h@9(^Ql#GIQ zIPZo_?1=li8lhhfl>D5VUi_o>5u6|BkcdlML!dv$Kug0CZ>N#VXU~Vj14NKiemoKL z8^EUPT9E^p7+)OUXJn4d@ETz@+s$N&yHVJsIlvm?kZ-d?&o2WH?C?`O%u(#MA9=o$ zFRG_EyMLUP8e&~#83rVlo?X{NHswSt)xi)PQDuT0WK_FkPNI*INOd%XY!yZvU(ZCP zliy@uGXh7|XauM@$j8aYgvj>o&U@JHj=HIZDP;bHTs~l z#J%r#h;A3H8V{i4hs=?{$rrsAJ!&sZf`nK1fw!_E1@2Ahg8SUhmgqI(azDLQ4M@iN zC^^OE24Bns*a5 zYX13M#}>VKWJ{)NbfNLRWwol7POHxS-zz(`+@#DH?~BEaN{`5>vKM7uzs4yEHtZ6? z%b<$VnhJ`OpC?)Tqq&=9t&ST?%NVFxmMrV7#gut+RWr>z947bo(U#Wsuepn;P z2CFR7mLNf@aY{4MQuz%Ey_;>92&Gazd0)1pkuV>KwP$FYH0)fzzAyzRb18KS!#fP| zDm)@sn%t?!zS76PA{H;7zsbm`LvQ< zujr5-h3qLt)ms{ZJ(|eq>yHUna6T$~q`<+!`i{I(0_}hdrjfw{)sLA>FU8Y#MTJzp z*e50C?c_m#FH~OBZ=h(72(>P=r?NoiPd(G^7sqAn!C@OdA#19pGdl0kztLc)mT@T{ z7Be~GoNdd0Ql|LXVMXGm$s{cIE-K^)y>^vSo|GH9rXpxxY-9~l>K#GNBhG=cQF4E7 zPQ)#W|4u#$G>eS?!x}d`c5DPSs!rJR`EPK;qm=L;;3B%{6}`SczsYyVAJc^r&E~K3qG|;RjqSU&+G3p*#4?VcqDZL6ezyGN!?Y&PAwMCGXttI%{xhL8yTaq?Eq< z!Dq0=I+ttmY;wh-`*-ieub$qXlxxTIW~q$@is3z}pp}|?M^7ZTK{O0Ozv+k!XItJ+ ztD2PAu@d&U|2j?_Wf89v($Jg`iub|tXMYh$t*YDIY6l0NCw1QrW4HSAJsemBZ5|$j zc=CN$8#*Yuse0CY|4tT1nYIGD4da+(W(J81-!t|qml8NsXvJnZY`DH*u52LwX6eOO zS=lmpgRjK@9j`nq4@p?zC}%LCs(}HYF7g11dgq<8GP&Ae+?Lx6RC8wWoWnR|#or^n z#*ni+O-L?dB$%ySp}o{={FHmXPRfKTAdMzNu`Kd!M#z({447Y!hR=?#UPT;3TsRPy zp4Ci{VaAufHd_@(ddu4eCH3r1WMq6r})JmSFPFdJrM`@a{?6axWC`G}A^DqGoIlg>9x%ssmFHAc zA;yh4FL&ObY{WN%1-N@ZkQEL$$G;3WwzQ5C?2izkG6-CG9J)TO|IP@-u!NrV(IF!O z^B$y&*w-qd>0l#76lq7<_+~i>wK9}j-kQ0>a__4_Y*flT4t|0TMxo|Gdl@&YMrW|_ zyf>Rk#+sy%!PnQtW14igo!1F%z6^)&_4m-!DYYxrb*s~~n$M{#zt~jJ>Kv8V(9+i4 z*g{(07N zU#$Pmp^gUD6>_j~06U-(Tzh@KF1lDf`}$<|G`?Nw)~I&+x44+O+%wT@SuA!g(T~rN zmHKA#w_@Giy|&*|g5qw%ZWaBZm22Khof#gU!Ab#UAiM>3)4w63*ZCrZ{O}|}InXr) zDEm-=^Z;@c|HA%q!+sU`IP!MD@9;zfov$>&X%zS7{fYQ{R}k>5k%iHQbAPk6 zv>`9*-r5WeOnzihj!z!MY(Xwx=F_No(zlR6)h*&N*Y?j*K;h+iW6?!6m(t{sdS4>4 zTY#&rxiRB(jqCp|IZW2TpJOt1#LY=mIgpIsnu_FWt6e;Mw;{xXkgAk8nI`qZsD(Bv zyvkm`XZB0;m2<6&qi_R=jZU%pn;+RV=FBo@`K9B9KhnO?%gL_4Nh)<;z>P1{#oja~ zP5Tq~;tO(M&{(VFdC$4z)(}~%)j} zHaDuLH34?Tfy}eJl|Mlb3)|1$JHVBocd@TYa85+6|IRZ*9m?fCGU0)xkq{6-Cf*ZaN#F@~PP8t@EI#8X^FN|lf;z-*2tigPkH zbrg##Zrs60*X2O={)MXU%7Jr7nG#W4#aq<9*%R6EOj#p%)rC#(AeEk5y&=)qjcZUYRKJY3dvzFX0C%hZGvfmP~T#f zQE#0|`ZS;WNqe8?#T>YB${6@t4y*v{!=MN#$xTUjBy>z@K=aez!CKP*$1RsptqQGc zk|dGUV%496zS~E$+R}9%)*?sIBLm?z(d9%m`4Vn|Q4@2fa3w3t2p9ictT=2AdNUk? zLMN+KIpxkKthpLGVjEiap8)2v_dljd3GU)?Wp^bc@nX?%6L_7;3XYi#EDg^QzNTP` zBCVgG%9kK`2UACUoY-(lhqhT1bsm4*L4MLduukZszN-JxqW4DwVYV}pKLAJ%KHlO7 zpyewOysjBD1=o3I%T2PT-pko?rE%RcxC@rsV8_gkw$Oz4V4M&15?no@=0_tjhZ+fC z8$IL`v60`W-u5o)k=v(nZlh|cA|eqX{NLI6KX&^c_5V%M|5cUzFV+9;;P?NfNc#_` z|9SmC{EUV0?-Bt45rGV0H$DE%j^h-f<+aM~_CI_MRr*hAsiLC&dxP{(H~m8q(toG_ E0K6^9ApigX literal 0 HcmV?d00001 diff --git a/src/Umbraco.Tests/Services/SectionServiceTests.cs b/src/Umbraco.Tests/Services/SectionServiceTests.cs index ca5d755220..206c99ffbf 100644 --- a/src/Umbraco.Tests/Services/SectionServiceTests.cs +++ b/src/Umbraco.Tests/Services/SectionServiceTests.cs @@ -3,6 +3,7 @@ using System.Linq; using System.Threading; using Umbraco.Core.Models.Membership; using Umbraco.Tests.Testing; +using Umbraco.Web.Services; namespace Umbraco.Tests.Services { @@ -14,24 +15,20 @@ namespace Umbraco.Tests.Services [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest, WithApplication = true)] public class SectionServiceTests : TestWithSomeContentBase { - public override void CreateTestData() - { - base.CreateTestData(); - - ServiceContext.SectionService.MakeNew("Content", "content", "icon-content"); - ServiceContext.SectionService.MakeNew("Media", "media", "icon-media"); - ServiceContext.SectionService.MakeNew("Settings", "settings", "icon-settings"); - ServiceContext.SectionService.MakeNew("Developer", "developer", "icon-developer"); - } + //fixme + private ISectionService SectionService => new SectionService(ServiceContext.UserService, null, null); + [Test] public void SectionService_Can_Get_Allowed_Sections_For_User() { + //fixme - need to mock + // Arrange var user = CreateTestUser(); // Act - var result = ServiceContext.SectionService.GetAllowedSections(user.Id).ToList(); + var result = SectionService.GetAllowedSections(user.Id).ToList(); // Assert Assert.AreEqual(3, result.Count); diff --git a/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestControllerActivatorBase.cs b/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestControllerActivatorBase.cs index 9e2a2156ee..31ee34843d 100644 --- a/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestControllerActivatorBase.cs +++ b/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestControllerActivatorBase.cs @@ -60,8 +60,7 @@ namespace Umbraco.Tests.TestHelpers.ControllerTesting memberTypeService: mockedMemberTypeService, dataTypeService: mockedDataTypeService, contentTypeService: mockedContentTypeService, - localizedTextService:Mock.Of(), - sectionService:Mock.Of()); + localizedTextService:Mock.Of()); var globalSettings = SettingsForTests.GenerateMockGlobalSettings(); diff --git a/src/Umbraco.Tests/TestHelpers/TestObjects-Mocks.cs b/src/Umbraco.Tests/TestHelpers/TestObjects-Mocks.cs index 8c230f98d0..4dfaa9e674 100644 --- a/src/Umbraco.Tests/TestHelpers/TestObjects-Mocks.cs +++ b/src/Umbraco.Tests/TestHelpers/TestObjects-Mocks.cs @@ -73,8 +73,6 @@ namespace Umbraco.Tests.TestHelpers MockService(container), MockService(container), MockService(container), - MockService(container), - MockService(container), MockService(container), MockService(container), MockService(container), diff --git a/src/Umbraco.Tests/TestHelpers/TestObjects.cs b/src/Umbraco.Tests/TestHelpers/TestObjects.cs index 14ffeb743f..f7f0d26c0e 100644 --- a/src/Umbraco.Tests/TestHelpers/TestObjects.cs +++ b/src/Umbraco.Tests/TestHelpers/TestObjects.cs @@ -188,9 +188,7 @@ namespace Umbraco.Tests.TestHelpers new DirectoryInfo(IOHelper.GetRootDirectorySafe()))); }); var relationService = GetLazyService(factory, c => new RelationService(scopeProvider, logger, eventMessagesFactory, entityService.Value, GetRepo(c), GetRepo(c))); - var treeService = GetLazyService(factory, c => new ApplicationTreeService(logger, cache, typeLoader)); - var tagService = GetLazyService(factory, c => new TagService(scopeProvider, logger, eventMessagesFactory, GetRepo(c))); - var sectionService = GetLazyService(factory, c => new SectionService(userService.Value, treeService.Value, scopeProvider, cache)); + var tagService = GetLazyService(factory, c => new TagService(scopeProvider, logger, eventMessagesFactory, GetRepo(c))); var redirectUrlService = GetLazyService(factory, c => new RedirectUrlService(scopeProvider, logger, eventMessagesFactory, GetRepo(c))); var consentService = GetLazyService(factory, c => new ConsentService(scopeProvider, logger, eventMessagesFactory, GetRepo(c))); @@ -213,8 +211,6 @@ namespace Umbraco.Tests.TestHelpers serverRegistrationService, entityService, relationService, - treeService, - sectionService, macroService, memberTypeService, memberGroupService, diff --git a/src/Umbraco.Tests/TreesAndSections/ApplicationTreeTest.cs b/src/Umbraco.Tests/TreesAndSections/ApplicationTreeTest.cs index 951246c535..95d90f1463 100644 --- a/src/Umbraco.Tests/TreesAndSections/ApplicationTreeTest.cs +++ b/src/Umbraco.Tests/TreesAndSections/ApplicationTreeTest.cs @@ -1,397 +1,397 @@ -using System.IO; -using NUnit.Framework; -using Umbraco.Core.Services; -using Umbraco.Tests.TestHelpers; -using System; -using System.Linq; -using System.Threading; -using Umbraco.Tests.Testing; -using Umbraco.Web.Services; -using Current = Umbraco.Web.Composing.Current; +//using System.IO; +//using NUnit.Framework; +//using Umbraco.Core.Services; +//using Umbraco.Tests.TestHelpers; +//using System; +//using System.Linq; +//using System.Threading; +//using Umbraco.Tests.Testing; +//using Umbraco.Web.Services; +//using Current = Umbraco.Web.Composing.Current; -namespace Umbraco.Tests.TreesAndSections -{ +//namespace Umbraco.Tests.TreesAndSections +//{ - /// - ///This is a test class for ApplicationTreeTest and is intended - ///to contain all ApplicationTreeTest Unit Tests - /// - [TestFixture] - [Apartment(ApartmentState.STA)] - [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] - public class ApplicationTreeTest : TestWithDatabaseBase - { - public override void SetUp() - { - base.SetUp(); +// /// +// ///This is a test class for ApplicationTreeTest and is intended +// ///to contain all ApplicationTreeTest Unit Tests +// /// +// [TestFixture] +// [Apartment(ApartmentState.STA)] +// [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] +// public class ApplicationTreeTest : TestWithDatabaseBase +// { +// public override void SetUp() +// { +// base.SetUp(); - var treesConfig = TestHelper.MapPathForTest("~/TEMP/TreesAndSections/trees.config"); - var appConfig = TestHelper.MapPathForTest("~/TEMP/TreesAndSections/applications.config"); - Directory.CreateDirectory(TestHelper.MapPathForTest("~/TEMP/TreesAndSections")); - using (var writer = File.CreateText(treesConfig)) - { - writer.Write(ResourceFiles.trees); - } - using (var writer = File.CreateText(appConfig)) - { - writer.Write(ResourceFiles.applications); - } +// var treesConfig = TestHelper.MapPathForTest("~/TEMP/TreesAndSections/trees.config"); +// var appConfig = TestHelper.MapPathForTest("~/TEMP/TreesAndSections/applications.config"); +// Directory.CreateDirectory(TestHelper.MapPathForTest("~/TEMP/TreesAndSections")); +// using (var writer = File.CreateText(treesConfig)) +// { +// writer.Write(ResourceFiles.trees); +// } +// using (var writer = File.CreateText(appConfig)) +// { +// writer.Write(ResourceFiles.applications); +// } - ApplicationTreeService.TreeConfigFilePath = treesConfig; - SectionService.AppConfigFilePath = appConfig; - } +// //ApplicationTreeService.TreeConfigFilePath = treesConfig; +// SectionService.AppConfigFilePath = appConfig; +// } - public override void TearDown() - { - base.TearDown(); +// public override void TearDown() +// { +// base.TearDown(); - if (Directory.Exists(TestHelper.MapPathForTest("~/TEMP/TreesAndSections"))) - { - Directory.Delete(TestHelper.MapPathForTest("~/TEMP/TreesAndSections"), true); - } - ApplicationTreeService.TreeConfigFilePath = null; - SectionService.AppConfigFilePath = null; - } +// if (Directory.Exists(TestHelper.MapPathForTest("~/TEMP/TreesAndSections"))) +// { +// Directory.Delete(TestHelper.MapPathForTest("~/TEMP/TreesAndSections"), true); +// } +// //ApplicationTreeService.TreeConfigFilePath = null; +// SectionService.AppConfigFilePath = null; +// } - /// - /// Creates a new app tree linked to an application, then delete the application and make sure the tree is gone as well - /// - [Test()] - public void ApplicationTree_Make_New_Then_Delete_App() - { - //create new app - var appName = Guid.NewGuid().ToString("N"); - var treeName = Guid.NewGuid().ToString("N"); - Current.Services.SectionService.MakeNew(appName, appName, "icon.jpg"); +// ///// +// ///// Creates a new app tree linked to an application, then delete the application and make sure the tree is gone as well +// ///// +// //[Test()] +// //public void ApplicationTree_Make_New_Then_Delete_App() +// //{ +// // //create new app +// // var appName = Guid.NewGuid().ToString("N"); +// // var treeName = Guid.NewGuid().ToString("N"); +// // Current.Services.SectionService.MakeNew(appName, appName, "icon.jpg"); - //check if it exists - var app = Current.Services.SectionService.GetByAlias(appName); - Assert.IsNotNull(app); +// // //check if it exists +// // var app = Current.Services.SectionService.GetByAlias(appName); +// // Assert.IsNotNull(app); - //create the new app tree assigned to the new app - Current.Services.ApplicationTreeService.MakeNew(false, 0, app.Alias, treeName, treeName, "icon.jpg", "icon.jpg", "Umbraco.Web.Trees.ContentTreeController, Umbraco.Web"); - var tree = Current.Services.ApplicationTreeService.GetByAlias(treeName); - Assert.IsNotNull(tree); +// // //create the new app tree assigned to the new app +// // Current.Services.ApplicationTreeService.MakeNew(false, 0, app.Alias, treeName, treeName, "icon.jpg", "icon.jpg", "Umbraco.Web.Trees.ContentTreeController, Umbraco.Web"); +// // var tree = Current.Services.ApplicationTreeService.GetByAlias(treeName); +// // Assert.IsNotNull(tree); - //now delete the app - Current.Services.SectionService.DeleteSection(app); +// // //now delete the app +// // Current.Services.SectionService.DeleteSection(app); - //check that the tree is gone - Assert.AreEqual(0, Current.Services.ApplicationTreeService.GetApplicationTrees(treeName).Count()); - } +// // //check that the tree is gone +// // Assert.AreEqual(0, Current.Services.ApplicationTreeService.GetApplicationTrees(treeName).Count()); +// //} - #region Tests to write - ///// - /////A test for ApplicationTree Constructor - ///// - //[TestMethod()] - //public void ApplicationTreeConstructorTest() - //{ - // bool silent = false; // TODO: Initialize to an appropriate value - // bool initialize = false; // TODO: Initialize to an appropriate value - // byte sortOrder = 0; // TODO: Initialize to an appropriate value - // string applicationAlias = string.Empty; // TODO: Initialize to an appropriate value - // string alias = string.Empty; // TODO: Initialize to an appropriate value - // string title = string.Empty; // TODO: Initialize to an appropriate value - // string iconClosed = string.Empty; // TODO: Initialize to an appropriate value - // string iconOpened = string.Empty; // TODO: Initialize to an appropriate value - // string assemblyName = string.Empty; // TODO: Initialize to an appropriate value - // string type = string.Empty; // TODO: Initialize to an appropriate value - // string action = string.Empty; // TODO: Initialize to an appropriate value - // ApplicationTree target = new ApplicationTree(silent, initialize, sortOrder, applicationAlias, alias, title, iconClosed, iconOpened, assemblyName, type, action); - // Assert.Inconclusive("TODO: Implement code to verify target"); - //} +// #region Tests to write +// ///// +// /////A test for ApplicationTree Constructor +// ///// +// //[TestMethod()] +// //public void ApplicationTreeConstructorTest() +// //{ +// // bool silent = false; // TODO: Initialize to an appropriate value +// // bool initialize = false; // TODO: Initialize to an appropriate value +// // byte sortOrder = 0; // TODO: Initialize to an appropriate value +// // string applicationAlias = string.Empty; // TODO: Initialize to an appropriate value +// // string alias = string.Empty; // TODO: Initialize to an appropriate value +// // string title = string.Empty; // TODO: Initialize to an appropriate value +// // string iconClosed = string.Empty; // TODO: Initialize to an appropriate value +// // string iconOpened = string.Empty; // TODO: Initialize to an appropriate value +// // string assemblyName = string.Empty; // TODO: Initialize to an appropriate value +// // string type = string.Empty; // TODO: Initialize to an appropriate value +// // string action = string.Empty; // TODO: Initialize to an appropriate value +// // ApplicationTree target = new ApplicationTree(silent, initialize, sortOrder, applicationAlias, alias, title, iconClosed, iconOpened, assemblyName, type, action); +// // Assert.Inconclusive("TODO: Implement code to verify target"); +// //} - ///// - /////A test for ApplicationTree Constructor - ///// - //[TestMethod()] - //public void ApplicationTreeConstructorTest1() - //{ - // ApplicationTree target = new ApplicationTree(); - // Assert.Inconclusive("TODO: Implement code to verify target"); - //} +// ///// +// /////A test for ApplicationTree Constructor +// ///// +// //[TestMethod()] +// //public void ApplicationTreeConstructorTest1() +// //{ +// // ApplicationTree target = new ApplicationTree(); +// // Assert.Inconclusive("TODO: Implement code to verify target"); +// //} - ///// - /////A test for Delete - ///// - //[TestMethod()] - //public void DeleteTest() - //{ - // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value - // target.Delete(); - // Assert.Inconclusive("A method that does not return a value cannot be verified."); - //} +// ///// +// /////A test for Delete +// ///// +// //[TestMethod()] +// //public void DeleteTest() +// //{ +// // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value +// // target.Delete(); +// // Assert.Inconclusive("A method that does not return a value cannot be verified."); +// //} - ///// - /////A test for Save - ///// - //[TestMethod()] - //public void SaveTest() - //{ - // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value - // target.Save(); - // Assert.Inconclusive("A method that does not return a value cannot be verified."); - //} +// ///// +// /////A test for Save +// ///// +// //[TestMethod()] +// //public void SaveTest() +// //{ +// // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value +// // target.Save(); +// // Assert.Inconclusive("A method that does not return a value cannot be verified."); +// //} - ///// - /////A test for getAll - ///// - //[TestMethod()] - //public void getAllTest() - //{ - // ApplicationTree[] expected = null; // TODO: Initialize to an appropriate value - // ApplicationTree[] actual; - // actual = ApplicationTree.getAll(); - // Assert.AreEqual(expected, actual); - // Assert.Inconclusive("Verify the correctness of this test method."); - //} +// ///// +// /////A test for getAll +// ///// +// //[TestMethod()] +// //public void getAllTest() +// //{ +// // ApplicationTree[] expected = null; // TODO: Initialize to an appropriate value +// // ApplicationTree[] actual; +// // actual = ApplicationTree.getAll(); +// // Assert.AreEqual(expected, actual); +// // Assert.Inconclusive("Verify the correctness of this test method."); +// //} - ///// - /////A test for getApplicationTree - ///// - //[TestMethod()] - //public void getApplicationTreeTest() - //{ - // string applicationAlias = string.Empty; // TODO: Initialize to an appropriate value - // ApplicationTree[] expected = null; // TODO: Initialize to an appropriate value - // ApplicationTree[] actual; - // actual = ApplicationTree.getApplicationTree(applicationAlias); - // Assert.AreEqual(expected, actual); - // Assert.Inconclusive("Verify the correctness of this test method."); - //} +// ///// +// /////A test for getApplicationTree +// ///// +// //[TestMethod()] +// //public void getApplicationTreeTest() +// //{ +// // string applicationAlias = string.Empty; // TODO: Initialize to an appropriate value +// // ApplicationTree[] expected = null; // TODO: Initialize to an appropriate value +// // ApplicationTree[] actual; +// // actual = ApplicationTree.getApplicationTree(applicationAlias); +// // Assert.AreEqual(expected, actual); +// // Assert.Inconclusive("Verify the correctness of this test method."); +// //} - ///// - /////A test for getApplicationTree - ///// - //[TestMethod()] - //public void getApplicationTreeTest1() - //{ - // string applicationAlias = string.Empty; // TODO: Initialize to an appropriate value - // bool onlyInitializedApplications = false; // TODO: Initialize to an appropriate value - // ApplicationTree[] expected = null; // TODO: Initialize to an appropriate value - // ApplicationTree[] actual; - // actual = ApplicationTree.getApplicationTree(applicationAlias, onlyInitializedApplications); - // Assert.AreEqual(expected, actual); - // Assert.Inconclusive("Verify the correctness of this test method."); - //} +// ///// +// /////A test for getApplicationTree +// ///// +// //[TestMethod()] +// //public void getApplicationTreeTest1() +// //{ +// // string applicationAlias = string.Empty; // TODO: Initialize to an appropriate value +// // bool onlyInitializedApplications = false; // TODO: Initialize to an appropriate value +// // ApplicationTree[] expected = null; // TODO: Initialize to an appropriate value +// // ApplicationTree[] actual; +// // actual = ApplicationTree.getApplicationTree(applicationAlias, onlyInitializedApplications); +// // Assert.AreEqual(expected, actual); +// // Assert.Inconclusive("Verify the correctness of this test method."); +// //} - ///// - /////A test for getByAlias - ///// - //[TestMethod()] - //public void getByAliasTest() - //{ - // string treeAlias = string.Empty; // TODO: Initialize to an appropriate value - // ApplicationTree expected = null; // TODO: Initialize to an appropriate value - // ApplicationTree actual; - // actual = ApplicationTree.getByAlias(treeAlias); - // Assert.AreEqual(expected, actual); - // Assert.Inconclusive("Verify the correctness of this test method."); - //} +// ///// +// /////A test for getByAlias +// ///// +// //[TestMethod()] +// //public void getByAliasTest() +// //{ +// // string treeAlias = string.Empty; // TODO: Initialize to an appropriate value +// // ApplicationTree expected = null; // TODO: Initialize to an appropriate value +// // ApplicationTree actual; +// // actual = ApplicationTree.getByAlias(treeAlias); +// // Assert.AreEqual(expected, actual); +// // Assert.Inconclusive("Verify the correctness of this test method."); +// //} - ///// - /////A test for Action - ///// - //[TestMethod()] - //public void ActionTest() - //{ - // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value - // string expected = string.Empty; // TODO: Initialize to an appropriate value - // string actual; - // target.Action = expected; - // actual = target.Action; - // Assert.AreEqual(expected, actual); - // Assert.Inconclusive("Verify the correctness of this test method."); - //} +// ///// +// /////A test for Action +// ///// +// //[TestMethod()] +// //public void ActionTest() +// //{ +// // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value +// // string expected = string.Empty; // TODO: Initialize to an appropriate value +// // string actual; +// // target.Action = expected; +// // actual = target.Action; +// // Assert.AreEqual(expected, actual); +// // Assert.Inconclusive("Verify the correctness of this test method."); +// //} - ///// - /////A test for Alias - ///// - //[TestMethod()] - //public void AliasTest() - //{ - // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value - // string actual; - // actual = target.Alias; - // Assert.Inconclusive("Verify the correctness of this test method."); - //} +// ///// +// /////A test for Alias +// ///// +// //[TestMethod()] +// //public void AliasTest() +// //{ +// // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value +// // string actual; +// // actual = target.Alias; +// // Assert.Inconclusive("Verify the correctness of this test method."); +// //} - ///// - /////A test for ApplicationAlias - ///// - //[TestMethod()] - //public void ApplicationAliasTest() - //{ - // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value - // string actual; - // actual = target.ApplicationAlias; - // Assert.Inconclusive("Verify the correctness of this test method."); - //} +// ///// +// /////A test for ApplicationAlias +// ///// +// //[TestMethod()] +// //public void ApplicationAliasTest() +// //{ +// // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value +// // string actual; +// // actual = target.ApplicationAlias; +// // Assert.Inconclusive("Verify the correctness of this test method."); +// //} - ///// - /////A test for AssemblyName - ///// - //[TestMethod()] - //public void AssemblyNameTest() - //{ - // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value - // string expected = string.Empty; // TODO: Initialize to an appropriate value - // string actual; - // target.AssemblyName = expected; - // actual = target.AssemblyName; - // Assert.AreEqual(expected, actual); - // Assert.Inconclusive("Verify the correctness of this test method."); - //} +// ///// +// /////A test for AssemblyName +// ///// +// //[TestMethod()] +// //public void AssemblyNameTest() +// //{ +// // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value +// // string expected = string.Empty; // TODO: Initialize to an appropriate value +// // string actual; +// // target.AssemblyName = expected; +// // actual = target.AssemblyName; +// // Assert.AreEqual(expected, actual); +// // Assert.Inconclusive("Verify the correctness of this test method."); +// //} - ///// - /////A test for IconClosed - ///// - //[TestMethod()] - //public void IconClosedTest() - //{ - // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value - // string expected = string.Empty; // TODO: Initialize to an appropriate value - // string actual; - // target.IconClosed = expected; - // actual = target.IconClosed; - // Assert.AreEqual(expected, actual); - // Assert.Inconclusive("Verify the correctness of this test method."); - //} +// ///// +// /////A test for IconClosed +// ///// +// //[TestMethod()] +// //public void IconClosedTest() +// //{ +// // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value +// // string expected = string.Empty; // TODO: Initialize to an appropriate value +// // string actual; +// // target.IconClosed = expected; +// // actual = target.IconClosed; +// // Assert.AreEqual(expected, actual); +// // Assert.Inconclusive("Verify the correctness of this test method."); +// //} - ///// - /////A test for IconOpened - ///// - //[TestMethod()] - //public void IconOpenedTest() - //{ - // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value - // string expected = string.Empty; // TODO: Initialize to an appropriate value - // string actual; - // target.IconOpened = expected; - // actual = target.IconOpened; - // Assert.AreEqual(expected, actual); - // Assert.Inconclusive("Verify the correctness of this test method."); - //} +// ///// +// /////A test for IconOpened +// ///// +// //[TestMethod()] +// //public void IconOpenedTest() +// //{ +// // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value +// // string expected = string.Empty; // TODO: Initialize to an appropriate value +// // string actual; +// // target.IconOpened = expected; +// // actual = target.IconOpened; +// // Assert.AreEqual(expected, actual); +// // Assert.Inconclusive("Verify the correctness of this test method."); +// //} - ///// - /////A test for Initialize - ///// - //[TestMethod()] - //public void InitializeTest() - //{ - // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value - // bool expected = false; // TODO: Initialize to an appropriate value - // bool actual; - // target.Initialize = expected; - // actual = target.Initialize; - // Assert.AreEqual(expected, actual); - // Assert.Inconclusive("Verify the correctness of this test method."); - //} +// ///// +// /////A test for Initialize +// ///// +// //[TestMethod()] +// //public void InitializeTest() +// //{ +// // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value +// // bool expected = false; // TODO: Initialize to an appropriate value +// // bool actual; +// // target.Initialize = expected; +// // actual = target.Initialize; +// // Assert.AreEqual(expected, actual); +// // Assert.Inconclusive("Verify the correctness of this test method."); +// //} - ///// - /////A test for Silent - ///// - //[TestMethod()] - //public void SilentTest() - //{ - // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value - // bool expected = false; // TODO: Initialize to an appropriate value - // bool actual; - // target.Silent = expected; - // actual = target.Silent; - // Assert.AreEqual(expected, actual); - // Assert.Inconclusive("Verify the correctness of this test method."); - //} +// ///// +// /////A test for Silent +// ///// +// //[TestMethod()] +// //public void SilentTest() +// //{ +// // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value +// // bool expected = false; // TODO: Initialize to an appropriate value +// // bool actual; +// // target.Silent = expected; +// // actual = target.Silent; +// // Assert.AreEqual(expected, actual); +// // Assert.Inconclusive("Verify the correctness of this test method."); +// //} - ///// - /////A test for SortOrder - ///// - //[TestMethod()] - //public void SortOrderTest() - //{ - // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value - // byte expected = 0; // TODO: Initialize to an appropriate value - // byte actual; - // target.SortOrder = expected; - // actual = target.SortOrder; - // Assert.AreEqual(expected, actual); - // Assert.Inconclusive("Verify the correctness of this test method."); - //} +// ///// +// /////A test for SortOrder +// ///// +// //[TestMethod()] +// //public void SortOrderTest() +// //{ +// // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value +// // byte expected = 0; // TODO: Initialize to an appropriate value +// // byte actual; +// // target.SortOrder = expected; +// // actual = target.SortOrder; +// // Assert.AreEqual(expected, actual); +// // Assert.Inconclusive("Verify the correctness of this test method."); +// //} - ///// - /////A test for SqlHelper - ///// - //[TestMethod()] - //public void SqlHelperTest() - //{ - // ISqlHelper actual; - // actual = ApplicationTree.SqlHelper; - // Assert.Inconclusive("Verify the correctness of this test method."); - //} +// ///// +// /////A test for SqlHelper +// ///// +// //[TestMethod()] +// //public void SqlHelperTest() +// //{ +// // ISqlHelper actual; +// // actual = ApplicationTree.SqlHelper; +// // Assert.Inconclusive("Verify the correctness of this test method."); +// //} - ///// - /////A test for Title - ///// - //[TestMethod()] - //public void TitleTest() - //{ - // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value - // string expected = string.Empty; // TODO: Initialize to an appropriate value - // string actual; - // target.Title = expected; - // actual = target.Title; - // Assert.AreEqual(expected, actual); - // Assert.Inconclusive("Verify the correctness of this test method."); - //} +// ///// +// /////A test for Title +// ///// +// //[TestMethod()] +// //public void TitleTest() +// //{ +// // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value +// // string expected = string.Empty; // TODO: Initialize to an appropriate value +// // string actual; +// // target.Title = expected; +// // actual = target.Title; +// // Assert.AreEqual(expected, actual); +// // Assert.Inconclusive("Verify the correctness of this test method."); +// //} - ///// - /////A test for Type - ///// - //[TestMethod()] - //public void TypeTest() - //{ - // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value - // string expected = string.Empty; // TODO: Initialize to an appropriate value - // string actual; - // target.Type = expected; - // actual = target.Type; - // Assert.AreEqual(expected, actual); - // Assert.Inconclusive("Verify the correctness of this test method."); - //} - #endregion +// ///// +// /////A test for Type +// ///// +// //[TestMethod()] +// //public void TypeTest() +// //{ +// // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value +// // string expected = string.Empty; // TODO: Initialize to an appropriate value +// // string actual; +// // target.Type = expected; +// // actual = target.Type; +// // Assert.AreEqual(expected, actual); +// // Assert.Inconclusive("Verify the correctness of this test method."); +// //} +// #endregion - #region Additional test attributes - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - //[ClassInitialize()] - //public static void MyClassInitialize(TestContext testContext) - //{ - //} - // - //Use ClassCleanup to run code after all tests in a class have run - //[ClassCleanup()] - //public static void MyClassCleanup() - //{ - //} - // - //Use TestInitialize to run code before running each test - //[TestInitialize()] - //public void MyTestInitialize() - //{ - //} - // - //Use TestCleanup to run code after each test has run - //[TestCleanup()] - //public void MyTestCleanup() - //{ - //} - // - #endregion - } -} +// #region Additional test attributes +// // +// //You can use the following additional attributes as you write your tests: +// // +// //Use ClassInitialize to run code before running the first test in the class +// //[ClassInitialize()] +// //public static void MyClassInitialize(TestContext testContext) +// //{ +// //} +// // +// //Use ClassCleanup to run code after all tests in a class have run +// //[ClassCleanup()] +// //public static void MyClassCleanup() +// //{ +// //} +// // +// //Use TestInitialize to run code before running each test +// //[TestInitialize()] +// //public void MyTestInitialize() +// //{ +// //} +// // +// //Use TestCleanup to run code after each test has run +// //[TestCleanup()] +// //public void MyTestCleanup() +// //{ +// //} +// // +// #endregion +// } +//} diff --git a/src/Umbraco.Tests/TreesAndSections/SectionTests.cs b/src/Umbraco.Tests/TreesAndSections/SectionTests.cs index 1f4a01fd3d..83de6c4479 100644 --- a/src/Umbraco.Tests/TreesAndSections/SectionTests.cs +++ b/src/Umbraco.Tests/TreesAndSections/SectionTests.cs @@ -1,252 +1,252 @@ -using System.IO; -using NUnit.Framework; -using Umbraco.Core.Services; -using Umbraco.Tests.TestHelpers; -using System; -using Umbraco.Core.Composing; -using Umbraco.Tests.Testing; -using Umbraco.Web.Services; +//using System.IO; +//using NUnit.Framework; +//using Umbraco.Core.Services; +//using Umbraco.Tests.TestHelpers; +//using System; +//using Umbraco.Core.Composing; +//using Umbraco.Tests.Testing; +//using Umbraco.Web.Services; -namespace Umbraco.Tests.TreesAndSections -{ - /// - ///This is a test class for ApplicationTest and is intended - ///to contain all ApplicationTest Unit Tests - /// - [TestFixture] - [UmbracoTest(AutoMapper = true, Database = UmbracoTestOptions.Database.NewSchemaPerTest)] - public class SectionTests : TestWithDatabaseBase - { - protected override void Compose() - { - base.Compose(); - Composition.RegisterUnique(); - } +//namespace Umbraco.Tests.TreesAndSections +//{ +// /// +// ///This is a test class for ApplicationTest and is intended +// ///to contain all ApplicationTest Unit Tests +// /// +// [TestFixture] +// [UmbracoTest(AutoMapper = true, Database = UmbracoTestOptions.Database.NewSchemaPerTest)] +// public class SectionTests : TestWithDatabaseBase +// { +// protected override void Compose() +// { +// base.Compose(); +// Composition.RegisterUnique(); +// } - public override void SetUp() - { - base.SetUp(); +// public override void SetUp() +// { +// base.SetUp(); - var treesConfig = TestHelper.MapPathForTest("~/TEMP/TreesAndSections/trees.config"); - var appConfig = TestHelper.MapPathForTest("~/TEMP/TreesAndSections/applications.config"); - Directory.CreateDirectory(TestHelper.MapPathForTest("~/TEMP/TreesAndSections")); - using (var writer = File.CreateText(treesConfig)) - { - writer.Write(ResourceFiles.trees); - } - using (var writer = File.CreateText(appConfig)) - { - writer.Write(ResourceFiles.applications); - } +// var treesConfig = TestHelper.MapPathForTest("~/TEMP/TreesAndSections/trees.config"); +// var appConfig = TestHelper.MapPathForTest("~/TEMP/TreesAndSections/applications.config"); +// Directory.CreateDirectory(TestHelper.MapPathForTest("~/TEMP/TreesAndSections")); +// using (var writer = File.CreateText(treesConfig)) +// { +// writer.Write(ResourceFiles.trees); +// } +// using (var writer = File.CreateText(appConfig)) +// { +// writer.Write(ResourceFiles.applications); +// } - ApplicationTreeService.TreeConfigFilePath = treesConfig; - SectionService.AppConfigFilePath = appConfig; - } +// ApplicationTreeService.TreeConfigFilePath = treesConfig; +// SectionService.AppConfigFilePath = appConfig; +// } - public override void TearDown() - { - base.TearDown(); +// public override void TearDown() +// { +// base.TearDown(); - if (Directory.Exists(TestHelper.MapPathForTest("~/TEMP/TreesAndSections"))) - { - Directory.Delete(TestHelper.MapPathForTest("~/TEMP/TreesAndSections"), true); - } - ApplicationTreeService.TreeConfigFilePath = null; - SectionService.AppConfigFilePath = null; - } +// if (Directory.Exists(TestHelper.MapPathForTest("~/TEMP/TreesAndSections"))) +// { +// Directory.Delete(TestHelper.MapPathForTest("~/TEMP/TreesAndSections"), true); +// } +// ApplicationTreeService.TreeConfigFilePath = null; +// SectionService.AppConfigFilePath = null; +// } - /// - /// Create a new application and delete it - /// - [Test()] - public void Application_Make_New() - { - var name = Guid.NewGuid().ToString("N"); - ServiceContext.SectionService.MakeNew(name, name, "icon.jpg"); +// ///// +// ///// Create a new application and delete it +// ///// +// //[Test()] +// //public void Application_Make_New() +// //{ +// // var name = Guid.NewGuid().ToString("N"); +// // ServiceContext.SectionService.MakeNew(name, name, "icon.jpg"); - //check if it exists - var app = ServiceContext.SectionService.GetByAlias(name); - Assert.IsNotNull(app); +// // //check if it exists +// // var app = ServiceContext.SectionService.GetByAlias(name); +// // Assert.IsNotNull(app); - //now remove it - ServiceContext.SectionService.DeleteSection(app); - Assert.IsNull(ServiceContext.SectionService.GetByAlias(name)); - } +// // //now remove it +// // ServiceContext.SectionService.DeleteSection(app); +// // Assert.IsNull(ServiceContext.SectionService.GetByAlias(name)); +// //} - #region Tests to write +// #region Tests to write - ///// - /////A test for Application Constructor - ///// - //[TestMethod()] - //public void ApplicationConstructorTest() - //{ - // string name = string.Empty; // TODO: Initialize to an appropriate value - // string alias = string.Empty; // TODO: Initialize to an appropriate value - // string icon = string.Empty; // TODO: Initialize to an appropriate value - // Application target = new Application(name, alias, icon); - // Assert.Inconclusive("TODO: Implement code to verify target"); - //} +// ///// +// /////A test for Application Constructor +// ///// +// //[TestMethod()] +// //public void ApplicationConstructorTest() +// //{ +// // string name = string.Empty; // TODO: Initialize to an appropriate value +// // string alias = string.Empty; // TODO: Initialize to an appropriate value +// // string icon = string.Empty; // TODO: Initialize to an appropriate value +// // Application target = new Application(name, alias, icon); +// // Assert.Inconclusive("TODO: Implement code to verify target"); +// //} - ///// - /////A test for Application Constructor - ///// - //[TestMethod()] - //public void ApplicationConstructorTest1() - //{ - // Application target = new Application(); - // Assert.Inconclusive("TODO: Implement code to verify target"); - //} +// ///// +// /////A test for Application Constructor +// ///// +// //[TestMethod()] +// //public void ApplicationConstructorTest1() +// //{ +// // Application target = new Application(); +// // Assert.Inconclusive("TODO: Implement code to verify target"); +// //} - ///// - /////A test for Delete - ///// - //[TestMethod()] - //public void DeleteTest() - //{ - // Application target = new Application(); // TODO: Initialize to an appropriate value - // target.Delete(); - // Assert.Inconclusive("A method that does not return a value cannot be verified."); - //} +// ///// +// /////A test for Delete +// ///// +// //[TestMethod()] +// //public void DeleteTest() +// //{ +// // Application target = new Application(); // TODO: Initialize to an appropriate value +// // target.Delete(); +// // Assert.Inconclusive("A method that does not return a value cannot be verified."); +// //} - ///// - /////A test for MakeNew - ///// - //[TestMethod()] - //public void MakeNewTest1() - //{ - // string name = string.Empty; // TODO: Initialize to an appropriate value - // string alias = string.Empty; // TODO: Initialize to an appropriate value - // string icon = string.Empty; // TODO: Initialize to an appropriate value - // Application.MakeNew(name, alias, icon); - // Assert.Inconclusive("A method that does not return a value cannot be verified."); - //} +// ///// +// /////A test for MakeNew +// ///// +// //[TestMethod()] +// //public void MakeNewTest1() +// //{ +// // string name = string.Empty; // TODO: Initialize to an appropriate value +// // string alias = string.Empty; // TODO: Initialize to an appropriate value +// // string icon = string.Empty; // TODO: Initialize to an appropriate value +// // Application.MakeNew(name, alias, icon); +// // Assert.Inconclusive("A method that does not return a value cannot be verified."); +// //} - ///// - /////A test for RegisterIApplications - ///// - //[TestMethod()] - //public void RegisterIApplicationsTest() - //{ - // Application.RegisterIApplications(); - // Assert.Inconclusive("A method that does not return a value cannot be verified."); - //} +// ///// +// /////A test for RegisterIApplications +// ///// +// //[TestMethod()] +// //public void RegisterIApplicationsTest() +// //{ +// // Application.RegisterIApplications(); +// // Assert.Inconclusive("A method that does not return a value cannot be verified."); +// //} - ///// - /////A test for getAll - ///// - //[TestMethod()] - //public void getAllTest() - //{ - // List expected = null; // TODO: Initialize to an appropriate value - // List actual; - // actual = Application.getAll(); - // Assert.AreEqual(expected, actual); - // Assert.Inconclusive("Verify the correctness of this test method."); - //} +// ///// +// /////A test for getAll +// ///// +// //[TestMethod()] +// //public void getAllTest() +// //{ +// // List expected = null; // TODO: Initialize to an appropriate value +// // List actual; +// // actual = Application.getAll(); +// // Assert.AreEqual(expected, actual); +// // Assert.Inconclusive("Verify the correctness of this test method."); +// //} - ///// - /////A test for getByAlias - ///// - //[TestMethod()] - //public void getByAliasTest() - //{ - // string appAlias = string.Empty; // TODO: Initialize to an appropriate value - // Application expected = null; // TODO: Initialize to an appropriate value - // Application actual; - // actual = Application.getByAlias(appAlias); - // Assert.AreEqual(expected, actual); - // Assert.Inconclusive("Verify the correctness of this test method."); - //} +// ///// +// /////A test for getByAlias +// ///// +// //[TestMethod()] +// //public void getByAliasTest() +// //{ +// // string appAlias = string.Empty; // TODO: Initialize to an appropriate value +// // Application expected = null; // TODO: Initialize to an appropriate value +// // Application actual; +// // actual = Application.getByAlias(appAlias); +// // Assert.AreEqual(expected, actual); +// // Assert.Inconclusive("Verify the correctness of this test method."); +// //} - ///// - /////A test for SqlHelper - ///// - //[TestMethod()] - //public void SqlHelperTest() - //{ - // ISqlHelper actual; - // actual = Application.SqlHelper; - // Assert.Inconclusive("Verify the correctness of this test method."); - //} +// ///// +// /////A test for SqlHelper +// ///// +// //[TestMethod()] +// //public void SqlHelperTest() +// //{ +// // ISqlHelper actual; +// // actual = Application.SqlHelper; +// // Assert.Inconclusive("Verify the correctness of this test method."); +// //} - ///// - /////A test for alias - ///// - //[TestMethod()] - //public void aliasTest() - //{ - // Application target = new Application(); // TODO: Initialize to an appropriate value - // string expected = string.Empty; // TODO: Initialize to an appropriate value - // string actual; - // target.alias = expected; - // actual = target.alias; - // Assert.AreEqual(expected, actual); - // Assert.Inconclusive("Verify the correctness of this test method."); - //} +// ///// +// /////A test for alias +// ///// +// //[TestMethod()] +// //public void aliasTest() +// //{ +// // Application target = new Application(); // TODO: Initialize to an appropriate value +// // string expected = string.Empty; // TODO: Initialize to an appropriate value +// // string actual; +// // target.alias = expected; +// // actual = target.alias; +// // Assert.AreEqual(expected, actual); +// // Assert.Inconclusive("Verify the correctness of this test method."); +// //} - ///// - /////A test for icon - ///// - //[TestMethod()] - //public void iconTest() - //{ - // Application target = new Application(); // TODO: Initialize to an appropriate value - // string expected = string.Empty; // TODO: Initialize to an appropriate value - // string actual; - // target.icon = expected; - // actual = target.icon; - // Assert.AreEqual(expected, actual); - // Assert.Inconclusive("Verify the correctness of this test method."); - //} +// ///// +// /////A test for icon +// ///// +// //[TestMethod()] +// //public void iconTest() +// //{ +// // Application target = new Application(); // TODO: Initialize to an appropriate value +// // string expected = string.Empty; // TODO: Initialize to an appropriate value +// // string actual; +// // target.icon = expected; +// // actual = target.icon; +// // Assert.AreEqual(expected, actual); +// // Assert.Inconclusive("Verify the correctness of this test method."); +// //} - ///// - /////A test for name - ///// - //[TestMethod()] - //public void nameTest() - //{ - // Application target = new Application(); // TODO: Initialize to an appropriate value - // string expected = string.Empty; // TODO: Initialize to an appropriate value - // string actual; - // target.name = expected; - // actual = target.name; - // Assert.AreEqual(expected, actual); - // Assert.Inconclusive("Verify the correctness of this test method."); - //} - #endregion +// ///// +// /////A test for name +// ///// +// //[TestMethod()] +// //public void nameTest() +// //{ +// // Application target = new Application(); // TODO: Initialize to an appropriate value +// // string expected = string.Empty; // TODO: Initialize to an appropriate value +// // string actual; +// // target.name = expected; +// // actual = target.name; +// // Assert.AreEqual(expected, actual); +// // Assert.Inconclusive("Verify the correctness of this test method."); +// //} +// #endregion - #region Additional test attributes - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - //[ClassInitialize()] - //public static void MyClassInitialize(TestContext testContext) - //{ - //} - // - //Use ClassCleanup to run code after all tests in a class have run - //[ClassCleanup()] - //public static void MyClassCleanup() - //{ - //} - // - //Use TestInitialize to run code before running each test - //[TestInitialize()] - //public void MyTestInitialize() - //{ - //} - // - //Use TestCleanup to run code after each test has run - //[TestCleanup()] - //public void MyTestCleanup() - //{ - //} - // - #endregion - } -} +// #region Additional test attributes +// // +// //You can use the following additional attributes as you write your tests: +// // +// //Use ClassInitialize to run code before running the first test in the class +// //[ClassInitialize()] +// //public static void MyClassInitialize(TestContext testContext) +// //{ +// //} +// // +// //Use ClassCleanup to run code after all tests in a class have run +// //[ClassCleanup()] +// //public static void MyClassCleanup() +// //{ +// //} +// // +// //Use TestInitialize to run code before running each test +// //[TestInitialize()] +// //public void MyTestInitialize() +// //{ +// //} +// // +// //Use TestCleanup to run code after each test has run +// //[TestCleanup()] +// //public void MyTestCleanup() +// //{ +// //} +// // +// #endregion +// } +//} diff --git a/src/Umbraco.Web/Cache/ApplicationTreeCacheRefresher.cs b/src/Umbraco.Web/Cache/ApplicationTreeCacheRefresher.cs index 247c33c361..4d6740a0b1 100644 --- a/src/Umbraco.Web/Cache/ApplicationTreeCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/ApplicationTreeCacheRefresher.cs @@ -1,46 +1,46 @@ -using System; -using Umbraco.Core.Cache; +//using System; +//using Umbraco.Core.Cache; -namespace Umbraco.Web.Cache -{ - public sealed class ApplicationTreeCacheRefresher : CacheRefresherBase - { - public ApplicationTreeCacheRefresher(CacheHelper cacheHelper) - : base(cacheHelper) - { } +//namespace Umbraco.Web.Cache +//{ +// public sealed class ApplicationTreeCacheRefresher : CacheRefresherBase +// { +// public ApplicationTreeCacheRefresher(CacheHelper cacheHelper) +// : base(cacheHelper) +// { } - #region Define +// #region Define - protected override ApplicationTreeCacheRefresher This => this; +// protected override ApplicationTreeCacheRefresher This => this; - public static readonly Guid UniqueId = Guid.Parse("0AC6C028-9860-4EA4-958D-14D39F45886E"); +// public static readonly Guid UniqueId = Guid.Parse("0AC6C028-9860-4EA4-958D-14D39F45886E"); - public override Guid RefresherUniqueId => UniqueId; +// public override Guid RefresherUniqueId => UniqueId; - public override string Name => "Application Tree Cache Refresher"; +// public override string Name => "Application Tree Cache Refresher"; - #endregion +// #endregion - #region Refresher +// #region Refresher - public override void RefreshAll() - { - CacheHelper.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationTreeCacheKey); - base.RefreshAll(); - } +// public override void RefreshAll() +// { +// CacheHelper.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationTreeCacheKey); +// base.RefreshAll(); +// } - public override void Refresh(int id) - { - Remove(id); - base.Refresh(id); - } +// public override void Refresh(int id) +// { +// Remove(id); +// base.Refresh(id); +// } - public override void Remove(int id) - { - CacheHelper.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationTreeCacheKey); - base.Remove(id); - } +// public override void Remove(int id) +// { +// CacheHelper.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationTreeCacheKey); +// base.Remove(id); +// } - #endregion - } -} +// #endregion +// } +//} diff --git a/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs b/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs index d522e54de6..421eb546a4 100644 --- a/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs +++ b/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs @@ -46,19 +46,19 @@ namespace Umbraco.Web.Cache _logger.Info("Initializing Umbraco internal event handlers for cache refreshing."); - // bind to application tree events - Bind(() => ApplicationTreeService.Deleted += ApplicationTreeService_Deleted, - () => ApplicationTreeService.Deleted -= ApplicationTreeService_Deleted); - Bind(() => ApplicationTreeService.Updated += ApplicationTreeService_Updated, - () => ApplicationTreeService.Updated -= ApplicationTreeService_Updated); - Bind(() => ApplicationTreeService.New += ApplicationTreeService_New, - () => ApplicationTreeService.New -= ApplicationTreeService_New); + //// bind to application tree events + //Bind(() => ApplicationTreeService.Deleted += ApplicationTreeService_Deleted, + // () => ApplicationTreeService.Deleted -= ApplicationTreeService_Deleted); + //Bind(() => ApplicationTreeService.Updated += ApplicationTreeService_Updated, + // () => ApplicationTreeService.Updated -= ApplicationTreeService_Updated); + //Bind(() => ApplicationTreeService.New += ApplicationTreeService_New, + // () => ApplicationTreeService.New -= ApplicationTreeService_New); - // bind to application events - Bind(() => SectionService.Deleted += SectionService_Deleted, - () => SectionService.Deleted -= SectionService_Deleted); - Bind(() => SectionService.New += SectionService_New, - () => SectionService.New -= SectionService_New); + //// bind to application events + //Bind(() => SectionService.Deleted += SectionService_Deleted, + // () => SectionService.Deleted -= SectionService_Deleted); + //Bind(() => SectionService.New += SectionService_New, + // () => SectionService.New -= SectionService_New); // bind to user and user group events Bind(() => UserService.SavedUserGroup += UserService_SavedUserGroup, @@ -231,38 +231,38 @@ namespace Umbraco.Web.Cache #endregion - #region ApplicationTreeService + //#region ApplicationTreeService - private void ApplicationTreeService_New(ApplicationTree sender, EventArgs e) - { - _distributedCache.RefreshAllApplicationTreeCache(); - } + //private void ApplicationTreeService_New(ApplicationTree sender, EventArgs e) + //{ + // _distributedCache.RefreshAllApplicationTreeCache(); + //} - private void ApplicationTreeService_Updated(ApplicationTree sender, EventArgs e) - { - _distributedCache.RefreshAllApplicationTreeCache(); - } + //private void ApplicationTreeService_Updated(ApplicationTree sender, EventArgs e) + //{ + // _distributedCache.RefreshAllApplicationTreeCache(); + //} - private void ApplicationTreeService_Deleted(ApplicationTree sender, EventArgs e) - { - _distributedCache.RefreshAllApplicationTreeCache(); - } + //private void ApplicationTreeService_Deleted(ApplicationTree sender, EventArgs e) + //{ + // _distributedCache.RefreshAllApplicationTreeCache(); + //} - #endregion + //#endregion - #region Application event handlers + //#region Application event handlers - private void SectionService_New(ISectionService sender, EventArgs e) - { - _distributedCache.RefreshAllApplicationCache(); - } + //private void SectionService_New(ISectionService sender, EventArgs e) + //{ + // _distributedCache.RefreshAllApplicationCache(); + //} - private void SectionService_Deleted(ISectionService sender, EventArgs e) - { - _distributedCache.RefreshAllApplicationCache(); - } + //private void SectionService_Deleted(ISectionService sender, EventArgs e) + //{ + // _distributedCache.RefreshAllApplicationCache(); + //} - #endregion + //#endregion #region LocalizationService / Dictionary diff --git a/src/Umbraco.Web/Cache/DistributedCacheExtensions.cs b/src/Umbraco.Web/Cache/DistributedCacheExtensions.cs index 68ac339a46..aab0f9b157 100644 --- a/src/Umbraco.Web/Cache/DistributedCacheExtensions.cs +++ b/src/Umbraco.Web/Cache/DistributedCacheExtensions.cs @@ -18,23 +18,23 @@ namespace Umbraco.Web.Cache #endregion - #region ApplicationTreeCache + //#region ApplicationTreeCache - public static void RefreshAllApplicationTreeCache(this DistributedCache dc) - { - dc.RefreshAll(ApplicationTreeCacheRefresher.UniqueId); - } + //public static void RefreshAllApplicationTreeCache(this DistributedCache dc) + //{ + // dc.RefreshAll(ApplicationTreeCacheRefresher.UniqueId); + //} - #endregion + //#endregion - #region ApplicationCache + //#region ApplicationCache - public static void RefreshAllApplicationCache(this DistributedCache dc) - { - dc.RefreshAll(ApplicationCacheRefresher.UniqueId); - } + //public static void RefreshAllApplicationCache(this DistributedCache dc) + //{ + // dc.RefreshAll(ApplicationCacheRefresher.UniqueId); + //} - #endregion + //#endregion #region User cache diff --git a/src/Umbraco.Web/TagsController.cs b/src/Umbraco.Web/Controllers/TagsController.cs similarity index 89% rename from src/Umbraco.Web/TagsController.cs rename to src/Umbraco.Web/Controllers/TagsController.cs index 181b9f7da2..cb6a28be47 100644 --- a/src/Umbraco.Web/TagsController.cs +++ b/src/Umbraco.Web/Controllers/TagsController.cs @@ -8,7 +8,7 @@ using Umbraco.Core.Services; using Umbraco.Web.Models; using Umbraco.Web.WebApi; -namespace Umbraco.Web.WebServices +namespace Umbraco.Web.Controllers { /// /// A public web service for querying tags @@ -29,8 +29,8 @@ namespace Umbraco.Web.WebServices /// /// Initializes a new instance of the with all its dependencies. /// - public TagsController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) - : base(globalSettings, umbracoContextAccessor, sqlContext, services, applicationCache, logger, runtimeState) + public TagsController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) + : base(globalSettings, umbracoContext, sqlContext, services, applicationCache, logger, runtimeState) { } /// diff --git a/src/Umbraco.Web/Editors/AuthenticationController.cs b/src/Umbraco.Web/Editors/AuthenticationController.cs index 231ec9ba67..7ffc6e1207 100644 --- a/src/Umbraco.Web/Editors/AuthenticationController.cs +++ b/src/Umbraco.Web/Editors/AuthenticationController.cs @@ -52,8 +52,8 @@ namespace Umbraco.Web.Editors /// /// Initializes a new instance of the class with all its dependencies. /// - public AuthenticationController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) - : base(globalSettings, umbracoContextAccessor, sqlContext, services, applicationCache, logger, runtimeState) + public AuthenticationController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) + : base(globalSettings, umbracoContext, sqlContext, services, applicationCache, logger, runtimeState) { } protected BackOfficeUserManager UserManager => _userManager diff --git a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs index ee973a4b58..65ab27d76a 100644 --- a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs +++ b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs @@ -14,13 +14,13 @@ using Umbraco.Core.Composing; using Umbraco.Core.Configuration; using Umbraco.Core.Configuration.UmbracoSettings; using Umbraco.Core.IO; +using Umbraco.Web.Controllers; using Umbraco.Web.Features; using Umbraco.Web.HealthCheck; using Umbraco.Web.Models.ContentEditing; using Umbraco.Web.Mvc; using Umbraco.Web.PropertyEditors; using Umbraco.Web.Trees; -using Umbraco.Web.WebServices; using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Editors @@ -158,7 +158,7 @@ namespace Umbraco.Web.Editors }, { "treeApplicationApiBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl( - controller => controller.GetApplicationTrees(null, null, null, true)) + controller => controller.GetApplicationTrees(null, null, null)) }, { "contentTypeApiBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl( diff --git a/src/Umbraco.Web/Editors/ContentTypeController.cs b/src/Umbraco.Web/Editors/ContentTypeController.cs index 670d37e7a7..00a0cb90bc 100644 --- a/src/Umbraco.Web/Editors/ContentTypeController.cs +++ b/src/Umbraco.Web/Editors/ContentTypeController.cs @@ -54,11 +54,11 @@ namespace Umbraco.Web.Editors public ContentTypeController(IEntityXmlSerializer serializer, ICultureDictionaryFactory cultureDictionaryFactory, IGlobalSettings globalSettings, - IUmbracoContextAccessor umbracoContextAccessor, + UmbracoContext umbracoContext, ISqlContext sqlContext, PropertyEditorCollection propertyEditors, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) - : base(cultureDictionaryFactory, globalSettings, umbracoContextAccessor, sqlContext, services, applicationCache, logger, runtimeState) + : base(cultureDictionaryFactory, globalSettings, umbracoContext, sqlContext, services, applicationCache, logger, runtimeState) { _serializer = serializer; _propertyEditors = propertyEditors; diff --git a/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs b/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs index 898208319a..a11fcaa869 100644 --- a/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs +++ b/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs @@ -33,7 +33,8 @@ namespace Umbraco.Web.Editors private readonly ICultureDictionaryFactory _cultureDictionaryFactory; private ICultureDictionary _cultureDictionary; - protected ContentTypeControllerBase(ICultureDictionaryFactory cultureDictionaryFactory, IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) : base(globalSettings, umbracoContextAccessor, sqlContext, services, applicationCache, logger, runtimeState) + protected ContentTypeControllerBase(ICultureDictionaryFactory cultureDictionaryFactory, IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) + : base(globalSettings, umbracoContext, sqlContext, services, applicationCache, logger, runtimeState) { _cultureDictionaryFactory = cultureDictionaryFactory; } diff --git a/src/Umbraco.Web/Editors/DashboardController.cs b/src/Umbraco.Web/Editors/DashboardController.cs index 8960f110c3..0340926ce4 100644 --- a/src/Umbraco.Web/Editors/DashboardController.cs +++ b/src/Umbraco.Web/Editors/DashboardController.cs @@ -38,8 +38,8 @@ namespace Umbraco.Web.Editors /// /// Initializes a new instance of the with all its dependencies. /// - public DashboardController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState, Dashboards dashboards) - : base(globalSettings, umbracoContextAccessor, sqlContext, services, applicationCache, logger, runtimeState) + public DashboardController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState, Dashboards dashboards) + : base(globalSettings, umbracoContext, sqlContext, services, applicationCache, logger, runtimeState) { _dashboards = dashboards; } diff --git a/src/Umbraco.Web/Editors/DashboardSecurity.cs b/src/Umbraco.Web/Editors/DashboardSecurity.cs index 1481606c7e..fdbf5af7d9 100644 --- a/src/Umbraco.Web/Editors/DashboardSecurity.cs +++ b/src/Umbraco.Web/Editors/DashboardSecurity.cs @@ -6,6 +6,7 @@ using Umbraco.Core; using Umbraco.Core.Configuration.Dashboard; using Umbraco.Core.Models.Membership; using Umbraco.Core.Services; +using Umbraco.Web.Services; namespace Umbraco.Web.Editors { diff --git a/src/Umbraco.Web/Editors/Dashboards.cs b/src/Umbraco.Web/Editors/Dashboards.cs index 4bf2d81045..c837cbbf33 100644 --- a/src/Umbraco.Web/Editors/Dashboards.cs +++ b/src/Umbraco.Web/Editors/Dashboards.cs @@ -8,6 +8,7 @@ using Umbraco.Core.Manifest; using Umbraco.Core.Models.Membership; using Umbraco.Core.Services; using Umbraco.Web.Models.ContentEditing; +using Umbraco.Web.Services; namespace Umbraco.Web.Editors { diff --git a/src/Umbraco.Web/Editors/EntityController.cs b/src/Umbraco.Web/Editors/EntityController.cs index 993489855f..c8368d11b0 100644 --- a/src/Umbraco.Web/Editors/EntityController.cs +++ b/src/Umbraco.Web/Editors/EntityController.cs @@ -16,11 +16,16 @@ using Constants = Umbraco.Core.Constants; using Umbraco.Core.Persistence.DatabaseModelDefinitions; using System.Web.Http.Controllers; using Examine; +using Umbraco.Core.Cache; +using Umbraco.Core.Configuration; +using Umbraco.Core.Logging; using Umbraco.Core.Models.Entities; +using Umbraco.Core.Persistence; using Umbraco.Core.Services; using Umbraco.Core.Xml; using Umbraco.Web.Models.Mapping; using Umbraco.Web.Search; +using Umbraco.Web.Services; using Umbraco.Web.Trees; using Umbraco.Web.WebApi; using Umbraco.Web.WebApi.Filters; @@ -37,6 +42,15 @@ namespace Umbraco.Web.Editors [PluginController("UmbracoApi")] public class EntityController : UmbracoAuthorizedJsonController { + private readonly IApplicationTreeService _treeService; + + public EntityController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState, + IApplicationTreeService treeService) + : base(globalSettings, umbracoContext, sqlContext, services, applicationCache, logger, runtimeState) + { + _treeService = treeService; + } + /// /// Configures this controller with a custom action selector /// @@ -129,7 +143,7 @@ namespace Umbraco.Web.Editors { if (allowedSections.Contains(searchableTree.Value.AppAlias)) { - var tree = Services.ApplicationTreeService.GetByAlias(searchableTree.Key); + var tree = _treeService.GetByAlias(searchableTree.Key); if (tree == null) continue; //shouldn't occur var searchableTreeAttribute = searchableTree.Value.SearchableTree.GetType().GetCustomAttribute(false); diff --git a/src/Umbraco.Web/Editors/MediaTypeController.cs b/src/Umbraco.Web/Editors/MediaTypeController.cs index f2b8fd3dda..e2fbe8c428 100644 --- a/src/Umbraco.Web/Editors/MediaTypeController.cs +++ b/src/Umbraco.Web/Editors/MediaTypeController.cs @@ -37,7 +37,8 @@ namespace Umbraco.Web.Editors [MediaTypeControllerControllerConfiguration] public class MediaTypeController : ContentTypeControllerBase { - public MediaTypeController(ICultureDictionaryFactory cultureDictionaryFactory, IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) : base(cultureDictionaryFactory, globalSettings, umbracoContextAccessor, sqlContext, services, applicationCache, logger, runtimeState) + public MediaTypeController(ICultureDictionaryFactory cultureDictionaryFactory, IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) + : base(cultureDictionaryFactory, globalSettings, umbracoContext, sqlContext, services, applicationCache, logger, runtimeState) { } diff --git a/src/Umbraco.Web/Editors/MemberTypeController.cs b/src/Umbraco.Web/Editors/MemberTypeController.cs index 3abc0035d3..c59bf6d332 100644 --- a/src/Umbraco.Web/Editors/MemberTypeController.cs +++ b/src/Umbraco.Web/Editors/MemberTypeController.cs @@ -30,7 +30,8 @@ namespace Umbraco.Web.Editors [UmbracoTreeAuthorize(new string[] { Constants.Trees.MemberTypes, Constants.Trees.Members})] public class MemberTypeController : ContentTypeControllerBase { - public MemberTypeController(ICultureDictionaryFactory cultureDictionaryFactory, IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) : base(cultureDictionaryFactory, globalSettings, umbracoContextAccessor, sqlContext, services, applicationCache, logger, runtimeState) + public MemberTypeController(ICultureDictionaryFactory cultureDictionaryFactory, IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) + : base(cultureDictionaryFactory, globalSettings, umbracoContext, sqlContext, services, applicationCache, logger, runtimeState) { } diff --git a/src/Umbraco.Web/Editors/PackageInstallController.cs b/src/Umbraco.Web/Editors/PackageInstallController.cs index 05d1e2a7a3..ec81b794a1 100644 --- a/src/Umbraco.Web/Editors/PackageInstallController.cs +++ b/src/Umbraco.Web/Editors/PackageInstallController.cs @@ -44,10 +44,10 @@ namespace Umbraco.Web.Editors [UmbracoApplicationAuthorize(Core.Constants.Applications.Packages)] public class PackageInstallController : UmbracoAuthorizedJsonController { - public PackageInstallController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, + public PackageInstallController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) - : base(globalSettings, umbracoContextAccessor, sqlContext, services, applicationCache, logger, runtimeState) + : base(globalSettings, umbracoContext, sqlContext, services, applicationCache, logger, runtimeState) { } diff --git a/src/Umbraco.Web/Editors/SectionController.cs b/src/Umbraco.Web/Editors/SectionController.cs index f650c18fb3..7b484b09b1 100644 --- a/src/Umbraco.Web/Editors/SectionController.cs +++ b/src/Umbraco.Web/Editors/SectionController.cs @@ -2,10 +2,17 @@ using AutoMapper; using Umbraco.Web.Mvc; using System.Linq; +using Umbraco.Core; +using Umbraco.Core.Cache; +using Umbraco.Core.Configuration; +using Umbraco.Core.Logging; using Umbraco.Core.Models; +using Umbraco.Core.Persistence; +using Umbraco.Core.Services; using Umbraco.Web.Trees; using Section = Umbraco.Web.Models.ContentEditing.Section; using Umbraco.Web.Models.Trees; +using Umbraco.Web.Services; namespace Umbraco.Web.Editors { @@ -16,21 +23,32 @@ namespace Umbraco.Web.Editors public class SectionController : UmbracoAuthorizedJsonController { private readonly Dashboards _dashboards; + private readonly ISectionService _sectionService; + private readonly TreeControllerResolver _treeControllerResolver; + private readonly IApplicationTreeService _treeService; - public SectionController(Dashboards dashboards) + public SectionController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState, + Dashboards dashboards, ISectionService sectionService, TreeControllerResolver treeControllerResolver, IApplicationTreeService treeService) + : base(globalSettings, umbracoContext, sqlContext, services, applicationCache, logger, runtimeState) { _dashboards = dashboards; + _sectionService = sectionService; + _treeControllerResolver = treeControllerResolver; + _treeService = treeService; } public IEnumerable
GetSections() { - var sections = Services.SectionService.GetAllowedSections(Security.GetUserId().ResultOr(0)); + var sections = _sectionService.GetAllowedSections(Security.GetUserId().ResultOr(0)); - var sectionModels = sections.Select(Mapper.Map).ToArray(); + var sectionModels = sections.Select(Mapper.Map
).ToArray(); // this is a bit nasty since we'll be proxying via the app tree controller but we sort of have to do that // since tree's by nature are controllers and require request contextual data - var appTreeController = new ApplicationTreeController { ControllerContext = ControllerContext }; + var appTreeController = new ApplicationTreeController(GlobalSettings, UmbracoContext, SqlContext, Services, ApplicationCache, Logger, RuntimeState, _treeControllerResolver, _treeService) + { + ControllerContext = ControllerContext + }; var dashboards = _dashboards.GetDashboards(Security.CurrentUser); @@ -76,8 +94,8 @@ namespace Umbraco.Web.Editors /// public IEnumerable
GetAllSections() { - var sections = Services.SectionService.GetSections(); - var mapped = sections.Select(Mapper.Map); + var sections = _sectionService.GetSections(); + var mapped = sections.Select(Mapper.Map
); if (Security.CurrentUser.IsAdmin()) return mapped; diff --git a/src/Umbraco.Web/Editors/UmbracoAuthorizedJsonController.cs b/src/Umbraco.Web/Editors/UmbracoAuthorizedJsonController.cs index 3baa5e85ff..4e430b833c 100644 --- a/src/Umbraco.Web/Editors/UmbracoAuthorizedJsonController.cs +++ b/src/Umbraco.Web/Editors/UmbracoAuthorizedJsonController.cs @@ -31,13 +31,13 @@ namespace Umbraco.Web.Editors /// Initializes a new instance of the class with all its dependencies. ///
/// - /// + /// /// /// /// /// /// - protected UmbracoAuthorizedJsonController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) : base(globalSettings, umbracoContextAccessor, sqlContext, services, applicationCache, logger, runtimeState) + protected UmbracoAuthorizedJsonController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) : base(globalSettings, umbracoContext, sqlContext, services, applicationCache, logger, runtimeState) { } } diff --git a/src/Umbraco.Web/Models/ContentEditing/ApplicationTree.cs b/src/Umbraco.Web/Models/ContentEditing/ApplicationTree.cs new file mode 100644 index 0000000000..e9befb0e27 --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/ApplicationTree.cs @@ -0,0 +1,177 @@ +using System; +using System.Diagnostics; +using Umbraco.Core.Services; + +namespace Umbraco.Web.Models.ContentEditing +{ + [DebuggerDisplay("Tree - {Alias} ({ApplicationAlias})")] + public class ApplicationTree + { + //private static readonly ConcurrentDictionary ResolvedTypes = new ConcurrentDictionary(); + + ///// + ///// Initializes a new instance of the class. + ///// + //public ApplicationTree() { } + + ///// + ///// Initializes a new instance of the class. + ///// + ///// if set to true [initialize]. + ///// The sort order. + ///// The application alias. + ///// The tree alias. + ///// The tree title. + ///// The icon closed. + ///// The icon opened. + ///// The tree type. + //public ApplicationTree(bool initialize, int sortOrder, string applicationAlias, string alias, string title, string iconClosed, string iconOpened, string type) + //{ + // //Initialize = initialize; + // SortOrder = sortOrder; + // ApplicationAlias = applicationAlias; + // Alias = alias; + // Title = title; + // IconClosed = iconClosed; + // IconOpened = iconOpened; + // Type = type; + + //} + + public ApplicationTree(int sortOrder, string applicationAlias, string alias, string title) + { + SortOrder = sortOrder; + ApplicationAlias = applicationAlias; + Alias = alias; + Title = title; + } + + ///// + ///// Gets or sets a value indicating whether this should initialize. + ///// + ///// true if initialize; otherwise, false. + //public bool Initialize { get; set; } + + /// + /// Gets or sets the sort order. + /// + /// The sort order. + public int SortOrder { get; set; } + + /// + /// Gets the application alias. + /// + /// The application alias. + public string ApplicationAlias { get; } + + /// + /// Gets the tree alias. + /// + /// The alias. + public string Alias { get; } + + /// + /// Gets or sets the tree title (fallback if the tree alias isn't localized) + /// + /// The title. + public string Title { get; set; } + + ///// + ///// Gets or sets the icon closed. + ///// + ///// The icon closed. + //public string IconClosed { get; set; } + + ///// + ///// Gets or sets the icon opened. + ///// + ///// The icon opened. + //public string IconOpened { get; set; } + + ///// + ///// Gets or sets the tree type assembly name. + ///// + ///// The type. + //public string Type { get; set; } + + /// + /// Returns the localized root node display name + /// + /// + /// + public string GetRootNodeDisplayName(ILocalizedTextService textService) + { + var label = $"[{Alias}]"; + + // try to look up a the localized tree header matching the tree alias + var localizedLabel = textService.Localize("treeHeaders/" + Alias); + + // if the localizedLabel returns [alias] then return the title if it's defined + if (localizedLabel != null && localizedLabel.Equals(label, StringComparison.InvariantCultureIgnoreCase)) + { + if (string.IsNullOrEmpty(Title) == false) + label = Title; + } + else + { + // the localizedLabel translated into something that's not just [alias], so use the translation + label = localizedLabel; + } + + return label; + } + + //private Type _runtimeType; + + ///// + ///// Returns the CLR type based on it's assembly name stored in the config + ///// + ///// + //public Type GetRuntimeType() + //{ + // return _runtimeType ?? (_runtimeType = System.Type.GetType(Type)); + //} + + ///// + ///// Used to try to get and cache the tree type + ///// + ///// + ///// + //internal static Type TryGetType(string type) + //{ + // try + // { + // return ResolvedTypes.GetOrAdd(type, s => + // { + // var result = System.Type.GetType(type); + // if (result != null) + // { + // return result; + // } + + // //we need to implement a bit of a hack here due to some trees being renamed and backwards compat + // var parts = type.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries); + // if (parts.Length != 2) + // throw new InvalidOperationException("Could not resolve type"); + // if (parts[1].Trim() != "Umbraco.Web" || parts[0].StartsWith("Umbraco.Web.Trees") == false || parts[0].EndsWith("Controller")) + // throw new InvalidOperationException("Could not resolve type"); + + // //if it's one of our controllers but it's not suffixed with "Controller" then add it and try again + // var tempType = parts[0] + "Controller, Umbraco.Web"; + + // result = System.Type.GetType(tempType); + // if (result != null) + // return result; + + // throw new InvalidOperationException("Could not resolve type"); + // }); + // } + // catch (InvalidOperationException) + // { + // //swallow, this is our own exception, couldn't find the type + // // fixme bad use of exceptions here! + // return null; + // } + //} + } +} diff --git a/src/Umbraco.Web/Models/ContentEditing/IBackOfficeSection.cs b/src/Umbraco.Web/Models/ContentEditing/IBackOfficeSection.cs new file mode 100644 index 0000000000..f27941035a --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/IBackOfficeSection.cs @@ -0,0 +1,15 @@ +using Umbraco.Core.Composing; + +namespace Umbraco.Web.Models.ContentEditing +{ + + /// + /// Defines a back office section + /// + public interface IBackOfficeSection : IDiscoverable + { + string Alias { get; } + string Name { get; } + int SortOrder { get; } + } +} diff --git a/src/Umbraco.Web/Models/Mapping/SectionMapperProfile.cs b/src/Umbraco.Web/Models/Mapping/SectionMapperProfile.cs index ba7ff3c38d..683fce36e8 100644 --- a/src/Umbraco.Web/Models/Mapping/SectionMapperProfile.cs +++ b/src/Umbraco.Web/Models/Mapping/SectionMapperProfile.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using AutoMapper; +using Umbraco.Core.Models.ContentEditing; using Umbraco.Core.Services; using Umbraco.Web.Models.ContentEditing; @@ -9,7 +10,7 @@ namespace Umbraco.Web.Models.Mapping { public SectionMapperProfile(ILocalizedTextService textService) { - CreateMap() + CreateMap() .ForMember(dest => dest.RoutePath, opt => opt.Ignore()) .ForMember(dest => dest.Icon, opt => opt.Ignore()) .ForMember(dest => dest.Name, opt => opt.MapFrom(src => textService.Localize("sections/" + src.Alias, (IDictionary)null))) diff --git a/src/Umbraco.Web/Models/Mapping/UserMapperProfile.cs b/src/Umbraco.Web/Models/Mapping/UserMapperProfile.cs index 8261dda0d4..c975f3a106 100644 --- a/src/Umbraco.Web/Models/Mapping/UserMapperProfile.cs +++ b/src/Umbraco.Web/Models/Mapping/UserMapperProfile.cs @@ -12,6 +12,7 @@ using Umbraco.Core.Models.Entities; using Umbraco.Core.Security; using Umbraco.Core.Services; using Umbraco.Web.Actions; +using Umbraco.Web.Services; namespace Umbraco.Web.Models.Mapping diff --git a/src/Umbraco.Web/Models/Trees/ApplicationAttribute.cs b/src/Umbraco.Web/Models/Trees/ApplicationAttribute.cs deleted file mode 100644 index 65fc4ed6f3..0000000000 --- a/src/Umbraco.Web/Models/Trees/ApplicationAttribute.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; - -namespace Umbraco.Web.Models.Trees -{ - /// - /// Identifies an application tree - /// - [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] - public class ApplicationAttribute : Attribute - { - /// - /// Initializes a new instance of the class. - /// - /// The alias. - /// The name. - /// The sort order. - public ApplicationAttribute(string alias, - string name, - int sortOrder = 0) - { - Alias = alias; - Name = name; - SortOrder = sortOrder; - } - - public string Alias { get; private set; } - public string Name { get; private set; } - public int SortOrder { get; private set; } - } -} diff --git a/src/Umbraco.Web/Models/Trees/ApplicationDefinitions.cs b/src/Umbraco.Web/Models/Trees/ApplicationDefinitions.cs index aa8e0cfda6..ba48c9e240 100644 --- a/src/Umbraco.Web/Models/Trees/ApplicationDefinitions.cs +++ b/src/Umbraco.Web/Models/Trees/ApplicationDefinitions.cs @@ -1,37 +1,77 @@ using Umbraco.Core; using Umbraco.Core.Models; +using Umbraco.Core.Models.ContentEditing; +using Umbraco.Web.Models.ContentEditing; namespace Umbraco.Web.Models.Trees { - // The application definitions are intended as a means to auto populate - // the application.config. On app startup, Umbraco will look for any - // unregistered classes with an ApplicationAttribute and add them to the cache + /// + /// Defines the back office content section + /// + public class ContentBackOfficeSectionDefinition : IBackOfficeSection + { + public string Alias => Constants.Applications.Content; + public string Name => "Content"; + public int SortOrder => 0; + } - [Application(Constants.Applications.Content, "Content")] - public class ContentApplicationDefinition : IApplication - { } + /// + /// Defines the back office media section + /// + public class MediaBackOfficeSectionDefinition : IBackOfficeSection + { + public string Alias => Constants.Applications.Media; + public string Name => "Media"; + public int SortOrder => 1; + } - [Application(Constants.Applications.Media, "Media", sortOrder: 1)] - public class MediaApplicationDefinition : IApplication - { } + /// + /// Defines the back office settings section + /// + public class SettingsBackOfficeSectionDefinition : IBackOfficeSection + { + public string Alias => Constants.Applications.Settings; + public string Name => "Settings"; + public int SortOrder => 2; + } - [Application(Constants.Applications.Settings, "Settings", sortOrder: 2)] - public class SettingsApplicationDefinition : IApplication - { } + /// + /// Defines the back office packages section + /// + public class PackagesBackOfficeSectionDefinition : IBackOfficeSection + { + public string Alias => Constants.Applications.Packages; + public string Name => "Packages"; + public int SortOrder => 3; + } - [Application(Constants.Applications.Packages, "Packages", sortOrder: 3)] - public class PackagesApplicationDefinition : IApplication - { } + /// + /// Defines the back office users section + /// + public class UsersBackOfficeSectionDefinition : IBackOfficeSection + { + public string Alias => Constants.Applications.Users; + public string Name => "Users"; + public int SortOrder => 4; + } - [Application(Constants.Applications.Users, "Users", sortOrder: 4)] - public class UsersApplicationDefinition : IApplication - { } + /// + /// Defines the back office members section + /// + public class MembersBackOfficeSectionDefinition : IBackOfficeSection + { + public string Alias => Constants.Applications.Members; + public string Name => "Members"; + public int SortOrder => 5; + } - [Application(Constants.Applications.Members, "Members", sortOrder: 5)] - public class MembersApplicationDefinition : IApplication - { } - - [Application(Constants.Applications.Translation, "Translation", sortOrder: 6)] - public class TranslationApplicationDefinition : IApplication - { } + /// + /// Defines the back office translation section + /// + public class TranslationBackOfficeSectionDefinition : IBackOfficeSection + { + public string Alias => Constants.Applications.Translation; + public string Name => "Translation"; + public int SortOrder => 6; + } } diff --git a/src/Umbraco.Web/Models/Trees/IApplication.cs b/src/Umbraco.Web/Models/Trees/IApplication.cs deleted file mode 100644 index 4e9cae43fd..0000000000 --- a/src/Umbraco.Web/Models/Trees/IApplication.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Umbraco.Core.Composing; - -namespace Umbraco.Web.Models.Trees -{ - /// - /// Marker interface for created applications in the umbraco backoffice - /// - public interface IApplication : IDiscoverable - { } -} diff --git a/src/Umbraco.Web/Mvc/SurfaceControllerTypeCollection.cs b/src/Umbraco.Web/Mvc/SurfaceControllerTypeCollection.cs index 30c21fce96..eef6ab1ca2 100644 --- a/src/Umbraco.Web/Mvc/SurfaceControllerTypeCollection.cs +++ b/src/Umbraco.Web/Mvc/SurfaceControllerTypeCollection.cs @@ -8,6 +8,8 @@ namespace Umbraco.Web.Mvc // which we are not doing at the moment // we can inherit from BuilderCollectionBase and just be enumerable + //fixme: this should be LazyCollectionBuilderBase ? + public class SurfaceControllerTypeCollection : BuilderCollectionBase { public SurfaceControllerTypeCollection(IEnumerable items) diff --git a/src/Umbraco.Web/Runtime/WebRuntimeComponent.cs b/src/Umbraco.Web/Runtime/WebRuntimeComponent.cs index 422b502f80..b7f4e13432 100644 --- a/src/Umbraco.Web/Runtime/WebRuntimeComponent.cs +++ b/src/Umbraco.Web/Runtime/WebRuntimeComponent.cs @@ -22,10 +22,12 @@ using Umbraco.Core.Models.PublishedContent; using Umbraco.Core.Profiling; using Umbraco.Core.Services; using Umbraco.Web.Install; +using Umbraco.Web.Models.Trees; using Umbraco.Web.Mvc; using Umbraco.Web.PublishedCache; using Umbraco.Web.Routing; using Umbraco.Web.Security; +using Umbraco.Web.Trees; using Umbraco.Web.UI.JavaScript; using Umbraco.Web.WebApi; diff --git a/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs b/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs index 51e4fbd008..0ef9adddb7 100644 --- a/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs +++ b/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs @@ -8,6 +8,8 @@ using Umbraco.Core.Composing; using Umbraco.Core.Configuration; using Umbraco.Core.Dictionary; using Umbraco.Core.Events; +using Umbraco.Core.Models; +using Umbraco.Core.Models.ContentEditing; using Umbraco.Core.Models.PublishedContent; using Umbraco.Core.PropertyEditors; using Umbraco.Core.PropertyEditors.ValueConverters; @@ -21,6 +23,7 @@ using Umbraco.Web.Dictionary; using Umbraco.Web.Editors; using Umbraco.Web.Features; using Umbraco.Web.HealthCheck; +using Umbraco.Web.Models.ContentEditing; using Umbraco.Web.Models.PublishedContent; using Umbraco.Web.Mvc; using Umbraco.Web.PublishedCache; @@ -189,6 +192,14 @@ namespace Umbraco.Web.Runtime .Append() .Append() .Append(); + + // register back office sections + composition.WithCollectionBuilder() + .Add(() => composition.TypeLoader.GetTypes()); + + // register back office trees + composition.WithCollectionBuilder() + .Add(() => composition.TypeLoader.GetTypes()); } } } diff --git a/src/Umbraco.Web/Search/SearchableTreeCollection.cs b/src/Umbraco.Web/Search/SearchableTreeCollection.cs index 38c329cafa..2b1baa5194 100644 --- a/src/Umbraco.Web/Search/SearchableTreeCollection.cs +++ b/src/Umbraco.Web/Search/SearchableTreeCollection.cs @@ -5,6 +5,7 @@ using System.Linq; using Umbraco.Core; using Umbraco.Core.Composing; using Umbraco.Core.Services; +using Umbraco.Web.Services; using Umbraco.Web.Trees; namespace Umbraco.Web.Search diff --git a/src/Umbraco.Web/Services/ApplicationTreeService.cs b/src/Umbraco.Web/Services/ApplicationTreeService.cs index 86bfc5d0bb..72b26e26d3 100644 --- a/src/Umbraco.Web/Services/ApplicationTreeService.cs +++ b/src/Umbraco.Web/Services/ApplicationTreeService.cs @@ -11,7 +11,9 @@ using Umbraco.Core.IO; using Umbraco.Core.Logging; using Umbraco.Core.Models; using Umbraco.Core.Composing; +using Umbraco.Core.Models.ContentEditing; using Umbraco.Core.Services; +using Umbraco.Web.Models.ContentEditing; using Umbraco.Web.Trees; namespace Umbraco.Web.Services @@ -19,276 +21,251 @@ namespace Umbraco.Web.Services internal class ApplicationTreeService : IApplicationTreeService { private readonly ILogger _logger; - private readonly CacheHelper _cache; - private readonly TypeLoader _typeLoader; - private Lazy> _allAvailableTrees; - internal const string TreeConfigFileName = "trees.config"; - private static string _treeConfig; + private readonly TreeCollection _treeCollection; private static readonly object Locker = new object(); private readonly Lazy>> _groupedTrees; - public ApplicationTreeService(ILogger logger, CacheHelper cache, TypeLoader typeLoader) + public ApplicationTreeService(ILogger logger, TreeCollection treeCollection) { _logger = logger; - _cache = cache; - _typeLoader = typeLoader; - _groupedTrees = new Lazy>>(InitGroupedTrees); + _treeCollection = treeCollection; + //_groupedTrees = new Lazy>>(InitGroupedTrees); } - /// - /// gets/sets the trees.config file path - /// - /// - /// The setter is generally only going to be used in unit tests, otherwise it will attempt to resolve it using the IOHelper.MapPath - /// - internal static string TreeConfigFilePath - { - get - { - if (string.IsNullOrWhiteSpace(_treeConfig)) - { - _treeConfig = IOHelper.MapPath(SystemDirectories.Config + "/" + TreeConfigFileName); - } - return _treeConfig; - } - set { _treeConfig = value; } - } + ///// + ///// gets/sets the trees.config file path + ///// + ///// + ///// The setter is generally only going to be used in unit tests, otherwise it will attempt to resolve it using the IOHelper.MapPath + ///// + //internal static string TreeConfigFilePath + //{ + // get + // { + // if (string.IsNullOrWhiteSpace(_treeConfig)) + // { + // _treeConfig = IOHelper.MapPath(SystemDirectories.Config + "/" + TreeConfigFileName); + // } + // return _treeConfig; + // } + // set { _treeConfig = value; } + //} - /// - /// The main entry point to get application trees - /// - /// - /// This lazily on first access will scan for plugin trees and ensure the trees.config is up-to-date with the plugins. If plugins - /// haven't changed on disk then the file will not be saved. The trees are all then loaded from this config file into cache and returned. - /// - private List GetAppTrees() - { - return _cache.RuntimeCache.GetCacheItem>( - CacheKeys.ApplicationTreeCacheKey, - () => - { - var list = ReadFromXmlAndSort(); + ///// + ///// The main entry point to get application trees + ///// + ///// + ///// This lazily on first access will scan for plugin trees and ensure the trees.config is up-to-date with the plugins. If plugins + ///// haven't changed on disk then the file will not be saved. The trees are all then loaded from this config file into cache and returned. + ///// + //private List GetAppTrees() + //{ + // return _cache.RuntimeCache.GetCacheItem>( + // CacheKeys.ApplicationTreeCacheKey, + // () => + // { + // var list = ReadFromXmlAndSort(); - //now we can check the non-volatile flag - if (_allAvailableTrees != null) - { - var hasChanges = false; + // //now we can check the non-volatile flag + // if (_allAvailableTrees != null) + // { + // var hasChanges = false; - LoadXml(doc => - { - //Now, load in the xml structure and update it with anything that is not declared there and save the file. + // LoadXml(doc => + // { + // //Now, load in the xml structure and update it with anything that is not declared there and save the file. - //NOTE: On the first iteration here, it will lazily scan all trees, etc... this is because this ienumerable is lazy - // based on the ApplicationTreeRegistrar - and as noted there this is not an ideal way to do things but were stuck like this - // currently because of the legacy assemblies and types not in the Core. + // //NOTE: On the first iteration here, it will lazily scan all trees, etc... this is because this ienumerable is lazy + // // based on the ApplicationTreeRegistrar - and as noted there this is not an ideal way to do things but were stuck like this + // // currently because of the legacy assemblies and types not in the Core. - //Get all the trees not registered in the config (those not matching by alias casing will be detected as "unregistered") - var unregistered = _allAvailableTrees.Value - .Where(x => list.Any(l => l.Alias == x.Alias) == false) - .ToArray(); + // //Get all the trees not registered in the config (those not matching by alias casing will be detected as "unregistered") + // var unregistered = _allAvailableTrees.Value + // .Where(x => list.Any(l => l.Alias == x.Alias) == false) + // .ToArray(); - hasChanges = unregistered.Any(); + // hasChanges = unregistered.Any(); - if (hasChanges == false) return false; + // if (hasChanges == false) return false; - //add or edit the unregistered ones and re-save the file if any changes were found - var count = 0; - foreach (var tree in unregistered) - { - var existingElement = doc.Root.Elements("add").SingleOrDefault(x => - string.Equals(x.Attribute("alias").Value, tree.Alias, - StringComparison.InvariantCultureIgnoreCase) && - string.Equals(x.Attribute("application").Value, tree.ApplicationAlias, - StringComparison.InvariantCultureIgnoreCase)); - if (existingElement != null) - { - existingElement.SetAttributeValue("alias", tree.Alias); - } - else - { - if (tree.Title.IsNullOrWhiteSpace()) - { - doc.Root.Add(new XElement("add", - new XAttribute("initialize", tree.Initialize), - new XAttribute("sortOrder", tree.SortOrder), - new XAttribute("alias", tree.Alias), - new XAttribute("application", tree.ApplicationAlias), - new XAttribute("iconClosed", tree.IconClosed), - new XAttribute("iconOpen", tree.IconOpened), - new XAttribute("type", tree.Type))); - } - else - { - doc.Root.Add(new XElement("add", - new XAttribute("initialize", tree.Initialize), - new XAttribute("sortOrder", tree.SortOrder), - new XAttribute("alias", tree.Alias), - new XAttribute("application", tree.ApplicationAlias), - new XAttribute("title", tree.Title), - new XAttribute("iconClosed", tree.IconClosed), - new XAttribute("iconOpen", tree.IconOpened), - new XAttribute("type", tree.Type))); - } + // //add or edit the unregistered ones and re-save the file if any changes were found + // var count = 0; + // foreach (var tree in unregistered) + // { + // var existingElement = doc.Root.Elements("add").SingleOrDefault(x => + // string.Equals(x.Attribute("alias").Value, tree.Alias, + // StringComparison.InvariantCultureIgnoreCase) && + // string.Equals(x.Attribute("application").Value, tree.ApplicationAlias, + // StringComparison.InvariantCultureIgnoreCase)); + // if (existingElement != null) + // { + // existingElement.SetAttributeValue("alias", tree.Alias); + // } + // else + // { + // if (tree.Title.IsNullOrWhiteSpace()) + // { + // doc.Root.Add(new XElement("add", + // new XAttribute("initialize", tree.Initialize), + // new XAttribute("sortOrder", tree.SortOrder), + // new XAttribute("alias", tree.Alias), + // new XAttribute("application", tree.ApplicationAlias), + // new XAttribute("iconClosed", tree.IconClosed), + // new XAttribute("iconOpen", tree.IconOpened), + // new XAttribute("type", tree.Type))); + // } + // else + // { + // doc.Root.Add(new XElement("add", + // new XAttribute("initialize", tree.Initialize), + // new XAttribute("sortOrder", tree.SortOrder), + // new XAttribute("alias", tree.Alias), + // new XAttribute("application", tree.ApplicationAlias), + // new XAttribute("title", tree.Title), + // new XAttribute("iconClosed", tree.IconClosed), + // new XAttribute("iconOpen", tree.IconOpened), + // new XAttribute("type", tree.Type))); + // } - } - count++; - } + // } + // count++; + // } - //don't save if there's no changes - return count > 0; - }, true); + // //don't save if there's no changes + // return count > 0; + // }, true); - if (hasChanges) - { - //If there were changes, we need to re-read the structures from the XML - list = ReadFromXmlAndSort(); - } - } + // if (hasChanges) + // { + // //If there were changes, we need to re-read the structures from the XML + // list = ReadFromXmlAndSort(); + // } + // } - return list; - }, new TimeSpan(0, 10, 0)); - } + // return list; + // }, new TimeSpan(0, 10, 0)); + //} - /// - /// Creates a new application tree. - /// - /// if set to true [initialize]. - /// The sort order. - /// The application alias. - /// The alias. - /// The title. - /// The icon closed. - /// The icon opened. - /// The type. - public void MakeNew(bool initialize, int sortOrder, string applicationAlias, string alias, string title, string iconClosed, string iconOpened, string type) - { - LoadXml(doc => - { - var el = doc.Root.Elements("add").SingleOrDefault(x => x.Attribute("alias").Value == alias && x.Attribute("application").Value == applicationAlias); + ///// + ///// Creates a new application tree. + ///// + ///// if set to true [initialize]. + ///// The sort order. + ///// The application alias. + ///// The alias. + ///// The title. + ///// The icon closed. + ///// The icon opened. + ///// The type. + //public void MakeNew(bool initialize, int sortOrder, string applicationAlias, string alias, string title, string iconClosed, string iconOpened, string type) + //{ + // LoadXml(doc => + // { + // var el = doc.Root.Elements("add").SingleOrDefault(x => x.Attribute("alias").Value == alias && x.Attribute("application").Value == applicationAlias); - if (el == null) - { - doc.Root.Add(new XElement("add", - new XAttribute("initialize", initialize), - new XAttribute("sortOrder", sortOrder), - new XAttribute("alias", alias), - new XAttribute("application", applicationAlias), - new XAttribute("title", title), - new XAttribute("iconClosed", iconClosed), - new XAttribute("iconOpen", iconOpened), - new XAttribute("type", type))); - } + // if (el == null) + // { + // doc.Root.Add(new XElement("add", + // new XAttribute("initialize", initialize), + // new XAttribute("sortOrder", sortOrder), + // new XAttribute("alias", alias), + // new XAttribute("application", applicationAlias), + // new XAttribute("title", title), + // new XAttribute("iconClosed", iconClosed), + // new XAttribute("iconOpen", iconOpened), + // new XAttribute("type", type))); + // } - return true; + // return true; - }, true); + // }, true); - OnNew(new ApplicationTree(initialize, sortOrder, applicationAlias, alias, title, iconClosed, iconOpened, type), new EventArgs()); - } + // OnNew(new ApplicationTree(initialize, sortOrder, applicationAlias, alias, title, iconClosed, iconOpened, type), new EventArgs()); + //} - /// - /// Saves this instance. - /// - public void SaveTree(ApplicationTree tree) - { - LoadXml(doc => - { - var el = doc.Root.Elements("add").SingleOrDefault(x => x.Attribute("alias").Value == tree.Alias && x.Attribute("application").Value == tree.ApplicationAlias); + ///// + ///// Saves this instance. + ///// + //public void SaveTree(ApplicationTree tree) + //{ + // LoadXml(doc => + // { + // var el = doc.Root.Elements("add").SingleOrDefault(x => x.Attribute("alias").Value == tree.Alias && x.Attribute("application").Value == tree.ApplicationAlias); - if (el != null) - { - el.RemoveAttributes(); + // if (el != null) + // { + // el.RemoveAttributes(); - el.Add(new XAttribute("initialize", tree.Initialize)); - el.Add(new XAttribute("sortOrder", tree.SortOrder)); - el.Add(new XAttribute("alias", tree.Alias)); - el.Add(new XAttribute("application", tree.ApplicationAlias)); - el.Add(new XAttribute("title", tree.Title)); - el.Add(new XAttribute("iconClosed", tree.IconClosed)); - el.Add(new XAttribute("iconOpen", tree.IconOpened)); - el.Add(new XAttribute("type", tree.Type)); - } + // el.Add(new XAttribute("initialize", tree.Initialize)); + // el.Add(new XAttribute("sortOrder", tree.SortOrder)); + // el.Add(new XAttribute("alias", tree.Alias)); + // el.Add(new XAttribute("application", tree.ApplicationAlias)); + // el.Add(new XAttribute("title", tree.Title)); + // el.Add(new XAttribute("iconClosed", tree.IconClosed)); + // el.Add(new XAttribute("iconOpen", tree.IconOpened)); + // el.Add(new XAttribute("type", tree.Type)); + // } - return true; + // return true; - }, true); + // }, true); - OnUpdated(tree, new EventArgs()); - } + // OnUpdated(tree, new EventArgs()); + //} - /// - /// Deletes this instance. - /// - public void DeleteTree(ApplicationTree tree) - { - LoadXml(doc => - { - doc.Root.Elements("add") - .Where(x => x.Attribute("application") != null - && x.Attribute("application").Value == tree.ApplicationAlias - && x.Attribute("alias") != null && x.Attribute("alias").Value == tree.Alias).Remove(); + ///// + ///// Deletes this instance. + ///// + //public void DeleteTree(ApplicationTree tree) + //{ + // LoadXml(doc => + // { + // doc.Root.Elements("add") + // .Where(x => x.Attribute("application") != null + // && x.Attribute("application").Value == tree.ApplicationAlias + // && x.Attribute("alias") != null && x.Attribute("alias").Value == tree.Alias).Remove(); - return true; + // return true; - }, true); + // }, true); - OnDeleted(tree, new EventArgs()); - } + // OnDeleted(tree, new EventArgs()); + //} - /// - /// Gets an ApplicationTree by it's tree alias. - /// - /// The tree alias. - /// An ApplicationTree instance - public ApplicationTree GetByAlias(string treeAlias) - { - return GetAppTrees().Find(t => (t.Alias == treeAlias)); + /// + public ApplicationTree GetByAlias(string treeAlias) => _treeCollection.FirstOrDefault(t => t.Alias == treeAlias); - } + /// + public IEnumerable GetAll() => _treeCollection; - /// - /// Gets all applicationTrees registered in umbraco from the umbracoAppTree table.. - /// - /// Returns a ApplicationTree Array - public IEnumerable GetAll() - { - return GetAppTrees().OrderBy(x => x.SortOrder); - } - - /// - /// Gets the application tree for the applcation with the specified alias - /// - /// The application alias. - /// Returns a ApplicationTree Array + /// public IEnumerable GetApplicationTrees(string applicationAlias) - { - return GetApplicationTrees(applicationAlias, false); - } + => GetAll().Where(x => x.ApplicationAlias.InvariantEquals(applicationAlias)).OrderBy(x => x.SortOrder).ToList(); - /// - /// Gets the application tree for the applcation with the specified alias - /// - /// The application alias. - /// - /// Returns a ApplicationTree Array - public IEnumerable GetApplicationTrees(string applicationAlias, bool onlyInitialized) - { - var list = GetAppTrees().FindAll( - t => - { - if (onlyInitialized) - return (t.ApplicationAlias == applicationAlias && t.Initialize); - return (t.ApplicationAlias == applicationAlias); - } - ); + ///// + ///// Gets the application tree for the applcation with the specified alias + ///// + ///// The application alias. + ///// + ///// Returns a ApplicationTree Array + //public IEnumerable GetApplicationTrees(string applicationAlias, bool onlyInitialized) + //{ + // var list = GetAppTrees().FindAll( + // t => + // { + // if (onlyInitialized) + // return (t.ApplicationAlias == applicationAlias && t.Initialize); + // return (t.ApplicationAlias == applicationAlias); + // } + // ); - return list.OrderBy(x => x.SortOrder).ToArray(); - } + // return list.OrderBy(x => x.SortOrder).ToArray(); + //} - public IDictionary> GetGroupedApplicationTrees(string applicationAlias, bool onlyInitialized) + public IDictionary> GetGroupedApplicationTrees(string applicationAlias) { var result = new Dictionary>(); - var foundTrees = GetApplicationTrees(applicationAlias, onlyInitialized); + var foundTrees = GetApplicationTrees(applicationAlias).ToList(); foreach(var treeGroup in _groupedTrees.Value) { List resultGroup = null; @@ -309,185 +286,185 @@ namespace Umbraco.Web.Services return result; } - /// - /// Creates a group of all tree groups and their tree aliases - /// - /// - /// - /// Used to initialize the field - /// - private IReadOnlyCollection> InitGroupedTrees() - { - var result = GetAll() - .Select(x => (treeAlias: x.Alias, treeGroup: x.GetRuntimeType().GetCustomAttribute(false)?.TreeGroup)) - .GroupBy(x => x.treeGroup, x => x.treeAlias) - .ToList(); - return result; - } - - /// - /// Loads in the xml structure from disk if one is found, otherwise loads in an empty xml structure, calls the - /// callback with the xml document and saves the structure back to disk if saveAfterCallback is true. - /// - /// - /// - internal void LoadXml(Func callback, bool saveAfterCallbackIfChanges) - { - lock (Locker) - { - var doc = System.IO.File.Exists(TreeConfigFilePath) - ? XDocument.Load(TreeConfigFilePath) - : XDocument.Parse(""); + ///// + ///// Creates a group of all tree groups and their tree aliases + ///// + ///// + ///// + ///// Used to initialize the field + ///// + //private IReadOnlyCollection> InitGroupedTrees() + //{ + // var result = GetAll() + // .Select(x => (treeAlias: x.Alias, treeGroup: x.GetRuntimeType().GetCustomAttribute(false)?.TreeGroup)) + // .GroupBy(x => x.treeGroup, x => x.treeAlias) + // .ToList(); + // return result; + //} - if (doc.Root != null) - { - var hasChanges = callback.Invoke(doc); + ///// + ///// Loads in the xml structure from disk if one is found, otherwise loads in an empty xml structure, calls the + ///// callback with the xml document and saves the structure back to disk if saveAfterCallback is true. + ///// + ///// + ///// + //internal void LoadXml(Func callback, bool saveAfterCallbackIfChanges) + //{ + // lock (Locker) + // { + // var doc = System.IO.File.Exists(TreeConfigFilePath) + // ? XDocument.Load(TreeConfigFilePath) + // : XDocument.Parse(""); - if (saveAfterCallbackIfChanges && hasChanges - //Don't save it if it is empty, in some very rare cases if the app domain get's killed in the middle of this process - // in some insane way the file saved will be empty. I'm pretty sure it's not actually anything to do with the xml doc and - // more about the IO trying to save the XML doc, but it doesn't hurt to check. - && doc.Root != null && doc.Root.Elements().Any()) - { - //ensures the folder exists - Directory.CreateDirectory(Path.GetDirectoryName(TreeConfigFilePath)); + // if (doc.Root != null) + // { + // var hasChanges = callback.Invoke(doc); - //saves it - doc.Save(TreeConfigFilePath); + // if (saveAfterCallbackIfChanges && hasChanges + // //Don't save it if it is empty, in some very rare cases if the app domain get's killed in the middle of this process + // // in some insane way the file saved will be empty. I'm pretty sure it's not actually anything to do with the xml doc and + // // more about the IO trying to save the XML doc, but it doesn't hurt to check. + // && doc.Root != null && doc.Root.Elements().Any()) + // { + // //ensures the folder exists + // Directory.CreateDirectory(Path.GetDirectoryName(TreeConfigFilePath)); - //remove the cache now that it has changed SD: I'm leaving this here even though it - // is taken care of by events as well, I think unit tests may rely on it being cleared here. - _cache.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationTreeCacheKey); - } - } - } - } + // //saves it + // doc.Save(TreeConfigFilePath); - private List ReadFromXmlAndSort() - { - var list = new List(); + // //remove the cache now that it has changed SD: I'm leaving this here even though it + // // is taken care of by events as well, I think unit tests may rely on it being cleared here. + // _cache.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationTreeCacheKey); + // } + // } + // } + //} - //read in the xml file containing trees and convert them all to ApplicationTree instances - LoadXml(doc => - { - foreach (var addElement in doc.Root.Elements("add").OrderBy(x => - { - var sortOrderAttr = x.Attribute("sortOrder"); - return sortOrderAttr != null ? Convert.ToInt32(sortOrderAttr.Value) : 0; - })) - { - var applicationAlias = (string)addElement.Attribute("application"); - var type = (string)addElement.Attribute("type"); - var assembly = (string)addElement.Attribute("assembly"); + //private List ReadFromXmlAndSort() + //{ + // var list = new List(); - var clrType = Type.GetType(type); - if (clrType == null) - { - _logger.Warn("The tree definition: {AddElement} could not be resolved to a .Net object type", addElement); - continue; - } + // //read in the xml file containing trees and convert them all to ApplicationTree instances + // LoadXml(doc => + // { + // foreach (var addElement in doc.Root.Elements("add").OrderBy(x => + // { + // var sortOrderAttr = x.Attribute("sortOrder"); + // return sortOrderAttr != null ? Convert.ToInt32(sortOrderAttr.Value) : 0; + // })) + // { + // var applicationAlias = (string)addElement.Attribute("application"); + // var type = (string)addElement.Attribute("type"); + // var assembly = (string)addElement.Attribute("assembly"); - //check if the tree definition (applicationAlias + type + assembly) is already in the list + // var clrType = Type.GetType(type); + // if (clrType == null) + // { + // _logger.Warn("The tree definition: {AddElement} could not be resolved to a .Net object type", addElement); + // continue; + // } - if (list.Any(tree => tree.ApplicationAlias.InvariantEquals(applicationAlias) && tree.GetRuntimeType() == clrType) == false) - { - list.Add(new ApplicationTree( - addElement.Attribute("initialize") == null || Convert.ToBoolean(addElement.Attribute("initialize").Value), - addElement.Attribute("sortOrder") != null - ? Convert.ToByte(addElement.Attribute("sortOrder").Value) - : (byte)0, - (string)addElement.Attribute("application"), - (string)addElement.Attribute("alias"), - (string)addElement.Attribute("title"), - (string)addElement.Attribute("iconClosed"), - (string)addElement.Attribute("iconOpen"), - (string)addElement.Attribute("type"))); - } - } + // //check if the tree definition (applicationAlias + type + assembly) is already in the list - return false; + // if (list.Any(tree => tree.ApplicationAlias.InvariantEquals(applicationAlias) && tree.GetRuntimeType() == clrType) == false) + // { + // list.Add(new ApplicationTree( + // addElement.Attribute("initialize") == null || Convert.ToBoolean(addElement.Attribute("initialize").Value), + // addElement.Attribute("sortOrder") != null + // ? Convert.ToByte(addElement.Attribute("sortOrder").Value) + // : (byte)0, + // (string)addElement.Attribute("application"), + // (string)addElement.Attribute("alias"), + // (string)addElement.Attribute("title"), + // (string)addElement.Attribute("iconClosed"), + // (string)addElement.Attribute("iconOpen"), + // (string)addElement.Attribute("type"))); + // } + // } - }, false); + // return false; - return list; - } + // }, false); + + // return list; + //} - internal static event TypedEventHandler Deleted; - private static void OnDeleted(ApplicationTree app, EventArgs args) - { - if (Deleted != null) - { - Deleted(app, args); - } - } + //internal static event TypedEventHandler Deleted; + //private static void OnDeleted(ApplicationTree app, EventArgs args) + //{ + // if (Deleted != null) + // { + // Deleted(app, args); + // } + //} - internal static event TypedEventHandler New; - private static void OnNew(ApplicationTree app, EventArgs args) - { - if (New != null) - { - New(app, args); - } - } + //internal static event TypedEventHandler New; + //private static void OnNew(ApplicationTree app, EventArgs args) + //{ + // if (New != null) + // { + // New(app, args); + // } + //} - internal static event TypedEventHandler Updated; - private static void OnUpdated(ApplicationTree app, EventArgs args) - { - if (Updated != null) - { - Updated(app, args); - } - } + //internal static event TypedEventHandler Updated; + //private static void OnUpdated(ApplicationTree app, EventArgs args) + //{ + // if (Updated != null) + // { + // Updated(app, args); + // } + //} - /// - /// This class is here so that we can provide lazy access to tree scanning for when it is needed - /// - private class LazyEnumerableTrees : IEnumerable - { - public LazyEnumerableTrees(TypeLoader typeLoader) - { - _lazyTrees = new Lazy>(() => - { - var added = new List(); + ///// + ///// This class is here so that we can provide lazy access to tree scanning for when it is needed + ///// + //private class LazyEnumerableTrees : IEnumerable + //{ + // public LazyEnumerableTrees(TypeLoader typeLoader) + // { + // _lazyTrees = new Lazy>(() => + // { + // var added = new List(); - // Load all Controller Trees by attribute - var types = typeLoader.GetTypesWithAttribute(); // fixme inject - //convert them to ApplicationTree instances - var items = types - .Select(x => (tree: x, treeAttribute: x.GetCustomAttributes(false).Single())) - .Select(x => new ApplicationTree(x.treeAttribute.Initialize, x.treeAttribute.SortOrder, x.treeAttribute.ApplicationAlias, x.treeAttribute.Alias, x.treeAttribute.Title, x.treeAttribute.IconClosed, x.treeAttribute.IconOpen, x.tree.GetFullNameWithAssembly())) - .ToArray(); + // // Load all Controller Trees by attribute + // var types = typeLoader.GetTypesWithAttribute(); // fixme inject + // //convert them to ApplicationTree instances + // var items = types + // .Select(x => (tree: x, treeAttribute: x.GetCustomAttributes(false).Single())) + // .Select(x => new ApplicationTree(x.treeAttribute.Initialize, x.treeAttribute.SortOrder, x.treeAttribute.ApplicationAlias, x.treeAttribute.Alias, x.treeAttribute.Title, x.treeAttribute.IconClosed, x.treeAttribute.IconOpen, x.tree.GetFullNameWithAssembly())) + // .ToArray(); - added.AddRange(items.Select(x => x.Alias)); + // added.AddRange(items.Select(x => x.Alias)); - return items.ToArray(); - }); - } + // return items.ToArray(); + // }); + // } - private readonly Lazy> _lazyTrees; - - /// - /// Returns an enumerator that iterates through the collection. - /// - /// - /// A that can be used to iterate through the collection. - /// - public IEnumerator GetEnumerator() - { - return _lazyTrees.Value.GetEnumerator(); - } + // private readonly Lazy> _lazyTrees; - /// - /// Returns an enumerator that iterates through a collection. - /// - /// - /// An object that can be used to iterate through the collection. - /// - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - } + // /// + // /// Returns an enumerator that iterates through the collection. + // /// + // /// + // /// A that can be used to iterate through the collection. + // /// + // public IEnumerator GetEnumerator() + // { + // return _lazyTrees.Value.GetEnumerator(); + // } + + // /// + // /// Returns an enumerator that iterates through a collection. + // /// + // /// + // /// An object that can be used to iterate through the collection. + // /// + // IEnumerator IEnumerable.GetEnumerator() + // { + // return GetEnumerator(); + // } + //} } } diff --git a/src/Umbraco.Core/Services/IApplicationTreeService.cs b/src/Umbraco.Web/Services/IApplicationTreeService.cs similarity index 52% rename from src/Umbraco.Core/Services/IApplicationTreeService.cs rename to src/Umbraco.Web/Services/IApplicationTreeService.cs index 691a3a0b63..1fd7bc939a 100644 --- a/src/Umbraco.Core/Services/IApplicationTreeService.cs +++ b/src/Umbraco.Web/Services/IApplicationTreeService.cs @@ -2,33 +2,35 @@ using System.Collections.Generic; using System.Linq; using Umbraco.Core.Models; +using Umbraco.Core.Models.ContentEditing; +using Umbraco.Web.Models.ContentEditing; -namespace Umbraco.Core.Services +namespace Umbraco.Web.Services { public interface IApplicationTreeService { - /// - /// Creates a new application tree. - /// - /// if set to true [initialize]. - /// The sort order. - /// The application alias. - /// The alias. - /// The title. - /// The icon closed. - /// The icon opened. - /// The type. - void MakeNew(bool initialize, int sortOrder, string applicationAlias, string alias, string title, string iconClosed, string iconOpened, string type); + ///// + ///// Creates a new application tree. + ///// + ///// if set to true [initialize]. + ///// The sort order. + ///// The application alias. + ///// The alias. + ///// The title. + ///// The icon closed. + ///// The icon opened. + ///// The type. + //void MakeNew(bool initialize, int sortOrder, string applicationAlias, string alias, string title, string iconClosed, string iconOpened, string type); - /// - /// Saves this instance. - /// - void SaveTree(ApplicationTree tree); + ///// + ///// Saves this instance. + ///// + //void SaveTree(ApplicationTree tree); - /// - /// Deletes this instance. - /// - void DeleteTree(ApplicationTree tree); + ///// + ///// Deletes this instance. + ///// + //void DeleteTree(ApplicationTree tree); /// /// Gets an ApplicationTree by it's tree alias. @@ -50,21 +52,20 @@ namespace Umbraco.Core.Services /// Returns a ApplicationTree Array IEnumerable GetApplicationTrees(string applicationAlias); - /// - /// Gets the application tree for the applcation with the specified alias - /// - /// The application alias. - /// - /// Returns a ApplicationTree Array - IEnumerable GetApplicationTrees(string applicationAlias, bool onlyInitialized); + ///// + ///// Gets the application tree for the applcation with the specified alias + ///// + ///// The application alias. + ///// + ///// Returns a ApplicationTree Array + //IEnumerable GetApplicationTrees(string applicationAlias, bool onlyInitialized); /// /// Gets the grouped application trees for the application with the specified alias /// /// - /// /// - IDictionary> GetGroupedApplicationTrees(string applicationAlias, bool onlyInitialized); + IDictionary> GetGroupedApplicationTrees(string applicationAlias); } /// @@ -72,37 +73,37 @@ namespace Umbraco.Core.Services /// internal class EmptyApplicationTreeService : IApplicationTreeService { - /// - /// Creates a new application tree. - /// - /// if set to true [initialize]. - /// The sort order. - /// The application alias. - /// The alias. - /// The title. - /// The icon closed. - /// The icon opened. - /// The type. - public void MakeNew(bool initialize, int sortOrder, string applicationAlias, string alias, string title, string iconClosed, string iconOpened, string type) - { - throw new System.NotImplementedException(); - } + ///// + ///// Creates a new application tree. + ///// + ///// if set to true [initialize]. + ///// The sort order. + ///// The application alias. + ///// The alias. + ///// The title. + ///// The icon closed. + ///// The icon opened. + ///// The type. + //public void MakeNew(bool initialize, int sortOrder, string applicationAlias, string alias, string title, string iconClosed, string iconOpened, string type) + //{ + // throw new System.NotImplementedException(); + //} - /// - /// Saves this instance. - /// - public void SaveTree(ApplicationTree tree) - { - throw new System.NotImplementedException(); - } + ///// + ///// Saves this instance. + ///// + //public void SaveTree(ApplicationTree tree) + //{ + // throw new System.NotImplementedException(); + //} - /// - /// Deletes this instance. - /// - public void DeleteTree(ApplicationTree tree) - { - throw new System.NotImplementedException(); - } + ///// + ///// Deletes this instance. + ///// + //public void DeleteTree(ApplicationTree tree) + //{ + // throw new System.NotImplementedException(); + //} /// /// Gets an ApplicationTree by it's tree alias. @@ -123,7 +124,7 @@ namespace Umbraco.Core.Services throw new System.NotImplementedException(); } - public IDictionary> GetGroupedApplicationTrees(string applicationAlias, bool onlyInitialized) + public IDictionary> GetGroupedApplicationTrees(string applicationAlias) { throw new System.NotImplementedException(); } diff --git a/src/Umbraco.Web/Services/ISectionService.cs b/src/Umbraco.Web/Services/ISectionService.cs new file mode 100644 index 0000000000..560805634f --- /dev/null +++ b/src/Umbraco.Web/Services/ISectionService.cs @@ -0,0 +1,116 @@ +using System.Collections.Generic; +using Umbraco.Core.Models; +using Umbraco.Core.Models.ContentEditing; +using Umbraco.Web.Models.ContentEditing; + +namespace Umbraco.Web.Services +{ + public interface ISectionService + { + /// + /// The cache storage for all applications + /// + IEnumerable GetSections(); + + /// + /// Get the user group's allowed sections + /// + /// + /// + IEnumerable GetAllowedSections(int userId); + + /// + /// Gets the application by its alias. + /// + /// The application alias. + /// + IBackOfficeSection GetByAlias(string appAlias); + + ///// + ///// Creates a new applcation if no application with the specified alias is found. + ///// + ///// The application name. + ///// The application alias. + ///// The application icon, which has to be located in umbraco/images/tray folder. + //void MakeNew(string name, string alias, string icon); + + ///// + ///// Makes the new. + ///// + ///// The name. + ///// The alias. + ///// The icon. + ///// The sort order. + //void MakeNew(string name, string alias, string icon, int sortOrder); + + ///// + ///// Deletes the section + ///// + //void DeleteSection(Section section); + } + + /// + /// Purely used to allow a service context to create the default services + /// + internal class EmptySectionService : ISectionService + { + /// + /// The cache storage for all applications + /// + public IEnumerable GetSections() + { + throw new System.NotImplementedException(); + } + + /// + /// Get the user's allowed sections + /// + /// + /// + public IEnumerable GetAllowedSections(int userId) + { + throw new System.NotImplementedException(); + } + + /// + /// Gets the application by its alias. + /// + /// The application alias. + /// + public IBackOfficeSection GetByAlias(string appAlias) + { + throw new System.NotImplementedException(); + } + + ///// + ///// Creates a new applcation if no application with the specified alias is found. + ///// + ///// The application name. + ///// The application alias. + ///// The application icon, which has to be located in umbraco/images/tray folder. + //public void MakeNew(string name, string alias, string icon) + //{ + // throw new System.NotImplementedException(); + //} + + ///// + ///// Makes the new. + ///// + ///// The name. + ///// The alias. + ///// The icon. + ///// The sort order. + //public void MakeNew(string name, string alias, string icon, int sortOrder) + //{ + // throw new System.NotImplementedException(); + //} + + ///// + ///// Deletes the section + ///// + //public void DeleteSection(IBackOfficeSection section) + //{ + // throw new System.NotImplementedException(); + //} + } +} diff --git a/src/Umbraco.Web/Services/SectionService.cs b/src/Umbraco.Web/Services/SectionService.cs index 6337db67f9..bb154976f0 100644 --- a/src/Umbraco.Web/Services/SectionService.cs +++ b/src/Umbraco.Web/Services/SectionService.cs @@ -10,9 +10,12 @@ using Umbraco.Core.Events; using Umbraco.Core.IO; using Umbraco.Core.Models; using Umbraco.Core.Composing; +using Umbraco.Core.Models.ContentEditing; using Umbraco.Core.Scoping; using Umbraco.Core.Services; +using Umbraco.Web.Models.ContentEditing; using Umbraco.Web.Models.Trees; +using Umbraco.Web.Trees; using File = System.IO.File; namespace Umbraco.Web.Services @@ -20,130 +23,90 @@ namespace Umbraco.Web.Services internal class SectionService : ISectionService { private readonly IUserService _userService; - private readonly Lazy> _allAvailableSections; - private readonly IApplicationTreeService _applicationTreeService; - private readonly IScopeProvider _scopeProvider; + private readonly BackOfficeSectionCollection _sectionCollection; + + private readonly Lazy> _allAvailableSections; + //private readonly IApplicationTreeService _applicationTreeService; + //private readonly IScopeProvider _scopeProvider; private readonly CacheHelper _cache; - internal const string AppConfigFileName = "applications.config"; - private static string _appConfig; - private static readonly object Locker = new object(); + //internal const string AppConfigFileName = "applications.config"; + //private static string _appConfig; + //private static readonly object Locker = new object(); public SectionService( IUserService userService, - IApplicationTreeService applicationTreeService, - IScopeProvider scopeProvider, + BackOfficeSectionCollection sectionCollection, CacheHelper cache) { - _applicationTreeService = applicationTreeService ?? throw new ArgumentNullException(nameof(applicationTreeService)); + //_applicationTreeService = applicationTreeService ?? throw new ArgumentNullException(nameof(applicationTreeService)); _cache = cache ?? throw new ArgumentNullException(nameof(cache)); _userService = userService; - _scopeProvider = scopeProvider; - _allAvailableSections = new Lazy>(() => new LazyEnumerableSections()); + _sectionCollection = sectionCollection; + //_scopeProvider = scopeProvider; + //_allAvailableSections = new Lazy>(() => new LazyEnumerableSections()); } - /// - /// gets/sets the application.config file path - /// - /// - /// The setter is generally only going to be used in unit tests, otherwise it will attempt to resolve it using the IOHelper.MapPath - /// - internal static string AppConfigFilePath - { - get - { - if (string.IsNullOrWhiteSpace(_appConfig)) - { - _appConfig = IOHelper.MapPath(SystemDirectories.Config + "/" + AppConfigFileName); - } - return _appConfig; - } - set => _appConfig = value; - } + ///// + ///// gets/sets the application.config file path + ///// + ///// + ///// The setter is generally only going to be used in unit tests, otherwise it will attempt to resolve it using the IOHelper.MapPath + ///// + //internal static string AppConfigFilePath + //{ + // get + // { + // if (string.IsNullOrWhiteSpace(_appConfig)) + // { + // _appConfig = IOHelper.MapPath(SystemDirectories.Config + "/" + AppConfigFileName); + // } + // return _appConfig; + // } + // set => _appConfig = value; + //} /// /// The cache storage for all applications /// - public IEnumerable
GetSections() + public IEnumerable GetSections() { - return _cache.RuntimeCache.GetCacheItem>( - CacheKeys.ApplicationsCacheKey, - () => - { - var list = ReadFromXmlAndSort(); - var hasChanges = false; - var localCopyList = list; - - LoadXml(doc => - { - //Now, load in the xml structure and update it with anything that is not declared there and save the file. - //NOTE: On the first iteration here, it will lazily scan all apps, etc... this is because this ienumerable is lazy - //Get all the trees not registered in the config - - var unregistered = _allAvailableSections.Value - .Where(x => localCopyList.Any(l => l.Alias == x.Alias) == false) - .ToArray(); - - hasChanges = unregistered.Any(); - - var count = 0; - foreach (var attr in unregistered) - { - doc.Root.Add(new XElement("add", - new XAttribute("alias", attr.Alias), - new XAttribute("name", attr.Name), - new XAttribute("sortOrder", attr.SortOrder))); - count++; - } - - //don't save if there's no changes - return count > 0; - }, true); - - if (hasChanges) - { - //If there were changes, we need to re-read the structures from the XML - list = ReadFromXmlAndSort(); - } - - return list; - - }, new TimeSpan(0, 10, 0)); + return _sectionCollection; } - internal void LoadXml(Func callback, bool saveAfterCallbackIfChanged) - { - lock (Locker) - { - var doc = File.Exists(AppConfigFilePath) - ? XDocument.Load(AppConfigFilePath) - : XDocument.Parse(""); + //internal void LoadXml(Func callback, bool saveAfterCallbackIfChanged) + //{ + // lock (Locker) + // { + // var doc = File.Exists(AppConfigFilePath) + // ? XDocument.Load(AppConfigFilePath) + // : XDocument.Parse(""); - if (doc.Root != null) - { - var changed = callback.Invoke(doc); + // if (doc.Root != null) + // { + // var changed = callback.Invoke(doc); - if (saveAfterCallbackIfChanged && changed) - { - //ensure the folder is created! - Directory.CreateDirectory(Path.GetDirectoryName(AppConfigFilePath)); + // if (saveAfterCallbackIfChanged && changed) + // { + // //ensure the folder is created! + // Directory.CreateDirectory(Path.GetDirectoryName(AppConfigFilePath)); - doc.Save(AppConfigFilePath); + // doc.Save(AppConfigFilePath); - //remove the cache so it gets re-read ... SD: I'm leaving this here even though it - // is taken care of by events as well, I think unit tests may rely on it being cleared here. - _cache.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationsCacheKey); - } - } - } - } + // //remove the cache so it gets re-read ... SD: I'm leaving this here even though it + // // is taken care of by events as well, I think unit tests may rely on it being cleared here. + // _cache.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationsCacheKey); + // } + // } + // } + //} /// /// Get the user's allowed sections /// /// /// - public IEnumerable
GetAllowedSections(int userId) + public IEnumerable GetAllowedSections(int userId) { var user = _userService.GetUserById(userId); @@ -160,172 +123,172 @@ namespace Umbraco.Web.Services ///
/// The application alias. /// - public Section GetByAlias(string appAlias) + public IBackOfficeSection GetByAlias(string appAlias) { return GetSections().FirstOrDefault(t => t.Alias == appAlias); } - /// - /// Creates a new applcation if no application with the specified alias is found. - /// - /// The application name. - /// The application alias. - /// The application icon, which has to be located in umbraco/images/tray folder. - public void MakeNew(string name, string alias, string icon) - { - var sections = GetSections(); - var nextSortOrder = sections.Any() ? sections.Max(x => x.SortOrder) + 1 : 1; - MakeNew(name, alias, icon, nextSortOrder); - } + ///// + ///// Creates a new applcation if no application with the specified alias is found. + ///// + ///// The application name. + ///// The application alias. + ///// The application icon, which has to be located in umbraco/images/tray folder. + //public void MakeNew(string name, string alias, string icon) + //{ + // var sections = GetSections(); + // var nextSortOrder = sections.Any() ? sections.Max(x => x.SortOrder) + 1 : 1; + // MakeNew(name, alias, icon, nextSortOrder); + //} - /// - /// Makes the new. - /// - /// The name. - /// The alias. - /// The icon. - /// The sort order. - public void MakeNew(string name, string alias, string icon, int sortOrder) - { - if (GetSections().All(x => x.Alias != alias)) - { - LoadXml(doc => - { - doc.Root.Add(new XElement("add", - new XAttribute("alias", alias), - new XAttribute("name", name), - new XAttribute("icon", icon), - new XAttribute("sortOrder", sortOrder))); - return true; - }, true); + ///// + ///// Makes the new. + ///// + ///// The name. + ///// The alias. + ///// The icon. + ///// The sort order. + //public void MakeNew(string name, string alias, string icon, int sortOrder) + //{ + // if (GetSections().All(x => x.Alias != alias)) + // { + // LoadXml(doc => + // { + // doc.Root.Add(new XElement("add", + // new XAttribute("alias", alias), + // new XAttribute("name", name), + // new XAttribute("icon", icon), + // new XAttribute("sortOrder", sortOrder))); + // return true; + // }, true); - //raise event - OnNew(this /*new Section(name, alias, sortOrder)*/, new EventArgs()); - } - } + // //raise event + // OnNew(this /*new Section(name, alias, sortOrder)*/, new EventArgs()); + // } + //} - /// - /// Deletes the section - /// - public void DeleteSection(Section section) - { - lock (Locker) - { - //delete the assigned applications - using (var scope = _scopeProvider.CreateScope()) - { - scope.Database.Execute("delete from umbracoUserGroup2App where app = @appAlias", - new { appAlias = section.Alias }); - scope.Complete(); - } + ///// + ///// Deletes the section + ///// + //public void DeleteSection(Section section) + //{ + // lock (Locker) + // { + // //delete the assigned applications + // using (var scope = _scopeProvider.CreateScope()) + // { + // scope.Database.Execute("delete from umbracoUserGroup2App where app = @appAlias", + // new { appAlias = section.Alias }); + // scope.Complete(); + // } - //delete the assigned trees - var trees = _applicationTreeService.GetApplicationTrees(section.Alias); - foreach (var t in trees) - { - _applicationTreeService.DeleteTree(t); - } + // //delete the assigned trees + // var trees = _applicationTreeService.GetApplicationTrees(section.Alias); + // foreach (var t in trees) + // { + // _applicationTreeService.DeleteTree(t); + // } - LoadXml(doc => - { - doc.Root.Elements("add").Where(x => x.Attribute("alias") != null && x.Attribute("alias").Value == section.Alias) - .Remove(); + // LoadXml(doc => + // { + // doc.Root.Elements("add").Where(x => x.Attribute("alias") != null && x.Attribute("alias").Value == section.Alias) + // .Remove(); - return true; - }, true); + // return true; + // }, true); - //raise event - OnDeleted(this, new EventArgs()); - } - } + // //raise event + // OnDeleted(this, new EventArgs()); + // } + //} - private List
ReadFromXmlAndSort() - { - var tmp = new List
(); + //private List
ReadFromXmlAndSort() + //{ + // var tmp = new List
(); - LoadXml(doc => - { - foreach (var addElement in doc.Root.Elements("add").OrderBy(x => - { - var sortOrderAttr = x.Attribute("sortOrder"); - return sortOrderAttr != null ? Convert.ToInt32(sortOrderAttr.Value) : 0; - })) - { - var sortOrderAttr = addElement.Attribute("sortOrder"); - tmp.Add(new Section(addElement.Attribute("name").Value, - addElement.Attribute("alias").Value, - sortOrderAttr != null ? Convert.ToInt32(sortOrderAttr.Value) : 0)); - } - return false; - }, false); + // LoadXml(doc => + // { + // foreach (var addElement in doc.Root.Elements("add").OrderBy(x => + // { + // var sortOrderAttr = x.Attribute("sortOrder"); + // return sortOrderAttr != null ? Convert.ToInt32(sortOrderAttr.Value) : 0; + // })) + // { + // var sortOrderAttr = addElement.Attribute("sortOrder"); + // tmp.Add(new Section(addElement.Attribute("name").Value, + // addElement.Attribute("alias").Value, + // sortOrderAttr != null ? Convert.ToInt32(sortOrderAttr.Value) : 0)); + // } + // return false; + // }, false); - return tmp; - } + // return tmp; + //} - internal static event TypedEventHandler Deleted; - private static void OnDeleted(ISectionService app, EventArgs args) - { - if (Deleted != null) - { - Deleted(app, args); - } - } + //internal static event TypedEventHandler Deleted; + //private static void OnDeleted(ISectionService app, EventArgs args) + //{ + // if (Deleted != null) + // { + // Deleted(app, args); + // } + //} - internal static event TypedEventHandler New; - private static void OnNew(ISectionService app, EventArgs args) - { - if (New != null) - { - New(app, args); - } - } + //internal static event TypedEventHandler New; + //private static void OnNew(ISectionService app, EventArgs args) + //{ + // if (New != null) + // { + // New(app, args); + // } + //} - /// - /// This class is here so that we can provide lazy access to tree scanning for when it is needed - /// - private class LazyEnumerableSections : IEnumerable
- { - public LazyEnumerableSections() - { - _lazySections = new Lazy>(() => - { - // Load all Applications by attribute and add them to the XML config + ///// + ///// This class is here so that we can provide lazy access to tree scanning for when it is needed + ///// + //private class LazyEnumerableSections : IEnumerable
+ //{ + // public LazyEnumerableSections() + // { + // _lazySections = new Lazy>(() => + // { + // // Load all Applications by attribute and add them to the XML config - //don't cache the result of this because it is only used once during app startup, caching will just add a bit more mem overhead for no reason - var types = Current.TypeLoader.GetTypesWithAttribute(cache: false); // fixme - inject + // //don't cache the result of this because it is only used once during app startup, caching will just add a bit more mem overhead for no reason + // var types = Current.TypeLoader.GetTypesWithAttribute(cache: false); // fixme - inject - //since applications don't populate their metadata from the attribute and because it is an interface, - //we need to interrogate the attributes for the data. Would be better to have a base class that contains - //metadata populated by the attribute. Oh well i guess. - var attrs = types.Select(x => x.GetCustomAttributes(false).Single()); - return attrs.Select(x => new Section(x.Name, x.Alias, x.SortOrder)).ToArray(); - }); - } + // //since applications don't populate their metadata from the attribute and because it is an interface, + // //we need to interrogate the attributes for the data. Would be better to have a base class that contains + // //metadata populated by the attribute. Oh well i guess. + // var attrs = types.Select(x => x.GetCustomAttributes(false).Single()); + // return attrs.Select(x => new Section(x.Name, x.Alias, x.SortOrder)).ToArray(); + // }); + // } - private readonly Lazy> _lazySections; + // private readonly Lazy> _lazySections; - /// - /// Returns an enumerator that iterates through the collection. - /// - /// - /// A that can be used to iterate through the collection. - /// - public IEnumerator
GetEnumerator() - { - return _lazySections.Value.GetEnumerator(); - } + // /// + // /// Returns an enumerator that iterates through the collection. + // /// + // /// + // /// A that can be used to iterate through the collection. + // /// + // public IEnumerator
GetEnumerator() + // { + // return _lazySections.Value.GetEnumerator(); + // } - /// - /// Returns an enumerator that iterates through a collection. - /// - /// - /// An object that can be used to iterate through the collection. - /// - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - } + // /// + // /// Returns an enumerator that iterates through a collection. + // /// + // /// + // /// An object that can be used to iterate through the collection. + // /// + // IEnumerator IEnumerable.GetEnumerator() + // { + // return GetEnumerator(); + // } + //} } } diff --git a/src/Umbraco.Web/Trees/ApplicationTreeController.cs b/src/Umbraco.Web/Trees/ApplicationTreeController.cs index 0454155772..7e7c77d607 100644 --- a/src/Umbraco.Web/Trees/ApplicationTreeController.cs +++ b/src/Umbraco.Web/Trees/ApplicationTreeController.cs @@ -7,10 +7,17 @@ using System.Net.Http.Formatting; using System.Threading.Tasks; using System.Web.Http; using Umbraco.Core; +using Umbraco.Core.Cache; +using Umbraco.Core.Configuration; +using Umbraco.Core.Logging; using Umbraco.Core.Models; +using Umbraco.Core.Models.ContentEditing; +using Umbraco.Core.Persistence; using Umbraco.Core.Services; +using Umbraco.Web.Models.ContentEditing; using Umbraco.Web.Models.Trees; using Umbraco.Web.Mvc; +using Umbraco.Web.Services; using Umbraco.Web.WebApi; using Umbraco.Web.WebApi.Filters; using Constants = Umbraco.Core.Constants; @@ -20,7 +27,19 @@ namespace Umbraco.Web.Trees [AngularJsonOnlyConfiguration] [PluginController("UmbracoTrees")] public class ApplicationTreeController : UmbracoAuthorizedApiController - { + { + private readonly TreeControllerResolver _treeControllerResolver; + private readonly IApplicationTreeService _treeService; + + public ApplicationTreeController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, + ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, + IRuntimeState runtimeState, TreeControllerResolver treeControllerResolver, IApplicationTreeService treeService) + : base(globalSettings, umbracoContext, sqlContext, services, applicationCache, logger, runtimeState) + { + _treeControllerResolver = treeControllerResolver; + _treeService = treeService; + } + /// /// Returns the tree nodes for an application /// @@ -30,14 +49,14 @@ namespace Umbraco.Web.Trees /// An optional bool (defaults to true), if set to false it will also load uninitialized trees /// [HttpQueryStringFilter("queryStrings")] - public async Task GetApplicationTrees(string application, string tree, FormDataCollection queryStrings, bool onlyInitialized = true) + public async Task GetApplicationTrees(string application, string tree, FormDataCollection queryStrings/*, bool onlyInitialized = true*/) { application = application.CleanForXss(); if (string.IsNullOrEmpty(application)) throw new HttpResponseException(HttpStatusCode.NotFound); //find all tree definitions that have the current application alias - var groupedTrees = Services.ApplicationTreeService.GetGroupedApplicationTrees(application, onlyInitialized); + var groupedTrees = _treeService.GetGroupedApplicationTrees(application); var allTrees = groupedTrees.Values.SelectMany(x => x).ToList(); if (string.IsNullOrEmpty(tree) == false || allTrees.Count == 1) @@ -142,7 +161,7 @@ namespace Umbraco.Web.Trees if (configTree == null) throw new ArgumentNullException(nameof(configTree)); try { - var byControllerAttempt = await configTree.TryGetRootNodeFromControllerTree(queryStrings, ControllerContext); + var byControllerAttempt = await _treeControllerResolver.TryGetRootNodeFromControllerTree(configTree, queryStrings, ControllerContext); if (byControllerAttempt.Success) { return byControllerAttempt.Result; @@ -170,17 +189,17 @@ namespace Umbraco.Web.Trees { var rootId = Constants.System.Root.ToString(CultureInfo.InvariantCulture); if (configTree == null) throw new ArgumentNullException(nameof(configTree)); - var byControllerAttempt = configTree.TryLoadFromControllerTree(id, queryStrings, ControllerContext); + var byControllerAttempt = _treeControllerResolver.TryLoadFromControllerTree(configTree, id, queryStrings, ControllerContext); if (byControllerAttempt.Success) { - var rootNode = await configTree.TryGetRootNodeFromControllerTree(queryStrings, ControllerContext); + var rootNode = await _treeControllerResolver.TryGetRootNodeFromControllerTree(configTree, queryStrings, ControllerContext); if (rootNode.Success == false) { //This should really never happen if we've successfully got the children above. throw new InvalidOperationException("Could not create root node for tree " + configTree.Alias); } - var treeAttribute = configTree.GetTreeAttribute(); + var treeAttribute = _treeControllerResolver.GetTreeAttribute(configTree); var sectionRoot = TreeRootNode.CreateSingleTreeRoot( rootId, diff --git a/src/Umbraco.Web/Trees/BackOfficeSectionCollection.cs b/src/Umbraco.Web/Trees/BackOfficeSectionCollection.cs new file mode 100644 index 0000000000..2b5a78d758 --- /dev/null +++ b/src/Umbraco.Web/Trees/BackOfficeSectionCollection.cs @@ -0,0 +1,21 @@ +using System.Collections.Generic; +using Umbraco.Core.Composing; +using Umbraco.Core.Models.ContentEditing; +using Umbraco.Web.Models.ContentEditing; + +namespace Umbraco.Web.Trees +{ + public class BackOfficeSectionCollection : BuilderCollectionBase + { + public BackOfficeSectionCollection(IEnumerable items) + : base(items) + { } + } + + public class BackOfficeSectionCollectionBuilder : LazyCollectionBuilderBase + { + protected override BackOfficeSectionCollectionBuilder This => this; + + //TODO: can we allow for re-ordering OOTB without exposing other methods? + } +} diff --git a/src/Umbraco.Web/Trees/TreeCollection.cs b/src/Umbraco.Web/Trees/TreeCollection.cs new file mode 100644 index 0000000000..8f913fb2d7 --- /dev/null +++ b/src/Umbraco.Web/Trees/TreeCollection.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Umbraco.Core.Composing; +using Umbraco.Core.Models; +using Umbraco.Core.Models.ContentEditing; +using Umbraco.Web.Models.ContentEditing; + +namespace Umbraco.Web.Trees +{ + public class TreeCollection : BuilderCollectionBase + { + public TreeCollection(IEnumerable items) + : base(items) + { } + } + + public class TreeCollectionBuilder : LazyCollectionBuilderBase + { + protected override TreeCollectionBuilder This => this; + + //TODO: can we allow for re-ordering OOTB without exposing other methods? + } + +} diff --git a/src/Umbraco.Web/Trees/TreeController.cs b/src/Umbraco.Web/Trees/TreeController.cs index 1c37307db5..102671ec29 100644 --- a/src/Umbraco.Web/Trees/TreeController.cs +++ b/src/Umbraco.Web/Trees/TreeController.cs @@ -1,4 +1,12 @@ -namespace Umbraco.Web.Trees +using System; +using Umbraco.Core; +using Umbraco.Core.Cache; +using Umbraco.Core.Configuration; +using Umbraco.Core.Logging; +using Umbraco.Core.Persistence; +using Umbraco.Core.Services; + +namespace Umbraco.Web.Trees { /// /// The base controller for all tree requests @@ -8,6 +16,10 @@ private TreeAttribute _attribute; private string _rootNodeDisplayName; + protected TreeController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) : base(globalSettings, umbracoContext, sqlContext, services, applicationCache, logger, runtimeState) + { + } + protected TreeController() { Initialize(); @@ -17,21 +29,25 @@ /// The name to display on the root node /// public override string RootNodeDisplayName - => _rootNodeDisplayName - ?? (_rootNodeDisplayName = Services.ApplicationTreeService.GetByAlias(_attribute.Alias) - ?.GetRootNodeDisplayName(Services.TextService)); + { + get + { + throw new NotImplementedException(); + //return _rootNodeDisplayName + // ?? (_rootNodeDisplayName = Services.ApplicationTreeService.GetByAlias(_attribute.Alias) + // ?.GetRootNodeDisplayName(Services.TextService)); + } + } /// /// Gets the current tree alias from the attribute assigned to it. /// - public override string TreeAlias - { - get { return _attribute.Alias; } - } + public override string TreeAlias => _attribute.Alias; private void Initialize() { - _attribute = GetType().GetTreeAttribute(); + throw new NotImplementedException(); + //_attribute = GetType().GetTreeAttribute(); } } } diff --git a/src/Umbraco.Web/Trees/TreeControllerBase.cs b/src/Umbraco.Web/Trees/TreeControllerBase.cs index ffdcac4479..c00d6053c8 100644 --- a/src/Umbraco.Web/Trees/TreeControllerBase.cs +++ b/src/Umbraco.Web/Trees/TreeControllerBase.cs @@ -4,9 +4,14 @@ using System.Linq; using System.Net.Http.Formatting; using System.Web.Http.Routing; using Umbraco.Core; +using Umbraco.Core.Cache; +using Umbraco.Core.Configuration; using Umbraco.Core.Events; +using Umbraco.Core.Logging; using Umbraco.Core.Models; using Umbraco.Core.Models.Entities; +using Umbraco.Core.Persistence; +using Umbraco.Core.Services; using Umbraco.Web.Models.Trees; using Umbraco.Web.WebApi; using Umbraco.Web.WebApi.Filters; @@ -14,12 +19,23 @@ using Umbraco.Web.WebApi.Filters; namespace Umbraco.Web.Trees { /// - /// A base controller reference for non-attributed trees (un-registered). Developers should inherit from - /// TreeController. + /// A base controller reference for non-attributed trees (un-registered). /// + /// + /// Developers should generally inherit from TreeController. + /// [AngularJsonOnlyConfiguration] public abstract class TreeControllerBase : UmbracoAuthorizedApiController { + protected TreeControllerBase() + { + } + + protected TreeControllerBase(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) : base(globalSettings, umbracoContext, sqlContext, services, applicationCache, logger, runtimeState) + { + } + + /// /// The method called to render the contents of the tree structure /// @@ -351,7 +367,7 @@ namespace Umbraco.Web.Trees private static void OnTreeNodesRendering(TreeControllerBase instance, TreeNodesRenderingEventArgs e) { var handler = TreeNodesRendering; - if (handler != null) handler(instance, e); + handler?.Invoke(instance, e); } /// @@ -363,7 +379,7 @@ namespace Umbraco.Web.Trees internal static void OnRootNodeRendering(TreeControllerBase instance, TreeNodeRenderingEventArgs e) { var handler = RootNodeRendering; - if (handler != null) handler(instance, e); + handler?.Invoke(instance, e); } /// @@ -377,80 +393,8 @@ namespace Umbraco.Web.Trees private static void OnMenuRendering(TreeControllerBase instance, MenuRenderingEventArgs e) { var handler = MenuRendering; - if (handler != null) handler(instance, e); + handler?.Invoke(instance, e); } } - internal class TreeControllerBaseStuffForLegacy - { - private readonly string _treeAlias; - private readonly string _rootNodeDisplayName; - private readonly UrlHelper _url; - - public TreeControllerBaseStuffForLegacy(string treeAlias, string rootNodeDisplayName, UrlHelper url) - { - _treeAlias = treeAlias; - _rootNodeDisplayName = rootNodeDisplayName; - _url = url; - } - - public TreeNode GetRootNode(FormDataCollection queryStrings) - { - if (queryStrings == null) queryStrings = new FormDataCollection(""); - var node = CreateRootNode(queryStrings); - - //add the tree alias to the root - node.AdditionalData["treeAlias"] = _treeAlias; - - AddQueryStringsToAdditionalData(node, queryStrings); - - //check if the tree is searchable and add that to the meta data as well - if (this is ISearchableTree) - { - node.AdditionalData.Add("searchable", "true"); - } - - //now update all data based on some of the query strings, like if we are running in dialog mode - if (IsDialog(queryStrings)) - { - node.RoutePath = "#"; - } - - TreeControllerBase.OnRootNodeRendering(null, new TreeNodeRenderingEventArgs(node, queryStrings)); - - return node; - } - - protected virtual TreeNode CreateRootNode(FormDataCollection queryStrings) - { - var rootNodeAsString = Constants.System.Root.ToString(CultureInfo.InvariantCulture); - var currApp = queryStrings.GetValue(TreeQueryStringParameters.Application); - - var node = new TreeNode( - rootNodeAsString, - null, //this is a root node, there is no parent - _url.GetTreeUrl(GetType(), rootNodeAsString, queryStrings), - _url.GetMenuUrl(GetType(), rootNodeAsString, queryStrings)) - { - HasChildren = true, - RoutePath = currApp, - Name = _rootNodeDisplayName - }; - - return node; - } - - protected void AddQueryStringsToAdditionalData(TreeNode node, FormDataCollection queryStrings) - { - foreach (var q in queryStrings.Where(x => node.AdditionalData.ContainsKey(x.Key) == false)) - { - node.AdditionalData.Add(q.Key, q.Value); - } - } - - protected bool IsDialog(FormDataCollection queryStrings) - { - return queryStrings.GetValue(TreeQueryStringParameters.IsDialog); - } - } } diff --git a/src/Umbraco.Web/Trees/ApplicationTreeExtensions.cs b/src/Umbraco.Web/Trees/TreeControllerResolver.cs similarity index 56% rename from src/Umbraco.Web/Trees/ApplicationTreeExtensions.cs rename to src/Umbraco.Web/Trees/TreeControllerResolver.cs index 2c43cbd5dc..62cafbb5dd 100644 --- a/src/Umbraco.Web/Trees/ApplicationTreeExtensions.cs +++ b/src/Umbraco.Web/Trees/TreeControllerResolver.cs @@ -14,16 +14,25 @@ using Umbraco.Web.Models.Trees; using Umbraco.Web.Mvc; using Umbraco.Web.WebApi; using Umbraco.Core.Composing; -using Current = Umbraco.Web.Composing.Current; -using ApplicationTree = Umbraco.Core.Models.ApplicationTree; +using ApplicationTree = Umbraco.Web.Models.ContentEditing.ApplicationTree; namespace Umbraco.Web.Trees { - internal static class ApplicationTreeExtensions + public class TreeControllerResolver { - private static readonly ConcurrentDictionary TreeAttributeCache = new ConcurrentDictionary(); + private readonly TreeCollection _trees; + private readonly UmbracoApiControllerTypeCollection _apiControllers; - internal static TreeAttribute GetTreeAttribute(this Type treeControllerType) + public TreeControllerResolver(TreeCollection trees, UmbracoApiControllerTypeCollection apiControllers) + { + _trees = trees; + _apiControllers = apiControllers; + } + + private static readonly ConcurrentDictionary TreeAttributeCache = new ConcurrentDictionary(); + private static readonly ConcurrentDictionary ResolvedControllerTypes = new ConcurrentDictionary(); + + private TreeAttribute GetTreeAttribute(Type treeControllerType) { return TreeAttributeCache.GetOrAdd(treeControllerType, type => { @@ -42,25 +51,41 @@ namespace Umbraco.Web.Trees }); } - internal static TreeAttribute GetTreeAttribute(this ApplicationTree tree) + internal TreeAttribute GetTreeAttribute(ApplicationTree tree) { - return tree.GetRuntimeType().GetTreeAttribute(); + throw new NotImplementedException(); + //return ResolvedControllerTypes.GetOrAdd(tree.Alias, s => + //{ + // var controllerType = _apiControllers + // .OfType() + // .FirstOrDefault(x => x.) + //}); + + //return GetTreeAttribute(tree.GetRuntimeType()); } - internal static Attempt TryGetControllerTree(this ApplicationTree appTree) + private Type GetControllerType(ApplicationTree tree) { - //get reference to all TreeApiControllers - var controllerTrees = Current.UmbracoApiControllerTypes - .Where(TypeHelper.IsTypeAssignableFrom) - .ToArray(); + throw new NotImplementedException(); + } + - //find the one we're looking for - var foundControllerTree = controllerTrees.FirstOrDefault(x => x == appTree.GetRuntimeType()); - if (foundControllerTree == null) - { - return Attempt.Fail(new InstanceNotFoundException("Could not find tree of type " + appTree.Type + " in any loaded DLLs")); - } - return Attempt.Succeed(foundControllerTree); + internal Attempt TryGetControllerTree(ApplicationTree appTree) + { + throw new NotImplementedException(); + + ////get reference to all TreeApiControllers + //var controllerTrees = _apiControllers + // .Where(TypeHelper.IsTypeAssignableFrom) + // .ToArray(); + + ////find the one we're looking for + //var foundControllerTree = controllerTrees.FirstOrDefault(x => x == appTree.GetRuntimeType()); + //if (foundControllerTree == null) + //{ + // return Attempt.Fail(new InstanceNotFoundException("Could not find tree of type " + appTree.Type + " in any loaded DLLs")); + //} + //return Attempt.Succeed(foundControllerTree); } /// @@ -73,9 +98,9 @@ namespace Umbraco.Web.Trees /// /// This ensures that authorization filters are applied to the sub request /// - internal static async Task> TryGetRootNodeFromControllerTree(this ApplicationTree appTree, FormDataCollection formCollection, HttpControllerContext controllerContext) + internal async Task> TryGetRootNodeFromControllerTree(ApplicationTree appTree, FormDataCollection formCollection, HttpControllerContext controllerContext) { - var foundControllerTreeAttempt = appTree.TryGetControllerTree(); + var foundControllerTreeAttempt = TryGetControllerTree(appTree); if (foundControllerTreeAttempt.Success == false) { return Attempt.Fail(foundControllerTreeAttempt.Exception); @@ -110,12 +135,15 @@ namespace Umbraco.Web.Trees if (WebApiVersionCheck.WebApiVersion >= Version.Parse("5.0.0")) { - //In WebApi2, this is required to be set: - // proxiedControllerContext.RequestContext = controllerContext.RequestContext - // but we need to do this with reflection because of codebase changes between version 4/5 - //NOTE: Use TypeHelper here since the reflection is cached - var controllerContextRequestContext = TypeHelper.GetProperty(controllerContext.GetType(), "RequestContext").GetValue(controllerContext); - TypeHelper.GetProperty(proxiedControllerContext.GetType(), "RequestContext").SetValue(proxiedControllerContext, controllerContextRequestContext); + //fixme - will this 'just' work now? + proxiedControllerContext.RequestContext = controllerContext.RequestContext; + + ////In WebApi2, this is required to be set: + //// proxiedControllerContext.RequestContext = controllerContext.RequestContext + //// but we need to do this with reflection because of codebase changes between version 4/5 + ////NOTE: Use TypeHelper here since the reflection is cached + //var controllerContextRequestContext = TypeHelper.GetProperty(controllerContext.GetType(), "RequestContext").GetValue(controllerContext); + //TypeHelper.GetProperty(proxiedControllerContext.GetType(), "RequestContext").SetValue(proxiedControllerContext, controllerContextRequestContext); } instance.ControllerContext = proxiedControllerContext; @@ -123,13 +151,17 @@ namespace Umbraco.Web.Trees if (WebApiVersionCheck.WebApiVersion >= Version.Parse("5.0.0")) { - //now we can change the request context's route data to be the proxied route data - NOTE: we cannot do this directly above - // because it will detect that the request context is different throw an exception. This is a change in webapi2 and we need to set - // this with reflection due to codebase changes between version 4/5 - // instance.RequestContext.RouteData = proxiedRouteData; - //NOTE: Use TypeHelper here since the reflection is cached - var instanceRequestContext = TypeHelper.GetProperty(typeof(ApiController), "RequestContext").GetValue(instance); - TypeHelper.GetProperty(instanceRequestContext.GetType(), "RouteData").SetValue(instanceRequestContext, proxiedRouteData); + + //fixme - will this 'just' work now? + instance.RequestContext.RouteData = proxiedRouteData; + + ////now we can change the request context's route data to be the proxied route data - NOTE: we cannot do this directly above + //// because it will detect that the request context is different throw an exception. This is a change in webapi2 and we need to set + //// this with reflection due to codebase changes between version 4/5 + //// instance.RequestContext.RouteData = proxiedRouteData; + ////NOTE: Use TypeHelper here since the reflection is cached + //var instanceRequestContext = TypeHelper.GetProperty(typeof(ApiController), "RequestContext").GetValue(instance); + //TypeHelper.GetProperty(instanceRequestContext.GetType(), "RouteData").SetValue(instanceRequestContext, proxiedRouteData); } //invoke auth filters for this sub request @@ -143,13 +175,13 @@ namespace Umbraco.Web.Trees //return the root var node = instance.GetRootNode(formCollection); return node == null - ? Attempt.Fail(new InvalidOperationException("Could not return a root node for tree " + appTree.Type)) + ? Attempt.Fail(new InvalidOperationException("Could not return a root node for tree " + appTree.Alias)) : Attempt.Succeed(node); } - internal static Attempt TryLoadFromControllerTree(this ApplicationTree appTree, string id, FormDataCollection formCollection, HttpControllerContext controllerContext) + internal Attempt TryLoadFromControllerTree(ApplicationTree appTree, string id, FormDataCollection formCollection, HttpControllerContext controllerContext) { - var foundControllerTreeAttempt = appTree.TryGetControllerTree(); + var foundControllerTreeAttempt = TryGetControllerTree(appTree); if (foundControllerTreeAttempt.Success == false) return Attempt.Fail(foundControllerTreeAttempt.Exception); diff --git a/src/Umbraco.Web/UI/Pages/UmbracoEnsuredPage.cs b/src/Umbraco.Web/UI/Pages/UmbracoEnsuredPage.cs index bb9ce3c421..9e632eabc9 100644 --- a/src/Umbraco.Web/UI/Pages/UmbracoEnsuredPage.cs +++ b/src/Umbraco.Web/UI/Pages/UmbracoEnsuredPage.cs @@ -29,12 +29,14 @@ namespace Umbraco.Web.UI.Pages var treeAuth = this.GetType().GetCustomAttribute(true); if (treeAuth != null) { - var treeByAlias = Current.Services.ApplicationTreeService - .GetByAlias(treeAuth.TreeAlias); - if (treeByAlias != null) - { - CurrentApp = treeByAlias.ApplicationAlias; - } + throw new NotImplementedException(); + + //var treeByAlias = Current.Services.ApplicationTreeService + // .GetByAlias(treeAuth.TreeAlias); + //if (treeByAlias != null) + //{ + // CurrentApp = treeByAlias.ApplicationAlias; + //} } } diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index b0142771d2..f1d15e9ea6 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -166,6 +166,8 @@ + + @@ -181,6 +183,9 @@ + + + @@ -217,6 +222,7 @@ + @@ -585,9 +591,7 @@ - - @@ -890,7 +894,6 @@ - @@ -969,7 +972,7 @@ - + @@ -1236,7 +1239,7 @@ True Reference.map - + diff --git a/src/Umbraco.Web/UrlHelperExtensions.cs b/src/Umbraco.Web/UrlHelperExtensions.cs index 9b1c282aab..0a04539967 100644 --- a/src/Umbraco.Web/UrlHelperExtensions.cs +++ b/src/Umbraco.Web/UrlHelperExtensions.cs @@ -13,7 +13,6 @@ using Umbraco.Web.Composing; using Umbraco.Web.Editors; using Umbraco.Web.Mvc; using Umbraco.Web.WebApi; -using Umbraco.Web.WebServices; namespace Umbraco.Web { diff --git a/src/Umbraco.Web/WebApi/Filters/LegacyTreeAuthorizeAttribute.cs b/src/Umbraco.Web/WebApi/Filters/LegacyTreeAuthorizeAttribute.cs deleted file mode 100644 index 5d1b90a09d..0000000000 --- a/src/Umbraco.Web/WebApi/Filters/LegacyTreeAuthorizeAttribute.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.Web.Http; -using System.Web.Http.Controllers; -using Umbraco.Core; -using Umbraco.Web.Composing; - -namespace Umbraco.Web.WebApi.Filters -{ - internal class LegacyTreeAuthorizeAttribute : AuthorizeAttribute - { - protected override bool IsAuthorized(HttpActionContext actionContext) - { - var httpContext = actionContext.Request.TryGetHttpContext(); - if (httpContext) - { - var treeRequest = httpContext.Result.Request.QueryString["treeType"]; - if (treeRequest.IsNullOrWhiteSpace()) return false; - - var tree = Current.Services.ApplicationTreeService.GetByAlias(treeRequest); - if (tree == null) return false; - - return UmbracoContext.Current.Security.CurrentUser != null - && UmbracoContext.Current.Security.UserHasSectionAccess(tree.ApplicationAlias, UmbracoContext.Current.Security.CurrentUser); - } - return false; - - - } - } -} diff --git a/src/Umbraco.Web/WebApi/Filters/UmbracoTreeAuthorizeAttribute.cs b/src/Umbraco.Web/WebApi/Filters/UmbracoTreeAuthorizeAttribute.cs index 7318c9d9b8..cc483db416 100644 --- a/src/Umbraco.Web/WebApi/Filters/UmbracoTreeAuthorizeAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/UmbracoTreeAuthorizeAttribute.cs @@ -1,4 +1,5 @@ -using System.Linq; +using System; +using System.Linq; using System.Web.Http.Controllers; using System.Web.Http.Filters; using Umbraco.Core; @@ -40,16 +41,18 @@ namespace Umbraco.Web.WebApi.Filters return true; } - var apps = _treeAliases.Select(x => Current.Services.ApplicationTreeService - .GetByAlias(x)) - .WhereNotNull() - .Select(x => x.ApplicationAlias) - .Distinct() - .ToArray(); + throw new NotImplementedException(); - return Current.UmbracoContext.Security.CurrentUser != null - && apps.Any(app => Current.UmbracoContext.Security.UserHasSectionAccess( - app, Current.UmbracoContext.Security.CurrentUser)); + //var apps = _treeAliases.Select(x => Current.Services.ApplicationTreeService + // .GetByAlias(x)) + // .WhereNotNull() + // .Select(x => x.ApplicationAlias) + // .Distinct() + // .ToArray(); + + //return Current.UmbracoContext.Security.CurrentUser != null + // && apps.Any(app => Current.UmbracoContext.Security.UserHasSectionAccess( + // app, Current.UmbracoContext.Security.CurrentUser)); } } } diff --git a/src/Umbraco.Web/WebApi/UmbracoApiController.cs b/src/Umbraco.Web/WebApi/UmbracoApiController.cs index 3db3610cc2..586160cfa0 100644 --- a/src/Umbraco.Web/WebApi/UmbracoApiController.cs +++ b/src/Umbraco.Web/WebApi/UmbracoApiController.cs @@ -23,8 +23,8 @@ namespace Umbraco.Web.WebApi /// /// Initialize a new instance of the with all its dependencies. /// - protected UmbracoApiController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) - : base(globalSettings, umbracoContextAccessor, sqlContext, services, applicationCache, logger, runtimeState) + protected UmbracoApiController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) + : base(globalSettings, umbracoContext, sqlContext, services, applicationCache, logger, runtimeState) { } } } diff --git a/src/Umbraco.Web/WebApi/UmbracoApiControllerBase.cs b/src/Umbraco.Web/WebApi/UmbracoApiControllerBase.cs index 21b88cc919..106ef60e0b 100644 --- a/src/Umbraco.Web/WebApi/UmbracoApiControllerBase.cs +++ b/src/Umbraco.Web/WebApi/UmbracoApiControllerBase.cs @@ -21,7 +21,6 @@ namespace Umbraco.Web.WebApi [FeatureAuthorize] public abstract class UmbracoApiControllerBase : ApiController { - private readonly IUmbracoContextAccessor _umbracoContextAccessor; private UmbracoHelper _umbracoHelper; // note: all Umbraco controllers have two constructors: one with all dependencies, which should be used, @@ -36,7 +35,7 @@ namespace Umbraco.Web.WebApi protected UmbracoApiControllerBase() : this( Current.Factory.GetInstance(), - Current.Factory.GetInstance(), + Current.Factory.GetInstance().UmbracoContext, Current.Factory.GetInstance(), Current.Factory.GetInstance(), Current.Factory.GetInstance(), @@ -48,15 +47,15 @@ namespace Umbraco.Web.WebApi /// /// Initializes a new instance of the class with all its dependencies. /// - protected UmbracoApiControllerBase(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) + protected UmbracoApiControllerBase(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) { GlobalSettings = globalSettings; - _umbracoContextAccessor = umbracoContextAccessor; SqlContext = sqlContext; Services = services; ApplicationCache = applicationCache; Logger = logger; RuntimeState = runtimeState; + UmbracoContext = umbracoContext; } /// @@ -73,8 +72,8 @@ namespace Umbraco.Web.WebApi /// /// Gets the Umbraco context. /// - public virtual UmbracoContext UmbracoContext => _umbracoContextAccessor.UmbracoContext; - + public virtual UmbracoContext UmbracoContext { get; } + /// /// Gets the sql context. /// diff --git a/src/Umbraco.Web/WebApi/UmbracoApiControllerTypeCollection.cs b/src/Umbraco.Web/WebApi/UmbracoApiControllerTypeCollection.cs index cdb1aa2f51..d84ab3fe4a 100644 --- a/src/Umbraco.Web/WebApi/UmbracoApiControllerTypeCollection.cs +++ b/src/Umbraco.Web/WebApi/UmbracoApiControllerTypeCollection.cs @@ -8,6 +8,8 @@ namespace Umbraco.Web.WebApi // which we are not doing at the moment // we can inherit from BuilderCollectionBase and just be enumerable + //fixme: this should be LazyCollectionBuilderBase ? + public class UmbracoApiControllerTypeCollection : BuilderCollectionBase { public UmbracoApiControllerTypeCollection(IEnumerable items) diff --git a/src/Umbraco.Web/WebApi/UmbracoAuthorizedApiController.cs b/src/Umbraco.Web/WebApi/UmbracoAuthorizedApiController.cs index 4ae9c00a47..e8c0a3c674 100644 --- a/src/Umbraco.Web/WebApi/UmbracoAuthorizedApiController.cs +++ b/src/Umbraco.Web/WebApi/UmbracoAuthorizedApiController.cs @@ -40,8 +40,8 @@ namespace Umbraco.Web.WebApi /// /// Initializes a new instance of the class with all its dependencies. /// - protected UmbracoAuthorizedApiController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) - : base(globalSettings, umbracoContextAccessor, sqlContext, services, applicationCache, logger, runtimeState) + protected UmbracoAuthorizedApiController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) + : base(globalSettings, umbracoContext, sqlContext, services, applicationCache, logger, runtimeState) { } /// diff --git a/src/Umbraco.Web/_Legacy/PackageActions/addApplication.cs b/src/Umbraco.Web/_Legacy/PackageActions/addApplication.cs index 26116820e6..c6d5ba30d9 100644 --- a/src/Umbraco.Web/_Legacy/PackageActions/addApplication.cs +++ b/src/Umbraco.Web/_Legacy/PackageActions/addApplication.cs @@ -1,61 +1,61 @@ -using System; -using System.Xml; -using System.Xml.Linq; -using Umbraco.Core; -using Umbraco.Core._Legacy.PackageActions; -using Umbraco.Web.Composing; +//using System; +//using System.Xml; +//using System.Xml.Linq; +//using Umbraco.Core; +//using Umbraco.Core._Legacy.PackageActions; +//using Umbraco.Web.Composing; -namespace Umbraco.Web._Legacy.PackageActions -{ - /// - /// This class implements the IPackageAction Interface, used to execute code when packages are installed. - /// All IPackageActions only takes a PackageName and a XmlNode as input, and executes based on the data in the xmlnode. - /// - public class AddApplication : IPackageAction - { +//namespace Umbraco.Web._Legacy.PackageActions +//{ +// /// +// /// This class implements the IPackageAction Interface, used to execute code when packages are installed. +// /// All IPackageActions only takes a PackageName and a XmlNode as input, and executes based on the data in the xmlnode. +// /// +// public class AddApplication : IPackageAction +// { - #region IPackageAction Members +// #region IPackageAction Members - /// - /// Installs a new application in umbraco. - /// - /// Name of the package. - /// The XML data. - /// - /// - /// - /// true if successfull - public bool Execute(string packageName, XElement xmlData) - { - string name = xmlData.AttributeValue("appName"); - string alias = xmlData.AttributeValue("appAlias"); - string icon = xmlData.AttributeValue("appIcon"); +// /// +// /// Installs a new application in umbraco. +// /// +// /// Name of the package. +// /// The XML data. +// /// +// /// +// /// +// /// true if successfull +// public bool Execute(string packageName, XElement xmlData) +// { +// string name = xmlData.AttributeValue("appName"); +// string alias = xmlData.AttributeValue("appAlias"); +// string icon = xmlData.AttributeValue("appIcon"); - Current.Services.SectionService.MakeNew(name, alias, icon); +// Current.Services.SectionService.MakeNew(name, alias, icon); - return true; - } +// return true; +// } - public bool Undo(string packageName, XElement xmlData) - { - string alias = xmlData.AttributeValue("appAlias"); - var section = Current.Services.SectionService.GetByAlias(alias); - if (section != null) - { - Current.Services.SectionService.DeleteSection(section); - } - return true; - } - /// - /// Action alias. - /// - /// - public string Alias() - { - return "addApplication"; - } +// public bool Undo(string packageName, XElement xmlData) +// { +// string alias = xmlData.AttributeValue("appAlias"); +// var section = Current.Services.SectionService.GetByAlias(alias); +// if (section != null) +// { +// Current.Services.SectionService.DeleteSection(section); +// } +// return true; +// } +// /// +// /// Action alias. +// /// +// /// +// public string Alias() +// { +// return "addApplication"; +// } - #endregion +// #endregion - } -} +// } +//} From cfe1b17eecc5a06b56530610d9e04158033e66a4 Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 17 Jan 2019 16:40:11 +1100 Subject: [PATCH 118/437] Gets trees and sections loading now in a much more simplified way without any xml, now to cleanup --- src/Umbraco.Tests/Testing/UmbracoTestBase.cs | 2 +- src/Umbraco.Web/Composing/Current.cs | 7 + .../Editors/BackOfficeServerVariables.cs | 2 +- src/Umbraco.Web/Editors/EntityController.cs | 6 +- src/Umbraco.Web/Editors/SectionController.cs | 8 +- .../Models/ContentEditing/ApplicationTree.cs | 177 --------------- .../Mvc/SurfaceControllerTypeCollection.cs | 4 +- src/Umbraco.Web/Runtime/WebRuntimeComposer.cs | 13 +- .../Search/SearchableTreeCollection.cs | 8 +- .../Services/IApplicationTreeService.cs | 153 ------------- src/Umbraco.Web/Services/ISectionService.cs | 89 +------- src/Umbraco.Web/Services/ITreeService.cs | 49 +++++ ...plicationTreeService.cs => TreeService.cs} | 40 ++-- src/Umbraco.Web/Trees/ApplicationTree.cs | 69 ++++++ .../Trees/ApplicationTreeController.cs | 173 +++++++++++---- src/Umbraco.Web/Trees/ITree.cs | 31 +++ src/Umbraco.Web/Trees/TreeAttribute.cs | 35 +-- src/Umbraco.Web/Trees/TreeCollection.cs | 21 +- src/Umbraco.Web/Trees/TreeController.cs | 55 +++-- src/Umbraco.Web/Trees/TreeControllerBase.cs | 14 +- .../Trees/TreeControllerResolver.cs | 203 ------------------ .../Trees/UserPermissionsTreeController.cs | 52 ----- src/Umbraco.Web/Umbraco.Web.csproj | 10 +- .../Filters/UmbracoTreeAuthorizeAttribute.cs | 20 +- src/Umbraco.Web/WebApi/MvcVersionCheck.cs | 10 - .../UmbracoApiControllerTypeCollection.cs | 2 - 26 files changed, 425 insertions(+), 828 deletions(-) delete mode 100644 src/Umbraco.Web/Models/ContentEditing/ApplicationTree.cs delete mode 100644 src/Umbraco.Web/Services/IApplicationTreeService.cs create mode 100644 src/Umbraco.Web/Services/ITreeService.cs rename src/Umbraco.Web/Services/{ApplicationTreeService.cs => TreeService.cs} (95%) create mode 100644 src/Umbraco.Web/Trees/ApplicationTree.cs create mode 100644 src/Umbraco.Web/Trees/ITree.cs delete mode 100644 src/Umbraco.Web/Trees/TreeControllerResolver.cs delete mode 100644 src/Umbraco.Web/Trees/UserPermissionsTreeController.cs delete mode 100644 src/Umbraco.Web/WebApi/MvcVersionCheck.cs diff --git a/src/Umbraco.Tests/Testing/UmbracoTestBase.cs b/src/Umbraco.Tests/Testing/UmbracoTestBase.cs index a79531af74..0a0999f2dc 100644 --- a/src/Umbraco.Tests/Testing/UmbracoTestBase.cs +++ b/src/Umbraco.Tests/Testing/UmbracoTestBase.cs @@ -342,7 +342,7 @@ namespace Umbraco.Tests.Testing Composition.ComposeServices(); // composition root is doing weird things, fix - Composition.RegisterUnique(); + Composition.RegisterUnique(); Composition.RegisterUnique(); // somehow property editor ends up wanting this diff --git a/src/Umbraco.Web/Composing/Current.cs b/src/Umbraco.Web/Composing/Current.cs index 1e8f3d17f7..d887720063 100644 --- a/src/Umbraco.Web/Composing/Current.cs +++ b/src/Umbraco.Web/Composing/Current.cs @@ -25,6 +25,7 @@ using Umbraco.Web.HealthCheck; using Umbraco.Web.Mvc; using Umbraco.Web.PublishedCache; using Umbraco.Web.Routing; +using Umbraco.Web.Services; using Umbraco.Web.WebApi; using CoreCurrent = Umbraco.Core.Composing.Current; @@ -135,6 +136,12 @@ namespace Umbraco.Web.Composing internal static IPublishedSnapshotService PublishedSnapshotService => Factory.GetInstance(); + public static ITreeService TreeService + => Factory.GetInstance(); + + public static ISectionService SectionService + => Factory.GetInstance(); + #endregion #region Web Constants diff --git a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs index 65ab27d76a..1525dd5808 100644 --- a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs +++ b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs @@ -408,7 +408,7 @@ namespace Umbraco.Web.Editors let pluginAttr = p.attributes.OfType().Single() select new Dictionary { - {"alias", treeAttr.Alias}, {"packageFolder", pluginAttr.AreaName} + {"alias", treeAttr.TreeAlias}, {"packageFolder", pluginAttr.AreaName} }).ToArray(); } diff --git a/src/Umbraco.Web/Editors/EntityController.cs b/src/Umbraco.Web/Editors/EntityController.cs index c8368d11b0..ca1a6a12bb 100644 --- a/src/Umbraco.Web/Editors/EntityController.cs +++ b/src/Umbraco.Web/Editors/EntityController.cs @@ -42,10 +42,10 @@ namespace Umbraco.Web.Editors [PluginController("UmbracoApi")] public class EntityController : UmbracoAuthorizedJsonController { - private readonly IApplicationTreeService _treeService; + private readonly ITreeService _treeService; public EntityController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState, - IApplicationTreeService treeService) + ITreeService treeService) : base(globalSettings, umbracoContext, sqlContext, services, applicationCache, logger, runtimeState) { _treeService = treeService; @@ -148,7 +148,7 @@ namespace Umbraco.Web.Editors var searchableTreeAttribute = searchableTree.Value.SearchableTree.GetType().GetCustomAttribute(false); - result[tree.GetRootNodeDisplayName(Services.TextService)] = new TreeSearchResult + result[ApplicationTree.GetRootNodeDisplayName(tree, Services.TextService)] = new TreeSearchResult { Results = searchableTree.Value.SearchableTree.Search(query, 200, 0, out var total), TreeAlias = searchableTree.Key, diff --git a/src/Umbraco.Web/Editors/SectionController.cs b/src/Umbraco.Web/Editors/SectionController.cs index 7b484b09b1..d68f062f61 100644 --- a/src/Umbraco.Web/Editors/SectionController.cs +++ b/src/Umbraco.Web/Editors/SectionController.cs @@ -24,16 +24,14 @@ namespace Umbraco.Web.Editors { private readonly Dashboards _dashboards; private readonly ISectionService _sectionService; - private readonly TreeControllerResolver _treeControllerResolver; - private readonly IApplicationTreeService _treeService; + private readonly ITreeService _treeService; public SectionController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState, - Dashboards dashboards, ISectionService sectionService, TreeControllerResolver treeControllerResolver, IApplicationTreeService treeService) + Dashboards dashboards, ISectionService sectionService, ITreeService treeService) : base(globalSettings, umbracoContext, sqlContext, services, applicationCache, logger, runtimeState) { _dashboards = dashboards; _sectionService = sectionService; - _treeControllerResolver = treeControllerResolver; _treeService = treeService; } @@ -45,7 +43,7 @@ namespace Umbraco.Web.Editors // this is a bit nasty since we'll be proxying via the app tree controller but we sort of have to do that // since tree's by nature are controllers and require request contextual data - var appTreeController = new ApplicationTreeController(GlobalSettings, UmbracoContext, SqlContext, Services, ApplicationCache, Logger, RuntimeState, _treeControllerResolver, _treeService) + var appTreeController = new ApplicationTreeController(GlobalSettings, UmbracoContext, SqlContext, Services, ApplicationCache, Logger, RuntimeState, _treeService) { ControllerContext = ControllerContext }; diff --git a/src/Umbraco.Web/Models/ContentEditing/ApplicationTree.cs b/src/Umbraco.Web/Models/ContentEditing/ApplicationTree.cs deleted file mode 100644 index e9befb0e27..0000000000 --- a/src/Umbraco.Web/Models/ContentEditing/ApplicationTree.cs +++ /dev/null @@ -1,177 +0,0 @@ -using System; -using System.Diagnostics; -using Umbraco.Core.Services; - -namespace Umbraco.Web.Models.ContentEditing -{ - [DebuggerDisplay("Tree - {Alias} ({ApplicationAlias})")] - public class ApplicationTree - { - //private static readonly ConcurrentDictionary ResolvedTypes = new ConcurrentDictionary(); - - ///// - ///// Initializes a new instance of the class. - ///// - //public ApplicationTree() { } - - ///// - ///// Initializes a new instance of the class. - ///// - ///// if set to true [initialize]. - ///// The sort order. - ///// The application alias. - ///// The tree alias. - ///// The tree title. - ///// The icon closed. - ///// The icon opened. - ///// The tree type. - //public ApplicationTree(bool initialize, int sortOrder, string applicationAlias, string alias, string title, string iconClosed, string iconOpened, string type) - //{ - // //Initialize = initialize; - // SortOrder = sortOrder; - // ApplicationAlias = applicationAlias; - // Alias = alias; - // Title = title; - // IconClosed = iconClosed; - // IconOpened = iconOpened; - // Type = type; - - //} - - public ApplicationTree(int sortOrder, string applicationAlias, string alias, string title) - { - SortOrder = sortOrder; - ApplicationAlias = applicationAlias; - Alias = alias; - Title = title; - } - - ///// - ///// Gets or sets a value indicating whether this should initialize. - ///// - ///// true if initialize; otherwise, false. - //public bool Initialize { get; set; } - - /// - /// Gets or sets the sort order. - /// - /// The sort order. - public int SortOrder { get; set; } - - /// - /// Gets the application alias. - /// - /// The application alias. - public string ApplicationAlias { get; } - - /// - /// Gets the tree alias. - /// - /// The alias. - public string Alias { get; } - - /// - /// Gets or sets the tree title (fallback if the tree alias isn't localized) - /// - /// The title. - public string Title { get; set; } - - ///// - ///// Gets or sets the icon closed. - ///// - ///// The icon closed. - //public string IconClosed { get; set; } - - ///// - ///// Gets or sets the icon opened. - ///// - ///// The icon opened. - //public string IconOpened { get; set; } - - ///// - ///// Gets or sets the tree type assembly name. - ///// - ///// The type. - //public string Type { get; set; } - - /// - /// Returns the localized root node display name - /// - /// - /// - public string GetRootNodeDisplayName(ILocalizedTextService textService) - { - var label = $"[{Alias}]"; - - // try to look up a the localized tree header matching the tree alias - var localizedLabel = textService.Localize("treeHeaders/" + Alias); - - // if the localizedLabel returns [alias] then return the title if it's defined - if (localizedLabel != null && localizedLabel.Equals(label, StringComparison.InvariantCultureIgnoreCase)) - { - if (string.IsNullOrEmpty(Title) == false) - label = Title; - } - else - { - // the localizedLabel translated into something that's not just [alias], so use the translation - label = localizedLabel; - } - - return label; - } - - //private Type _runtimeType; - - ///// - ///// Returns the CLR type based on it's assembly name stored in the config - ///// - ///// - //public Type GetRuntimeType() - //{ - // return _runtimeType ?? (_runtimeType = System.Type.GetType(Type)); - //} - - ///// - ///// Used to try to get and cache the tree type - ///// - ///// - ///// - //internal static Type TryGetType(string type) - //{ - // try - // { - // return ResolvedTypes.GetOrAdd(type, s => - // { - // var result = System.Type.GetType(type); - // if (result != null) - // { - // return result; - // } - - // //we need to implement a bit of a hack here due to some trees being renamed and backwards compat - // var parts = type.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries); - // if (parts.Length != 2) - // throw new InvalidOperationException("Could not resolve type"); - // if (parts[1].Trim() != "Umbraco.Web" || parts[0].StartsWith("Umbraco.Web.Trees") == false || parts[0].EndsWith("Controller")) - // throw new InvalidOperationException("Could not resolve type"); - - // //if it's one of our controllers but it's not suffixed with "Controller" then add it and try again - // var tempType = parts[0] + "Controller, Umbraco.Web"; - - // result = System.Type.GetType(tempType); - // if (result != null) - // return result; - - // throw new InvalidOperationException("Could not resolve type"); - // }); - // } - // catch (InvalidOperationException) - // { - // //swallow, this is our own exception, couldn't find the type - // // fixme bad use of exceptions here! - // return null; - // } - //} - } -} diff --git a/src/Umbraco.Web/Mvc/SurfaceControllerTypeCollection.cs b/src/Umbraco.Web/Mvc/SurfaceControllerTypeCollection.cs index eef6ab1ca2..d9577417cc 100644 --- a/src/Umbraco.Web/Mvc/SurfaceControllerTypeCollection.cs +++ b/src/Umbraco.Web/Mvc/SurfaceControllerTypeCollection.cs @@ -7,9 +7,7 @@ namespace Umbraco.Web.Mvc // unless we want to modify the content of the collection // which we are not doing at the moment // we can inherit from BuilderCollectionBase and just be enumerable - - //fixme: this should be LazyCollectionBuilderBase ? - + public class SurfaceControllerTypeCollection : BuilderCollectionBase { public SurfaceControllerTypeCollection(IEnumerable items) diff --git a/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs b/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs index 0ef9adddb7..047d080a88 100644 --- a/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs +++ b/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs @@ -95,7 +95,7 @@ namespace Umbraco.Web.Runtime // replace some services composition.RegisterUnique(); composition.RegisterUnique(); - composition.RegisterUnique(); + composition.RegisterUnique(); composition.RegisterUnique(); composition.RegisterUnique(factory => ExamineManager.Instance); @@ -125,9 +125,11 @@ namespace Umbraco.Web.Runtime composition.WithCollectionBuilder() .Add(() => composition.TypeLoader.GetTypes()); + //we need to eagerly scan controller types since they will need to be routed var surfaceControllerTypes = new SurfaceControllerTypeCollection(composition.TypeLoader.GetSurfaceControllers()); composition.RegisterUnique(surfaceControllerTypes); + //we need to eagerly scan controller types since they will need to be routed var umbracoApiControllerTypes = new UmbracoApiControllerTypeCollection(composition.TypeLoader.GetUmbracoApiControllers()); composition.RegisterUnique(umbracoApiControllerTypes); @@ -198,8 +200,13 @@ namespace Umbraco.Web.Runtime .Add(() => composition.TypeLoader.GetTypes()); // register back office trees - composition.WithCollectionBuilder() - .Add(() => composition.TypeLoader.GetTypes()); + foreach (var treeControllerType in umbracoApiControllerTypes) + { + var attribute = treeControllerType.GetCustomAttribute(false); + if (attribute == null) continue; + var tree = new ApplicationTree(attribute.SortOrder, attribute.ApplicationAlias, attribute.TreeAlias, attribute.TreeTitle, treeControllerType, attribute.IsSingleNodeTree); + composition.WithCollectionBuilder().AddTree(tree); + } } } } diff --git a/src/Umbraco.Web/Search/SearchableTreeCollection.cs b/src/Umbraco.Web/Search/SearchableTreeCollection.cs index 2b1baa5194..032782b466 100644 --- a/src/Umbraco.Web/Search/SearchableTreeCollection.cs +++ b/src/Umbraco.Web/Search/SearchableTreeCollection.cs @@ -14,13 +14,13 @@ namespace Umbraco.Web.Search { private readonly Dictionary _dictionary; - public SearchableTreeCollection(IEnumerable items, IApplicationTreeService treeService) + public SearchableTreeCollection(IEnumerable items, ITreeService treeService) : base(items) { _dictionary = CreateDictionary(treeService); } - private Dictionary CreateDictionary(IApplicationTreeService treeService) + private Dictionary CreateDictionary(ITreeService treeService) { var appTrees = treeService.GetAll() .OrderBy(x => x.SortOrder) @@ -29,10 +29,10 @@ namespace Umbraco.Web.Search var searchableTrees = this.ToArray(); foreach (var appTree in appTrees) { - var found = searchableTrees.FirstOrDefault(x => x.TreeAlias.InvariantEquals(appTree.Alias)); + var found = searchableTrees.FirstOrDefault(x => x.TreeAlias.InvariantEquals(appTree.TreeAlias)); if (found != null) { - dictionary[found.TreeAlias] = new SearchableApplicationTree(appTree.ApplicationAlias, appTree.Alias, found); + dictionary[found.TreeAlias] = new SearchableApplicationTree(appTree.ApplicationAlias, appTree.TreeAlias, found); } } return dictionary; diff --git a/src/Umbraco.Web/Services/IApplicationTreeService.cs b/src/Umbraco.Web/Services/IApplicationTreeService.cs deleted file mode 100644 index 1fd7bc939a..0000000000 --- a/src/Umbraco.Web/Services/IApplicationTreeService.cs +++ /dev/null @@ -1,153 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Umbraco.Core.Models; -using Umbraco.Core.Models.ContentEditing; -using Umbraco.Web.Models.ContentEditing; - -namespace Umbraco.Web.Services -{ - public interface IApplicationTreeService - { - ///// - ///// Creates a new application tree. - ///// - ///// if set to true [initialize]. - ///// The sort order. - ///// The application alias. - ///// The alias. - ///// The title. - ///// The icon closed. - ///// The icon opened. - ///// The type. - //void MakeNew(bool initialize, int sortOrder, string applicationAlias, string alias, string title, string iconClosed, string iconOpened, string type); - - ///// - ///// Saves this instance. - ///// - //void SaveTree(ApplicationTree tree); - - ///// - ///// Deletes this instance. - ///// - //void DeleteTree(ApplicationTree tree); - - /// - /// Gets an ApplicationTree by it's tree alias. - /// - /// The tree alias. - /// An ApplicationTree instance - ApplicationTree GetByAlias(string treeAlias); - - /// - /// Gets all applicationTrees registered in umbraco from the umbracoAppTree table.. - /// - /// Returns a ApplicationTree Array - IEnumerable GetAll(); - - /// - /// Gets the application tree for the applcation with the specified alias - /// - /// The application alias. - /// Returns a ApplicationTree Array - IEnumerable GetApplicationTrees(string applicationAlias); - - ///// - ///// Gets the application tree for the applcation with the specified alias - ///// - ///// The application alias. - ///// - ///// Returns a ApplicationTree Array - //IEnumerable GetApplicationTrees(string applicationAlias, bool onlyInitialized); - - /// - /// Gets the grouped application trees for the application with the specified alias - /// - /// - /// - IDictionary> GetGroupedApplicationTrees(string applicationAlias); - } - - /// - /// Purely used to allow a service context to create the default services - /// - internal class EmptyApplicationTreeService : IApplicationTreeService - { - ///// - ///// Creates a new application tree. - ///// - ///// if set to true [initialize]. - ///// The sort order. - ///// The application alias. - ///// The alias. - ///// The title. - ///// The icon closed. - ///// The icon opened. - ///// The type. - //public void MakeNew(bool initialize, int sortOrder, string applicationAlias, string alias, string title, string iconClosed, string iconOpened, string type) - //{ - // throw new System.NotImplementedException(); - //} - - ///// - ///// Saves this instance. - ///// - //public void SaveTree(ApplicationTree tree) - //{ - // throw new System.NotImplementedException(); - //} - - ///// - ///// Deletes this instance. - ///// - //public void DeleteTree(ApplicationTree tree) - //{ - // throw new System.NotImplementedException(); - //} - - /// - /// Gets an ApplicationTree by it's tree alias. - /// - /// The tree alias. - /// An ApplicationTree instance - public ApplicationTree GetByAlias(string treeAlias) - { - throw new System.NotImplementedException(); - } - - /// - /// Gets all applicationTrees registered in umbraco from the umbracoAppTree table.. - /// - /// Returns a ApplicationTree Array - public IEnumerable GetAll() - { - throw new System.NotImplementedException(); - } - - public IDictionary> GetGroupedApplicationTrees(string applicationAlias) - { - throw new System.NotImplementedException(); - } - - /// - /// Gets the application tree for the applcation with the specified alias - /// - /// The application alias. - /// Returns a ApplicationTree Array - public IEnumerable GetApplicationTrees(string applicationAlias) - { - throw new System.NotImplementedException(); - } - - /// - /// Gets the application tree for the applcation with the specified alias - /// - /// The application alias. - /// - /// Returns a ApplicationTree Array - public IEnumerable GetApplicationTrees(string applicationAlias, bool onlyInitialized) - { - throw new System.NotImplementedException(); - } - } -} diff --git a/src/Umbraco.Web/Services/ISectionService.cs b/src/Umbraco.Web/Services/ISectionService.cs index 560805634f..c325020cf1 100644 --- a/src/Umbraco.Web/Services/ISectionService.cs +++ b/src/Umbraco.Web/Services/ISectionService.cs @@ -25,92 +25,7 @@ namespace Umbraco.Web.Services /// The application alias. /// IBackOfficeSection GetByAlias(string appAlias); - - ///// - ///// Creates a new applcation if no application with the specified alias is found. - ///// - ///// The application name. - ///// The application alias. - ///// The application icon, which has to be located in umbraco/images/tray folder. - //void MakeNew(string name, string alias, string icon); - - ///// - ///// Makes the new. - ///// - ///// The name. - ///// The alias. - ///// The icon. - ///// The sort order. - //void MakeNew(string name, string alias, string icon, int sortOrder); - - ///// - ///// Deletes the section - ///// - //void DeleteSection(Section section); - } - - /// - /// Purely used to allow a service context to create the default services - /// - internal class EmptySectionService : ISectionService - { - /// - /// The cache storage for all applications - /// - public IEnumerable GetSections() - { - throw new System.NotImplementedException(); - } - - /// - /// Get the user's allowed sections - /// - /// - /// - public IEnumerable GetAllowedSections(int userId) - { - throw new System.NotImplementedException(); - } - - /// - /// Gets the application by its alias. - /// - /// The application alias. - /// - public IBackOfficeSection GetByAlias(string appAlias) - { - throw new System.NotImplementedException(); - } - - ///// - ///// Creates a new applcation if no application with the specified alias is found. - ///// - ///// The application name. - ///// The application alias. - ///// The application icon, which has to be located in umbraco/images/tray folder. - //public void MakeNew(string name, string alias, string icon) - //{ - // throw new System.NotImplementedException(); - //} - - ///// - ///// Makes the new. - ///// - ///// The name. - ///// The alias. - ///// The icon. - ///// The sort order. - //public void MakeNew(string name, string alias, string icon, int sortOrder) - //{ - // throw new System.NotImplementedException(); - //} - - ///// - ///// Deletes the section - ///// - //public void DeleteSection(IBackOfficeSection section) - //{ - // throw new System.NotImplementedException(); - //} + } + } diff --git a/src/Umbraco.Web/Services/ITreeService.cs b/src/Umbraco.Web/Services/ITreeService.cs new file mode 100644 index 0000000000..ce734cc5e4 --- /dev/null +++ b/src/Umbraco.Web/Services/ITreeService.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Umbraco.Core.Models; +using Umbraco.Core.Models.ContentEditing; +using Umbraco.Web.Models.ContentEditing; +using Umbraco.Web.Trees; + +namespace Umbraco.Web.Services +{ + public interface ITreeService + { + /// + /// Gets an ApplicationTree by it's tree alias. + /// + /// The tree alias. + /// An ApplicationTree instance + ApplicationTree GetByAlias(string treeAlias); + + /// + /// Gets all applicationTrees registered in umbraco from the umbracoAppTree table.. + /// + /// Returns a ApplicationTree Array + IEnumerable GetAll(); + + /// + /// Gets the application tree for the applcation with the specified alias + /// + /// The application alias. + /// Returns a ApplicationTree Array + IEnumerable GetApplicationTrees(string applicationAlias); + + ///// + ///// Gets the application tree for the applcation with the specified alias + ///// + ///// The application alias. + ///// + ///// Returns a ApplicationTree Array + //IEnumerable GetApplicationTrees(string applicationAlias, bool onlyInitialized); + + /// + /// Gets the grouped application trees for the application with the specified alias + /// + /// + /// + IDictionary> GetGroupedApplicationTrees(string applicationAlias); + } + +} diff --git a/src/Umbraco.Web/Services/ApplicationTreeService.cs b/src/Umbraco.Web/Services/TreeService.cs similarity index 95% rename from src/Umbraco.Web/Services/ApplicationTreeService.cs rename to src/Umbraco.Web/Services/TreeService.cs index 72b26e26d3..cf010f1480 100644 --- a/src/Umbraco.Web/Services/ApplicationTreeService.cs +++ b/src/Umbraco.Web/Services/TreeService.cs @@ -18,18 +18,18 @@ using Umbraco.Web.Trees; namespace Umbraco.Web.Services { - internal class ApplicationTreeService : IApplicationTreeService + internal class TreeService : ITreeService { private readonly ILogger _logger; private readonly TreeCollection _treeCollection; private static readonly object Locker = new object(); private readonly Lazy>> _groupedTrees; - public ApplicationTreeService(ILogger logger, TreeCollection treeCollection) + public TreeService(ILogger logger, TreeCollection treeCollection) { _logger = logger; _treeCollection = treeCollection; - //_groupedTrees = new Lazy>>(InitGroupedTrees); + _groupedTrees = new Lazy>>(InitGroupedTrees); } ///// @@ -233,7 +233,7 @@ namespace Umbraco.Web.Services //} /// - public ApplicationTree GetByAlias(string treeAlias) => _treeCollection.FirstOrDefault(t => t.Alias == treeAlias); + public ApplicationTree GetByAlias(string treeAlias) => _treeCollection.FirstOrDefault(t => t.TreeAlias == treeAlias); /// public IEnumerable GetAll() => _treeCollection; @@ -273,7 +273,7 @@ namespace Umbraco.Web.Services { foreach(var treeAliasInGroup in treeGroup) { - if (tree.Alias == treeAliasInGroup) + if (tree.TreeAlias == treeAliasInGroup) { if (resultGroup == null) resultGroup = new List(); resultGroup.Add(tree); @@ -286,21 +286,21 @@ namespace Umbraco.Web.Services return result; } - ///// - ///// Creates a group of all tree groups and their tree aliases - ///// - ///// - ///// - ///// Used to initialize the field - ///// - //private IReadOnlyCollection> InitGroupedTrees() - //{ - // var result = GetAll() - // .Select(x => (treeAlias: x.Alias, treeGroup: x.GetRuntimeType().GetCustomAttribute(false)?.TreeGroup)) - // .GroupBy(x => x.treeGroup, x => x.treeAlias) - // .ToList(); - // return result; - //} + /// + /// Creates a group of all tree groups and their tree aliases + /// + /// + /// + /// Used to initialize the field + /// + private IReadOnlyCollection> InitGroupedTrees() + { + var result = GetAll() + .Select(x => (treeAlias: x.TreeAlias, treeGroup: x.TreeControllerType.GetCustomAttribute(false)?.TreeGroup)) + .GroupBy(x => x.treeGroup, x => x.treeAlias) + .ToList(); + return result; + } ///// ///// Loads in the xml structure from disk if one is found, otherwise loads in an empty xml structure, calls the diff --git a/src/Umbraco.Web/Trees/ApplicationTree.cs b/src/Umbraco.Web/Trees/ApplicationTree.cs new file mode 100644 index 0000000000..5ed9847be3 --- /dev/null +++ b/src/Umbraco.Web/Trees/ApplicationTree.cs @@ -0,0 +1,69 @@ +using System; +using System.Diagnostics; +using Umbraco.Core.Services; +using Umbraco.Web.Models.Trees; + +namespace Umbraco.Web.Trees +{ + [DebuggerDisplay("Tree - {TreeAlias} ({ApplicationAlias})")] + public class ApplicationTree : ITree + { + public ApplicationTree(int sortOrder, string applicationAlias, string alias, string title, Type treeControllerType, bool isSingleNodeTree) + { + SortOrder = sortOrder; + ApplicationAlias = applicationAlias; + TreeAlias = alias; + TreeTitle = title; + TreeControllerType = treeControllerType; + IsSingleNodeTree = isSingleNodeTree; + } + + /// + /// + /// Gets or sets the sort order. + /// + public int SortOrder { get; set; } + + /// + /// Gets the application alias. + /// + public string ApplicationAlias { get; set; } + + /// + public string TreeAlias { get; } + + /// + /// + /// Gets or sets the tree title (fallback if the tree alias isn't localized) + /// + /// The title. + public string TreeTitle { get; set; } + + public bool IsSingleNodeTree { get; } + + public Type TreeControllerType { get; } + + public static string GetRootNodeDisplayName(ITree tree, ILocalizedTextService textService) + { + var label = $"[{tree.TreeAlias}]"; + + // try to look up a the localized tree header matching the tree alias + var localizedLabel = textService.Localize("treeHeaders/" + tree.TreeAlias); + + // if the localizedLabel returns [alias] then return the title if it's defined + if (localizedLabel != null && localizedLabel.Equals(label, StringComparison.InvariantCultureIgnoreCase)) + { + if (string.IsNullOrEmpty(tree.TreeTitle) == false) + label = tree.TreeTitle; + } + else + { + // the localizedLabel translated into something that's not just [alias], so use the translation + label = localizedLabel; + } + + return label; + } + + } +} diff --git a/src/Umbraco.Web/Trees/ApplicationTreeController.cs b/src/Umbraco.Web/Trees/ApplicationTreeController.cs index 7e7c77d607..0e405ca3f3 100644 --- a/src/Umbraco.Web/Trees/ApplicationTreeController.cs +++ b/src/Umbraco.Web/Trees/ApplicationTreeController.cs @@ -3,9 +3,13 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Net; +using System.Net.Http; using System.Net.Http.Formatting; using System.Threading.Tasks; using System.Web.Http; +using System.Web.Http.Controllers; +using System.Web.Http.Routing; +using System.Web.Mvc; using Umbraco.Core; using Umbraco.Core.Cache; using Umbraco.Core.Configuration; @@ -24,19 +28,20 @@ using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Trees { + /// + /// Used to return tree root nodes + /// [AngularJsonOnlyConfiguration] [PluginController("UmbracoTrees")] public class ApplicationTreeController : UmbracoAuthorizedApiController { - private readonly TreeControllerResolver _treeControllerResolver; - private readonly IApplicationTreeService _treeService; + private readonly ITreeService _treeService; public ApplicationTreeController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, - IRuntimeState runtimeState, TreeControllerResolver treeControllerResolver, IApplicationTreeService treeService) + IRuntimeState runtimeState, ITreeService treeService) : base(globalSettings, umbracoContext, sqlContext, services, applicationCache, logger, runtimeState) { - _treeControllerResolver = treeControllerResolver; _treeService = treeService; } @@ -46,10 +51,9 @@ namespace Umbraco.Web.Trees /// The application to load tree for /// An optional single tree alias, if specified will only load the single tree for the request app /// - /// An optional bool (defaults to true), if set to false it will also load uninitialized trees /// [HttpQueryStringFilter("queryStrings")] - public async Task GetApplicationTrees(string application, string tree, FormDataCollection queryStrings/*, bool onlyInitialized = true*/) + public async Task GetApplicationTrees(string application, string tree, FormDataCollection queryStrings) { application = application.CleanForXss(); @@ -62,7 +66,7 @@ namespace Umbraco.Web.Trees if (string.IsNullOrEmpty(tree) == false || allTrees.Count == 1) { var apptree = !tree.IsNullOrWhiteSpace() - ? allTrees.FirstOrDefault(x => x.Alias == tree) + ? allTrees.FirstOrDefault(x => x.TreeAlias == tree) : allTrees.FirstOrDefault(); if (apptree == null) throw new HttpResponseException(HttpStatusCode.NotFound); @@ -153,15 +157,15 @@ namespace Umbraco.Web.Trees /// /// Get the root node for an application with multiple trees /// - /// + /// /// /// - private async Task GetRootForMultipleAppTree(ApplicationTree configTree, FormDataCollection queryStrings) + private async Task GetRootForMultipleAppTree(ApplicationTree tree, FormDataCollection queryStrings) { - if (configTree == null) throw new ArgumentNullException(nameof(configTree)); + if (tree == null) throw new ArgumentNullException(nameof(tree)); try { - var byControllerAttempt = await _treeControllerResolver.TryGetRootNodeFromControllerTree(configTree, queryStrings, ControllerContext); + var byControllerAttempt = await TryGetRootNodeFromControllerTree(tree, queryStrings, ControllerContext); if (byControllerAttempt.Success) { return byControllerAttempt.Result; @@ -174,54 +178,133 @@ namespace Umbraco.Web.Trees return null; } - throw new ApplicationException("Could not get root node for tree type " + configTree.Alias); + throw new ApplicationException("Could not get root node for tree type " + tree.TreeAlias); } /// /// Get the root node for an application with one tree /// - /// + /// /// /// /// /// - private async Task GetRootForSingleAppTree(ApplicationTree configTree, string id, FormDataCollection queryStrings, string application) + private async Task GetRootForSingleAppTree(ApplicationTree tree, string id, FormDataCollection queryStrings, string application) { var rootId = Constants.System.Root.ToString(CultureInfo.InvariantCulture); - if (configTree == null) throw new ArgumentNullException(nameof(configTree)); - var byControllerAttempt = _treeControllerResolver.TryLoadFromControllerTree(configTree, id, queryStrings, ControllerContext); - if (byControllerAttempt.Success) + if (tree == null) throw new ArgumentNullException(nameof(tree)); + var byControllerAttempt = TryLoadFromControllerTree(tree, id, queryStrings, ControllerContext); + if (!byControllerAttempt.Success) + throw new ApplicationException("Could not render a tree for type " + tree.TreeAlias); + + var rootNode = await TryGetRootNodeFromControllerTree(tree, queryStrings, ControllerContext); + if (rootNode.Success == false) { - var rootNode = await _treeControllerResolver.TryGetRootNodeFromControllerTree(configTree, queryStrings, ControllerContext); - if (rootNode.Success == false) - { - //This should really never happen if we've successfully got the children above. - throw new InvalidOperationException("Could not create root node for tree " + configTree.Alias); - } - - var treeAttribute = _treeControllerResolver.GetTreeAttribute(configTree); - - var sectionRoot = TreeRootNode.CreateSingleTreeRoot( - rootId, - rootNode.Result.ChildNodesUrl, - rootNode.Result.MenuUrl, - rootNode.Result.Name, - byControllerAttempt.Result, - treeAttribute.IsSingleNodeTree); - - //assign the route path based on the root node, this means it will route there when the section is navigated to - //and no dashboards will be available for this section - sectionRoot.RoutePath = rootNode.Result.RoutePath; - - foreach (var d in rootNode.Result.AdditionalData) - { - sectionRoot.AdditionalData[d.Key] = d.Value; - } - return sectionRoot; - + //This should really never happen if we've successfully got the children above. + throw new InvalidOperationException("Could not create root node for tree " + tree.TreeAlias); } - throw new ApplicationException("Could not render a tree for type " + configTree.Alias); + var sectionRoot = TreeRootNode.CreateSingleTreeRoot( + rootId, + rootNode.Result.ChildNodesUrl, + rootNode.Result.MenuUrl, + rootNode.Result.Name, + byControllerAttempt.Result, + tree.IsSingleNodeTree); + + //assign the route path based on the root node, this means it will route there when the section is navigated to + //and no dashboards will be available for this section + sectionRoot.RoutePath = rootNode.Result.RoutePath; + + foreach (var d in rootNode.Result.AdditionalData) + { + sectionRoot.AdditionalData[d.Key] = d.Value; + } + return sectionRoot; + } + + /// + /// Proxies a request to the destination tree controller to get it's root tree node + /// + /// + /// + /// + /// + /// + /// This ensures that authorization filters are applied to the sub request + /// + private async Task> TryGetRootNodeFromControllerTree(ApplicationTree appTree, FormDataCollection formCollection, HttpControllerContext controllerContext) + { + //instantiate it, since we are proxying, we need to setup the instance with our current context + var instance = (TreeController)DependencyResolver.Current.GetService(appTree.TreeControllerType); + + //NOTE: This is all required in order to execute the auth-filters for the sub request, we + // need to "trick" web-api into thinking that it is actually executing the proxied controller. + + var urlHelper = controllerContext.Request.GetUrlHelper(); + //create the proxied URL for the controller action + var proxiedUrl = controllerContext.Request.RequestUri.GetLeftPart(UriPartial.Authority) + + urlHelper.GetUmbracoApiService("GetRootNode", instance.GetType()); + //add the query strings to it + proxiedUrl += "?" + formCollection.ToQueryString(); + //create proxy route data specifying the action / controller to execute + var proxiedRouteData = new HttpRouteData( + controllerContext.RouteData.Route, + new HttpRouteValueDictionary(new { action = "GetRootNode", controller = ControllerExtensions.GetControllerName(instance.GetType()) })); + + //create a proxied controller context + var proxiedControllerContext = new HttpControllerContext( + controllerContext.Configuration, + proxiedRouteData, + new HttpRequestMessage(HttpMethod.Get, proxiedUrl)) + { + ControllerDescriptor = new HttpControllerDescriptor(controllerContext.ControllerDescriptor.Configuration, ControllerExtensions.GetControllerName(instance.GetType()), instance.GetType()), + RequestContext = controllerContext.RequestContext + }; + + instance.ControllerContext = proxiedControllerContext; + instance.Request = controllerContext.Request; + instance.RequestContext.RouteData = proxiedRouteData; + + //invoke auth filters for this sub request + var result = await instance.ControllerContext.InvokeAuthorizationFiltersForRequest(); + //if a result is returned it means they are unauthorized, just throw the response. + if (result != null) + { + throw new HttpResponseException(result); + } + + //return the root + var node = instance.GetRootNode(formCollection); + return node == null + ? Attempt.Fail(new InvalidOperationException("Could not return a root node for tree " + appTree.TreeAlias)) + : Attempt.Succeed(node); + } + + /// + /// Proxies a request to the destination tree controller to get it's tree node collection + /// + /// + /// + /// + /// + /// + private Attempt TryLoadFromControllerTree(ApplicationTree appTree, string id, FormDataCollection formCollection, HttpControllerContext controllerContext) + { + // instantiate it, since we are proxying, we need to setup the instance with our current context + var instance = (TreeController)DependencyResolver.Current.GetService(appTree.TreeControllerType); + if (instance == null) + throw new Exception("Failed to create tree " + appTree.TreeControllerType + "."); + + //TODO: Shouldn't we be applying the same proxying logic as above so that filters work? seems like an oversight + + instance.ControllerContext = controllerContext; + instance.Request = controllerContext.Request; + + // return its data + return Attempt.Succeed(instance.GetNodes(id, formCollection)); + } + } } diff --git a/src/Umbraco.Web/Trees/ITree.cs b/src/Umbraco.Web/Trees/ITree.cs new file mode 100644 index 0000000000..40be7338b0 --- /dev/null +++ b/src/Umbraco.Web/Trees/ITree.cs @@ -0,0 +1,31 @@ +namespace Umbraco.Web.Trees +{ + public interface ITree + { + /// + /// Gets or sets the sort order. + /// + /// The sort order. + int SortOrder { get; } + + /// + /// Gets the section alias. + /// + string ApplicationAlias { get; } + + /// + /// Gets the tree alias. + /// + string TreeAlias { get; } + + /// + /// Gets or sets the tree title (fallback if the tree alias isn't localized) + /// + string TreeTitle { get; } + + /// + /// Flag to define if this tree is a single node tree (will never contain child nodes, full screen app) + /// + bool IsSingleNodeTree { get; } + } +} diff --git a/src/Umbraco.Web/Trees/TreeAttribute.cs b/src/Umbraco.Web/Trees/TreeAttribute.cs index 1cf23c549f..dd63f8c172 100644 --- a/src/Umbraco.Web/Trees/TreeAttribute.cs +++ b/src/Umbraco.Web/Trees/TreeAttribute.cs @@ -1,4 +1,5 @@ using System; +using Umbraco.Web.Models.Trees; namespace Umbraco.Web.Trees { @@ -6,15 +7,15 @@ namespace Umbraco.Web.Trees /// Identifies an application tree /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] - public class TreeAttribute : Attribute + public class TreeAttribute : Attribute, ITree { /// /// Initializes a new instance of the class. /// /// The app alias. - /// The alias. + /// public TreeAttribute(string appAlias, - string alias) : this(appAlias, alias, null) + string treeAlias) : this(appAlias, treeAlias, null) { } @@ -22,16 +23,16 @@ namespace Umbraco.Web.Trees /// Initializes a new instance of the class. /// /// The app alias. - /// The alias. - /// The title. + /// + /// /// The icon closed. /// The icon open. /// if set to true [initialize]. /// The sort order. /// Flag to define if this tree is a single node tree (will never contain child nodes, full screen app) public TreeAttribute(string appAlias, - string alias, - string title, + string treeAlias, + string treeTitle, string iconClosed = "icon-folder", string iconOpen = "icon-folder-open", bool initialize = true, @@ -39,8 +40,8 @@ namespace Umbraco.Web.Trees bool isSingleNodeTree = false) { ApplicationAlias = appAlias; - Alias = alias; - Title = title; + TreeAlias = treeAlias; + TreeTitle = treeTitle; IconClosed = iconClosed; IconOpen = iconOpen; Initialize = initialize; @@ -48,17 +49,17 @@ namespace Umbraco.Web.Trees IsSingleNodeTree = isSingleNodeTree; } - public string ApplicationAlias { get; private set; } - public string Alias { get; private set; } - public string Title { get; private set; } - public string IconClosed { get; private set; } - public string IconOpen { get; private set; } - public bool Initialize { get; private set; } - public int SortOrder { get; private set; } + public string ApplicationAlias { get; } + public string TreeAlias { get; } + public string TreeTitle { get; } + public string IconClosed { get; } + public string IconOpen { get; } + public bool Initialize { get; } + public int SortOrder { get; } /// /// Flag to define if this tree is a single node tree (will never contain child nodes, full screen app) /// - public bool IsSingleNodeTree { get; private set; } + public bool IsSingleNodeTree { get; } } } diff --git a/src/Umbraco.Web/Trees/TreeCollection.cs b/src/Umbraco.Web/Trees/TreeCollection.cs index 8f913fb2d7..c7b60dea16 100644 --- a/src/Umbraco.Web/Trees/TreeCollection.cs +++ b/src/Umbraco.Web/Trees/TreeCollection.cs @@ -21,7 +21,26 @@ namespace Umbraco.Web.Trees { protected override TreeCollectionBuilder This => this; - //TODO: can we allow for re-ordering OOTB without exposing other methods? + private readonly List _instances = new List(); + + public void AddTree(ApplicationTree tree) + { + _instances.Add(tree); + } + + protected override IEnumerable CreateItems(IFactory factory) + { + return _instances; + + //var items = base.CreateItems(factory).ToList(); + //throw new NotImplementedException(); + ////validate the items, no actions should exist that do not either expose notifications or permissions + //var invalidItems = items.Where(x => !x.CanBePermissionAssigned && !x.ShowInNotifier).ToList(); + //if (invalidItems.Count == 0) return items; + + //var invalidActions = string.Join(", ", invalidItems.Select(x => "'" + x.Alias + "'")); + //throw new InvalidOperationException($"Invalid actions {invalidActions}'. All {typeof(IAction)} implementations must be true for either {nameof(IAction.CanBePermissionAssigned)} or {nameof(IAction.ShowInNotifier)}."); + } } } diff --git a/src/Umbraco.Web/Trees/TreeController.cs b/src/Umbraco.Web/Trees/TreeController.cs index 102671ec29..63e8f5aad5 100644 --- a/src/Umbraco.Web/Trees/TreeController.cs +++ b/src/Umbraco.Web/Trees/TreeController.cs @@ -1,4 +1,6 @@ using System; +using System.Collections.Concurrent; +using System.Linq; using Umbraco.Core; using Umbraco.Core.Cache; using Umbraco.Core.Configuration; @@ -14,10 +16,10 @@ namespace Umbraco.Web.Trees public abstract class TreeController : TreeControllerBase { private TreeAttribute _attribute; - private string _rootNodeDisplayName; protected TreeController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) : base(globalSettings, umbracoContext, sqlContext, services, applicationCache, logger, runtimeState) { + Initialize(); } protected TreeController() @@ -25,29 +27,42 @@ namespace Umbraco.Web.Trees Initialize(); } - /// - /// The name to display on the root node - /// - public override string RootNodeDisplayName - { - get - { - throw new NotImplementedException(); - //return _rootNodeDisplayName - // ?? (_rootNodeDisplayName = Services.ApplicationTreeService.GetByAlias(_attribute.Alias) - // ?.GetRootNodeDisplayName(Services.TextService)); - } - } + /// + public override string RootNodeDisplayName => ApplicationTree.GetRootNodeDisplayName(this, Services.TextService); - /// - /// Gets the current tree alias from the attribute assigned to it. - /// - public override string TreeAlias => _attribute.Alias; + /// + public override string TreeAlias => _attribute.TreeAlias; + /// + public override string TreeTitle => _attribute.TreeTitle; + /// + public override string ApplicationAlias => _attribute.ApplicationAlias; + /// + public override int SortOrder => _attribute.SortOrder; + /// + public override bool IsSingleNodeTree => _attribute.IsSingleNodeTree; private void Initialize() { - throw new NotImplementedException(); - //_attribute = GetType().GetTreeAttribute(); + _attribute = GetTreeAttribute(); + } + + private static readonly ConcurrentDictionary TreeAttributeCache = new ConcurrentDictionary(); + + private TreeAttribute GetTreeAttribute() + { + return TreeAttributeCache.GetOrAdd(GetType(), type => + { + //Locate the tree attribute + var treeAttributes = type + .GetCustomAttributes(false) + .ToArray(); + + if (treeAttributes.Length == 0) + throw new InvalidOperationException("The Tree controller is missing the " + typeof(TreeAttribute).FullName + " attribute"); + + //assign the properties of this object to those of the metadata attribute + return treeAttributes[0]; + }); } } } diff --git a/src/Umbraco.Web/Trees/TreeControllerBase.cs b/src/Umbraco.Web/Trees/TreeControllerBase.cs index c00d6053c8..7a027033fc 100644 --- a/src/Umbraco.Web/Trees/TreeControllerBase.cs +++ b/src/Umbraco.Web/Trees/TreeControllerBase.cs @@ -25,7 +25,7 @@ namespace Umbraco.Web.Trees /// Developers should generally inherit from TreeController. /// [AngularJsonOnlyConfiguration] - public abstract class TreeControllerBase : UmbracoAuthorizedApiController + public abstract class TreeControllerBase : UmbracoAuthorizedApiController, ITree { protected TreeControllerBase() { @@ -62,10 +62,16 @@ namespace Umbraco.Web.Trees /// public abstract string RootNodeDisplayName { get; } - /// - /// Gets the current tree alias from the attribute assigned to it. - /// + /// public abstract string TreeAlias { get; } + /// + public abstract string TreeTitle { get; } + /// + public abstract string ApplicationAlias { get; } + /// + public abstract int SortOrder { get; } + /// + public abstract bool IsSingleNodeTree { get; } /// /// Returns the root node for the tree diff --git a/src/Umbraco.Web/Trees/TreeControllerResolver.cs b/src/Umbraco.Web/Trees/TreeControllerResolver.cs deleted file mode 100644 index 62cafbb5dd..0000000000 --- a/src/Umbraco.Web/Trees/TreeControllerResolver.cs +++ /dev/null @@ -1,203 +0,0 @@ -using System; -using System.Collections.Concurrent; -using System.Linq; -using System.Management.Instrumentation; -using System.Net.Http; -using System.Net.Http.Formatting; -using System.Threading.Tasks; -using System.Web.Http; -using System.Web.Http.Controllers; -using System.Web.Http.Routing; -using System.Web.Mvc; -using Umbraco.Core; -using Umbraco.Web.Models.Trees; -using Umbraco.Web.Mvc; -using Umbraco.Web.WebApi; -using Umbraco.Core.Composing; -using ApplicationTree = Umbraco.Web.Models.ContentEditing.ApplicationTree; - -namespace Umbraco.Web.Trees -{ - public class TreeControllerResolver - { - private readonly TreeCollection _trees; - private readonly UmbracoApiControllerTypeCollection _apiControllers; - - public TreeControllerResolver(TreeCollection trees, UmbracoApiControllerTypeCollection apiControllers) - { - _trees = trees; - _apiControllers = apiControllers; - } - - private static readonly ConcurrentDictionary TreeAttributeCache = new ConcurrentDictionary(); - private static readonly ConcurrentDictionary ResolvedControllerTypes = new ConcurrentDictionary(); - - private TreeAttribute GetTreeAttribute(Type treeControllerType) - { - return TreeAttributeCache.GetOrAdd(treeControllerType, type => - { - //Locate the tree attribute - var treeAttributes = type - .GetCustomAttributes(false) - .ToArray(); - - if (treeAttributes.Length == 0) - { - throw new InvalidOperationException("The Tree controller is missing the " + typeof(TreeAttribute).FullName + " attribute"); - } - - //assign the properties of this object to those of the metadata attribute - return treeAttributes[0]; - }); - } - - internal TreeAttribute GetTreeAttribute(ApplicationTree tree) - { - throw new NotImplementedException(); - //return ResolvedControllerTypes.GetOrAdd(tree.Alias, s => - //{ - // var controllerType = _apiControllers - // .OfType() - // .FirstOrDefault(x => x.) - //}); - - //return GetTreeAttribute(tree.GetRuntimeType()); - } - - private Type GetControllerType(ApplicationTree tree) - { - throw new NotImplementedException(); - } - - - internal Attempt TryGetControllerTree(ApplicationTree appTree) - { - throw new NotImplementedException(); - - ////get reference to all TreeApiControllers - //var controllerTrees = _apiControllers - // .Where(TypeHelper.IsTypeAssignableFrom) - // .ToArray(); - - ////find the one we're looking for - //var foundControllerTree = controllerTrees.FirstOrDefault(x => x == appTree.GetRuntimeType()); - //if (foundControllerTree == null) - //{ - // return Attempt.Fail(new InstanceNotFoundException("Could not find tree of type " + appTree.Type + " in any loaded DLLs")); - //} - //return Attempt.Succeed(foundControllerTree); - } - - /// - /// This will go and get the root node from a controller tree by executing the tree's GetRootNode method - /// - /// - /// - /// - /// - /// - /// This ensures that authorization filters are applied to the sub request - /// - internal async Task> TryGetRootNodeFromControllerTree(ApplicationTree appTree, FormDataCollection formCollection, HttpControllerContext controllerContext) - { - var foundControllerTreeAttempt = TryGetControllerTree(appTree); - if (foundControllerTreeAttempt.Success == false) - { - return Attempt.Fail(foundControllerTreeAttempt.Exception); - } - - var foundControllerTree = foundControllerTreeAttempt.Result; - //instantiate it, since we are proxying, we need to setup the instance with our current context - var instance = (TreeController)DependencyResolver.Current.GetService(foundControllerTree); - - //NOTE: This is all required in order to execute the auth-filters for the sub request, we - // need to "trick" web-api into thinking that it is actually executing the proxied controller. - - var urlHelper = controllerContext.Request.GetUrlHelper(); - //create the proxied URL for the controller action - var proxiedUrl = controllerContext.Request.RequestUri.GetLeftPart(UriPartial.Authority) + - urlHelper.GetUmbracoApiService("GetRootNode", instance.GetType()); - //add the query strings to it - proxiedUrl += "?" + formCollection.ToQueryString(); - //create proxy route data specifying the action / controller to execute - var proxiedRouteData = new HttpRouteData( - controllerContext.RouteData.Route, - new HttpRouteValueDictionary(new {action = "GetRootNode", controller = ControllerExtensions.GetControllerName(instance.GetType())})); - - //create a proxied controller context - var proxiedControllerContext = new HttpControllerContext( - controllerContext.Configuration, - proxiedRouteData, - new HttpRequestMessage(HttpMethod.Get, proxiedUrl)) - { - ControllerDescriptor = new HttpControllerDescriptor(controllerContext.ControllerDescriptor.Configuration, ControllerExtensions.GetControllerName(instance.GetType()), instance.GetType()) - }; - - if (WebApiVersionCheck.WebApiVersion >= Version.Parse("5.0.0")) - { - //fixme - will this 'just' work now? - proxiedControllerContext.RequestContext = controllerContext.RequestContext; - - ////In WebApi2, this is required to be set: - //// proxiedControllerContext.RequestContext = controllerContext.RequestContext - //// but we need to do this with reflection because of codebase changes between version 4/5 - ////NOTE: Use TypeHelper here since the reflection is cached - //var controllerContextRequestContext = TypeHelper.GetProperty(controllerContext.GetType(), "RequestContext").GetValue(controllerContext); - //TypeHelper.GetProperty(proxiedControllerContext.GetType(), "RequestContext").SetValue(proxiedControllerContext, controllerContextRequestContext); - } - - instance.ControllerContext = proxiedControllerContext; - instance.Request = controllerContext.Request; - - if (WebApiVersionCheck.WebApiVersion >= Version.Parse("5.0.0")) - { - - //fixme - will this 'just' work now? - instance.RequestContext.RouteData = proxiedRouteData; - - ////now we can change the request context's route data to be the proxied route data - NOTE: we cannot do this directly above - //// because it will detect that the request context is different throw an exception. This is a change in webapi2 and we need to set - //// this with reflection due to codebase changes between version 4/5 - //// instance.RequestContext.RouteData = proxiedRouteData; - ////NOTE: Use TypeHelper here since the reflection is cached - //var instanceRequestContext = TypeHelper.GetProperty(typeof(ApiController), "RequestContext").GetValue(instance); - //TypeHelper.GetProperty(instanceRequestContext.GetType(), "RouteData").SetValue(instanceRequestContext, proxiedRouteData); - } - - //invoke auth filters for this sub request - var result = await instance.ControllerContext.InvokeAuthorizationFiltersForRequest(); - //if a result is returned it means they are unauthorized, just throw the response. - if (result != null) - { - throw new HttpResponseException(result); - } - - //return the root - var node = instance.GetRootNode(formCollection); - return node == null - ? Attempt.Fail(new InvalidOperationException("Could not return a root node for tree " + appTree.Alias)) - : Attempt.Succeed(node); - } - - internal Attempt TryLoadFromControllerTree(ApplicationTree appTree, string id, FormDataCollection formCollection, HttpControllerContext controllerContext) - { - var foundControllerTreeAttempt = TryGetControllerTree(appTree); - if (foundControllerTreeAttempt.Success == false) - return Attempt.Fail(foundControllerTreeAttempt.Exception); - - // instantiate it, since we are proxying, we need to setup the instance with our current context - var foundControllerTree = foundControllerTreeAttempt.Result; - var instance = (TreeController) DependencyResolver.Current.GetService(foundControllerTree); - if (instance == null) - throw new Exception("Failed to get tree " + foundControllerTree.FullName + "."); - - instance.ControllerContext = controllerContext; - instance.Request = controllerContext.Request; - - // return its data - return Attempt.Succeed(instance.GetNodes(id, formCollection)); - } - - } - -} diff --git a/src/Umbraco.Web/Trees/UserPermissionsTreeController.cs b/src/Umbraco.Web/Trees/UserPermissionsTreeController.cs deleted file mode 100644 index 5473fee7bb..0000000000 --- a/src/Umbraco.Web/Trees/UserPermissionsTreeController.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.Linq; -using System.Net.Http.Formatting; -using Umbraco.Core; -using Umbraco.Web.Models.Trees; -using Umbraco.Web.Mvc; -using Umbraco.Web.WebApi.Filters; - -using Constants = Umbraco.Core.Constants; - -namespace Umbraco.Web.Trees -{ - [UmbracoTreeAuthorize(Constants.Trees.UserPermissions)] - [Tree(Constants.Applications.Users, Constants.Trees.UserPermissions, null, sortOrder: 2)] - [PluginController("UmbracoTrees")] - [CoreTree] - public class UserPermissionsTreeController : TreeController - { - protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) - { - var nodes = new TreeNodeCollection(); - long totalUsers; - nodes.AddRange( - Services.UserService.GetAll(0, int.MaxValue, out totalUsers) - .Where(x => x.Id != Constants.Security.SuperUserId && x.IsApproved) - .Select(x => CreateTreeNode(x.Id.ToString(), - id, - queryStrings, - x.Name, - "icon-user", - false, - "/" + queryStrings.GetValue("application") + "/framed/" - + Uri.EscapeDataString("users/PermissionEditor.aspx?id=" + x.Id)))); - - return nodes; - } - - protected override MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings) - { - var menu = new MenuItemCollection(); - - if (id == Constants.System.Root.ToInvariantString()) - { - // root actions - menu.Items.Add(new RefreshNode(Services.TextService, true)); - return menu; - } - - return menu; - } - } -} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index f1d15e9ea6..0b1603c9e3 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -166,8 +166,9 @@ - + + @@ -183,7 +184,7 @@ - + @@ -551,7 +552,6 @@ - @@ -649,7 +649,7 @@ - + @@ -972,7 +972,6 @@ - @@ -1056,7 +1055,6 @@ - diff --git a/src/Umbraco.Web/WebApi/Filters/UmbracoTreeAuthorizeAttribute.cs b/src/Umbraco.Web/WebApi/Filters/UmbracoTreeAuthorizeAttribute.cs index cc483db416..5ad3da7f4d 100644 --- a/src/Umbraco.Web/WebApi/Filters/UmbracoTreeAuthorizeAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/UmbracoTreeAuthorizeAttribute.cs @@ -41,18 +41,16 @@ namespace Umbraco.Web.WebApi.Filters return true; } - throw new NotImplementedException(); + var apps = _treeAliases.Select(x => Current.TreeService + .GetByAlias(x)) + .WhereNotNull() + .Select(x => x.ApplicationAlias) + .Distinct() + .ToArray(); - //var apps = _treeAliases.Select(x => Current.Services.ApplicationTreeService - // .GetByAlias(x)) - // .WhereNotNull() - // .Select(x => x.ApplicationAlias) - // .Distinct() - // .ToArray(); - - //return Current.UmbracoContext.Security.CurrentUser != null - // && apps.Any(app => Current.UmbracoContext.Security.UserHasSectionAccess( - // app, Current.UmbracoContext.Security.CurrentUser)); + return Current.UmbracoContext.Security.CurrentUser != null + && apps.Any(app => Current.UmbracoContext.Security.UserHasSectionAccess( + app, Current.UmbracoContext.Security.CurrentUser)); } } } diff --git a/src/Umbraco.Web/WebApi/MvcVersionCheck.cs b/src/Umbraco.Web/WebApi/MvcVersionCheck.cs deleted file mode 100644 index 3c84fa91ce..0000000000 --- a/src/Umbraco.Web/WebApi/MvcVersionCheck.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Umbraco.Web.WebApi -{ - internal class WebApiVersionCheck - { - public static System.Version WebApiVersion - { - get { return typeof(System.Web.Http.ApiController).Assembly.GetName().Version; } - } - } -} diff --git a/src/Umbraco.Web/WebApi/UmbracoApiControllerTypeCollection.cs b/src/Umbraco.Web/WebApi/UmbracoApiControllerTypeCollection.cs index d84ab3fe4a..cdb1aa2f51 100644 --- a/src/Umbraco.Web/WebApi/UmbracoApiControllerTypeCollection.cs +++ b/src/Umbraco.Web/WebApi/UmbracoApiControllerTypeCollection.cs @@ -8,8 +8,6 @@ namespace Umbraco.Web.WebApi // which we are not doing at the moment // we can inherit from BuilderCollectionBase and just be enumerable - //fixme: this should be LazyCollectionBuilderBase ? - public class UmbracoApiControllerTypeCollection : BuilderCollectionBase { public UmbracoApiControllerTypeCollection(IEnumerable items) From 0160f141f4104c1048cf96f498b2dc1cc4a20e06 Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 17 Jan 2019 17:04:53 +1100 Subject: [PATCH 119/437] cleanup and explicitly registering sections --- .../Services/SectionServiceTests.cs | 2 +- .../TreesAndSections/ApplicationTreeTest.cs | 397 ----------------- .../ResourceFiles.Designer.cs | 91 ---- .../TreesAndSections/ResourceFiles.resx | 127 ------ .../TreesAndSections/SectionTests.cs | 252 ----------- .../TreesAndSections/applications.config | 16 - .../TreesAndSections/trees.config | 8 - src/Umbraco.Tests/Umbraco.Tests.csproj | 13 - .../Cache/ApplicationTreeCacheRefresher.cs | 46 -- .../Cache/DistributedCacheBinder_Handlers.cs | 47 -- .../Cache/DistributedCacheExtensions.cs | 19 - .../ContentEditing/IBackOfficeSection.cs | 15 - .../Models/Mapping/SectionMapperProfile.cs | 1 + .../Models/Trees/ApplicationDefinitions.cs | 77 ---- .../Models/Trees/IBackOfficeSection.cs | 12 + .../{SectionRootNode.cs => TreeRootNode.cs} | 0 src/Umbraco.Web/Runtime/WebRuntimeComposer.cs | 11 +- src/Umbraco.Web/Services/ISectionService.cs | 1 + src/Umbraco.Web/Services/ITreeService.cs | 10 +- src/Umbraco.Web/Services/SectionService.cs | 253 +---------- src/Umbraco.Web/Services/TreeService.cs | 410 +----------------- .../Trees/BackOfficeSectionCollection.cs | 8 +- .../BackOfficeSectionCollectionBuilder.cs | 10 + .../Trees/ContentBackOfficeSection.cs | 15 + src/Umbraco.Web/Trees/ITree.cs | 1 + .../Trees/MediaBackOfficeSection.cs | 15 + .../Trees/MembersBackOfficeSection.cs | 15 + .../Trees/PackagesBackOfficeSection.cs | 15 + .../Trees/SettingsBackOfficeSection.cs | 15 + .../Trees/TranslationBackOfficeSection.cs | 15 + src/Umbraco.Web/Trees/TreeCollection.cs | 27 -- .../Trees/TreeCollectionBuilder.cs | 18 + .../Trees/UsersBackOfficeSection.cs | 15 + src/Umbraco.Web/Umbraco.Web.csproj | 15 +- 34 files changed, 183 insertions(+), 1809 deletions(-) delete mode 100644 src/Umbraco.Tests/TreesAndSections/ApplicationTreeTest.cs delete mode 100644 src/Umbraco.Tests/TreesAndSections/ResourceFiles.Designer.cs delete mode 100644 src/Umbraco.Tests/TreesAndSections/ResourceFiles.resx delete mode 100644 src/Umbraco.Tests/TreesAndSections/SectionTests.cs delete mode 100644 src/Umbraco.Tests/TreesAndSections/applications.config delete mode 100644 src/Umbraco.Tests/TreesAndSections/trees.config delete mode 100644 src/Umbraco.Web/Cache/ApplicationTreeCacheRefresher.cs delete mode 100644 src/Umbraco.Web/Models/ContentEditing/IBackOfficeSection.cs delete mode 100644 src/Umbraco.Web/Models/Trees/ApplicationDefinitions.cs create mode 100644 src/Umbraco.Web/Models/Trees/IBackOfficeSection.cs rename src/Umbraco.Web/Models/Trees/{SectionRootNode.cs => TreeRootNode.cs} (100%) create mode 100644 src/Umbraco.Web/Trees/BackOfficeSectionCollectionBuilder.cs create mode 100644 src/Umbraco.Web/Trees/ContentBackOfficeSection.cs create mode 100644 src/Umbraco.Web/Trees/MediaBackOfficeSection.cs create mode 100644 src/Umbraco.Web/Trees/MembersBackOfficeSection.cs create mode 100644 src/Umbraco.Web/Trees/PackagesBackOfficeSection.cs create mode 100644 src/Umbraco.Web/Trees/SettingsBackOfficeSection.cs create mode 100644 src/Umbraco.Web/Trees/TranslationBackOfficeSection.cs create mode 100644 src/Umbraco.Web/Trees/TreeCollectionBuilder.cs create mode 100644 src/Umbraco.Web/Trees/UsersBackOfficeSection.cs diff --git a/src/Umbraco.Tests/Services/SectionServiceTests.cs b/src/Umbraco.Tests/Services/SectionServiceTests.cs index 206c99ffbf..9211755251 100644 --- a/src/Umbraco.Tests/Services/SectionServiceTests.cs +++ b/src/Umbraco.Tests/Services/SectionServiceTests.cs @@ -16,7 +16,7 @@ namespace Umbraco.Tests.Services public class SectionServiceTests : TestWithSomeContentBase { //fixme - private ISectionService SectionService => new SectionService(ServiceContext.UserService, null, null); + private ISectionService SectionService => new SectionService(ServiceContext.UserService, null); [Test] diff --git a/src/Umbraco.Tests/TreesAndSections/ApplicationTreeTest.cs b/src/Umbraco.Tests/TreesAndSections/ApplicationTreeTest.cs deleted file mode 100644 index 95d90f1463..0000000000 --- a/src/Umbraco.Tests/TreesAndSections/ApplicationTreeTest.cs +++ /dev/null @@ -1,397 +0,0 @@ -//using System.IO; -//using NUnit.Framework; -//using Umbraco.Core.Services; -//using Umbraco.Tests.TestHelpers; -//using System; -//using System.Linq; -//using System.Threading; -//using Umbraco.Tests.Testing; -//using Umbraco.Web.Services; -//using Current = Umbraco.Web.Composing.Current; - -//namespace Umbraco.Tests.TreesAndSections -//{ - - -// /// -// ///This is a test class for ApplicationTreeTest and is intended -// ///to contain all ApplicationTreeTest Unit Tests -// /// -// [TestFixture] -// [Apartment(ApartmentState.STA)] -// [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] -// public class ApplicationTreeTest : TestWithDatabaseBase -// { -// public override void SetUp() -// { -// base.SetUp(); - -// var treesConfig = TestHelper.MapPathForTest("~/TEMP/TreesAndSections/trees.config"); -// var appConfig = TestHelper.MapPathForTest("~/TEMP/TreesAndSections/applications.config"); -// Directory.CreateDirectory(TestHelper.MapPathForTest("~/TEMP/TreesAndSections")); -// using (var writer = File.CreateText(treesConfig)) -// { -// writer.Write(ResourceFiles.trees); -// } -// using (var writer = File.CreateText(appConfig)) -// { -// writer.Write(ResourceFiles.applications); -// } - -// //ApplicationTreeService.TreeConfigFilePath = treesConfig; -// SectionService.AppConfigFilePath = appConfig; -// } - -// public override void TearDown() -// { -// base.TearDown(); - -// if (Directory.Exists(TestHelper.MapPathForTest("~/TEMP/TreesAndSections"))) -// { -// Directory.Delete(TestHelper.MapPathForTest("~/TEMP/TreesAndSections"), true); -// } -// //ApplicationTreeService.TreeConfigFilePath = null; -// SectionService.AppConfigFilePath = null; -// } - -// ///// -// ///// Creates a new app tree linked to an application, then delete the application and make sure the tree is gone as well -// ///// -// //[Test()] -// //public void ApplicationTree_Make_New_Then_Delete_App() -// //{ -// // //create new app -// // var appName = Guid.NewGuid().ToString("N"); -// // var treeName = Guid.NewGuid().ToString("N"); -// // Current.Services.SectionService.MakeNew(appName, appName, "icon.jpg"); - -// // //check if it exists -// // var app = Current.Services.SectionService.GetByAlias(appName); -// // Assert.IsNotNull(app); - -// // //create the new app tree assigned to the new app -// // Current.Services.ApplicationTreeService.MakeNew(false, 0, app.Alias, treeName, treeName, "icon.jpg", "icon.jpg", "Umbraco.Web.Trees.ContentTreeController, Umbraco.Web"); -// // var tree = Current.Services.ApplicationTreeService.GetByAlias(treeName); -// // Assert.IsNotNull(tree); - -// // //now delete the app -// // Current.Services.SectionService.DeleteSection(app); - -// // //check that the tree is gone -// // Assert.AreEqual(0, Current.Services.ApplicationTreeService.GetApplicationTrees(treeName).Count()); -// //} - - -// #region Tests to write -// ///// -// /////A test for ApplicationTree Constructor -// ///// -// //[TestMethod()] -// //public void ApplicationTreeConstructorTest() -// //{ -// // bool silent = false; // TODO: Initialize to an appropriate value -// // bool initialize = false; // TODO: Initialize to an appropriate value -// // byte sortOrder = 0; // TODO: Initialize to an appropriate value -// // string applicationAlias = string.Empty; // TODO: Initialize to an appropriate value -// // string alias = string.Empty; // TODO: Initialize to an appropriate value -// // string title = string.Empty; // TODO: Initialize to an appropriate value -// // string iconClosed = string.Empty; // TODO: Initialize to an appropriate value -// // string iconOpened = string.Empty; // TODO: Initialize to an appropriate value -// // string assemblyName = string.Empty; // TODO: Initialize to an appropriate value -// // string type = string.Empty; // TODO: Initialize to an appropriate value -// // string action = string.Empty; // TODO: Initialize to an appropriate value -// // ApplicationTree target = new ApplicationTree(silent, initialize, sortOrder, applicationAlias, alias, title, iconClosed, iconOpened, assemblyName, type, action); -// // Assert.Inconclusive("TODO: Implement code to verify target"); -// //} - -// ///// -// /////A test for ApplicationTree Constructor -// ///// -// //[TestMethod()] -// //public void ApplicationTreeConstructorTest1() -// //{ -// // ApplicationTree target = new ApplicationTree(); -// // Assert.Inconclusive("TODO: Implement code to verify target"); -// //} - -// ///// -// /////A test for Delete -// ///// -// //[TestMethod()] -// //public void DeleteTest() -// //{ -// // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value -// // target.Delete(); -// // Assert.Inconclusive("A method that does not return a value cannot be verified."); -// //} - - -// ///// -// /////A test for Save -// ///// -// //[TestMethod()] -// //public void SaveTest() -// //{ -// // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value -// // target.Save(); -// // Assert.Inconclusive("A method that does not return a value cannot be verified."); -// //} - -// ///// -// /////A test for getAll -// ///// -// //[TestMethod()] -// //public void getAllTest() -// //{ -// // ApplicationTree[] expected = null; // TODO: Initialize to an appropriate value -// // ApplicationTree[] actual; -// // actual = ApplicationTree.getAll(); -// // Assert.AreEqual(expected, actual); -// // Assert.Inconclusive("Verify the correctness of this test method."); -// //} - -// ///// -// /////A test for getApplicationTree -// ///// -// //[TestMethod()] -// //public void getApplicationTreeTest() -// //{ -// // string applicationAlias = string.Empty; // TODO: Initialize to an appropriate value -// // ApplicationTree[] expected = null; // TODO: Initialize to an appropriate value -// // ApplicationTree[] actual; -// // actual = ApplicationTree.getApplicationTree(applicationAlias); -// // Assert.AreEqual(expected, actual); -// // Assert.Inconclusive("Verify the correctness of this test method."); -// //} - -// ///// -// /////A test for getApplicationTree -// ///// -// //[TestMethod()] -// //public void getApplicationTreeTest1() -// //{ -// // string applicationAlias = string.Empty; // TODO: Initialize to an appropriate value -// // bool onlyInitializedApplications = false; // TODO: Initialize to an appropriate value -// // ApplicationTree[] expected = null; // TODO: Initialize to an appropriate value -// // ApplicationTree[] actual; -// // actual = ApplicationTree.getApplicationTree(applicationAlias, onlyInitializedApplications); -// // Assert.AreEqual(expected, actual); -// // Assert.Inconclusive("Verify the correctness of this test method."); -// //} - -// ///// -// /////A test for getByAlias -// ///// -// //[TestMethod()] -// //public void getByAliasTest() -// //{ -// // string treeAlias = string.Empty; // TODO: Initialize to an appropriate value -// // ApplicationTree expected = null; // TODO: Initialize to an appropriate value -// // ApplicationTree actual; -// // actual = ApplicationTree.getByAlias(treeAlias); -// // Assert.AreEqual(expected, actual); -// // Assert.Inconclusive("Verify the correctness of this test method."); -// //} - -// ///// -// /////A test for Action -// ///// -// //[TestMethod()] -// //public void ActionTest() -// //{ -// // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value -// // string expected = string.Empty; // TODO: Initialize to an appropriate value -// // string actual; -// // target.Action = expected; -// // actual = target.Action; -// // Assert.AreEqual(expected, actual); -// // Assert.Inconclusive("Verify the correctness of this test method."); -// //} - -// ///// -// /////A test for Alias -// ///// -// //[TestMethod()] -// //public void AliasTest() -// //{ -// // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value -// // string actual; -// // actual = target.Alias; -// // Assert.Inconclusive("Verify the correctness of this test method."); -// //} - -// ///// -// /////A test for ApplicationAlias -// ///// -// //[TestMethod()] -// //public void ApplicationAliasTest() -// //{ -// // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value -// // string actual; -// // actual = target.ApplicationAlias; -// // Assert.Inconclusive("Verify the correctness of this test method."); -// //} - -// ///// -// /////A test for AssemblyName -// ///// -// //[TestMethod()] -// //public void AssemblyNameTest() -// //{ -// // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value -// // string expected = string.Empty; // TODO: Initialize to an appropriate value -// // string actual; -// // target.AssemblyName = expected; -// // actual = target.AssemblyName; -// // Assert.AreEqual(expected, actual); -// // Assert.Inconclusive("Verify the correctness of this test method."); -// //} - -// ///// -// /////A test for IconClosed -// ///// -// //[TestMethod()] -// //public void IconClosedTest() -// //{ -// // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value -// // string expected = string.Empty; // TODO: Initialize to an appropriate value -// // string actual; -// // target.IconClosed = expected; -// // actual = target.IconClosed; -// // Assert.AreEqual(expected, actual); -// // Assert.Inconclusive("Verify the correctness of this test method."); -// //} - -// ///// -// /////A test for IconOpened -// ///// -// //[TestMethod()] -// //public void IconOpenedTest() -// //{ -// // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value -// // string expected = string.Empty; // TODO: Initialize to an appropriate value -// // string actual; -// // target.IconOpened = expected; -// // actual = target.IconOpened; -// // Assert.AreEqual(expected, actual); -// // Assert.Inconclusive("Verify the correctness of this test method."); -// //} - -// ///// -// /////A test for Initialize -// ///// -// //[TestMethod()] -// //public void InitializeTest() -// //{ -// // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value -// // bool expected = false; // TODO: Initialize to an appropriate value -// // bool actual; -// // target.Initialize = expected; -// // actual = target.Initialize; -// // Assert.AreEqual(expected, actual); -// // Assert.Inconclusive("Verify the correctness of this test method."); -// //} - -// ///// -// /////A test for Silent -// ///// -// //[TestMethod()] -// //public void SilentTest() -// //{ -// // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value -// // bool expected = false; // TODO: Initialize to an appropriate value -// // bool actual; -// // target.Silent = expected; -// // actual = target.Silent; -// // Assert.AreEqual(expected, actual); -// // Assert.Inconclusive("Verify the correctness of this test method."); -// //} - -// ///// -// /////A test for SortOrder -// ///// -// //[TestMethod()] -// //public void SortOrderTest() -// //{ -// // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value -// // byte expected = 0; // TODO: Initialize to an appropriate value -// // byte actual; -// // target.SortOrder = expected; -// // actual = target.SortOrder; -// // Assert.AreEqual(expected, actual); -// // Assert.Inconclusive("Verify the correctness of this test method."); -// //} - -// ///// -// /////A test for SqlHelper -// ///// -// //[TestMethod()] -// //public void SqlHelperTest() -// //{ -// // ISqlHelper actual; -// // actual = ApplicationTree.SqlHelper; -// // Assert.Inconclusive("Verify the correctness of this test method."); -// //} - -// ///// -// /////A test for Title -// ///// -// //[TestMethod()] -// //public void TitleTest() -// //{ -// // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value -// // string expected = string.Empty; // TODO: Initialize to an appropriate value -// // string actual; -// // target.Title = expected; -// // actual = target.Title; -// // Assert.AreEqual(expected, actual); -// // Assert.Inconclusive("Verify the correctness of this test method."); -// //} - -// ///// -// /////A test for Type -// ///// -// //[TestMethod()] -// //public void TypeTest() -// //{ -// // ApplicationTree target = new ApplicationTree(); // TODO: Initialize to an appropriate value -// // string expected = string.Empty; // TODO: Initialize to an appropriate value -// // string actual; -// // target.Type = expected; -// // actual = target.Type; -// // Assert.AreEqual(expected, actual); -// // Assert.Inconclusive("Verify the correctness of this test method."); -// //} -// #endregion - -// #region Additional test attributes -// // -// //You can use the following additional attributes as you write your tests: -// // -// //Use ClassInitialize to run code before running the first test in the class -// //[ClassInitialize()] -// //public static void MyClassInitialize(TestContext testContext) -// //{ -// //} -// // -// //Use ClassCleanup to run code after all tests in a class have run -// //[ClassCleanup()] -// //public static void MyClassCleanup() -// //{ -// //} -// // -// //Use TestInitialize to run code before running each test -// //[TestInitialize()] -// //public void MyTestInitialize() -// //{ -// //} -// // -// //Use TestCleanup to run code after each test has run -// //[TestCleanup()] -// //public void MyTestCleanup() -// //{ -// //} -// // -// #endregion -// } -//} diff --git a/src/Umbraco.Tests/TreesAndSections/ResourceFiles.Designer.cs b/src/Umbraco.Tests/TreesAndSections/ResourceFiles.Designer.cs deleted file mode 100644 index 02bc84649e..0000000000 --- a/src/Umbraco.Tests/TreesAndSections/ResourceFiles.Designer.cs +++ /dev/null @@ -1,91 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Umbraco.Tests.TreesAndSections { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class ResourceFiles { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal ResourceFiles() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Umbraco.Tests.TreesAndSections.ResourceFiles", typeof(ResourceFiles).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?> - ///<applications> - /// <add alias="content" name="content" icon="file" sortOrder="0" /> - /// <add alias="0b486ac9c0f1456996192c6ed1f03e57" name="0b486ac9c0f1456996192c6ed1f03e57" icon="icon.jpg" sortOrder="1" /> - /// <add alias="1ffbc301744c4e75ae3054d741954c7b" name="1ffbc301744c4e75ae3054d741954c7b" icon="icon.jpg" sortOrder="2" /> - /// <add alias="1838c3e1591f4008bbafe59a06a00a31" name="1838c3e1591f4008bbafe59a06a00a31" icon="icon.jpg" sortOrder="3" /> - /// <add alias="e5badae2 [rest of string was truncated]";. - /// - internal static string applications { - get { - return ResourceManager.GetString("applications", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?> - ///<trees> - /// <add initialize="false" sortOrder="0" alias="1838c3e1591f4008bbafe59a06a00a31" application="1838c3e1591f4008bbafe59a06a00a31" title="1838c3e1591f4008bbafe59a06a00a31" iconClosed="icon.jpg" iconOpen="icon.jpg" type="nulltype" /> - /// <add initialize="false" sortOrder="0" alias="e5badae2fc5e4cd7acb3700320e33b8b" application="e5badae2fc5e4cd7acb3700320e33b8b" title="e5badae2fc5e4cd7acb3700320e33b8b" iconClosed="icon.jpg" iconOpen="icon.jpg" type="nulltype" /> - /// [rest of string was truncated]";. - /// - internal static string trees { - get { - return ResourceManager.GetString("trees", resourceCulture); - } - } - } -} diff --git a/src/Umbraco.Tests/TreesAndSections/ResourceFiles.resx b/src/Umbraco.Tests/TreesAndSections/ResourceFiles.resx deleted file mode 100644 index fac58dc842..0000000000 --- a/src/Umbraco.Tests/TreesAndSections/ResourceFiles.resx +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - applications.config;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 - - - trees.config;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 - - \ No newline at end of file diff --git a/src/Umbraco.Tests/TreesAndSections/SectionTests.cs b/src/Umbraco.Tests/TreesAndSections/SectionTests.cs deleted file mode 100644 index 83de6c4479..0000000000 --- a/src/Umbraco.Tests/TreesAndSections/SectionTests.cs +++ /dev/null @@ -1,252 +0,0 @@ -//using System.IO; -//using NUnit.Framework; -//using Umbraco.Core.Services; -//using Umbraco.Tests.TestHelpers; -//using System; -//using Umbraco.Core.Composing; -//using Umbraco.Tests.Testing; -//using Umbraco.Web.Services; - -//namespace Umbraco.Tests.TreesAndSections -//{ -// /// -// ///This is a test class for ApplicationTest and is intended -// ///to contain all ApplicationTest Unit Tests -// /// -// [TestFixture] -// [UmbracoTest(AutoMapper = true, Database = UmbracoTestOptions.Database.NewSchemaPerTest)] -// public class SectionTests : TestWithDatabaseBase -// { -// protected override void Compose() -// { -// base.Compose(); -// Composition.RegisterUnique(); -// } - -// public override void SetUp() -// { -// base.SetUp(); - -// var treesConfig = TestHelper.MapPathForTest("~/TEMP/TreesAndSections/trees.config"); -// var appConfig = TestHelper.MapPathForTest("~/TEMP/TreesAndSections/applications.config"); -// Directory.CreateDirectory(TestHelper.MapPathForTest("~/TEMP/TreesAndSections")); -// using (var writer = File.CreateText(treesConfig)) -// { -// writer.Write(ResourceFiles.trees); -// } -// using (var writer = File.CreateText(appConfig)) -// { -// writer.Write(ResourceFiles.applications); -// } - -// ApplicationTreeService.TreeConfigFilePath = treesConfig; -// SectionService.AppConfigFilePath = appConfig; -// } - -// public override void TearDown() -// { -// base.TearDown(); - -// if (Directory.Exists(TestHelper.MapPathForTest("~/TEMP/TreesAndSections"))) -// { -// Directory.Delete(TestHelper.MapPathForTest("~/TEMP/TreesAndSections"), true); -// } -// ApplicationTreeService.TreeConfigFilePath = null; -// SectionService.AppConfigFilePath = null; -// } - -// ///// -// ///// Create a new application and delete it -// ///// -// //[Test()] -// //public void Application_Make_New() -// //{ -// // var name = Guid.NewGuid().ToString("N"); -// // ServiceContext.SectionService.MakeNew(name, name, "icon.jpg"); - -// // //check if it exists -// // var app = ServiceContext.SectionService.GetByAlias(name); -// // Assert.IsNotNull(app); - -// // //now remove it -// // ServiceContext.SectionService.DeleteSection(app); -// // Assert.IsNull(ServiceContext.SectionService.GetByAlias(name)); -// //} - -// #region Tests to write - - -// ///// -// /////A test for Application Constructor -// ///// -// //[TestMethod()] -// //public void ApplicationConstructorTest() -// //{ -// // string name = string.Empty; // TODO: Initialize to an appropriate value -// // string alias = string.Empty; // TODO: Initialize to an appropriate value -// // string icon = string.Empty; // TODO: Initialize to an appropriate value -// // Application target = new Application(name, alias, icon); -// // Assert.Inconclusive("TODO: Implement code to verify target"); -// //} - -// ///// -// /////A test for Application Constructor -// ///// -// //[TestMethod()] -// //public void ApplicationConstructorTest1() -// //{ -// // Application target = new Application(); -// // Assert.Inconclusive("TODO: Implement code to verify target"); -// //} - -// ///// -// /////A test for Delete -// ///// -// //[TestMethod()] -// //public void DeleteTest() -// //{ -// // Application target = new Application(); // TODO: Initialize to an appropriate value -// // target.Delete(); -// // Assert.Inconclusive("A method that does not return a value cannot be verified."); -// //} - - - -// ///// -// /////A test for MakeNew -// ///// -// //[TestMethod()] -// //public void MakeNewTest1() -// //{ -// // string name = string.Empty; // TODO: Initialize to an appropriate value -// // string alias = string.Empty; // TODO: Initialize to an appropriate value -// // string icon = string.Empty; // TODO: Initialize to an appropriate value -// // Application.MakeNew(name, alias, icon); -// // Assert.Inconclusive("A method that does not return a value cannot be verified."); -// //} - -// ///// -// /////A test for RegisterIApplications -// ///// -// //[TestMethod()] -// //public void RegisterIApplicationsTest() -// //{ -// // Application.RegisterIApplications(); -// // Assert.Inconclusive("A method that does not return a value cannot be verified."); -// //} - -// ///// -// /////A test for getAll -// ///// -// //[TestMethod()] -// //public void getAllTest() -// //{ -// // List expected = null; // TODO: Initialize to an appropriate value -// // List actual; -// // actual = Application.getAll(); -// // Assert.AreEqual(expected, actual); -// // Assert.Inconclusive("Verify the correctness of this test method."); -// //} - -// ///// -// /////A test for getByAlias -// ///// -// //[TestMethod()] -// //public void getByAliasTest() -// //{ -// // string appAlias = string.Empty; // TODO: Initialize to an appropriate value -// // Application expected = null; // TODO: Initialize to an appropriate value -// // Application actual; -// // actual = Application.getByAlias(appAlias); -// // Assert.AreEqual(expected, actual); -// // Assert.Inconclusive("Verify the correctness of this test method."); -// //} - -// ///// -// /////A test for SqlHelper -// ///// -// //[TestMethod()] -// //public void SqlHelperTest() -// //{ -// // ISqlHelper actual; -// // actual = Application.SqlHelper; -// // Assert.Inconclusive("Verify the correctness of this test method."); -// //} - -// ///// -// /////A test for alias -// ///// -// //[TestMethod()] -// //public void aliasTest() -// //{ -// // Application target = new Application(); // TODO: Initialize to an appropriate value -// // string expected = string.Empty; // TODO: Initialize to an appropriate value -// // string actual; -// // target.alias = expected; -// // actual = target.alias; -// // Assert.AreEqual(expected, actual); -// // Assert.Inconclusive("Verify the correctness of this test method."); -// //} - -// ///// -// /////A test for icon -// ///// -// //[TestMethod()] -// //public void iconTest() -// //{ -// // Application target = new Application(); // TODO: Initialize to an appropriate value -// // string expected = string.Empty; // TODO: Initialize to an appropriate value -// // string actual; -// // target.icon = expected; -// // actual = target.icon; -// // Assert.AreEqual(expected, actual); -// // Assert.Inconclusive("Verify the correctness of this test method."); -// //} - -// ///// -// /////A test for name -// ///// -// //[TestMethod()] -// //public void nameTest() -// //{ -// // Application target = new Application(); // TODO: Initialize to an appropriate value -// // string expected = string.Empty; // TODO: Initialize to an appropriate value -// // string actual; -// // target.name = expected; -// // actual = target.name; -// // Assert.AreEqual(expected, actual); -// // Assert.Inconclusive("Verify the correctness of this test method."); -// //} -// #endregion - -// #region Additional test attributes -// // -// //You can use the following additional attributes as you write your tests: -// // -// //Use ClassInitialize to run code before running the first test in the class -// //[ClassInitialize()] -// //public static void MyClassInitialize(TestContext testContext) -// //{ -// //} -// // -// //Use ClassCleanup to run code after all tests in a class have run -// //[ClassCleanup()] -// //public static void MyClassCleanup() -// //{ -// //} -// // -// //Use TestInitialize to run code before running each test -// //[TestInitialize()] -// //public void MyTestInitialize() -// //{ -// //} -// // -// //Use TestCleanup to run code after each test has run -// //[TestCleanup()] -// //public void MyTestCleanup() -// //{ -// //} -// // -// #endregion -// } -//} diff --git a/src/Umbraco.Tests/TreesAndSections/applications.config b/src/Umbraco.Tests/TreesAndSections/applications.config deleted file mode 100644 index aadd1c5407..0000000000 --- a/src/Umbraco.Tests/TreesAndSections/applications.config +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Umbraco.Tests/TreesAndSections/trees.config b/src/Umbraco.Tests/TreesAndSections/trees.config deleted file mode 100644 index d21fea28a9..0000000000 --- a/src/Umbraco.Tests/TreesAndSections/trees.config +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/src/Umbraco.Tests/Umbraco.Tests.csproj b/src/Umbraco.Tests/Umbraco.Tests.csproj index e49ba250fa..408b0f96ca 100644 --- a/src/Umbraco.Tests/Umbraco.Tests.csproj +++ b/src/Umbraco.Tests/Umbraco.Tests.csproj @@ -423,13 +423,6 @@ - - True - True - ResourceFiles.resx - - - @@ -525,8 +518,6 @@ Designer Always - - Designer @@ -561,10 +552,6 @@ ImportResources.Designer.cs Designer - - ResXFileCodeGenerator - ResourceFiles.Designer.cs - ResXFileCodeGenerator TestFiles.Designer.cs diff --git a/src/Umbraco.Web/Cache/ApplicationTreeCacheRefresher.cs b/src/Umbraco.Web/Cache/ApplicationTreeCacheRefresher.cs deleted file mode 100644 index 4d6740a0b1..0000000000 --- a/src/Umbraco.Web/Cache/ApplicationTreeCacheRefresher.cs +++ /dev/null @@ -1,46 +0,0 @@ -//using System; -//using Umbraco.Core.Cache; - -//namespace Umbraco.Web.Cache -//{ -// public sealed class ApplicationTreeCacheRefresher : CacheRefresherBase -// { -// public ApplicationTreeCacheRefresher(CacheHelper cacheHelper) -// : base(cacheHelper) -// { } - -// #region Define - -// protected override ApplicationTreeCacheRefresher This => this; - -// public static readonly Guid UniqueId = Guid.Parse("0AC6C028-9860-4EA4-958D-14D39F45886E"); - -// public override Guid RefresherUniqueId => UniqueId; - -// public override string Name => "Application Tree Cache Refresher"; - -// #endregion - -// #region Refresher - -// public override void RefreshAll() -// { -// CacheHelper.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationTreeCacheKey); -// base.RefreshAll(); -// } - -// public override void Refresh(int id) -// { -// Remove(id); -// base.Refresh(id); -// } - -// public override void Remove(int id) -// { -// CacheHelper.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationTreeCacheKey); -// base.Remove(id); -// } - -// #endregion -// } -//} diff --git a/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs b/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs index 421eb546a4..3a3eb1b8fb 100644 --- a/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs +++ b/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs @@ -46,20 +46,6 @@ namespace Umbraco.Web.Cache _logger.Info("Initializing Umbraco internal event handlers for cache refreshing."); - //// bind to application tree events - //Bind(() => ApplicationTreeService.Deleted += ApplicationTreeService_Deleted, - // () => ApplicationTreeService.Deleted -= ApplicationTreeService_Deleted); - //Bind(() => ApplicationTreeService.Updated += ApplicationTreeService_Updated, - // () => ApplicationTreeService.Updated -= ApplicationTreeService_Updated); - //Bind(() => ApplicationTreeService.New += ApplicationTreeService_New, - // () => ApplicationTreeService.New -= ApplicationTreeService_New); - - //// bind to application events - //Bind(() => SectionService.Deleted += SectionService_Deleted, - // () => SectionService.Deleted -= SectionService_Deleted); - //Bind(() => SectionService.New += SectionService_New, - // () => SectionService.New -= SectionService_New); - // bind to user and user group events Bind(() => UserService.SavedUserGroup += UserService_SavedUserGroup, () => UserService.SavedUserGroup -= UserService_SavedUserGroup); @@ -231,39 +217,6 @@ namespace Umbraco.Web.Cache #endregion - //#region ApplicationTreeService - - //private void ApplicationTreeService_New(ApplicationTree sender, EventArgs e) - //{ - // _distributedCache.RefreshAllApplicationTreeCache(); - //} - - //private void ApplicationTreeService_Updated(ApplicationTree sender, EventArgs e) - //{ - // _distributedCache.RefreshAllApplicationTreeCache(); - //} - - //private void ApplicationTreeService_Deleted(ApplicationTree sender, EventArgs e) - //{ - // _distributedCache.RefreshAllApplicationTreeCache(); - //} - - //#endregion - - //#region Application event handlers - - //private void SectionService_New(ISectionService sender, EventArgs e) - //{ - // _distributedCache.RefreshAllApplicationCache(); - //} - - //private void SectionService_Deleted(ISectionService sender, EventArgs e) - //{ - // _distributedCache.RefreshAllApplicationCache(); - //} - - //#endregion - #region LocalizationService / Dictionary private void LocalizationService_SavedDictionaryItem(ILocalizationService sender, SaveEventArgs e) diff --git a/src/Umbraco.Web/Cache/DistributedCacheExtensions.cs b/src/Umbraco.Web/Cache/DistributedCacheExtensions.cs index aab0f9b157..80c49e279c 100644 --- a/src/Umbraco.Web/Cache/DistributedCacheExtensions.cs +++ b/src/Umbraco.Web/Cache/DistributedCacheExtensions.cs @@ -18,24 +18,6 @@ namespace Umbraco.Web.Cache #endregion - //#region ApplicationTreeCache - - //public static void RefreshAllApplicationTreeCache(this DistributedCache dc) - //{ - // dc.RefreshAll(ApplicationTreeCacheRefresher.UniqueId); - //} - - //#endregion - - //#region ApplicationCache - - //public static void RefreshAllApplicationCache(this DistributedCache dc) - //{ - // dc.RefreshAll(ApplicationCacheRefresher.UniqueId); - //} - - //#endregion - #region User cache public static void RemoveUserCache(this DistributedCache dc, int userId) @@ -74,7 +56,6 @@ namespace Umbraco.Web.Cache #endregion - #region TemplateCache public static void RefreshTemplateCache(this DistributedCache dc, int templateId) diff --git a/src/Umbraco.Web/Models/ContentEditing/IBackOfficeSection.cs b/src/Umbraco.Web/Models/ContentEditing/IBackOfficeSection.cs deleted file mode 100644 index f27941035a..0000000000 --- a/src/Umbraco.Web/Models/ContentEditing/IBackOfficeSection.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Umbraco.Core.Composing; - -namespace Umbraco.Web.Models.ContentEditing -{ - - /// - /// Defines a back office section - /// - public interface IBackOfficeSection : IDiscoverable - { - string Alias { get; } - string Name { get; } - int SortOrder { get; } - } -} diff --git a/src/Umbraco.Web/Models/Mapping/SectionMapperProfile.cs b/src/Umbraco.Web/Models/Mapping/SectionMapperProfile.cs index 683fce36e8..5aa99e4652 100644 --- a/src/Umbraco.Web/Models/Mapping/SectionMapperProfile.cs +++ b/src/Umbraco.Web/Models/Mapping/SectionMapperProfile.cs @@ -3,6 +3,7 @@ using AutoMapper; using Umbraco.Core.Models.ContentEditing; using Umbraco.Core.Services; using Umbraco.Web.Models.ContentEditing; +using Umbraco.Web.Models.Trees; namespace Umbraco.Web.Models.Mapping { diff --git a/src/Umbraco.Web/Models/Trees/ApplicationDefinitions.cs b/src/Umbraco.Web/Models/Trees/ApplicationDefinitions.cs deleted file mode 100644 index ba48c9e240..0000000000 --- a/src/Umbraco.Web/Models/Trees/ApplicationDefinitions.cs +++ /dev/null @@ -1,77 +0,0 @@ -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Models.ContentEditing; -using Umbraco.Web.Models.ContentEditing; - -namespace Umbraco.Web.Models.Trees -{ - /// - /// Defines the back office content section - /// - public class ContentBackOfficeSectionDefinition : IBackOfficeSection - { - public string Alias => Constants.Applications.Content; - public string Name => "Content"; - public int SortOrder => 0; - } - - /// - /// Defines the back office media section - /// - public class MediaBackOfficeSectionDefinition : IBackOfficeSection - { - public string Alias => Constants.Applications.Media; - public string Name => "Media"; - public int SortOrder => 1; - } - - /// - /// Defines the back office settings section - /// - public class SettingsBackOfficeSectionDefinition : IBackOfficeSection - { - public string Alias => Constants.Applications.Settings; - public string Name => "Settings"; - public int SortOrder => 2; - } - - /// - /// Defines the back office packages section - /// - public class PackagesBackOfficeSectionDefinition : IBackOfficeSection - { - public string Alias => Constants.Applications.Packages; - public string Name => "Packages"; - public int SortOrder => 3; - } - - /// - /// Defines the back office users section - /// - public class UsersBackOfficeSectionDefinition : IBackOfficeSection - { - public string Alias => Constants.Applications.Users; - public string Name => "Users"; - public int SortOrder => 4; - } - - /// - /// Defines the back office members section - /// - public class MembersBackOfficeSectionDefinition : IBackOfficeSection - { - public string Alias => Constants.Applications.Members; - public string Name => "Members"; - public int SortOrder => 5; - } - - /// - /// Defines the back office translation section - /// - public class TranslationBackOfficeSectionDefinition : IBackOfficeSection - { - public string Alias => Constants.Applications.Translation; - public string Name => "Translation"; - public int SortOrder => 6; - } -} diff --git a/src/Umbraco.Web/Models/Trees/IBackOfficeSection.cs b/src/Umbraco.Web/Models/Trees/IBackOfficeSection.cs new file mode 100644 index 0000000000..0cc505fb19 --- /dev/null +++ b/src/Umbraco.Web/Models/Trees/IBackOfficeSection.cs @@ -0,0 +1,12 @@ +namespace Umbraco.Web.Models.Trees +{ + + /// + /// Defines a back office section + /// + public interface IBackOfficeSection + { + string Alias { get; } + string Name { get; } + } +} diff --git a/src/Umbraco.Web/Models/Trees/SectionRootNode.cs b/src/Umbraco.Web/Models/Trees/TreeRootNode.cs similarity index 100% rename from src/Umbraco.Web/Models/Trees/SectionRootNode.cs rename to src/Umbraco.Web/Models/Trees/TreeRootNode.cs diff --git a/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs b/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs index 047d080a88..134ed7b1d0 100644 --- a/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs +++ b/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs @@ -25,6 +25,7 @@ using Umbraco.Web.Features; using Umbraco.Web.HealthCheck; using Umbraco.Web.Models.ContentEditing; using Umbraco.Web.Models.PublishedContent; +using Umbraco.Web.Models.Trees; using Umbraco.Web.Mvc; using Umbraco.Web.PublishedCache; using Umbraco.Web.Routing; @@ -195,9 +196,15 @@ namespace Umbraco.Web.Runtime .Append() .Append(); - // register back office sections + // register back office sections in the order we want them rendered composition.WithCollectionBuilder() - .Add(() => composition.TypeLoader.GetTypes()); + .Append() + .Append() + .Append() + .Append() + .Append() + .Append() + .Append(); // register back office trees foreach (var treeControllerType in umbracoApiControllerTypes) diff --git a/src/Umbraco.Web/Services/ISectionService.cs b/src/Umbraco.Web/Services/ISectionService.cs index c325020cf1..f0a16dc965 100644 --- a/src/Umbraco.Web/Services/ISectionService.cs +++ b/src/Umbraco.Web/Services/ISectionService.cs @@ -2,6 +2,7 @@ using Umbraco.Core.Models; using Umbraco.Core.Models.ContentEditing; using Umbraco.Web.Models.ContentEditing; +using Umbraco.Web.Models.Trees; namespace Umbraco.Web.Services { diff --git a/src/Umbraco.Web/Services/ITreeService.cs b/src/Umbraco.Web/Services/ITreeService.cs index ce734cc5e4..17998ae1a7 100644 --- a/src/Umbraco.Web/Services/ITreeService.cs +++ b/src/Umbraco.Web/Services/ITreeService.cs @@ -29,15 +29,7 @@ namespace Umbraco.Web.Services /// The application alias. /// Returns a ApplicationTree Array IEnumerable GetApplicationTrees(string applicationAlias); - - ///// - ///// Gets the application tree for the applcation with the specified alias - ///// - ///// The application alias. - ///// - ///// Returns a ApplicationTree Array - //IEnumerable GetApplicationTrees(string applicationAlias, bool onlyInitialized); - + /// /// Gets the grouped application trees for the application with the specified alias /// diff --git a/src/Umbraco.Web/Services/SectionService.cs b/src/Umbraco.Web/Services/SectionService.cs index bb154976f0..e6af27534c 100644 --- a/src/Umbraco.Web/Services/SectionService.cs +++ b/src/Umbraco.Web/Services/SectionService.cs @@ -25,270 +25,31 @@ namespace Umbraco.Web.Services private readonly IUserService _userService; private readonly BackOfficeSectionCollection _sectionCollection; - private readonly Lazy> _allAvailableSections; - //private readonly IApplicationTreeService _applicationTreeService; - //private readonly IScopeProvider _scopeProvider; - private readonly CacheHelper _cache; - //internal const string AppConfigFileName = "applications.config"; - //private static string _appConfig; - //private static readonly object Locker = new object(); - public SectionService( IUserService userService, - BackOfficeSectionCollection sectionCollection, - CacheHelper cache) + BackOfficeSectionCollection sectionCollection) { - //_applicationTreeService = applicationTreeService ?? throw new ArgumentNullException(nameof(applicationTreeService)); - _cache = cache ?? throw new ArgumentNullException(nameof(cache)); _userService = userService; _sectionCollection = sectionCollection; - //_scopeProvider = scopeProvider; - //_allAvailableSections = new Lazy>(() => new LazyEnumerableSections()); } - - - ///// - ///// gets/sets the application.config file path - ///// - ///// - ///// The setter is generally only going to be used in unit tests, otherwise it will attempt to resolve it using the IOHelper.MapPath - ///// - //internal static string AppConfigFilePath - //{ - // get - // { - // if (string.IsNullOrWhiteSpace(_appConfig)) - // { - // _appConfig = IOHelper.MapPath(SystemDirectories.Config + "/" + AppConfigFileName); - // } - // return _appConfig; - // } - // set => _appConfig = value; - //} - + /// /// The cache storage for all applications /// - public IEnumerable GetSections() - { - return _sectionCollection; - } + public IEnumerable GetSections() => _sectionCollection; - //internal void LoadXml(Func callback, bool saveAfterCallbackIfChanged) - //{ - // lock (Locker) - // { - // var doc = File.Exists(AppConfigFilePath) - // ? XDocument.Load(AppConfigFilePath) - // : XDocument.Parse(""); - - // if (doc.Root != null) - // { - // var changed = callback.Invoke(doc); - - // if (saveAfterCallbackIfChanged && changed) - // { - // //ensure the folder is created! - // Directory.CreateDirectory(Path.GetDirectoryName(AppConfigFilePath)); - - // doc.Save(AppConfigFilePath); - - // //remove the cache so it gets re-read ... SD: I'm leaving this here even though it - // // is taken care of by events as well, I think unit tests may rely on it being cleared here. - // _cache.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationsCacheKey); - // } - // } - // } - //} - - /// - /// Get the user's allowed sections - /// - /// - /// + /// public IEnumerable GetAllowedSections(int userId) { - var user = _userService.GetUserById(userId); if (user == null) - { throw new InvalidOperationException("No user found with id " + userId); - } return GetSections().Where(x => user.AllowedSections.Contains(x.Alias)); } - /// - /// Gets the application by its alias. - /// - /// The application alias. - /// - public IBackOfficeSection GetByAlias(string appAlias) - { - return GetSections().FirstOrDefault(t => t.Alias == appAlias); - } - - ///// - ///// Creates a new applcation if no application with the specified alias is found. - ///// - ///// The application name. - ///// The application alias. - ///// The application icon, which has to be located in umbraco/images/tray folder. - //public void MakeNew(string name, string alias, string icon) - //{ - // var sections = GetSections(); - // var nextSortOrder = sections.Any() ? sections.Max(x => x.SortOrder) + 1 : 1; - // MakeNew(name, alias, icon, nextSortOrder); - //} - - ///// - ///// Makes the new. - ///// - ///// The name. - ///// The alias. - ///// The icon. - ///// The sort order. - //public void MakeNew(string name, string alias, string icon, int sortOrder) - //{ - // if (GetSections().All(x => x.Alias != alias)) - // { - // LoadXml(doc => - // { - // doc.Root.Add(new XElement("add", - // new XAttribute("alias", alias), - // new XAttribute("name", name), - // new XAttribute("icon", icon), - // new XAttribute("sortOrder", sortOrder))); - // return true; - // }, true); - - // //raise event - // OnNew(this /*new Section(name, alias, sortOrder)*/, new EventArgs()); - // } - //} - - ///// - ///// Deletes the section - ///// - //public void DeleteSection(Section section) - //{ - // lock (Locker) - // { - // //delete the assigned applications - // using (var scope = _scopeProvider.CreateScope()) - // { - // scope.Database.Execute("delete from umbracoUserGroup2App where app = @appAlias", - // new { appAlias = section.Alias }); - // scope.Complete(); - // } - - // //delete the assigned trees - // var trees = _applicationTreeService.GetApplicationTrees(section.Alias); - // foreach (var t in trees) - // { - // _applicationTreeService.DeleteTree(t); - // } - - // LoadXml(doc => - // { - // doc.Root.Elements("add").Where(x => x.Attribute("alias") != null && x.Attribute("alias").Value == section.Alias) - // .Remove(); - - // return true; - // }, true); - - // //raise event - // OnDeleted(this, new EventArgs()); - // } - //} - - //private List
ReadFromXmlAndSort() - //{ - // var tmp = new List
(); - - // LoadXml(doc => - // { - // foreach (var addElement in doc.Root.Elements("add").OrderBy(x => - // { - // var sortOrderAttr = x.Attribute("sortOrder"); - // return sortOrderAttr != null ? Convert.ToInt32(sortOrderAttr.Value) : 0; - // })) - // { - // var sortOrderAttr = addElement.Attribute("sortOrder"); - // tmp.Add(new Section(addElement.Attribute("name").Value, - // addElement.Attribute("alias").Value, - // sortOrderAttr != null ? Convert.ToInt32(sortOrderAttr.Value) : 0)); - // } - // return false; - // }, false); - - // return tmp; - //} - - //internal static event TypedEventHandler Deleted; - //private static void OnDeleted(ISectionService app, EventArgs args) - //{ - // if (Deleted != null) - // { - // Deleted(app, args); - // } - //} - - //internal static event TypedEventHandler New; - //private static void OnNew(ISectionService app, EventArgs args) - //{ - // if (New != null) - // { - // New(app, args); - // } - //} - - ///// - ///// This class is here so that we can provide lazy access to tree scanning for when it is needed - ///// - //private class LazyEnumerableSections : IEnumerable
- //{ - // public LazyEnumerableSections() - // { - // _lazySections = new Lazy>(() => - // { - // // Load all Applications by attribute and add them to the XML config - - // //don't cache the result of this because it is only used once during app startup, caching will just add a bit more mem overhead for no reason - // var types = Current.TypeLoader.GetTypesWithAttribute(cache: false); // fixme - inject - - // //since applications don't populate their metadata from the attribute and because it is an interface, - // //we need to interrogate the attributes for the data. Would be better to have a base class that contains - // //metadata populated by the attribute. Oh well i guess. - // var attrs = types.Select(x => x.GetCustomAttributes(false).Single()); - // return attrs.Select(x => new Section(x.Name, x.Alias, x.SortOrder)).ToArray(); - // }); - // } - - // private readonly Lazy> _lazySections; - - // /// - // /// Returns an enumerator that iterates through the collection. - // /// - // /// - // /// A that can be used to iterate through the collection. - // /// - // public IEnumerator
GetEnumerator() - // { - // return _lazySections.Value.GetEnumerator(); - // } - - // /// - // /// Returns an enumerator that iterates through a collection. - // /// - // /// - // /// An object that can be used to iterate through the collection. - // /// - // IEnumerator IEnumerable.GetEnumerator() - // { - // return GetEnumerator(); - // } - //} - + /// + public IBackOfficeSection GetByAlias(string appAlias) => GetSections().FirstOrDefault(t => t.Alias == appAlias); + } } diff --git a/src/Umbraco.Web/Services/TreeService.cs b/src/Umbraco.Web/Services/TreeService.cs index cf010f1480..670f57ce49 100644 --- a/src/Umbraco.Web/Services/TreeService.cs +++ b/src/Umbraco.Web/Services/TreeService.cs @@ -1,237 +1,22 @@ using System; -using System.Collections; using System.Collections.Generic; -using System.IO; using System.Linq; -using System.Xml.Linq; using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Events; -using Umbraco.Core.IO; -using Umbraco.Core.Logging; -using Umbraco.Core.Models; -using Umbraco.Core.Composing; -using Umbraco.Core.Models.ContentEditing; -using Umbraco.Core.Services; -using Umbraco.Web.Models.ContentEditing; using Umbraco.Web.Trees; namespace Umbraco.Web.Services { internal class TreeService : ITreeService { - private readonly ILogger _logger; private readonly TreeCollection _treeCollection; - private static readonly object Locker = new object(); private readonly Lazy>> _groupedTrees; - public TreeService(ILogger logger, TreeCollection treeCollection) + public TreeService(TreeCollection treeCollection) { - _logger = logger; _treeCollection = treeCollection; _groupedTrees = new Lazy>>(InitGroupedTrees); } - ///// - ///// gets/sets the trees.config file path - ///// - ///// - ///// The setter is generally only going to be used in unit tests, otherwise it will attempt to resolve it using the IOHelper.MapPath - ///// - //internal static string TreeConfigFilePath - //{ - // get - // { - // if (string.IsNullOrWhiteSpace(_treeConfig)) - // { - // _treeConfig = IOHelper.MapPath(SystemDirectories.Config + "/" + TreeConfigFileName); - // } - // return _treeConfig; - // } - // set { _treeConfig = value; } - //} - - ///// - ///// The main entry point to get application trees - ///// - ///// - ///// This lazily on first access will scan for plugin trees and ensure the trees.config is up-to-date with the plugins. If plugins - ///// haven't changed on disk then the file will not be saved. The trees are all then loaded from this config file into cache and returned. - ///// - //private List GetAppTrees() - //{ - // return _cache.RuntimeCache.GetCacheItem>( - // CacheKeys.ApplicationTreeCacheKey, - // () => - // { - // var list = ReadFromXmlAndSort(); - - // //now we can check the non-volatile flag - // if (_allAvailableTrees != null) - // { - // var hasChanges = false; - - // LoadXml(doc => - // { - // //Now, load in the xml structure and update it with anything that is not declared there and save the file. - - // //NOTE: On the first iteration here, it will lazily scan all trees, etc... this is because this ienumerable is lazy - // // based on the ApplicationTreeRegistrar - and as noted there this is not an ideal way to do things but were stuck like this - // // currently because of the legacy assemblies and types not in the Core. - - // //Get all the trees not registered in the config (those not matching by alias casing will be detected as "unregistered") - // var unregistered = _allAvailableTrees.Value - // .Where(x => list.Any(l => l.Alias == x.Alias) == false) - // .ToArray(); - - // hasChanges = unregistered.Any(); - - // if (hasChanges == false) return false; - - // //add or edit the unregistered ones and re-save the file if any changes were found - // var count = 0; - // foreach (var tree in unregistered) - // { - // var existingElement = doc.Root.Elements("add").SingleOrDefault(x => - // string.Equals(x.Attribute("alias").Value, tree.Alias, - // StringComparison.InvariantCultureIgnoreCase) && - // string.Equals(x.Attribute("application").Value, tree.ApplicationAlias, - // StringComparison.InvariantCultureIgnoreCase)); - // if (existingElement != null) - // { - // existingElement.SetAttributeValue("alias", tree.Alias); - // } - // else - // { - // if (tree.Title.IsNullOrWhiteSpace()) - // { - // doc.Root.Add(new XElement("add", - // new XAttribute("initialize", tree.Initialize), - // new XAttribute("sortOrder", tree.SortOrder), - // new XAttribute("alias", tree.Alias), - // new XAttribute("application", tree.ApplicationAlias), - // new XAttribute("iconClosed", tree.IconClosed), - // new XAttribute("iconOpen", tree.IconOpened), - // new XAttribute("type", tree.Type))); - // } - // else - // { - // doc.Root.Add(new XElement("add", - // new XAttribute("initialize", tree.Initialize), - // new XAttribute("sortOrder", tree.SortOrder), - // new XAttribute("alias", tree.Alias), - // new XAttribute("application", tree.ApplicationAlias), - // new XAttribute("title", tree.Title), - // new XAttribute("iconClosed", tree.IconClosed), - // new XAttribute("iconOpen", tree.IconOpened), - // new XAttribute("type", tree.Type))); - // } - - // } - // count++; - // } - - // //don't save if there's no changes - // return count > 0; - // }, true); - - // if (hasChanges) - // { - // //If there were changes, we need to re-read the structures from the XML - // list = ReadFromXmlAndSort(); - // } - // } - - // return list; - // }, new TimeSpan(0, 10, 0)); - //} - - ///// - ///// Creates a new application tree. - ///// - ///// if set to true [initialize]. - ///// The sort order. - ///// The application alias. - ///// The alias. - ///// The title. - ///// The icon closed. - ///// The icon opened. - ///// The type. - //public void MakeNew(bool initialize, int sortOrder, string applicationAlias, string alias, string title, string iconClosed, string iconOpened, string type) - //{ - // LoadXml(doc => - // { - // var el = doc.Root.Elements("add").SingleOrDefault(x => x.Attribute("alias").Value == alias && x.Attribute("application").Value == applicationAlias); - - // if (el == null) - // { - // doc.Root.Add(new XElement("add", - // new XAttribute("initialize", initialize), - // new XAttribute("sortOrder", sortOrder), - // new XAttribute("alias", alias), - // new XAttribute("application", applicationAlias), - // new XAttribute("title", title), - // new XAttribute("iconClosed", iconClosed), - // new XAttribute("iconOpen", iconOpened), - // new XAttribute("type", type))); - // } - - // return true; - - // }, true); - - // OnNew(new ApplicationTree(initialize, sortOrder, applicationAlias, alias, title, iconClosed, iconOpened, type), new EventArgs()); - //} - - ///// - ///// Saves this instance. - ///// - //public void SaveTree(ApplicationTree tree) - //{ - // LoadXml(doc => - // { - // var el = doc.Root.Elements("add").SingleOrDefault(x => x.Attribute("alias").Value == tree.Alias && x.Attribute("application").Value == tree.ApplicationAlias); - - // if (el != null) - // { - // el.RemoveAttributes(); - - // el.Add(new XAttribute("initialize", tree.Initialize)); - // el.Add(new XAttribute("sortOrder", tree.SortOrder)); - // el.Add(new XAttribute("alias", tree.Alias)); - // el.Add(new XAttribute("application", tree.ApplicationAlias)); - // el.Add(new XAttribute("title", tree.Title)); - // el.Add(new XAttribute("iconClosed", tree.IconClosed)); - // el.Add(new XAttribute("iconOpen", tree.IconOpened)); - // el.Add(new XAttribute("type", tree.Type)); - // } - - // return true; - - // }, true); - - // OnUpdated(tree, new EventArgs()); - //} - - ///// - ///// Deletes this instance. - ///// - //public void DeleteTree(ApplicationTree tree) - //{ - // LoadXml(doc => - // { - // doc.Root.Elements("add") - // .Where(x => x.Attribute("application") != null - // && x.Attribute("application").Value == tree.ApplicationAlias - // && x.Attribute("alias") != null && x.Attribute("alias").Value == tree.Alias).Remove(); - - // return true; - - // }, true); - - // OnDeleted(tree, new EventArgs()); - //} - /// public ApplicationTree GetByAlias(string treeAlias) => _treeCollection.FirstOrDefault(t => t.TreeAlias == treeAlias); @@ -242,26 +27,6 @@ namespace Umbraco.Web.Services public IEnumerable GetApplicationTrees(string applicationAlias) => GetAll().Where(x => x.ApplicationAlias.InvariantEquals(applicationAlias)).OrderBy(x => x.SortOrder).ToList(); - ///// - ///// Gets the application tree for the applcation with the specified alias - ///// - ///// The application alias. - ///// - ///// Returns a ApplicationTree Array - //public IEnumerable GetApplicationTrees(string applicationAlias, bool onlyInitialized) - //{ - // var list = GetAppTrees().FindAll( - // t => - // { - // if (onlyInitialized) - // return (t.ApplicationAlias == applicationAlias && t.Initialize); - // return (t.ApplicationAlias == applicationAlias); - // } - // ); - - // return list.OrderBy(x => x.SortOrder).ToArray(); - //} - public IDictionary> GetGroupedApplicationTrees(string applicationAlias) { var result = new Dictionary>(); @@ -273,11 +38,10 @@ namespace Umbraco.Web.Services { foreach(var treeAliasInGroup in treeGroup) { - if (tree.TreeAlias == treeAliasInGroup) - { - if (resultGroup == null) resultGroup = new List(); - resultGroup.Add(tree); - } + if (tree.TreeAlias != treeAliasInGroup) continue; + + if (resultGroup == null) resultGroup = new List(); + resultGroup.Add(tree); } } if (resultGroup != null) @@ -302,169 +66,5 @@ namespace Umbraco.Web.Services return result; } - ///// - ///// Loads in the xml structure from disk if one is found, otherwise loads in an empty xml structure, calls the - ///// callback with the xml document and saves the structure back to disk if saveAfterCallback is true. - ///// - ///// - ///// - //internal void LoadXml(Func callback, bool saveAfterCallbackIfChanges) - //{ - // lock (Locker) - // { - // var doc = System.IO.File.Exists(TreeConfigFilePath) - // ? XDocument.Load(TreeConfigFilePath) - // : XDocument.Parse(""); - - // if (doc.Root != null) - // { - // var hasChanges = callback.Invoke(doc); - - // if (saveAfterCallbackIfChanges && hasChanges - // //Don't save it if it is empty, in some very rare cases if the app domain get's killed in the middle of this process - // // in some insane way the file saved will be empty. I'm pretty sure it's not actually anything to do with the xml doc and - // // more about the IO trying to save the XML doc, but it doesn't hurt to check. - // && doc.Root != null && doc.Root.Elements().Any()) - // { - // //ensures the folder exists - // Directory.CreateDirectory(Path.GetDirectoryName(TreeConfigFilePath)); - - // //saves it - // doc.Save(TreeConfigFilePath); - - // //remove the cache now that it has changed SD: I'm leaving this here even though it - // // is taken care of by events as well, I think unit tests may rely on it being cleared here. - // _cache.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationTreeCacheKey); - // } - // } - // } - //} - - //private List ReadFromXmlAndSort() - //{ - // var list = new List(); - - // //read in the xml file containing trees and convert them all to ApplicationTree instances - // LoadXml(doc => - // { - // foreach (var addElement in doc.Root.Elements("add").OrderBy(x => - // { - // var sortOrderAttr = x.Attribute("sortOrder"); - // return sortOrderAttr != null ? Convert.ToInt32(sortOrderAttr.Value) : 0; - // })) - // { - // var applicationAlias = (string)addElement.Attribute("application"); - // var type = (string)addElement.Attribute("type"); - // var assembly = (string)addElement.Attribute("assembly"); - - // var clrType = Type.GetType(type); - // if (clrType == null) - // { - // _logger.Warn("The tree definition: {AddElement} could not be resolved to a .Net object type", addElement); - // continue; - // } - - // //check if the tree definition (applicationAlias + type + assembly) is already in the list - - // if (list.Any(tree => tree.ApplicationAlias.InvariantEquals(applicationAlias) && tree.GetRuntimeType() == clrType) == false) - // { - // list.Add(new ApplicationTree( - // addElement.Attribute("initialize") == null || Convert.ToBoolean(addElement.Attribute("initialize").Value), - // addElement.Attribute("sortOrder") != null - // ? Convert.ToByte(addElement.Attribute("sortOrder").Value) - // : (byte)0, - // (string)addElement.Attribute("application"), - // (string)addElement.Attribute("alias"), - // (string)addElement.Attribute("title"), - // (string)addElement.Attribute("iconClosed"), - // (string)addElement.Attribute("iconOpen"), - // (string)addElement.Attribute("type"))); - // } - // } - - // return false; - - // }, false); - - // return list; - //} - - - //internal static event TypedEventHandler Deleted; - //private static void OnDeleted(ApplicationTree app, EventArgs args) - //{ - // if (Deleted != null) - // { - // Deleted(app, args); - // } - //} - - //internal static event TypedEventHandler New; - //private static void OnNew(ApplicationTree app, EventArgs args) - //{ - // if (New != null) - // { - // New(app, args); - // } - //} - - //internal static event TypedEventHandler Updated; - //private static void OnUpdated(ApplicationTree app, EventArgs args) - //{ - // if (Updated != null) - // { - // Updated(app, args); - // } - //} - - ///// - ///// This class is here so that we can provide lazy access to tree scanning for when it is needed - ///// - //private class LazyEnumerableTrees : IEnumerable - //{ - // public LazyEnumerableTrees(TypeLoader typeLoader) - // { - // _lazyTrees = new Lazy>(() => - // { - // var added = new List(); - - // // Load all Controller Trees by attribute - // var types = typeLoader.GetTypesWithAttribute(); // fixme inject - // //convert them to ApplicationTree instances - // var items = types - // .Select(x => (tree: x, treeAttribute: x.GetCustomAttributes(false).Single())) - // .Select(x => new ApplicationTree(x.treeAttribute.Initialize, x.treeAttribute.SortOrder, x.treeAttribute.ApplicationAlias, x.treeAttribute.Alias, x.treeAttribute.Title, x.treeAttribute.IconClosed, x.treeAttribute.IconOpen, x.tree.GetFullNameWithAssembly())) - // .ToArray(); - - // added.AddRange(items.Select(x => x.Alias)); - - // return items.ToArray(); - // }); - // } - - // private readonly Lazy> _lazyTrees; - - // /// - // /// Returns an enumerator that iterates through the collection. - // /// - // /// - // /// A that can be used to iterate through the collection. - // /// - // public IEnumerator GetEnumerator() - // { - // return _lazyTrees.Value.GetEnumerator(); - // } - - // /// - // /// Returns an enumerator that iterates through a collection. - // /// - // /// - // /// An object that can be used to iterate through the collection. - // /// - // IEnumerator IEnumerable.GetEnumerator() - // { - // return GetEnumerator(); - // } - //} } } diff --git a/src/Umbraco.Web/Trees/BackOfficeSectionCollection.cs b/src/Umbraco.Web/Trees/BackOfficeSectionCollection.cs index 2b5a78d758..54762e73d8 100644 --- a/src/Umbraco.Web/Trees/BackOfficeSectionCollection.cs +++ b/src/Umbraco.Web/Trees/BackOfficeSectionCollection.cs @@ -2,6 +2,7 @@ using Umbraco.Core.Composing; using Umbraco.Core.Models.ContentEditing; using Umbraco.Web.Models.ContentEditing; +using Umbraco.Web.Models.Trees; namespace Umbraco.Web.Trees { @@ -11,11 +12,4 @@ namespace Umbraco.Web.Trees : base(items) { } } - - public class BackOfficeSectionCollectionBuilder : LazyCollectionBuilderBase - { - protected override BackOfficeSectionCollectionBuilder This => this; - - //TODO: can we allow for re-ordering OOTB without exposing other methods? - } } diff --git a/src/Umbraco.Web/Trees/BackOfficeSectionCollectionBuilder.cs b/src/Umbraco.Web/Trees/BackOfficeSectionCollectionBuilder.cs new file mode 100644 index 0000000000..62d61a4090 --- /dev/null +++ b/src/Umbraco.Web/Trees/BackOfficeSectionCollectionBuilder.cs @@ -0,0 +1,10 @@ +using Umbraco.Core.Composing; +using Umbraco.Web.Models.Trees; + +namespace Umbraco.Web.Trees +{ + public class BackOfficeSectionCollectionBuilder : OrderedCollectionBuilderBase + { + protected override BackOfficeSectionCollectionBuilder This => this; + } +} diff --git a/src/Umbraco.Web/Trees/ContentBackOfficeSection.cs b/src/Umbraco.Web/Trees/ContentBackOfficeSection.cs new file mode 100644 index 0000000000..0109a6916d --- /dev/null +++ b/src/Umbraco.Web/Trees/ContentBackOfficeSection.cs @@ -0,0 +1,15 @@ +using Umbraco.Core; +using Umbraco.Web.Models.ContentEditing; +using Umbraco.Web.Models.Trees; + +namespace Umbraco.Web.Trees +{ + /// + /// Defines the back office content section + /// + public class ContentBackOfficeSection : IBackOfficeSection + { + public string Alias => Constants.Applications.Content; + public string Name => "Content"; + } +} diff --git a/src/Umbraco.Web/Trees/ITree.cs b/src/Umbraco.Web/Trees/ITree.cs index 40be7338b0..f408ce5e60 100644 --- a/src/Umbraco.Web/Trees/ITree.cs +++ b/src/Umbraco.Web/Trees/ITree.cs @@ -1,5 +1,6 @@ namespace Umbraco.Web.Trees { + //fixme - we don't really use this, it is nice to have the treecontroller, attribute and ApplicationTree streamlined to implement this but it's not used public interface ITree { /// diff --git a/src/Umbraco.Web/Trees/MediaBackOfficeSection.cs b/src/Umbraco.Web/Trees/MediaBackOfficeSection.cs new file mode 100644 index 0000000000..aac4fd036f --- /dev/null +++ b/src/Umbraco.Web/Trees/MediaBackOfficeSection.cs @@ -0,0 +1,15 @@ +using Umbraco.Core; +using Umbraco.Web.Models.ContentEditing; +using Umbraco.Web.Models.Trees; + +namespace Umbraco.Web.Trees +{ + /// + /// Defines the back office media section + /// + public class MediaBackOfficeSection : IBackOfficeSection + { + public string Alias => Constants.Applications.Media; + public string Name => "Media"; + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Trees/MembersBackOfficeSection.cs b/src/Umbraco.Web/Trees/MembersBackOfficeSection.cs new file mode 100644 index 0000000000..bfaead33d5 --- /dev/null +++ b/src/Umbraco.Web/Trees/MembersBackOfficeSection.cs @@ -0,0 +1,15 @@ +using Umbraco.Core; +using Umbraco.Web.Models.ContentEditing; +using Umbraco.Web.Models.Trees; + +namespace Umbraco.Web.Trees +{ + /// + /// Defines the back office members section + /// + public class MembersBackOfficeSection : IBackOfficeSection + { + public string Alias => Constants.Applications.Members; + public string Name => "Members"; + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Trees/PackagesBackOfficeSection.cs b/src/Umbraco.Web/Trees/PackagesBackOfficeSection.cs new file mode 100644 index 0000000000..41f049c092 --- /dev/null +++ b/src/Umbraco.Web/Trees/PackagesBackOfficeSection.cs @@ -0,0 +1,15 @@ +using Umbraco.Core; +using Umbraco.Web.Models.ContentEditing; +using Umbraco.Web.Models.Trees; + +namespace Umbraco.Web.Trees +{ + /// + /// Defines the back office packages section + /// + public class PackagesBackOfficeSection : IBackOfficeSection + { + public string Alias => Constants.Applications.Packages; + public string Name => "Packages"; + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Trees/SettingsBackOfficeSection.cs b/src/Umbraco.Web/Trees/SettingsBackOfficeSection.cs new file mode 100644 index 0000000000..623f593c30 --- /dev/null +++ b/src/Umbraco.Web/Trees/SettingsBackOfficeSection.cs @@ -0,0 +1,15 @@ +using Umbraco.Core; +using Umbraco.Web.Models.ContentEditing; +using Umbraco.Web.Models.Trees; + +namespace Umbraco.Web.Trees +{ + /// + /// Defines the back office settings section + /// + public class SettingsBackOfficeSection : IBackOfficeSection + { + public string Alias => Constants.Applications.Settings; + public string Name => "Settings"; + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Trees/TranslationBackOfficeSection.cs b/src/Umbraco.Web/Trees/TranslationBackOfficeSection.cs new file mode 100644 index 0000000000..41254b3179 --- /dev/null +++ b/src/Umbraco.Web/Trees/TranslationBackOfficeSection.cs @@ -0,0 +1,15 @@ +using Umbraco.Core; +using Umbraco.Web.Models.ContentEditing; +using Umbraco.Web.Models.Trees; + +namespace Umbraco.Web.Trees +{ + /// + /// Defines the back office translation section + /// + public class TranslationBackOfficeSection : IBackOfficeSection + { + public string Alias => Constants.Applications.Translation; + public string Name => "Translation"; + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Trees/TreeCollection.cs b/src/Umbraco.Web/Trees/TreeCollection.cs index c7b60dea16..51b79ce67b 100644 --- a/src/Umbraco.Web/Trees/TreeCollection.cs +++ b/src/Umbraco.Web/Trees/TreeCollection.cs @@ -16,31 +16,4 @@ namespace Umbraco.Web.Trees : base(items) { } } - - public class TreeCollectionBuilder : LazyCollectionBuilderBase - { - protected override TreeCollectionBuilder This => this; - - private readonly List _instances = new List(); - - public void AddTree(ApplicationTree tree) - { - _instances.Add(tree); - } - - protected override IEnumerable CreateItems(IFactory factory) - { - return _instances; - - //var items = base.CreateItems(factory).ToList(); - //throw new NotImplementedException(); - ////validate the items, no actions should exist that do not either expose notifications or permissions - //var invalidItems = items.Where(x => !x.CanBePermissionAssigned && !x.ShowInNotifier).ToList(); - //if (invalidItems.Count == 0) return items; - - //var invalidActions = string.Join(", ", invalidItems.Select(x => "'" + x.Alias + "'")); - //throw new InvalidOperationException($"Invalid actions {invalidActions}'. All {typeof(IAction)} implementations must be true for either {nameof(IAction.CanBePermissionAssigned)} or {nameof(IAction.ShowInNotifier)}."); - } - } - } diff --git a/src/Umbraco.Web/Trees/TreeCollectionBuilder.cs b/src/Umbraco.Web/Trees/TreeCollectionBuilder.cs new file mode 100644 index 0000000000..2f92e72419 --- /dev/null +++ b/src/Umbraco.Web/Trees/TreeCollectionBuilder.cs @@ -0,0 +1,18 @@ +using System.Collections.Generic; +using Umbraco.Core.Composing; + +namespace Umbraco.Web.Trees +{ + //fixme - how will we allow users to modify these items? they will need to be able to change the ApplicationTree's registered (i.e. sort order, section) + public class TreeCollectionBuilder : CollectionBuilderBase + { + private readonly List _instances = new List(); + + public void AddTree(ApplicationTree tree) + { + _instances.Add(tree); + } + + protected override IEnumerable CreateItems(IFactory factory) => _instances; + } +} diff --git a/src/Umbraco.Web/Trees/UsersBackOfficeSection.cs b/src/Umbraco.Web/Trees/UsersBackOfficeSection.cs new file mode 100644 index 0000000000..90a65cb508 --- /dev/null +++ b/src/Umbraco.Web/Trees/UsersBackOfficeSection.cs @@ -0,0 +1,15 @@ +using Umbraco.Core; +using Umbraco.Web.Models.ContentEditing; +using Umbraco.Web.Models.Trees; + +namespace Umbraco.Web.Trees +{ + /// + /// Defines the back office users section + /// + public class UsersBackOfficeSection : IBackOfficeSection + { + public string Alias => Constants.Applications.Users; + public string Name => "Users"; + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 0b1603c9e3..161f6c6689 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -166,8 +166,16 @@ + + + + + + + + - + @@ -591,7 +599,7 @@ - + @@ -673,7 +681,6 @@ - @@ -970,7 +977,7 @@ - + From 77dd816c514e13c487ce6b258af0dbdde4d932cb Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 17 Jan 2019 17:06:22 +1100 Subject: [PATCH 120/437] more cleanup --- .../UI/Pages/UmbracoEnsuredPage.cs | 14 ++--- src/Umbraco.Web/Umbraco.Web.csproj | 1 - .../_Legacy/PackageActions/addApplication.cs | 61 ------------------- 3 files changed, 6 insertions(+), 70 deletions(-) delete mode 100644 src/Umbraco.Web/_Legacy/PackageActions/addApplication.cs diff --git a/src/Umbraco.Web/UI/Pages/UmbracoEnsuredPage.cs b/src/Umbraco.Web/UI/Pages/UmbracoEnsuredPage.cs index 9e632eabc9..cafdfb0e04 100644 --- a/src/Umbraco.Web/UI/Pages/UmbracoEnsuredPage.cs +++ b/src/Umbraco.Web/UI/Pages/UmbracoEnsuredPage.cs @@ -29,14 +29,12 @@ namespace Umbraco.Web.UI.Pages var treeAuth = this.GetType().GetCustomAttribute(true); if (treeAuth != null) { - throw new NotImplementedException(); - - //var treeByAlias = Current.Services.ApplicationTreeService - // .GetByAlias(treeAuth.TreeAlias); - //if (treeByAlias != null) - //{ - // CurrentApp = treeByAlias.ApplicationAlias; - //} + var treeByAlias = Current.TreeService + .GetByAlias(treeAuth.TreeAlias); + if (treeByAlias != null) + { + CurrentApp = treeByAlias.ApplicationAlias; + } } } diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 161f6c6689..8c1a0639c4 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -1138,7 +1138,6 @@ - diff --git a/src/Umbraco.Web/_Legacy/PackageActions/addApplication.cs b/src/Umbraco.Web/_Legacy/PackageActions/addApplication.cs deleted file mode 100644 index c6d5ba30d9..0000000000 --- a/src/Umbraco.Web/_Legacy/PackageActions/addApplication.cs +++ /dev/null @@ -1,61 +0,0 @@ -//using System; -//using System.Xml; -//using System.Xml.Linq; -//using Umbraco.Core; -//using Umbraco.Core._Legacy.PackageActions; -//using Umbraco.Web.Composing; - -//namespace Umbraco.Web._Legacy.PackageActions -//{ -// /// -// /// This class implements the IPackageAction Interface, used to execute code when packages are installed. -// /// All IPackageActions only takes a PackageName and a XmlNode as input, and executes based on the data in the xmlnode. -// /// -// public class AddApplication : IPackageAction -// { - -// #region IPackageAction Members - -// /// -// /// Installs a new application in umbraco. -// /// -// /// Name of the package. -// /// The XML data. -// /// -// /// -// /// -// /// true if successfull -// public bool Execute(string packageName, XElement xmlData) -// { -// string name = xmlData.AttributeValue("appName"); -// string alias = xmlData.AttributeValue("appAlias"); -// string icon = xmlData.AttributeValue("appIcon"); - -// Current.Services.SectionService.MakeNew(name, alias, icon); - -// return true; -// } - -// public bool Undo(string packageName, XElement xmlData) -// { -// string alias = xmlData.AttributeValue("appAlias"); -// var section = Current.Services.SectionService.GetByAlias(alias); -// if (section != null) -// { -// Current.Services.SectionService.DeleteSection(section); -// } -// return true; -// } -// /// -// /// Action alias. -// /// -// /// -// public string Alias() -// { -// return "addApplication"; -// } - -// #endregion - -// } -//} From 9df1773b78d38a3ff59c65193702ef7e3ba73cfe Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 17 Jan 2019 17:08:58 +1100 Subject: [PATCH 121/437] more cleanup --- build/NuSpecs/UmbracoCms.nuspec | 2 -- src/Umbraco.Core/Composing/TypeLoader.cs | 4 +-- src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 11 ------ .../config/applications.Release.config | 11 ------ src/Umbraco.Web.UI/config/applications.config | 11 ------ .../config/trees.Release.config | 34 ------------------ src/Umbraco.Web.UI/config/trees.config | 36 ------------------- 7 files changed, 1 insertion(+), 108 deletions(-) delete mode 100644 src/Umbraco.Web.UI/config/applications.Release.config delete mode 100644 src/Umbraco.Web.UI/config/applications.config delete mode 100644 src/Umbraco.Web.UI/config/trees.Release.config delete mode 100644 src/Umbraco.Web.UI/config/trees.config diff --git a/build/NuSpecs/UmbracoCms.nuspec b/build/NuSpecs/UmbracoCms.nuspec index 3cb3d0d875..a188377c19 100644 --- a/build/NuSpecs/UmbracoCms.nuspec +++ b/build/NuSpecs/UmbracoCms.nuspec @@ -52,10 +52,8 @@ - - diff --git a/src/Umbraco.Core/Composing/TypeLoader.cs b/src/Umbraco.Core/Composing/TypeLoader.cs index acb12ab575..4c4139848d 100644 --- a/src/Umbraco.Core/Composing/TypeLoader.cs +++ b/src/Umbraco.Core/Composing/TypeLoader.cs @@ -185,9 +185,7 @@ namespace Umbraco.Core.Composing // the app code folder and everything in it new Tuple(new DirectoryInfo(IOHelper.MapPath("~/App_Code")), false), // global.asax (the app domain also monitors this, if it changes will do a full restart) - new Tuple(new FileInfo(IOHelper.MapPath("~/global.asax")), false), - // trees.config - use the contents to create the hash since this gets resaved on every app startup! - new Tuple(new FileInfo(IOHelper.MapPath(SystemDirectories.Config + "/trees.config")), true) + new Tuple(new FileInfo(IOHelper.MapPath("~/global.asax")), false) }, _logger); return _currentAssembliesHash; diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index c21bf7fef6..778ab188cd 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -241,9 +241,6 @@ umbracoSettings.config Designer - - trees.config - tinyMceConfig.config Designer @@ -301,14 +298,6 @@ - - - Designer - - - applications.config - Designer - diff --git a/src/Umbraco.Web.UI/config/applications.Release.config b/src/Umbraco.Web.UI/config/applications.Release.config deleted file mode 100644 index 5c8dee3b8a..0000000000 --- a/src/Umbraco.Web.UI/config/applications.Release.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/src/Umbraco.Web.UI/config/applications.config b/src/Umbraco.Web.UI/config/applications.config deleted file mode 100644 index 5c8dee3b8a..0000000000 --- a/src/Umbraco.Web.UI/config/applications.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/src/Umbraco.Web.UI/config/trees.Release.config b/src/Umbraco.Web.UI/config/trees.Release.config deleted file mode 100644 index bd75e97c38..0000000000 --- a/src/Umbraco.Web.UI/config/trees.Release.config +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Umbraco.Web.UI/config/trees.config b/src/Umbraco.Web.UI/config/trees.config deleted file mode 100644 index 5892545682..0000000000 --- a/src/Umbraco.Web.UI/config/trees.config +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 1a734141f18a6e25493e1b6fef7ab0188b5ec3d6 Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 17 Jan 2019 17:31:29 +1100 Subject: [PATCH 122/437] Allows package manifest to declare a section --- src/Umbraco.Core/Manifest/ManifestParser.cs | 7 +++- src/Umbraco.Core/Manifest/PackageManifest.cs | 7 ++++ .../Manifest/ManifestParserTests.cs | 18 ++++++++++ src/Umbraco.Web/Services/SectionService.cs | 13 ------- .../Trees/BackOfficeSectionCollection.cs | 1 + .../BackOfficeSectionCollectionBuilder.cs | 35 ++++++++++++++++++- 6 files changed, 66 insertions(+), 15 deletions(-) diff --git a/src/Umbraco.Core/Manifest/ManifestParser.cs b/src/Umbraco.Core/Manifest/ManifestParser.cs index 59753df66a..28493fe20f 100644 --- a/src/Umbraco.Core/Manifest/ManifestParser.cs +++ b/src/Umbraco.Core/Manifest/ManifestParser.cs @@ -101,6 +101,7 @@ namespace Umbraco.Core.Manifest var gridEditors = new List(); var contentApps = new List(); var dashboards = new List(); + var sections = new Dictionary(); foreach (var manifest in manifests) { @@ -111,6 +112,9 @@ namespace Umbraco.Core.Manifest if (manifest.GridEditors != null) gridEditors.AddRange(manifest.GridEditors); if (manifest.ContentApps != null) contentApps.AddRange(manifest.ContentApps); if (manifest.Dashboards != null) dashboards.AddRange(manifest.Dashboards); + if (manifest.Sections != null) + foreach (var (key, value) in manifest.Sections) + sections[key] = value; } return new PackageManifest @@ -121,7 +125,8 @@ namespace Umbraco.Core.Manifest ParameterEditors = parameterEditors.ToArray(), GridEditors = gridEditors.ToArray(), ContentApps = contentApps.ToArray(), - Dashboards = dashboards.ToArray() + Dashboards = dashboards.ToArray(), + Sections = sections }; } diff --git a/src/Umbraco.Core/Manifest/PackageManifest.cs b/src/Umbraco.Core/Manifest/PackageManifest.cs index cd806ac847..a0546f3629 100644 --- a/src/Umbraco.Core/Manifest/PackageManifest.cs +++ b/src/Umbraco.Core/Manifest/PackageManifest.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using Newtonsoft.Json; using Umbraco.Core.Models.ContentEditing; using Umbraco.Core.PropertyEditors; @@ -30,5 +31,11 @@ namespace Umbraco.Core.Manifest [JsonProperty("dashboards")] public ManifestDashboardDefinition[] Dashboards { get; set; } = Array.Empty(); + + /// + /// Declares the back office sections that this package installs + /// + [JsonProperty("sections")] + public IReadOnlyDictionary Sections { get; set; } = new Dictionary(); } } diff --git a/src/Umbraco.Tests/Manifest/ManifestParserTests.cs b/src/Umbraco.Tests/Manifest/ManifestParserTests.cs index ce3d1d705c..9970d5f6b0 100644 --- a/src/Umbraco.Tests/Manifest/ManifestParserTests.cs +++ b/src/Umbraco.Tests/Manifest/ManifestParserTests.cs @@ -429,5 +429,23 @@ javascript: ['~/test.js',/*** some note about stuff asd09823-4**09234*/ '~/test2 Assert.AreEqual(1, db1.Sections.Length); Assert.AreEqual("forms", db1.Sections[0]); } + + [Test] + public void CanParseManifest_Sections() + { + const string json = @"{'sections': { + 'content': 'Content', + 'hello': 'World' + } +}"; + + var manifest = _parser.ParseManifest(json); + Assert.AreEqual(2, manifest.Sections.Count); + Assert.AreEqual("content", manifest.Sections.Keys.ElementAt(0)); + Assert.AreEqual("hello", manifest.Sections.Keys.ElementAt(1)); + Assert.AreEqual("Content", manifest.Sections["content"]); + Assert.AreEqual("World", manifest.Sections["hello"]); + + } } } diff --git a/src/Umbraco.Web/Services/SectionService.cs b/src/Umbraco.Web/Services/SectionService.cs index e6af27534c..b17b9f965a 100644 --- a/src/Umbraco.Web/Services/SectionService.cs +++ b/src/Umbraco.Web/Services/SectionService.cs @@ -1,22 +1,9 @@ using System; -using System.Collections; using System.Collections.Generic; -using System.IO; using System.Linq; -using System.Xml.Linq; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Events; -using Umbraco.Core.IO; -using Umbraco.Core.Models; -using Umbraco.Core.Composing; -using Umbraco.Core.Models.ContentEditing; -using Umbraco.Core.Scoping; using Umbraco.Core.Services; -using Umbraco.Web.Models.ContentEditing; using Umbraco.Web.Models.Trees; using Umbraco.Web.Trees; -using File = System.IO.File; namespace Umbraco.Web.Services { diff --git a/src/Umbraco.Web/Trees/BackOfficeSectionCollection.cs b/src/Umbraco.Web/Trees/BackOfficeSectionCollection.cs index 54762e73d8..fdeb812363 100644 --- a/src/Umbraco.Web/Trees/BackOfficeSectionCollection.cs +++ b/src/Umbraco.Web/Trees/BackOfficeSectionCollection.cs @@ -11,5 +11,6 @@ namespace Umbraco.Web.Trees public BackOfficeSectionCollection(IEnumerable items) : base(items) { } + } } diff --git a/src/Umbraco.Web/Trees/BackOfficeSectionCollectionBuilder.cs b/src/Umbraco.Web/Trees/BackOfficeSectionCollectionBuilder.cs index 62d61a4090..ec5833f79c 100644 --- a/src/Umbraco.Web/Trees/BackOfficeSectionCollectionBuilder.cs +++ b/src/Umbraco.Web/Trees/BackOfficeSectionCollectionBuilder.cs @@ -1,10 +1,43 @@ -using Umbraco.Core.Composing; +using System.Collections.Generic; +using System.Linq; +using Umbraco.Core.Composing; +using Umbraco.Core.Manifest; +using Umbraco.Core.Models.ContentEditing; using Umbraco.Web.Models.Trees; namespace Umbraco.Web.Trees { + //fixme: how can a developer re-sort the items in this collection ? public class BackOfficeSectionCollectionBuilder : OrderedCollectionBuilderBase { protected override BackOfficeSectionCollectionBuilder This => this; + + // need to inject dependencies in the collection, so override creation + public override BackOfficeSectionCollection CreateCollection(IFactory factory) + { + return new BackOfficeSectionCollection(CreateItems(factory)); + } + + protected override IEnumerable CreateItems(IFactory factory) + { + // get the manifest parser just-in-time - injecting it in the ctor would mean that + // simply getting the builder in order to configure the collection, would require + // its dependencies too, and that can create cycles or other oddities + var manifestParser = factory.GetInstance(); + + return base.CreateItems(factory).Concat(manifestParser.Manifest.Sections.Select(x => new ManifestBackOfficeSection(x.Key, x.Value))); + } + + private class ManifestBackOfficeSection : IBackOfficeSection + { + public ManifestBackOfficeSection(string @alias, string name) + { + Alias = alias; + Name = name; + } + + public string Alias { get; } + public string Name { get; } + } } } From 356209e013f93cf9b7b890a3c7067ce6830dac42 Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 17 Jan 2019 17:33:38 +1100 Subject: [PATCH 123/437] renames ApplicationTree to just Tree --- src/Umbraco.Web/Editors/EntityController.cs | 2 +- src/Umbraco.Web/Runtime/WebRuntimeComposer.cs | 2 +- src/Umbraco.Web/Services/ITreeService.cs | 8 ++++---- src/Umbraco.Web/Services/TreeService.cs | 14 +++++++------- src/Umbraco.Web/Trees/ApplicationTreeController.cs | 8 ++++---- .../Trees/{ApplicationTree.cs => Tree.cs} | 4 ++-- src/Umbraco.Web/Trees/TreeCollection.cs | 4 ++-- src/Umbraco.Web/Trees/TreeCollectionBuilder.cs | 8 ++++---- src/Umbraco.Web/Trees/TreeController.cs | 2 +- src/Umbraco.Web/Umbraco.Web.csproj | 2 +- 10 files changed, 27 insertions(+), 27 deletions(-) rename src/Umbraco.Web/Trees/{ApplicationTree.cs => Tree.cs} (91%) diff --git a/src/Umbraco.Web/Editors/EntityController.cs b/src/Umbraco.Web/Editors/EntityController.cs index ca1a6a12bb..e376f9ad5b 100644 --- a/src/Umbraco.Web/Editors/EntityController.cs +++ b/src/Umbraco.Web/Editors/EntityController.cs @@ -148,7 +148,7 @@ namespace Umbraco.Web.Editors var searchableTreeAttribute = searchableTree.Value.SearchableTree.GetType().GetCustomAttribute(false); - result[ApplicationTree.GetRootNodeDisplayName(tree, Services.TextService)] = new TreeSearchResult + result[Tree.GetRootNodeDisplayName(tree, Services.TextService)] = new TreeSearchResult { Results = searchableTree.Value.SearchableTree.Search(query, 200, 0, out var total), TreeAlias = searchableTree.Key, diff --git a/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs b/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs index 134ed7b1d0..f21c040a37 100644 --- a/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs +++ b/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs @@ -211,7 +211,7 @@ namespace Umbraco.Web.Runtime { var attribute = treeControllerType.GetCustomAttribute(false); if (attribute == null) continue; - var tree = new ApplicationTree(attribute.SortOrder, attribute.ApplicationAlias, attribute.TreeAlias, attribute.TreeTitle, treeControllerType, attribute.IsSingleNodeTree); + var tree = new Tree(attribute.SortOrder, attribute.ApplicationAlias, attribute.TreeAlias, attribute.TreeTitle, treeControllerType, attribute.IsSingleNodeTree); composition.WithCollectionBuilder().AddTree(tree); } } diff --git a/src/Umbraco.Web/Services/ITreeService.cs b/src/Umbraco.Web/Services/ITreeService.cs index 17998ae1a7..5172e4b7b7 100644 --- a/src/Umbraco.Web/Services/ITreeService.cs +++ b/src/Umbraco.Web/Services/ITreeService.cs @@ -15,27 +15,27 @@ namespace Umbraco.Web.Services /// /// The tree alias. /// An ApplicationTree instance - ApplicationTree GetByAlias(string treeAlias); + Tree GetByAlias(string treeAlias); /// /// Gets all applicationTrees registered in umbraco from the umbracoAppTree table.. /// /// Returns a ApplicationTree Array - IEnumerable GetAll(); + IEnumerable GetAll(); /// /// Gets the application tree for the applcation with the specified alias /// /// The application alias. /// Returns a ApplicationTree Array - IEnumerable GetApplicationTrees(string applicationAlias); + IEnumerable GetApplicationTrees(string applicationAlias); /// /// Gets the grouped application trees for the application with the specified alias /// /// /// - IDictionary> GetGroupedApplicationTrees(string applicationAlias); + IDictionary> GetGroupedApplicationTrees(string applicationAlias); } } diff --git a/src/Umbraco.Web/Services/TreeService.cs b/src/Umbraco.Web/Services/TreeService.cs index 670f57ce49..8389c27a19 100644 --- a/src/Umbraco.Web/Services/TreeService.cs +++ b/src/Umbraco.Web/Services/TreeService.cs @@ -18,29 +18,29 @@ namespace Umbraco.Web.Services } /// - public ApplicationTree GetByAlias(string treeAlias) => _treeCollection.FirstOrDefault(t => t.TreeAlias == treeAlias); + public Tree GetByAlias(string treeAlias) => _treeCollection.FirstOrDefault(t => t.TreeAlias == treeAlias); /// - public IEnumerable GetAll() => _treeCollection; + public IEnumerable GetAll() => _treeCollection; /// - public IEnumerable GetApplicationTrees(string applicationAlias) + public IEnumerable GetApplicationTrees(string applicationAlias) => GetAll().Where(x => x.ApplicationAlias.InvariantEquals(applicationAlias)).OrderBy(x => x.SortOrder).ToList(); - public IDictionary> GetGroupedApplicationTrees(string applicationAlias) + public IDictionary> GetGroupedApplicationTrees(string applicationAlias) { - var result = new Dictionary>(); + var result = new Dictionary>(); var foundTrees = GetApplicationTrees(applicationAlias).ToList(); foreach(var treeGroup in _groupedTrees.Value) { - List resultGroup = null; + List resultGroup = null; foreach(var tree in foundTrees) { foreach(var treeAliasInGroup in treeGroup) { if (tree.TreeAlias != treeAliasInGroup) continue; - if (resultGroup == null) resultGroup = new List(); + if (resultGroup == null) resultGroup = new List(); resultGroup.Add(tree); } } diff --git a/src/Umbraco.Web/Trees/ApplicationTreeController.cs b/src/Umbraco.Web/Trees/ApplicationTreeController.cs index 0e405ca3f3..5a0f72c8dc 100644 --- a/src/Umbraco.Web/Trees/ApplicationTreeController.cs +++ b/src/Umbraco.Web/Trees/ApplicationTreeController.cs @@ -160,7 +160,7 @@ namespace Umbraco.Web.Trees /// /// /// - private async Task GetRootForMultipleAppTree(ApplicationTree tree, FormDataCollection queryStrings) + private async Task GetRootForMultipleAppTree(Tree tree, FormDataCollection queryStrings) { if (tree == null) throw new ArgumentNullException(nameof(tree)); try @@ -189,7 +189,7 @@ namespace Umbraco.Web.Trees /// /// /// - private async Task GetRootForSingleAppTree(ApplicationTree tree, string id, FormDataCollection queryStrings, string application) + private async Task GetRootForSingleAppTree(Tree tree, string id, FormDataCollection queryStrings, string application) { var rootId = Constants.System.Root.ToString(CultureInfo.InvariantCulture); if (tree == null) throw new ArgumentNullException(nameof(tree)); @@ -234,7 +234,7 @@ namespace Umbraco.Web.Trees /// /// This ensures that authorization filters are applied to the sub request /// - private async Task> TryGetRootNodeFromControllerTree(ApplicationTree appTree, FormDataCollection formCollection, HttpControllerContext controllerContext) + private async Task> TryGetRootNodeFromControllerTree(Tree appTree, FormDataCollection formCollection, HttpControllerContext controllerContext) { //instantiate it, since we are proxying, we need to setup the instance with our current context var instance = (TreeController)DependencyResolver.Current.GetService(appTree.TreeControllerType); @@ -290,7 +290,7 @@ namespace Umbraco.Web.Trees /// /// /// - private Attempt TryLoadFromControllerTree(ApplicationTree appTree, string id, FormDataCollection formCollection, HttpControllerContext controllerContext) + private Attempt TryLoadFromControllerTree(Tree appTree, string id, FormDataCollection formCollection, HttpControllerContext controllerContext) { // instantiate it, since we are proxying, we need to setup the instance with our current context var instance = (TreeController)DependencyResolver.Current.GetService(appTree.TreeControllerType); diff --git a/src/Umbraco.Web/Trees/ApplicationTree.cs b/src/Umbraco.Web/Trees/Tree.cs similarity index 91% rename from src/Umbraco.Web/Trees/ApplicationTree.cs rename to src/Umbraco.Web/Trees/Tree.cs index 5ed9847be3..3bac5bae58 100644 --- a/src/Umbraco.Web/Trees/ApplicationTree.cs +++ b/src/Umbraco.Web/Trees/Tree.cs @@ -6,9 +6,9 @@ using Umbraco.Web.Models.Trees; namespace Umbraco.Web.Trees { [DebuggerDisplay("Tree - {TreeAlias} ({ApplicationAlias})")] - public class ApplicationTree : ITree + public class Tree : ITree { - public ApplicationTree(int sortOrder, string applicationAlias, string alias, string title, Type treeControllerType, bool isSingleNodeTree) + public Tree(int sortOrder, string applicationAlias, string alias, string title, Type treeControllerType, bool isSingleNodeTree) { SortOrder = sortOrder; ApplicationAlias = applicationAlias; diff --git a/src/Umbraco.Web/Trees/TreeCollection.cs b/src/Umbraco.Web/Trees/TreeCollection.cs index 51b79ce67b..a7bfe52295 100644 --- a/src/Umbraco.Web/Trees/TreeCollection.cs +++ b/src/Umbraco.Web/Trees/TreeCollection.cs @@ -10,9 +10,9 @@ using Umbraco.Web.Models.ContentEditing; namespace Umbraco.Web.Trees { - public class TreeCollection : BuilderCollectionBase + public class TreeCollection : BuilderCollectionBase { - public TreeCollection(IEnumerable items) + public TreeCollection(IEnumerable items) : base(items) { } } diff --git a/src/Umbraco.Web/Trees/TreeCollectionBuilder.cs b/src/Umbraco.Web/Trees/TreeCollectionBuilder.cs index 2f92e72419..143b8e308b 100644 --- a/src/Umbraco.Web/Trees/TreeCollectionBuilder.cs +++ b/src/Umbraco.Web/Trees/TreeCollectionBuilder.cs @@ -4,15 +4,15 @@ using Umbraco.Core.Composing; namespace Umbraco.Web.Trees { //fixme - how will we allow users to modify these items? they will need to be able to change the ApplicationTree's registered (i.e. sort order, section) - public class TreeCollectionBuilder : CollectionBuilderBase + public class TreeCollectionBuilder : CollectionBuilderBase { - private readonly List _instances = new List(); + private readonly List _instances = new List(); - public void AddTree(ApplicationTree tree) + public void AddTree(Tree tree) { _instances.Add(tree); } - protected override IEnumerable CreateItems(IFactory factory) => _instances; + protected override IEnumerable CreateItems(IFactory factory) => _instances; } } diff --git a/src/Umbraco.Web/Trees/TreeController.cs b/src/Umbraco.Web/Trees/TreeController.cs index 63e8f5aad5..553cda255e 100644 --- a/src/Umbraco.Web/Trees/TreeController.cs +++ b/src/Umbraco.Web/Trees/TreeController.cs @@ -28,7 +28,7 @@ namespace Umbraco.Web.Trees } /// - public override string RootNodeDisplayName => ApplicationTree.GetRootNodeDisplayName(this, Services.TextService); + public override string RootNodeDisplayName => Tree.GetRootNodeDisplayName(this, Services.TextService); /// public override string TreeAlias => _attribute.TreeAlias; diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 8c1a0639c4..23cbb7a416 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -174,7 +174,7 @@ - + From 6b9ba3c53c806b2943f531bb71e0fc247ee243e3 Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 17 Jan 2019 17:50:59 +1100 Subject: [PATCH 124/437] Fixing tests --- src/Umbraco.Tests/Services/SectionServiceTests.cs | 9 +++------ src/Umbraco.Tests/Testing/UmbracoTestBase.cs | 11 +++++++++++ src/Umbraco.Web/Services/SectionService.cs | 4 ++-- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/Umbraco.Tests/Services/SectionServiceTests.cs b/src/Umbraco.Tests/Services/SectionServiceTests.cs index 9211755251..87fcde34ad 100644 --- a/src/Umbraco.Tests/Services/SectionServiceTests.cs +++ b/src/Umbraco.Tests/Services/SectionServiceTests.cs @@ -1,6 +1,7 @@ using NUnit.Framework; using System.Linq; using System.Threading; +using Umbraco.Core.Composing; using Umbraco.Core.Models.Membership; using Umbraco.Tests.Testing; using Umbraco.Web.Services; @@ -15,15 +16,11 @@ namespace Umbraco.Tests.Services [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest, WithApplication = true)] public class SectionServiceTests : TestWithSomeContentBase { - //fixme - private ISectionService SectionService => new SectionService(ServiceContext.UserService, null); - + private ISectionService SectionService => Factory.GetInstance(); [Test] public void SectionService_Can_Get_Allowed_Sections_For_User() { - //fixme - need to mock - // Arrange var user = CreateTestUser(); @@ -60,7 +57,7 @@ namespace Umbraco.Tests.Services Name = "Group B" }; userGroupB.AddAllowedSection("settings"); - userGroupB.AddAllowedSection("developer"); + userGroupB.AddAllowedSection("member"); ServiceContext.UserService.Save(userGroupB, new[] { user.Id }, false); return ServiceContext.UserService.GetUserById(user.Id); diff --git a/src/Umbraco.Tests/Testing/UmbracoTestBase.cs b/src/Umbraco.Tests/Testing/UmbracoTestBase.cs index 0a0999f2dc..ace50917ba 100644 --- a/src/Umbraco.Tests/Testing/UmbracoTestBase.cs +++ b/src/Umbraco.Tests/Testing/UmbracoTestBase.cs @@ -40,6 +40,7 @@ using Umbraco.Web.Composing.Composers; using Umbraco.Web.ContentApps; using Current = Umbraco.Core.Composing.Current; using Umbraco.Web.Routing; +using Umbraco.Web.Trees; namespace Umbraco.Tests.Testing { @@ -216,6 +217,16 @@ namespace Umbraco.Tests.Testing Composition.WithCollectionBuilder(); Composition.RegisterUnique(); Composition.RegisterUnique(); + + // register back office sections in the order we want them rendered + Composition.WithCollectionBuilder().Append() + .Append() + .Append() + .Append() + .Append() + .Append() + .Append(); + Composition.RegisterUnique(); } protected virtual void ComposeWtf() diff --git a/src/Umbraco.Web/Services/SectionService.cs b/src/Umbraco.Web/Services/SectionService.cs index b17b9f965a..089bdc5bd3 100644 --- a/src/Umbraco.Web/Services/SectionService.cs +++ b/src/Umbraco.Web/Services/SectionService.cs @@ -16,8 +16,8 @@ namespace Umbraco.Web.Services IUserService userService, BackOfficeSectionCollection sectionCollection) { - _userService = userService; - _sectionCollection = sectionCollection; + _userService = userService ?? throw new ArgumentNullException(nameof(userService)); + _sectionCollection = sectionCollection ?? throw new ArgumentNullException(nameof(sectionCollection)); } /// From 3f89558ddbc3d37081eb50ce5360f476839499ed Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 17 Jan 2019 17:51:38 +1100 Subject: [PATCH 125/437] Fixing tests --- src/Umbraco.Tests/Composing/TypeFinderTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Tests/Composing/TypeFinderTests.cs b/src/Umbraco.Tests/Composing/TypeFinderTests.cs index 49c807b19f..2b9474310b 100644 --- a/src/Umbraco.Tests/Composing/TypeFinderTests.cs +++ b/src/Umbraco.Tests/Composing/TypeFinderTests.cs @@ -90,7 +90,7 @@ namespace Umbraco.Tests.Composing Assert.AreEqual(0, typesFound.Count()); // 0 classes in _assemblies are marked with [Tree] typesFound = TypeFinder.FindClassesWithAttribute(new[] { typeof (UmbracoContext).Assembly }); - Assert.AreEqual(22, typesFound.Count()); // + classes in Umbraco.Web are marked with [Tree] + Assert.AreEqual(21, typesFound.Count()); // + classes in Umbraco.Web are marked with [Tree] } private static IProfilingLogger GetTestProfilingLogger() From 67e47038217be35969e982195974c5441a518e65 Mon Sep 17 00:00:00 2001 From: Stephan Date: Thu, 17 Jan 2019 08:34:29 +0100 Subject: [PATCH 126/437] CacheHelper becomes AppCaches --- .../Cache/{CacheHelper.cs => AppCaches.cs} | 12 +++--- src/Umbraco.Core/Cache/CacheRefresherBase.cs | 10 ++--- .../Cache/JsonCacheRefresherBase.cs | 4 +- .../Cache/PayloadCacheRefresherBase.cs | 4 +- .../Cache/TypedCacheRefresherBase.cs | 6 +-- .../Composing/Composers/ServicesComposer.cs | 2 +- .../Composing/CompositionExtensions.cs | 4 +- src/Umbraco.Core/Composing/Current.cs | 4 +- .../Implement/AuditEntryRepository.cs | 2 +- .../Repositories/Implement/AuditRepository.cs | 2 +- .../Implement/ConsentRepository.cs | 2 +- .../Implement/ContentRepositoryBase.cs | 2 +- .../Implement/ContentTypeRepository.cs | 2 +- .../Implement/ContentTypeRepositoryBase.cs | 2 +- .../Implement/DataTypeContainerRepository.cs | 2 +- .../Implement/DataTypeRepository.cs | 2 +- .../Implement/DictionaryRepository.cs | 6 +-- .../Implement/DocumentBlueprintRepository.cs | 4 +- .../Implement/DocumentRepository.cs | 14 +++---- .../DocumentTypeContainerRepository.cs | 2 +- .../Implement/DomainRepository.cs | 2 +- .../Implement/EntityContainerRepository.cs | 2 +- .../Implement/ExternalLoginRepository.cs | 2 +- .../Implement/LanguageRepository.cs | 2 +- .../Repositories/Implement/MacroRepository.cs | 2 +- .../Repositories/Implement/MediaRepository.cs | 4 +- .../Implement/MediaTypeContainerRepository.cs | 2 +- .../Implement/MediaTypeRepository.cs | 2 +- .../Implement/MemberGroupRepository.cs | 2 +- .../Implement/MemberRepository.cs | 2 +- .../Implement/MemberTypeRepository.cs | 2 +- .../Implement/NPocoRepositoryBase.cs | 2 +- .../Implement/PermissionRepository.cs | 2 +- .../Implement/PublicAccessRepository.cs | 2 +- .../Implement/RedirectUrlRepository.cs | 2 +- .../Implement/RelationRepository.cs | 2 +- .../Implement/RelationTypeRepository.cs | 2 +- .../Implement/RepositoryBaseOfTIdTEntity.cs | 6 +-- .../Implement/ServerRegistrationRepository.cs | 2 +- .../Implement/SimpleGetRepository.cs | 2 +- .../Repositories/Implement/TagRepository.cs | 2 +- .../Implement/TemplateRepository.cs | 2 +- .../Implement/UserGroupRepository.cs | 10 ++--- .../Repositories/Implement/UserRepository.cs | 10 ++--- src/Umbraco.Core/Runtime/CoreRuntime.cs | 4 +- src/Umbraco.Core/Umbraco.Core.csproj | 2 +- src/Umbraco.Tests/Macros/MacroTests.cs | 2 +- .../Models/Mapping/AutoMapperTests.cs | 2 +- .../Repositories/ContentTypeRepositoryTest.cs | 12 +++--- .../DataTypeDefinitionRepositoryTest.cs | 2 +- .../Repositories/DocumentRepositoryTest.cs | 28 ++++++------- .../Repositories/DomainRepositoryTest.cs | 12 +++--- .../Repositories/LanguageRepositoryTest.cs | 2 +- .../Repositories/MacroRepositoryTest.cs | 36 ++++++++--------- .../Repositories/MediaRepositoryTest.cs | 14 +++---- .../Repositories/MediaTypeRepositoryTest.cs | 4 +- .../Repositories/MemberRepositoryTest.cs | 8 ++-- .../Repositories/MemberTypeRepositoryTest.cs | 2 +- .../PublicAccessRepositoryTest.cs | 24 +++++------ .../RedirectUrlRepositoryTests.cs | 2 +- .../Repositories/RelationRepositoryTest.cs | 4 +- .../RelationTypeRepositoryTest.cs | 4 +- .../ServerRegistrationRepositoryTest.cs | 4 +- .../Repositories/TagRepositoryTest.cs | 18 ++++----- .../Repositories/TemplateRepositoryTest.cs | 10 ++--- .../Repositories/UserGroupRepositoryTest.cs | 4 +- .../Repositories/UserRepositoryTest.cs | 22 +++++----- .../Routing/RenderRouteHandlerTests.cs | 2 +- src/Umbraco.Tests/Runtimes/StandaloneTests.cs | 4 +- .../Scoping/ScopedRepositoryTests.cs | 4 +- .../Services/ContentServicePerformanceTest.cs | 40 +++++++++---------- .../Services/ContentServiceTests.cs | 10 ++--- .../Services/MacroServiceTests.cs | 2 +- .../Templates/TemplateRepositoryTests.cs | 2 +- .../TestControllerActivatorBase.cs | 2 +- src/Umbraco.Tests/TestHelpers/TestObjects.cs | 2 +- .../Testing/TestingTests/MockTests.cs | 4 +- src/Umbraco.Tests/Testing/UmbracoTestBase.cs | 6 +-- .../Web/Mvc/SurfaceControllerTests.cs | 4 +- .../Cache/ApplicationCacheRefresher.cs | 8 ++-- .../Cache/ApplicationTreeCacheRefresher.cs | 8 ++-- .../Cache/ContentCacheRefresher.cs | 20 +++++----- .../Cache/ContentTypeCacheRefresher.cs | 10 ++--- .../Cache/DataTypeCacheRefresher.cs | 6 +-- .../Cache/DictionaryCacheRefresher.cs | 4 +- src/Umbraco.Web/Cache/DomainCacheRefresher.cs | 4 +- .../Cache/LanguageCacheRefresher.cs | 4 +- src/Umbraco.Web/Cache/MacroCacheRefresher.cs | 16 ++++---- src/Umbraco.Web/Cache/MediaCacheRefresher.cs | 10 ++--- src/Umbraco.Web/Cache/MemberCacheRefresher.cs | 12 +++--- .../Cache/MemberGroupCacheRefresher.cs | 6 +-- .../Cache/PublicAccessCacheRefresher.cs | 4 +- .../Cache/RelationTypeCacheRefresher.cs | 8 ++-- .../Cache/TemplateCacheRefresher.cs | 6 +-- src/Umbraco.Web/Cache/UserCacheRefresher.cs | 6 +-- .../Cache/UserGroupCacheRefresher.cs | 8 ++-- .../UserGroupPermissionsCacheRefresher.cs | 4 +- src/Umbraco.Web/CacheHelperExtensions.cs | 12 +++--- src/Umbraco.Web/Composing/Current.cs | 2 +- .../Controllers/UmbLoginController.cs | 2 +- .../Controllers/UmbLoginStatusController.cs | 2 +- .../Controllers/UmbProfileController.cs | 2 +- .../Controllers/UmbRegisterController.cs | 2 +- .../Editors/AuthenticationController.cs | 2 +- .../Editors/BackOfficeController.cs | 2 +- .../Editors/ContentTypeController.cs | 2 +- .../Editors/ContentTypeControllerBase.cs | 2 +- .../Editors/DashboardController.cs | 2 +- .../Editors/MediaTypeController.cs | 2 +- .../Editors/MemberTypeController.cs | 2 +- .../Editors/PackageInstallController.cs | 2 +- .../UmbracoAuthorizedJsonController.cs | 2 +- src/Umbraco.Web/Mvc/PluginController.cs | 6 +-- src/Umbraco.Web/Mvc/RenderMvcController.cs | 2 +- src/Umbraco.Web/Mvc/SurfaceController.cs | 2 +- .../Mvc/UmbracoAuthorizedController.cs | 2 +- src/Umbraco.Web/Mvc/UmbracoController.cs | 6 +-- .../Mvc/UmbracoViewPageOfTModel.cs | 6 +-- src/Umbraco.Web/Runtime/WebRuntime.cs | 2 +- src/Umbraco.Web/Security/MembershipHelper.cs | 4 +- .../Services/ApplicationTreeService.cs | 4 +- src/Umbraco.Web/Services/SectionService.cs | 4 +- src/Umbraco.Web/TagsController.cs | 2 +- .../WebApi/UmbracoApiController.cs | 2 +- .../WebApi/UmbracoApiControllerBase.cs | 6 +-- .../WebApi/UmbracoAuthorizedApiController.cs | 2 +- 126 files changed, 348 insertions(+), 348 deletions(-) rename src/Umbraco.Core/Cache/{CacheHelper.cs => AppCaches.cs} (83%) diff --git a/src/Umbraco.Core/Cache/CacheHelper.cs b/src/Umbraco.Core/Cache/AppCaches.cs similarity index 83% rename from src/Umbraco.Core/Cache/CacheHelper.cs rename to src/Umbraco.Core/Cache/AppCaches.cs index cd2225ae9d..7dd95624ef 100644 --- a/src/Umbraco.Core/Cache/CacheHelper.cs +++ b/src/Umbraco.Core/Cache/AppCaches.cs @@ -6,12 +6,12 @@ namespace Umbraco.Core.Cache /// /// Represents the application-wide caches. /// - public class CacheHelper + public class AppCaches { /// /// Initializes a new instance for use in the web /// - public CacheHelper() + public AppCaches() : this( new HttpRuntimeCacheProvider(HttpRuntime.Cache), new StaticCacheProvider(), @@ -23,7 +23,7 @@ namespace Umbraco.Core.Cache /// /// Initializes a new instance for use in the web /// - public CacheHelper(System.Web.Caching.Cache cache) + public AppCaches(System.Web.Caching.Cache cache) : this( new HttpRuntimeCacheProvider(cache), new StaticCacheProvider(), @@ -35,7 +35,7 @@ namespace Umbraco.Core.Cache /// /// Initializes a new instance based on the provided providers /// - public CacheHelper( + public AppCaches( IRuntimeCacheProvider httpCacheProvider, ICacheProvider staticCacheProvider, ICacheProvider requestCacheProvider, @@ -54,7 +54,7 @@ namespace Umbraco.Core.Cache /// When used by repositories, all cache policies apply, but the underlying caches do not cache anything. /// Used by tests. /// - public static CacheHelper Disabled { get; } = new CacheHelper(NullCacheProvider.Instance, NullCacheProvider.Instance, NullCacheProvider.Instance, new IsolatedRuntimeCache(_ => NullCacheProvider.Instance)); + public static AppCaches Disabled { get; } = new AppCaches(NullCacheProvider.Instance, NullCacheProvider.Instance, NullCacheProvider.Instance, new IsolatedRuntimeCache(_ => NullCacheProvider.Instance)); /// /// Gets the special no-cache instance. @@ -63,7 +63,7 @@ namespace Umbraco.Core.Cache /// When used by repositories, all cache policies are bypassed. /// Used by repositories that do no cache. /// - public static CacheHelper NoCache { get; } = new CacheHelper(NullCacheProvider.Instance, NullCacheProvider.Instance, NullCacheProvider.Instance, new IsolatedRuntimeCache(_ => NullCacheProvider.Instance)); + public static AppCaches NoCache { get; } = new AppCaches(NullCacheProvider.Instance, NullCacheProvider.Instance, NullCacheProvider.Instance, new IsolatedRuntimeCache(_ => NullCacheProvider.Instance)); /// /// Returns the current Request cache diff --git a/src/Umbraco.Core/Cache/CacheRefresherBase.cs b/src/Umbraco.Core/Cache/CacheRefresherBase.cs index 7242ab225e..5e6ec593af 100644 --- a/src/Umbraco.Core/Cache/CacheRefresherBase.cs +++ b/src/Umbraco.Core/Cache/CacheRefresherBase.cs @@ -16,10 +16,10 @@ namespace Umbraco.Core.Cache /// /// Initializes a new instance of the . /// - /// A cache helper. - protected CacheRefresherBase(CacheHelper cacheHelper) + /// A cache helper. + protected CacheRefresherBase(AppCaches appCaches) { - CacheHelper = cacheHelper; + AppCaches = appCaches; } /// @@ -93,7 +93,7 @@ namespace Umbraco.Core.Cache /// /// Gets the cache helper. /// - protected CacheHelper CacheHelper { get; } + protected AppCaches AppCaches { get; } /// /// Clears the cache for all repository entities of a specified type. @@ -102,7 +102,7 @@ namespace Umbraco.Core.Cache protected void ClearAllIsolatedCacheByEntityType() where TEntity : class, IEntity { - CacheHelper.IsolatedRuntimeCache.ClearCache(); + AppCaches.IsolatedRuntimeCache.ClearCache(); } /// diff --git a/src/Umbraco.Core/Cache/JsonCacheRefresherBase.cs b/src/Umbraco.Core/Cache/JsonCacheRefresherBase.cs index 27302f0786..d9d9644a36 100644 --- a/src/Umbraco.Core/Cache/JsonCacheRefresherBase.cs +++ b/src/Umbraco.Core/Cache/JsonCacheRefresherBase.cs @@ -13,8 +13,8 @@ namespace Umbraco.Core.Cache /// /// Initializes a new instance of the . /// - /// A cache helper. - protected JsonCacheRefresherBase(CacheHelper cacheHelper) : base(cacheHelper) + /// A cache helper. + protected JsonCacheRefresherBase(AppCaches appCaches) : base(appCaches) { } /// diff --git a/src/Umbraco.Core/Cache/PayloadCacheRefresherBase.cs b/src/Umbraco.Core/Cache/PayloadCacheRefresherBase.cs index 22bc46e020..4a3a03a0d6 100644 --- a/src/Umbraco.Core/Cache/PayloadCacheRefresherBase.cs +++ b/src/Umbraco.Core/Cache/PayloadCacheRefresherBase.cs @@ -15,8 +15,8 @@ namespace Umbraco.Core.Cache /// /// Initializes a new instance of the . /// - /// A cache helper. - protected PayloadCacheRefresherBase(CacheHelper cacheHelper) : base(cacheHelper) + /// A cache helper. + protected PayloadCacheRefresherBase(AppCaches appCaches) : base(appCaches) { } #region Json diff --git a/src/Umbraco.Core/Cache/TypedCacheRefresherBase.cs b/src/Umbraco.Core/Cache/TypedCacheRefresherBase.cs index 4defc15482..0b5a04b571 100644 --- a/src/Umbraco.Core/Cache/TypedCacheRefresherBase.cs +++ b/src/Umbraco.Core/Cache/TypedCacheRefresherBase.cs @@ -14,9 +14,9 @@ namespace Umbraco.Core.Cache /// /// Initializes a new instance of the . /// - /// A cache helper. - protected TypedCacheRefresherBase(CacheHelper cacheHelper) - : base(cacheHelper) + /// A cache helper. + protected TypedCacheRefresherBase(AppCaches appCaches) + : base(appCaches) { } #region Refresher diff --git a/src/Umbraco.Core/Composing/Composers/ServicesComposer.cs b/src/Umbraco.Core/Composing/Composers/ServicesComposer.cs index 8c9ccd1088..9ed4a7265c 100644 --- a/src/Umbraco.Core/Composing/Composers/ServicesComposer.cs +++ b/src/Umbraco.Core/Composing/Composers/ServicesComposer.cs @@ -116,7 +116,7 @@ namespace Umbraco.Core.Composing.Composers return new LocalizedTextServiceFileSources( container.GetInstance(), - container.GetInstance().RuntimeCache, + container.GetInstance().RuntimeCache, mainLangFolder, pluginLangFolders.Concat(userLangFolders)); } diff --git a/src/Umbraco.Core/Composing/CompositionExtensions.cs b/src/Umbraco.Core/Composing/CompositionExtensions.cs index 2307d757c9..910062688c 100644 --- a/src/Umbraco.Core/Composing/CompositionExtensions.cs +++ b/src/Umbraco.Core/Composing/CompositionExtensions.cs @@ -18,7 +18,7 @@ namespace Umbraco.Core.Composing public static void RegisterEssentials(this Composition composition, ILogger logger, IProfiler profiler, IProfilingLogger profilingLogger, IMainDom mainDom, - CacheHelper appCaches, + AppCaches appCaches, IUmbracoDatabaseFactory databaseFactory, TypeLoader typeLoader, IRuntimeState state) @@ -28,7 +28,7 @@ namespace Umbraco.Core.Composing composition.RegisterUnique(profilingLogger); composition.RegisterUnique(mainDom); composition.RegisterUnique(appCaches); - composition.RegisterUnique(factory => factory.GetInstance().RuntimeCache); + composition.RegisterUnique(factory => factory.GetInstance().RuntimeCache); composition.RegisterUnique(databaseFactory); composition.RegisterUnique(factory => factory.GetInstance().SqlContext); composition.RegisterUnique(typeLoader); diff --git a/src/Umbraco.Core/Composing/Current.cs b/src/Umbraco.Core/Composing/Current.cs index 5c8351924f..bfc5cfd51c 100644 --- a/src/Umbraco.Core/Composing/Current.cs +++ b/src/Umbraco.Core/Composing/Current.cs @@ -180,8 +180,8 @@ namespace Umbraco.Core.Composing public static ICultureDictionaryFactory CultureDictionaryFactory => Factory.GetInstance(); - public static CacheHelper ApplicationCache - => Factory.GetInstance(); + public static AppCaches ApplicationCache + => Factory.GetInstance(); public static ServiceContext Services => Factory.GetInstance(); diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/AuditEntryRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/AuditEntryRepository.cs index 77759ea2da..1486935e2a 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/AuditEntryRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/AuditEntryRepository.cs @@ -21,7 +21,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement /// /// Initializes a new instance of the class. /// - public AuditEntryRepository(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger) + public AuditEntryRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) : base(scopeAccessor, cache, logger) { } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/AuditRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/AuditRepository.cs index 45f083bc6b..cda89fd89a 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/AuditRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/AuditRepository.cs @@ -15,7 +15,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement internal class AuditRepository : NPocoRepositoryBase, IAuditRepository { public AuditRepository(IScopeAccessor scopeAccessor, ILogger logger) - : base(scopeAccessor, CacheHelper.NoCache, logger) + : base(scopeAccessor, AppCaches.NoCache, logger) { } protected override void PersistNewItem(IAuditItem entity) diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ConsentRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ConsentRepository.cs index 3794bf183a..bd55654809 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ConsentRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ConsentRepository.cs @@ -20,7 +20,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement /// /// Initializes a new instance of the class. /// - public ConsentRepository(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger) + public ConsentRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) : base(scopeAccessor, cache, logger) { } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs index bd7943ff1d..ba56c17087 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs @@ -33,7 +33,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement where TEntity : class, IUmbracoEntity where TRepository : class, IRepository { - protected ContentRepositoryBase(IScopeAccessor scopeAccessor, CacheHelper cache, ILanguageRepository languageRepository, ILogger logger) + protected ContentRepositoryBase(IScopeAccessor scopeAccessor, AppCaches cache, ILanguageRepository languageRepository, ILogger logger) : base(scopeAccessor, cache, logger) { LanguageRepository = languageRepository; diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepository.cs index 4bec3160a7..f608e2968d 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepository.cs @@ -19,7 +19,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { private readonly ITemplateRepository _templateRepository; - public ContentTypeRepository(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger, ITemplateRepository templateRepository) + public ContentTypeRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger, ITemplateRepository templateRepository) : base(scopeAccessor, cache, logger) { _templateRepository = templateRepository; diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs index 683df047f8..6404880a2e 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs @@ -28,7 +28,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement internal abstract class ContentTypeRepositoryBase : NPocoRepositoryBase, IReadRepository where TEntity : class, IContentTypeComposition { - protected ContentTypeRepositoryBase(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger) + protected ContentTypeRepositoryBase(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) : base(scopeAccessor, cache, logger) { } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeContainerRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeContainerRepository.cs index f23b6df5e2..752b641bc3 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeContainerRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeContainerRepository.cs @@ -6,7 +6,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { class DataTypeContainerRepository : EntityContainerRepository, IDataTypeContainerRepository { - public DataTypeContainerRepository(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger) + public DataTypeContainerRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) : base(scopeAccessor, cache, logger, Constants.ObjectTypes.DataTypeContainer) { } } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs index 4556c78fe6..28d4262763 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs @@ -27,7 +27,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement private readonly Lazy _editors; // fixme temp fixing circular dependencies with LAZY but is this the right place? - public DataTypeRepository(IScopeAccessor scopeAccessor, CacheHelper cache, Lazy editors, ILogger logger) + public DataTypeRepository(IScopeAccessor scopeAccessor, AppCaches cache, Lazy editors, ILogger logger) : base(scopeAccessor, cache, logger) { _editors = editors; diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DictionaryRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DictionaryRepository.cs index 8f5ad70c32..3517fb3545 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/DictionaryRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DictionaryRepository.cs @@ -18,7 +18,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement /// internal class DictionaryRepository : NPocoRepositoryBase, IDictionaryRepository { - public DictionaryRepository(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger) + public DictionaryRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) : base(scopeAccessor, cache, logger) { } @@ -290,7 +290,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { private readonly DictionaryRepository _dictionaryRepository; - public DictionaryByUniqueIdRepository(DictionaryRepository dictionaryRepository, IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger) + public DictionaryByUniqueIdRepository(DictionaryRepository dictionaryRepository, IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) : base(scopeAccessor, cache, logger) { _dictionaryRepository = dictionaryRepository; @@ -343,7 +343,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { private readonly DictionaryRepository _dictionaryRepository; - public DictionaryByKeyRepository(DictionaryRepository dictionaryRepository, IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger) + public DictionaryByKeyRepository(DictionaryRepository dictionaryRepository, IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) : base(scopeAccessor, cache, logger) { _dictionaryRepository = dictionaryRepository; diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentBlueprintRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentBlueprintRepository.cs index 1d24cfd2dc..09fa420f26 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentBlueprintRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentBlueprintRepository.cs @@ -17,8 +17,8 @@ namespace Umbraco.Core.Persistence.Repositories.Implement /// internal class DocumentBlueprintRepository : DocumentRepository, IDocumentBlueprintRepository { - public DocumentBlueprintRepository(IScopeAccessor scopeAccessor, CacheHelper cacheHelper, ILogger logger, IContentTypeRepository contentTypeRepository, ITemplateRepository templateRepository, ITagRepository tagRepository, ILanguageRepository languageRepository, IContentSection settings) - : base(scopeAccessor, cacheHelper, logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, settings) + public DocumentBlueprintRepository(IScopeAccessor scopeAccessor, AppCaches appCaches, ILogger logger, IContentTypeRepository contentTypeRepository, ITemplateRepository templateRepository, ITagRepository tagRepository, ILanguageRepository languageRepository, IContentSection settings) + : base(scopeAccessor, appCaches, logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, settings) { EnsureUniqueNaming = false; // duplicates are allowed } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs index 054ab8cb4b..31c08f9124 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs @@ -25,20 +25,20 @@ namespace Umbraco.Core.Persistence.Repositories.Implement private readonly IContentTypeRepository _contentTypeRepository; private readonly ITemplateRepository _templateRepository; private readonly ITagRepository _tagRepository; - private readonly CacheHelper _cacheHelper; + private readonly AppCaches _appCaches; private PermissionRepository _permissionRepository; private readonly ContentByGuidReadRepository _contentByGuidReadRepository; private readonly IScopeAccessor _scopeAccessor; - public DocumentRepository(IScopeAccessor scopeAccessor, CacheHelper cacheHelper, ILogger logger, IContentTypeRepository contentTypeRepository, ITemplateRepository templateRepository, ITagRepository tagRepository, ILanguageRepository languageRepository, IContentSection settings) - : base(scopeAccessor, cacheHelper, languageRepository, logger) + public DocumentRepository(IScopeAccessor scopeAccessor, AppCaches appCaches, ILogger logger, IContentTypeRepository contentTypeRepository, ITemplateRepository templateRepository, ITagRepository tagRepository, ILanguageRepository languageRepository, IContentSection settings) + : base(scopeAccessor, appCaches, languageRepository, logger) { _contentTypeRepository = contentTypeRepository ?? throw new ArgumentNullException(nameof(contentTypeRepository)); _templateRepository = templateRepository ?? throw new ArgumentNullException(nameof(templateRepository)); _tagRepository = tagRepository ?? throw new ArgumentNullException(nameof(tagRepository)); - _cacheHelper = cacheHelper; + _appCaches = appCaches; _scopeAccessor = scopeAccessor; - _contentByGuidReadRepository = new ContentByGuidReadRepository(this, scopeAccessor, cacheHelper, logger); + _contentByGuidReadRepository = new ContentByGuidReadRepository(this, scopeAccessor, appCaches, logger); EnsureUniqueNaming = settings.EnsureUniqueNaming; } @@ -48,7 +48,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // note: is ok to 'new' the repo here as it's a sub-repo really private PermissionRepository PermissionRepository => _permissionRepository - ?? (_permissionRepository = new PermissionRepository(_scopeAccessor, _cacheHelper, Logger)); + ?? (_permissionRepository = new PermissionRepository(_scopeAccessor, _appCaches, Logger)); #region Repository Base @@ -847,7 +847,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { private readonly DocumentRepository _outerRepo; - public ContentByGuidReadRepository(DocumentRepository outerRepo, IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger) + public ContentByGuidReadRepository(DocumentRepository outerRepo, IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) : base(scopeAccessor, cache, logger) { _outerRepo = outerRepo; diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentTypeContainerRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentTypeContainerRepository.cs index de8042cfcf..d50981e036 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentTypeContainerRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentTypeContainerRepository.cs @@ -6,7 +6,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { class DocumentTypeContainerRepository : EntityContainerRepository, IDocumentTypeContainerRepository { - public DocumentTypeContainerRepository(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger) + public DocumentTypeContainerRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) : base(scopeAccessor, cache, logger, Constants.ObjectTypes.DocumentTypeContainer) { } } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DomainRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DomainRepository.cs index f75d82bd4e..fa06216f9b 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/DomainRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DomainRepository.cs @@ -16,7 +16,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement internal class DomainRepository : NPocoRepositoryBase, IDomainRepository { - public DomainRepository(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger) + public DomainRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) : base(scopeAccessor, cache, logger) { } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/EntityContainerRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/EntityContainerRepository.cs index fae7ae2ebc..09fe949df1 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/EntityContainerRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/EntityContainerRepository.cs @@ -19,7 +19,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { private readonly Guid _containerObjectType; - public EntityContainerRepository(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger, Guid containerObjectType) + public EntityContainerRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger, Guid containerObjectType) : base(scopeAccessor, cache, logger) { var allowedContainers = new[] { Constants.ObjectTypes.DocumentTypeContainer, Constants.ObjectTypes.MediaTypeContainer, Constants.ObjectTypes.DataTypeContainer }; diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ExternalLoginRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ExternalLoginRepository.cs index ce9a44f595..7cb78f4c9f 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ExternalLoginRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ExternalLoginRepository.cs @@ -16,7 +16,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { internal class ExternalLoginRepository : NPocoRepositoryBase, IExternalLoginRepository { - public ExternalLoginRepository(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger) + public ExternalLoginRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) : base(scopeAccessor, cache, logger) { } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/LanguageRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/LanguageRepository.cs index e236670e74..b3f2ff4af0 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/LanguageRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/LanguageRepository.cs @@ -21,7 +21,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement private readonly Dictionary _codeIdMap = new Dictionary(StringComparer.OrdinalIgnoreCase); private readonly Dictionary _idCodeMap = new Dictionary(); - public LanguageRepository(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger) + public LanguageRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) : base(scopeAccessor, cache, logger) { } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MacroRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/MacroRepository.cs index 594f26fa72..565917e078 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/MacroRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/MacroRepository.cs @@ -15,7 +15,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { internal class MacroRepository : NPocoRepositoryBase, IMacroRepository { - public MacroRepository(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger) + public MacroRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) : base(scopeAccessor, cache, logger) { } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs index 3e665e321f..f2c7e35395 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs @@ -26,7 +26,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement private readonly ITagRepository _tagRepository; private readonly MediaByGuidReadRepository _mediaByGuidReadRepository; - public MediaRepository(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger, IMediaTypeRepository mediaTypeRepository, ITagRepository tagRepository, IContentSection contentSection, ILanguageRepository languageRepository) + public MediaRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger, IMediaTypeRepository mediaTypeRepository, ITagRepository tagRepository, IContentSection contentSection, ILanguageRepository languageRepository) : base(scopeAccessor, cache, languageRepository, logger) { _mediaTypeRepository = mediaTypeRepository ?? throw new ArgumentNullException(nameof(mediaTypeRepository)); @@ -395,7 +395,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { private readonly MediaRepository _outerRepo; - public MediaByGuidReadRepository(MediaRepository outerRepo, IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger) + public MediaByGuidReadRepository(MediaRepository outerRepo, IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) : base(scopeAccessor, cache, logger) { _outerRepo = outerRepo; diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MediaTypeContainerRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/MediaTypeContainerRepository.cs index 318d3a9c5a..68b33e989d 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/MediaTypeContainerRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/MediaTypeContainerRepository.cs @@ -6,7 +6,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { class MediaTypeContainerRepository : EntityContainerRepository, IMediaTypeContainerRepository { - public MediaTypeContainerRepository(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger) + public MediaTypeContainerRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) : base(scopeAccessor, cache, logger, Constants.ObjectTypes.MediaTypeContainer) { } } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MediaTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/MediaTypeRepository.cs index 7dc1c29396..4639871a4a 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/MediaTypeRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/MediaTypeRepository.cs @@ -16,7 +16,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement /// internal class MediaTypeRepository : ContentTypeRepositoryBase, IMediaTypeRepository { - public MediaTypeRepository(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger) + public MediaTypeRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) : base(scopeAccessor, cache, logger) { } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberGroupRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberGroupRepository.cs index e80faaa44a..11166ce777 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberGroupRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberGroupRepository.cs @@ -15,7 +15,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { internal class MemberGroupRepository : NPocoRepositoryBase, IMemberGroupRepository { - public MemberGroupRepository(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger) + public MemberGroupRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) : base(scopeAccessor, cache, logger) { } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs index bfadebd61b..2daa4abeca 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs @@ -24,7 +24,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement private readonly ITagRepository _tagRepository; private readonly IMemberGroupRepository _memberGroupRepository; - public MemberRepository(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger, IMemberTypeRepository memberTypeRepository, IMemberGroupRepository memberGroupRepository, ITagRepository tagRepository, ILanguageRepository languageRepository) + public MemberRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger, IMemberTypeRepository memberTypeRepository, IMemberGroupRepository memberGroupRepository, ITagRepository tagRepository, ILanguageRepository languageRepository) : base(scopeAccessor, cache, languageRepository, logger) { _memberTypeRepository = memberTypeRepository ?? throw new ArgumentNullException(nameof(memberTypeRepository)); diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberTypeRepository.cs index 023e308ad3..b81ce4010b 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberTypeRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberTypeRepository.cs @@ -17,7 +17,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement /// internal class MemberTypeRepository : ContentTypeRepositoryBase, IMemberTypeRepository { - public MemberTypeRepository(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger) + public MemberTypeRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) : base(scopeAccessor, cache, logger) { } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/NPocoRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/NPocoRepositoryBase.cs index df7517469c..234693602f 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/NPocoRepositoryBase.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/NPocoRepositoryBase.cs @@ -21,7 +21,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement /// /// Initializes a new instance of the class. /// - protected NPocoRepositoryBase(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger) + protected NPocoRepositoryBase(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) : base(scopeAccessor, cache, logger) { } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/PermissionRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/PermissionRepository.cs index 8261ed2ea3..b4fd86c567 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/PermissionRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/PermissionRepository.cs @@ -25,7 +25,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement internal class PermissionRepository : NPocoRepositoryBase where TEntity : class, IEntity { - public PermissionRepository(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger) + public PermissionRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) : base(scopeAccessor, cache, logger) { } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/PublicAccessRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/PublicAccessRepository.cs index f49905573d..bd2580b38f 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/PublicAccessRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/PublicAccessRepository.cs @@ -14,7 +14,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { internal class PublicAccessRepository : NPocoRepositoryBase, IPublicAccessRepository { - public PublicAccessRepository(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger) + public PublicAccessRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) : base(scopeAccessor, cache, logger) { } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/RedirectUrlRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/RedirectUrlRepository.cs index 3ca937ffcd..baac02b6bf 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/RedirectUrlRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/RedirectUrlRepository.cs @@ -13,7 +13,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { internal class RedirectUrlRepository : NPocoRepositoryBase, IRedirectUrlRepository { - public RedirectUrlRepository(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger) + public RedirectUrlRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) : base(scopeAccessor, cache, logger) { } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/RelationRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/RelationRepository.cs index fb5ba00ea0..c5ba24f385 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/RelationRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/RelationRepository.cs @@ -21,7 +21,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement private readonly IRelationTypeRepository _relationTypeRepository; public RelationRepository(IScopeAccessor scopeAccessor, ILogger logger, IRelationTypeRepository relationTypeRepository) - : base(scopeAccessor, CacheHelper.NoCache, logger) + : base(scopeAccessor, AppCaches.NoCache, logger) { _relationTypeRepository = relationTypeRepository; } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/RelationTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/RelationTypeRepository.cs index e4d8396e71..4faf78bd0a 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/RelationTypeRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/RelationTypeRepository.cs @@ -18,7 +18,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement /// internal class RelationTypeRepository : NPocoRepositoryBase, IRelationTypeRepository { - public RelationTypeRepository(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger) + public RelationTypeRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) : base(scopeAccessor, cache, logger) { } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs index 84c76dbb53..2626f60123 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs @@ -19,7 +19,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { private IRepositoryCachePolicy _cachePolicy; - protected RepositoryBase(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger) + protected RepositoryBase(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) { ScopeAccessor = scopeAccessor ?? throw new ArgumentNullException(nameof(scopeAccessor)); Logger = logger ?? throw new ArgumentNullException(nameof(logger)); @@ -28,7 +28,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement protected ILogger Logger { get; } - protected CacheHelper GlobalCache { get; } + protected AppCaches GlobalCache { get; } protected IRuntimeCacheProvider GlobalIsolatedCache => GlobalCache.IsolatedRuntimeCache.GetOrCreateCache(); @@ -127,7 +127,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { get { - if (GlobalCache == CacheHelper.NoCache) + if (GlobalCache == AppCaches.NoCache) return NoCacheRepositoryCachePolicy.Instance; // create the cache policy using IsolatedCache which is either global diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ServerRegistrationRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ServerRegistrationRepository.cs index 2679f8f92f..ead7c066be 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ServerRegistrationRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ServerRegistrationRepository.cs @@ -15,7 +15,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement internal class ServerRegistrationRepository : NPocoRepositoryBase, IServerRegistrationRepository { public ServerRegistrationRepository(IScopeAccessor scopeAccessor, ILogger logger) - : base(scopeAccessor, CacheHelper.NoCache, logger) + : base(scopeAccessor, AppCaches.NoCache, logger) { } protected override IRepositoryCachePolicy CreateCachePolicy() diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/SimpleGetRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/SimpleGetRepository.cs index 7a3bfdb757..43233d0f31 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/SimpleGetRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/SimpleGetRepository.cs @@ -18,7 +18,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement where TEntity : class, IEntity where TDto: class { - protected SimpleGetRepository(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger) + protected SimpleGetRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) : base(scopeAccessor, cache, logger) { } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/TagRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/TagRepository.cs index 77e474be08..7dd3f03407 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/TagRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/TagRepository.cs @@ -17,7 +17,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { internal class TagRepository : NPocoRepositoryBase, ITagRepository { - public TagRepository(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger) + public TagRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) : base(scopeAccessor, cache, logger) { } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/TemplateRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/TemplateRepository.cs index 19ef303ebe..bef71b1a51 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/TemplateRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/TemplateRepository.cs @@ -29,7 +29,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement private readonly ViewHelper _viewHelper; private readonly MasterPageHelper _masterPageHelper; - public TemplateRepository(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger, ITemplatesSection templateConfig, IFileSystems fileSystems) + public TemplateRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger, ITemplatesSection templateConfig, IFileSystems fileSystems) : base(scopeAccessor, cache, logger) { _masterpagesFileSystem = fileSystems.MasterPagesFileSystem; diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/UserGroupRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/UserGroupRepository.cs index 91466a0d09..c76a5de0d0 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/UserGroupRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/UserGroupRepository.cs @@ -23,11 +23,11 @@ namespace Umbraco.Core.Persistence.Repositories.Implement private readonly UserGroupWithUsersRepository _userGroupWithUsersRepository; private readonly PermissionRepository _permissionRepository; - public UserGroupRepository(IScopeAccessor scopeAccessor, CacheHelper cacheHelper, ILogger logger) - : base(scopeAccessor, cacheHelper, logger) + public UserGroupRepository(IScopeAccessor scopeAccessor, AppCaches appCaches, ILogger logger) + : base(scopeAccessor, appCaches, logger) { - _userGroupWithUsersRepository = new UserGroupWithUsersRepository(this, scopeAccessor, cacheHelper, logger); - _permissionRepository = new PermissionRepository(scopeAccessor, cacheHelper, logger); + _userGroupWithUsersRepository = new UserGroupWithUsersRepository(this, scopeAccessor, appCaches, logger); + _permissionRepository = new PermissionRepository(scopeAccessor, appCaches, logger); } public const string GetByAliasCacheKeyPrefix = "UserGroupRepository_GetByAlias_"; @@ -360,7 +360,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { private readonly UserGroupRepository _userGroupRepo; - public UserGroupWithUsersRepository(UserGroupRepository userGroupRepo, IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger) + public UserGroupWithUsersRepository(UserGroupRepository userGroupRepo, IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) : base(scopeAccessor, cache, logger) { _userGroupRepo = userGroupRepo; diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs index 17fe79a55b..918cc66cb0 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs @@ -35,22 +35,22 @@ namespace Umbraco.Core.Persistence.Repositories.Implement /// Constructor /// /// - /// + /// /// /// /// A dictionary specifying the configuration for user passwords. If this is null then no password configuration will be persisted or read. /// /// - public UserRepository(IScopeAccessor scopeAccessor, CacheHelper cacheHelper, ILogger logger, IMapperCollection mapperCollection, IGlobalSettings globalSettings) - : base(scopeAccessor, cacheHelper, logger) + public UserRepository(IScopeAccessor scopeAccessor, AppCaches appCaches, ILogger logger, IMapperCollection mapperCollection, IGlobalSettings globalSettings) + : base(scopeAccessor, appCaches, logger) { _mapperCollection = mapperCollection; _globalSettings = globalSettings; } // for tests - internal UserRepository(IScopeAccessor scopeAccessor, CacheHelper cacheHelper, ILogger logger, IMapperCollection mapperCollection, IDictionary passwordConfig, IGlobalSettings globalSettings) - : base(scopeAccessor, cacheHelper, logger) + internal UserRepository(IScopeAccessor scopeAccessor, AppCaches appCaches, ILogger logger, IMapperCollection mapperCollection, IDictionary passwordConfig, IGlobalSettings globalSettings) + : base(scopeAccessor, appCaches, logger) { _mapperCollection = mapperCollection; _globalSettings = globalSettings; diff --git a/src/Umbraco.Core/Runtime/CoreRuntime.cs b/src/Umbraco.Core/Runtime/CoreRuntime.cs index 729e960896..f29109b9d2 100644 --- a/src/Umbraco.Core/Runtime/CoreRuntime.cs +++ b/src/Umbraco.Core/Runtime/CoreRuntime.cs @@ -325,13 +325,13 @@ namespace Umbraco.Core.Runtime /// /// Gets the application caches. /// - protected virtual CacheHelper GetAppCaches() + protected virtual AppCaches GetAppCaches() { // need the deep clone runtime cache provider to ensure entities are cached properly, ie // are cloned in and cloned out - no request-based cache here since no web-based context, // is overriden by the web runtime - return new CacheHelper( + return new AppCaches( new DeepCloneRuntimeCacheProvider(new ObjectCacheRuntimeCacheProvider()), new StaticCacheProvider(), NullCacheProvider.Instance, diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 2236854351..79162c06ad 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -111,7 +111,7 @@ - + diff --git a/src/Umbraco.Tests/Macros/MacroTests.cs b/src/Umbraco.Tests/Macros/MacroTests.cs index 984fb94fab..23e198b778 100644 --- a/src/Umbraco.Tests/Macros/MacroTests.cs +++ b/src/Umbraco.Tests/Macros/MacroTests.cs @@ -21,7 +21,7 @@ namespace Umbraco.Tests.Macros public void Setup() { //we DO want cache enabled for these tests - var cacheHelper = new CacheHelper( + var cacheHelper = new AppCaches( new ObjectCacheRuntimeCacheProvider(), new StaticCacheProvider(), NullCacheProvider.Instance, diff --git a/src/Umbraco.Tests/Models/Mapping/AutoMapperTests.cs b/src/Umbraco.Tests/Models/Mapping/AutoMapperTests.cs index 1f7c5624bf..f48abc1233 100644 --- a/src/Umbraco.Tests/Models/Mapping/AutoMapperTests.cs +++ b/src/Umbraco.Tests/Models/Mapping/AutoMapperTests.cs @@ -20,7 +20,7 @@ namespace Umbraco.Tests.Models.Mapping base.Compose(); var manifestBuilder = new ManifestParser( - CacheHelper.Disabled.RuntimeCache, + AppCaches.Disabled.RuntimeCache, new ManifestValueValidatorCollection(Enumerable.Empty()), Composition.Logger) { diff --git a/src/Umbraco.Tests/Persistence/Repositories/ContentTypeRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/ContentTypeRepositoryTest.cs index aeaf76967f..34699826ad 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/ContentTypeRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/ContentTypeRepositoryTest.cs @@ -35,7 +35,7 @@ namespace Umbraco.Tests.Persistence.Repositories private DocumentRepository CreateRepository(IScopeAccessor scopeAccessor, out ContentTypeRepository contentTypeRepository) { - var cacheHelper = CacheHelper.Disabled; + var cacheHelper = AppCaches.Disabled; var templateRepository = new TemplateRepository(scopeAccessor, cacheHelper, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); var tagRepository = new TagRepository(scopeAccessor, cacheHelper, Logger); contentTypeRepository = new ContentTypeRepository(scopeAccessor, cacheHelper, Logger, templateRepository); @@ -46,20 +46,20 @@ namespace Umbraco.Tests.Persistence.Repositories private ContentTypeRepository CreateRepository(IScopeAccessor scopeAccessor) { - var templateRepository = new TemplateRepository(scopeAccessor, CacheHelper.Disabled, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); - var contentTypeRepository = new ContentTypeRepository(scopeAccessor, CacheHelper.Disabled, Logger, templateRepository); + var templateRepository = new TemplateRepository(scopeAccessor, AppCaches.Disabled, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); + var contentTypeRepository = new ContentTypeRepository(scopeAccessor, AppCaches.Disabled, Logger, templateRepository); return contentTypeRepository; } private MediaTypeRepository CreateMediaTypeRepository(IScopeAccessor scopeAccessor) { - var contentTypeRepository = new MediaTypeRepository(scopeAccessor, CacheHelper.Disabled, Logger); + var contentTypeRepository = new MediaTypeRepository(scopeAccessor, AppCaches.Disabled, Logger); return contentTypeRepository; } private EntityContainerRepository CreateContainerRepository(IScopeAccessor scopeAccessor, Guid containerEntityType) { - return new EntityContainerRepository(scopeAccessor, CacheHelper.Disabled, Logger, containerEntityType); + return new EntityContainerRepository(scopeAccessor, AppCaches.Disabled, Logger, containerEntityType); } //TODO Add test to verify SetDefaultTemplates updates both AllowedTemplates and DefaultTemplate(id). @@ -71,7 +71,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var templateRepo = new TemplateRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); + var templateRepo = new TemplateRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); var repository = CreateRepository((IScopeAccessor) provider); var templates = new[] { diff --git a/src/Umbraco.Tests/Persistence/Repositories/DataTypeDefinitionRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/DataTypeDefinitionRepositoryTest.cs index ce871d0d0a..b9724b0770 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/DataTypeDefinitionRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/DataTypeDefinitionRepositoryTest.cs @@ -25,7 +25,7 @@ namespace Umbraco.Tests.Persistence.Repositories private EntityContainerRepository CreateContainerRepository(IScopeAccessor scopeAccessor) { - return new EntityContainerRepository(scopeAccessor, CacheHelper.Disabled, Logger, Constants.ObjectTypes.DataTypeContainer); + return new EntityContainerRepository(scopeAccessor, AppCaches.Disabled, Logger, Constants.ObjectTypes.DataTypeContainer); } [Test] diff --git a/src/Umbraco.Tests/Persistence/Repositories/DocumentRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/DocumentRepositoryTest.cs index c1fa5381ff..772147f5ad 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/DocumentRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/DocumentRepositoryTest.cs @@ -43,39 +43,39 @@ namespace Umbraco.Tests.Persistence.Repositories base.TearDown(); } - private DocumentRepository CreateRepository(IScopeAccessor scopeAccessor, out ContentTypeRepository contentTypeRepository, out DataTypeRepository dtdRepository, CacheHelper cacheHelper = null) + private DocumentRepository CreateRepository(IScopeAccessor scopeAccessor, out ContentTypeRepository contentTypeRepository, out DataTypeRepository dtdRepository, AppCaches appCaches = null) { - cacheHelper = cacheHelper ?? CacheHelper; + appCaches = appCaches ?? AppCaches; TemplateRepository tr; var ctRepository = CreateRepository(scopeAccessor, out contentTypeRepository, out tr); var editors = new PropertyEditorCollection(new DataEditorCollection(Enumerable.Empty())); - dtdRepository = new DataTypeRepository(scopeAccessor, cacheHelper, new Lazy(() => editors), Logger); + dtdRepository = new DataTypeRepository(scopeAccessor, appCaches, new Lazy(() => editors), Logger); return ctRepository; } - private DocumentRepository CreateRepository(IScopeAccessor scopeAccessor, out ContentTypeRepository contentTypeRepository, CacheHelper cacheHelper = null) + private DocumentRepository CreateRepository(IScopeAccessor scopeAccessor, out ContentTypeRepository contentTypeRepository, AppCaches appCaches = null) { TemplateRepository tr; - return CreateRepository(scopeAccessor, out contentTypeRepository, out tr, cacheHelper); + return CreateRepository(scopeAccessor, out contentTypeRepository, out tr, appCaches); } - private DocumentRepository CreateRepository(IScopeAccessor scopeAccessor, out ContentTypeRepository contentTypeRepository, out TemplateRepository templateRepository, CacheHelper cacheHelper = null) + private DocumentRepository CreateRepository(IScopeAccessor scopeAccessor, out ContentTypeRepository contentTypeRepository, out TemplateRepository templateRepository, AppCaches appCaches = null) { - cacheHelper = cacheHelper ?? CacheHelper; + appCaches = appCaches ?? AppCaches; - templateRepository = new TemplateRepository(scopeAccessor, cacheHelper, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); - var tagRepository = new TagRepository(scopeAccessor, cacheHelper, Logger); - contentTypeRepository = new ContentTypeRepository(scopeAccessor, cacheHelper, Logger, templateRepository); - var languageRepository = new LanguageRepository(scopeAccessor, cacheHelper, Logger); - var repository = new DocumentRepository(scopeAccessor, cacheHelper, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of()); + templateRepository = new TemplateRepository(scopeAccessor, appCaches, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); + var tagRepository = new TagRepository(scopeAccessor, appCaches, Logger); + contentTypeRepository = new ContentTypeRepository(scopeAccessor, appCaches, Logger, templateRepository); + var languageRepository = new LanguageRepository(scopeAccessor, appCaches, Logger); + var repository = new DocumentRepository(scopeAccessor, appCaches, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of()); return repository; } [Test] public void CacheActiveForIntsAndGuids() { - var realCache = new CacheHelper( + var realCache = new AppCaches( new ObjectCacheRuntimeCacheProvider(), new StaticCacheProvider(), new StaticCacheProvider(), @@ -84,7 +84,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var repository = CreateRepository((IScopeAccessor)provider, out var contentTypeRepository, cacheHelper: realCache); + var repository = CreateRepository((IScopeAccessor)provider, out var contentTypeRepository, appCaches: realCache); var udb = (UmbracoDatabase)scope.Database; diff --git a/src/Umbraco.Tests/Persistence/Repositories/DomainRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/DomainRepositoryTest.cs index a5402f964e..a64a65047b 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/DomainRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/DomainRepositoryTest.cs @@ -22,12 +22,12 @@ namespace Umbraco.Tests.Persistence.Repositories private DomainRepository CreateRepository(IScopeProvider provider, out ContentTypeRepository contentTypeRepository, out DocumentRepository documentRepository, out LanguageRepository languageRepository) { var accessor = (IScopeAccessor) provider; - var templateRepository = new TemplateRepository(accessor, Core.Cache.CacheHelper.Disabled, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); - var tagRepository = new TagRepository(accessor, Core.Cache.CacheHelper.Disabled, Logger); - contentTypeRepository = new ContentTypeRepository(accessor, Core.Cache.CacheHelper.Disabled, Logger, templateRepository); - languageRepository = new LanguageRepository(accessor, Core.Cache.CacheHelper.Disabled, Logger); - documentRepository = new DocumentRepository(accessor, Core.Cache.CacheHelper.Disabled, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of()); - var domainRepository = new DomainRepository(accessor, Core.Cache.CacheHelper.Disabled, Logger); + var templateRepository = new TemplateRepository(accessor, Core.Cache.AppCaches.Disabled, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); + var tagRepository = new TagRepository(accessor, Core.Cache.AppCaches.Disabled, Logger); + contentTypeRepository = new ContentTypeRepository(accessor, Core.Cache.AppCaches.Disabled, Logger, templateRepository); + languageRepository = new LanguageRepository(accessor, Core.Cache.AppCaches.Disabled, Logger); + documentRepository = new DocumentRepository(accessor, Core.Cache.AppCaches.Disabled, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of()); + var domainRepository = new DomainRepository(accessor, Core.Cache.AppCaches.Disabled, Logger); return domainRepository; } diff --git a/src/Umbraco.Tests/Persistence/Repositories/LanguageRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/LanguageRepositoryTest.cs index 2f91c602af..5823537f7a 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/LanguageRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/LanguageRepositoryTest.cs @@ -26,7 +26,7 @@ namespace Umbraco.Tests.Persistence.Repositories private LanguageRepository CreateRepository(IScopeProvider provider) { - return new LanguageRepository((IScopeAccessor) provider, CacheHelper.Disabled, Mock.Of()); + return new LanguageRepository((IScopeAccessor) provider, AppCaches.Disabled, Mock.Of()); } [Test] diff --git a/src/Umbraco.Tests/Persistence/Repositories/MacroRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/MacroRepositoryTest.cs index e21debfdfd..6f215f4a35 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/MacroRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/MacroRepositoryTest.cs @@ -35,7 +35,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var repository = new MacroRepository((IScopeAccessor) provider, CacheHelper.Disabled, Mock.Of()); + var repository = new MacroRepository((IScopeAccessor) provider, AppCaches.Disabled, Mock.Of()); var macro = new Macro("test1", "Test", "~/views/macropartials/test.cshtml", MacroTypes.PartialView); ; @@ -52,7 +52,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var repository = new MacroRepository((IScopeAccessor) provider, CacheHelper.Disabled, Mock.Of()); + var repository = new MacroRepository((IScopeAccessor) provider, AppCaches.Disabled, Mock.Of()); var macro = repository.Get(1); macro.Alias = "test2"; @@ -69,7 +69,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var repository = new MacroRepository((IScopeAccessor) provider, CacheHelper.Disabled, Mock.Of()); + var repository = new MacroRepository((IScopeAccessor) provider, AppCaches.Disabled, Mock.Of()); // Assert Assert.That(repository, Is.Not.Null); @@ -83,7 +83,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var repository = new MacroRepository((IScopeAccessor) provider, CacheHelper.Disabled, Mock.Of()); + var repository = new MacroRepository((IScopeAccessor) provider, AppCaches.Disabled, Mock.Of()); // Act var macro = repository.Get(1); @@ -111,7 +111,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var repository = new MacroRepository((IScopeAccessor) provider, CacheHelper.Disabled, Mock.Of()); + var repository = new MacroRepository((IScopeAccessor) provider, AppCaches.Disabled, Mock.Of()); // Act var macros = repository.GetMany(); @@ -129,7 +129,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var repository = new MacroRepository((IScopeAccessor) provider, CacheHelper.Disabled, Mock.Of()); + var repository = new MacroRepository((IScopeAccessor) provider, AppCaches.Disabled, Mock.Of()); // Act var query = scope.SqlContext.Query().Where(x => x.Alias.ToUpper() == "TEST1"); @@ -147,7 +147,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var repository = new MacroRepository((IScopeAccessor) provider, CacheHelper.Disabled, Mock.Of()); + var repository = new MacroRepository((IScopeAccessor) provider, AppCaches.Disabled, Mock.Of()); // Act var query = scope.SqlContext.Query().Where(x => x.Name.StartsWith("Test")); @@ -165,7 +165,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var repository = new MacroRepository((IScopeAccessor) provider, CacheHelper.Disabled, Mock.Of()); + var repository = new MacroRepository((IScopeAccessor) provider, AppCaches.Disabled, Mock.Of()); // Act var macro = new Macro("test", "Test", "~/views/macropartials/test.cshtml", MacroTypes.PartialView); @@ -186,7 +186,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var repository = new MacroRepository((IScopeAccessor) provider, CacheHelper.Disabled, Mock.Of()); + var repository = new MacroRepository((IScopeAccessor) provider, AppCaches.Disabled, Mock.Of()); // Act var macro = repository.Get(2); @@ -221,7 +221,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var repository = new MacroRepository((IScopeAccessor) provider, CacheHelper.Disabled, Mock.Of()); + var repository = new MacroRepository((IScopeAccessor) provider, AppCaches.Disabled, Mock.Of()); // Act var macro = repository.Get(3); @@ -242,7 +242,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var repository = new MacroRepository((IScopeAccessor) provider, CacheHelper.Disabled, Mock.Of()); + var repository = new MacroRepository((IScopeAccessor) provider, AppCaches.Disabled, Mock.Of()); // Act var exists = repository.Exists(3); @@ -261,7 +261,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var repository = new MacroRepository((IScopeAccessor) provider, CacheHelper.Disabled, Mock.Of()); + var repository = new MacroRepository((IScopeAccessor) provider, AppCaches.Disabled, Mock.Of()); var macro = repository.Get(1); macro.Properties.Add(new MacroProperty("new1", "New1", 3, "test")); @@ -287,7 +287,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var repository = new MacroRepository((IScopeAccessor) provider, CacheHelper.Disabled, Mock.Of()); + var repository = new MacroRepository((IScopeAccessor) provider, AppCaches.Disabled, Mock.Of()); var macro = new Macro("newmacro", "A new macro", "~/views/macropartials/test1.cshtml", MacroTypes.PartialView); macro.Properties.Add(new MacroProperty("blah1", "New1", 4, "test.editor")); @@ -312,7 +312,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var repository = new MacroRepository((IScopeAccessor) provider, CacheHelper.Disabled, Mock.Of()); + var repository = new MacroRepository((IScopeAccessor) provider, AppCaches.Disabled, Mock.Of()); var macro = new Macro("newmacro", "A new macro", "~/views/macropartials/test1.cshtml", MacroTypes.PartialView); macro.Properties.Add(new MacroProperty("blah1", "New1", 4, "test.editor")); @@ -336,7 +336,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var repository = new MacroRepository((IScopeAccessor) provider, CacheHelper.Disabled, Mock.Of()); + var repository = new MacroRepository((IScopeAccessor) provider, AppCaches.Disabled, Mock.Of()); var macro = new Macro("newmacro", "A new macro", "~/views/macropartials/test1.cshtml", MacroTypes.PartialView); var prop1 = new MacroProperty("blah1", "New1", 4, "test.editor"); @@ -367,7 +367,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var repository = new MacroRepository((IScopeAccessor) provider, CacheHelper.Disabled, Mock.Of()); + var repository = new MacroRepository((IScopeAccessor) provider, AppCaches.Disabled, Mock.Of()); var macro = repository.Get(1); macro.Properties.Add(new MacroProperty("new1", "New1", 3, "test")); @@ -394,7 +394,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var repository = new MacroRepository((IScopeAccessor) provider, CacheHelper.Disabled, Mock.Of()); + var repository = new MacroRepository((IScopeAccessor) provider, AppCaches.Disabled, Mock.Of()); var macro = repository.Get(1); macro.Properties.Add(new MacroProperty("new1", "New1", 3, "test")); @@ -422,7 +422,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var repository = new MacroRepository((IScopeAccessor) provider, CacheHelper.Disabled, Mock.Of()); + var repository = new MacroRepository((IScopeAccessor) provider, AppCaches.Disabled, Mock.Of()); repository.Save(new Macro("test1", "Test1", "~/views/macropartials/test1.cshtml", MacroTypes.PartialView)); repository.Save(new Macro("test2", "Test2", "~/views/macropartials/test2.cshtml", MacroTypes.PartialView)); diff --git a/src/Umbraco.Tests/Persistence/Repositories/MediaRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/MediaRepositoryTest.cs index d1e7f96ff3..5e1900b29e 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/MediaRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/MediaRepositoryTest.cs @@ -30,14 +30,14 @@ namespace Umbraco.Tests.Persistence.Repositories CreateTestData(); } - private MediaRepository CreateRepository(IScopeProvider provider, out MediaTypeRepository mediaTypeRepository, CacheHelper cacheHelper = null) + private MediaRepository CreateRepository(IScopeProvider provider, out MediaTypeRepository mediaTypeRepository, AppCaches appCaches = null) { - cacheHelper = cacheHelper ?? CacheHelper; + appCaches = appCaches ?? AppCaches; var scopeAccessor = (IScopeAccessor) provider; - mediaTypeRepository = new MediaTypeRepository(scopeAccessor, cacheHelper, Logger); - var tagRepository = new TagRepository(scopeAccessor, cacheHelper, Logger); - var repository = new MediaRepository(scopeAccessor, cacheHelper, Logger, mediaTypeRepository, tagRepository, Mock.Of(), Mock.Of()); + mediaTypeRepository = new MediaTypeRepository(scopeAccessor, appCaches, Logger); + var tagRepository = new TagRepository(scopeAccessor, appCaches, Logger); + var repository = new MediaRepository(scopeAccessor, appCaches, Logger, mediaTypeRepository, tagRepository, Mock.Of(), Mock.Of()); return repository; } @@ -46,7 +46,7 @@ namespace Umbraco.Tests.Persistence.Repositories { MediaTypeRepository mediaTypeRepository; - var realCache = new CacheHelper( + var realCache = new AppCaches( new ObjectCacheRuntimeCacheProvider(), new StaticCacheProvider(), new StaticCacheProvider(), @@ -55,7 +55,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var repository = CreateRepository(provider, out mediaTypeRepository, cacheHelper: realCache); + var repository = CreateRepository(provider, out mediaTypeRepository, appCaches: realCache); var udb = (UmbracoDatabase)scope.Database; diff --git a/src/Umbraco.Tests/Persistence/Repositories/MediaTypeRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/MediaTypeRepositoryTest.cs index ae4308db55..49bb93f2a7 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/MediaTypeRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/MediaTypeRepositoryTest.cs @@ -21,12 +21,12 @@ namespace Umbraco.Tests.Persistence.Repositories { private MediaTypeRepository CreateRepository(IScopeProvider provider) { - return new MediaTypeRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger); + return new MediaTypeRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger); } private EntityContainerRepository CreateContainerRepository(IScopeProvider provider) { - return new EntityContainerRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, Constants.ObjectTypes.MediaTypeContainer); + return new EntityContainerRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, Constants.ObjectTypes.MediaTypeContainer); } diff --git a/src/Umbraco.Tests/Persistence/Repositories/MemberRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/MemberRepositoryTest.cs index 18bfc4fcea..dea15cd4ad 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/MemberRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/MemberRepositoryTest.cs @@ -29,10 +29,10 @@ namespace Umbraco.Tests.Persistence.Repositories private MemberRepository CreateRepository(IScopeProvider provider, out MemberTypeRepository memberTypeRepository, out MemberGroupRepository memberGroupRepository) { var accessor = (IScopeAccessor) provider; - memberTypeRepository = new MemberTypeRepository(accessor, CacheHelper.Disabled, Logger); - memberGroupRepository = new MemberGroupRepository(accessor, CacheHelper.Disabled, Logger); - var tagRepo = new TagRepository(accessor, CacheHelper.Disabled, Logger); - var repository = new MemberRepository(accessor, CacheHelper.Disabled, Logger, memberTypeRepository, memberGroupRepository, tagRepo, Mock.Of()); + memberTypeRepository = new MemberTypeRepository(accessor, AppCaches.Disabled, Logger); + memberGroupRepository = new MemberGroupRepository(accessor, AppCaches.Disabled, Logger); + var tagRepo = new TagRepository(accessor, AppCaches.Disabled, Logger); + var repository = new MemberRepository(accessor, AppCaches.Disabled, Logger, memberTypeRepository, memberGroupRepository, tagRepo, Mock.Of()); return repository; } diff --git a/src/Umbraco.Tests/Persistence/Repositories/MemberTypeRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/MemberTypeRepositoryTest.cs index 87d146f9f4..0c2314fd47 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/MemberTypeRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/MemberTypeRepositoryTest.cs @@ -22,7 +22,7 @@ namespace Umbraco.Tests.Persistence.Repositories { private MemberTypeRepository CreateRepository(IScopeProvider provider) { - return new MemberTypeRepository((IScopeAccessor) provider, CacheHelper.Disabled, Mock.Of()); + return new MemberTypeRepository((IScopeAccessor) provider, AppCaches.Disabled, Mock.Of()); } [Test] diff --git a/src/Umbraco.Tests/Persistence/Repositories/PublicAccessRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/PublicAccessRepositoryTest.cs index e76d794e69..d28a002e31 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/PublicAccessRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/PublicAccessRepositoryTest.cs @@ -29,7 +29,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var repo = new PublicAccessRepository((IScopeAccessor) provider, CacheHelper, Logger); + var repo = new PublicAccessRepository((IScopeAccessor) provider, AppCaches, Logger); var entry = new PublicAccessEntry(content[0], content[1], content[2], new[] { @@ -59,7 +59,7 @@ namespace Umbraco.Tests.Persistence.Repositories using (var scope = provider.CreateScope()) { scope.Database.AsUmbracoDatabase().EnableSqlTrace = true; - var repo = new PublicAccessRepository((IScopeAccessor) provider, CacheHelper, Logger); + var repo = new PublicAccessRepository((IScopeAccessor) provider, AppCaches, Logger); var entry = new PublicAccessEntry(content[0], content[1], content[2], new[] { @@ -99,7 +99,7 @@ namespace Umbraco.Tests.Persistence.Repositories using (var scope = provider.CreateScope()) { scope.Database.AsUmbracoDatabase().EnableSqlTrace = true; - var repo = new PublicAccessRepository((IScopeAccessor) provider, CacheHelper, Logger); + var repo = new PublicAccessRepository((IScopeAccessor) provider, AppCaches, Logger); var entry = new PublicAccessEntry(content[0], content[1], content[2], new[] { @@ -144,7 +144,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var repo = new PublicAccessRepository((IScopeAccessor) provider, CacheHelper, Logger); + var repo = new PublicAccessRepository((IScopeAccessor) provider, AppCaches, Logger); var entry = new PublicAccessEntry(content[0], content[1], content[2], new[] { @@ -182,7 +182,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var repo = new PublicAccessRepository((IScopeAccessor) provider, CacheHelper, Logger); + var repo = new PublicAccessRepository((IScopeAccessor) provider, AppCaches, Logger); var entry = new PublicAccessEntry(content[0], content[1], content[2], new[] { @@ -210,7 +210,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var repo = new PublicAccessRepository((IScopeAccessor) provider, CacheHelper, Logger); + var repo = new PublicAccessRepository((IScopeAccessor) provider, AppCaches, Logger); var allEntries = new List(); for (int i = 0; i < 10; i++) @@ -274,7 +274,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var repo = new PublicAccessRepository((IScopeAccessor) provider, CacheHelper, Logger); + var repo = new PublicAccessRepository((IScopeAccessor) provider, AppCaches, Logger); var entry1 = new PublicAccessEntry(content[0], content[1], content[2], new[] { @@ -307,11 +307,11 @@ namespace Umbraco.Tests.Persistence.Repositories private DocumentRepository CreateRepository(IScopeProvider provider, out ContentTypeRepository contentTypeRepository) { var accessor = (IScopeAccessor) provider; - var templateRepository = new TemplateRepository(accessor, CacheHelper, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); - var tagRepository = new TagRepository(accessor, CacheHelper, Logger); - contentTypeRepository = new ContentTypeRepository(accessor, CacheHelper, Logger, templateRepository); - var languageRepository = new LanguageRepository(accessor, CacheHelper, Logger); - var repository = new DocumentRepository(accessor, CacheHelper, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of()); + var templateRepository = new TemplateRepository(accessor, AppCaches, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); + var tagRepository = new TagRepository(accessor, AppCaches, Logger); + contentTypeRepository = new ContentTypeRepository(accessor, AppCaches, Logger, templateRepository); + var languageRepository = new LanguageRepository(accessor, AppCaches, Logger); + var repository = new DocumentRepository(accessor, AppCaches, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of()); return repository; } diff --git a/src/Umbraco.Tests/Persistence/Repositories/RedirectUrlRepositoryTests.cs b/src/Umbraco.Tests/Persistence/Repositories/RedirectUrlRepositoryTests.cs index ca2c713a27..66f6655c77 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/RedirectUrlRepositoryTests.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/RedirectUrlRepositoryTests.cs @@ -188,7 +188,7 @@ namespace Umbraco.Tests.Persistence.Repositories private IRedirectUrlRepository CreateRepository(IScopeProvider provider) { - return new RedirectUrlRepository((IScopeAccessor) provider, CacheHelper, Logger); + return new RedirectUrlRepository((IScopeAccessor) provider, AppCaches, Logger); } private IContent _textpage, _subpage, _otherpage, _trashed; diff --git a/src/Umbraco.Tests/Persistence/Repositories/RelationRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/RelationRepositoryTest.cs index 697951d021..cea7f44b71 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/RelationRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/RelationRepositoryTest.cs @@ -30,7 +30,7 @@ namespace Umbraco.Tests.Persistence.Repositories private RelationRepository CreateRepository(IScopeProvider provider, out RelationTypeRepository relationTypeRepository) { var accessor = (IScopeAccessor) provider; - relationTypeRepository = new RelationTypeRepository(accessor, CacheHelper.Disabled, Mock.Of()); + relationTypeRepository = new RelationTypeRepository(accessor, AppCaches.Disabled, Mock.Of()); var repository = new RelationRepository(accessor, Mock.Of(), relationTypeRepository); return repository; } @@ -266,7 +266,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var relationTypeRepository = new RelationTypeRepository((IScopeAccessor) provider, CacheHelper.Disabled, Mock.Of()); + var relationTypeRepository = new RelationTypeRepository((IScopeAccessor) provider, AppCaches.Disabled, Mock.Of()); var relationRepository = new RelationRepository((IScopeAccessor) provider, Mock.Of(), relationTypeRepository); relationTypeRepository.Save(relateContent); diff --git a/src/Umbraco.Tests/Persistence/Repositories/RelationTypeRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/RelationTypeRepositoryTest.cs index 26b2fe48c2..e52e2dfcdf 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/RelationTypeRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/RelationTypeRepositoryTest.cs @@ -28,7 +28,7 @@ namespace Umbraco.Tests.Persistence.Repositories private RelationTypeRepository CreateRepository(IScopeProvider provider) { - return new RelationTypeRepository((IScopeAccessor) provider, CacheHelper.Disabled, Mock.Of()); + return new RelationTypeRepository((IScopeAccessor) provider, AppCaches.Disabled, Mock.Of()); } @@ -232,7 +232,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = ScopeProvider.CreateScope()) { - var repository = new RelationTypeRepository((IScopeAccessor) provider, CacheHelper.Disabled, Mock.Of()); + var repository = new RelationTypeRepository((IScopeAccessor) provider, AppCaches.Disabled, Mock.Of()); repository.Save(relateContent);//Id 2 repository.Save(relateContentType);//Id 3 diff --git a/src/Umbraco.Tests/Persistence/Repositories/ServerRegistrationRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/ServerRegistrationRepositoryTest.cs index 08c34f453c..e2fc4b4705 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/ServerRegistrationRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/ServerRegistrationRepositoryTest.cs @@ -16,13 +16,13 @@ namespace Umbraco.Tests.Persistence.Repositories [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] public class ServerRegistrationRepositoryTest : TestWithDatabaseBase { - private CacheHelper _cacheHelper; + private AppCaches _appCaches; public override void SetUp() { base.SetUp(); - _cacheHelper = new CacheHelper(); + _appCaches = new AppCaches(); CreateTestData(); } diff --git a/src/Umbraco.Tests/Persistence/Repositories/TagRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/TagRepositoryTest.cs index 78eb736007..4812131a61 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/TagRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/TagRepositoryTest.cs @@ -947,26 +947,26 @@ namespace Umbraco.Tests.Persistence.Repositories private TagRepository CreateRepository(IScopeProvider provider) { - return new TagRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger); + return new TagRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger); } private DocumentRepository CreateContentRepository(IScopeProvider provider, out ContentTypeRepository contentTypeRepository) { var accessor = (IScopeAccessor) provider; - var templateRepository = new TemplateRepository(accessor, CacheHelper.Disabled, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); - var tagRepository = new TagRepository(accessor, CacheHelper.Disabled, Logger); - contentTypeRepository = new ContentTypeRepository(accessor, CacheHelper.Disabled, Logger, templateRepository); - var languageRepository = new LanguageRepository(accessor, CacheHelper.Disabled, Logger); - var repository = new DocumentRepository(accessor, CacheHelper.Disabled, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of()); + var templateRepository = new TemplateRepository(accessor, AppCaches.Disabled, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); + var tagRepository = new TagRepository(accessor, AppCaches.Disabled, Logger); + contentTypeRepository = new ContentTypeRepository(accessor, AppCaches.Disabled, Logger, templateRepository); + var languageRepository = new LanguageRepository(accessor, AppCaches.Disabled, Logger); + var repository = new DocumentRepository(accessor, AppCaches.Disabled, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of()); return repository; } private MediaRepository CreateMediaRepository(IScopeProvider provider, out MediaTypeRepository mediaTypeRepository) { var accessor = (IScopeAccessor) provider; - var tagRepository = new TagRepository(accessor, CacheHelper.Disabled, Logger); - mediaTypeRepository = new MediaTypeRepository(accessor, CacheHelper.Disabled, Logger); - var repository = new MediaRepository(accessor, CacheHelper.Disabled, Logger, mediaTypeRepository, tagRepository, Mock.Of(), Mock.Of()); + var tagRepository = new TagRepository(accessor, AppCaches.Disabled, Logger); + mediaTypeRepository = new MediaTypeRepository(accessor, AppCaches.Disabled, Logger); + var repository = new MediaRepository(accessor, AppCaches.Disabled, Logger, mediaTypeRepository, tagRepository, Mock.Of(), Mock.Of()); return repository; } } diff --git a/src/Umbraco.Tests/Persistence/Repositories/TemplateRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/TemplateRepositoryTest.cs index f4bed68315..94471aed7e 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/TemplateRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/TemplateRepositoryTest.cs @@ -27,7 +27,7 @@ namespace Umbraco.Tests.Persistence.Repositories private ITemplateRepository CreateRepository(IScopeProvider provider, ITemplatesSection templatesSection = null) { - return new TemplateRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, + return new TemplateRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, templatesSection ?? Mock.Of(t => t.DefaultRenderingEngine == RenderingEngine.Mvc), _fileSystems); } @@ -363,10 +363,10 @@ namespace Umbraco.Tests.Persistence.Repositories { var templateRepository = CreateRepository(ScopeProvider); - var tagRepository = new TagRepository((IScopeAccessor) ScopeProvider, CacheHelper.Disabled, Logger); - var contentTypeRepository = new ContentTypeRepository((IScopeAccessor) ScopeProvider, CacheHelper.Disabled, Logger, templateRepository); - var languageRepository = new LanguageRepository((IScopeAccessor) ScopeProvider, CacheHelper.Disabled, Logger); - var contentRepo = new DocumentRepository((IScopeAccessor) ScopeProvider, CacheHelper.Disabled, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of()); + var tagRepository = new TagRepository((IScopeAccessor) ScopeProvider, AppCaches.Disabled, Logger); + var contentTypeRepository = new ContentTypeRepository((IScopeAccessor) ScopeProvider, AppCaches.Disabled, Logger, templateRepository); + var languageRepository = new LanguageRepository((IScopeAccessor) ScopeProvider, AppCaches.Disabled, Logger); + var contentRepo = new DocumentRepository((IScopeAccessor) ScopeProvider, AppCaches.Disabled, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of()); var contentType = MockedContentTypes.CreateSimpleContentType("umbTextpage2", "Textpage"); ServiceContext.FileService.SaveTemplate(contentType.DefaultTemplate); // else, FK violation on contentType! diff --git a/src/Umbraco.Tests/Persistence/Repositories/UserGroupRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/UserGroupRepositoryTest.cs index f0fb8cff88..311372ef10 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/UserGroupRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/UserGroupRepositoryTest.cs @@ -19,7 +19,7 @@ namespace Umbraco.Tests.Persistence.Repositories { private UserGroupRepository CreateRepository(IScopeProvider provider) { - return new UserGroupRepository((IScopeAccessor) provider, Core.Cache.CacheHelper.Disabled, Mock.Of()); + return new UserGroupRepository((IScopeAccessor) provider, Core.Cache.AppCaches.Disabled, Mock.Of()); } [Test] @@ -131,7 +131,7 @@ namespace Umbraco.Tests.Persistence.Repositories var id = userGroup.Id; - var repository2 = new UserGroupRepository((IScopeAccessor) provider, Core.Cache.CacheHelper.Disabled, Logger); + var repository2 = new UserGroupRepository((IScopeAccessor) provider, Core.Cache.AppCaches.Disabled, Logger); repository2.Delete(userGroup); scope.Complete(); diff --git a/src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs index 847972cc50..7934544d8f 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs @@ -26,9 +26,9 @@ namespace Umbraco.Tests.Persistence.Repositories private MediaRepository CreateMediaRepository(IScopeProvider provider, out IMediaTypeRepository mediaTypeRepository) { var accessor = (IScopeAccessor) provider; - mediaTypeRepository = new MediaTypeRepository(accessor, CacheHelper, Mock.Of()); - var tagRepository = new TagRepository(accessor, CacheHelper, Mock.Of()); - var repository = new MediaRepository(accessor, CacheHelper, Mock.Of(), mediaTypeRepository, tagRepository, Mock.Of(), Mock.Of()); + mediaTypeRepository = new MediaTypeRepository(accessor, AppCaches, Mock.Of()); + var tagRepository = new TagRepository(accessor, AppCaches, Mock.Of()); + var repository = new MediaRepository(accessor, AppCaches, Mock.Of(), mediaTypeRepository, tagRepository, Mock.Of(), Mock.Of()); return repository; } @@ -41,25 +41,25 @@ namespace Umbraco.Tests.Persistence.Repositories private DocumentRepository CreateContentRepository(IScopeProvider provider, out IContentTypeRepository contentTypeRepository, out ITemplateRepository templateRepository) { var accessor = (IScopeAccessor) provider; - templateRepository = new TemplateRepository(accessor, CacheHelper, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); - var tagRepository = new TagRepository(accessor, CacheHelper, Logger); - contentTypeRepository = new ContentTypeRepository(accessor, CacheHelper, Logger, templateRepository); - var languageRepository = new LanguageRepository(accessor, CacheHelper, Logger); - var repository = new DocumentRepository(accessor, CacheHelper, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of()); + templateRepository = new TemplateRepository(accessor, AppCaches, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); + var tagRepository = new TagRepository(accessor, AppCaches, Logger); + contentTypeRepository = new ContentTypeRepository(accessor, AppCaches, Logger, templateRepository); + var languageRepository = new LanguageRepository(accessor, AppCaches, Logger); + var repository = new DocumentRepository(accessor, AppCaches, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of()); return repository; } private UserRepository CreateRepository(IScopeProvider provider) { var accessor = (IScopeAccessor) provider; - var repository = new UserRepository(accessor, CacheHelper.Disabled, Logger, Mappers, TestObjects.GetGlobalSettings()); + var repository = new UserRepository(accessor, AppCaches.Disabled, Logger, Mappers, TestObjects.GetGlobalSettings()); return repository; } private UserGroupRepository CreateUserGroupRepository(IScopeProvider provider) { var accessor = (IScopeAccessor) provider; - return new UserGroupRepository(accessor, CacheHelper.Disabled, Logger); + return new UserGroupRepository(accessor, AppCaches.Disabled, Logger); } [Test] @@ -207,7 +207,7 @@ namespace Umbraco.Tests.Persistence.Repositories var id = user.Id; - var repository2 = new UserRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, Mock.Of(),TestObjects.GetGlobalSettings()); + var repository2 = new UserRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, Mock.Of(),TestObjects.GetGlobalSettings()); repository2.Delete(user); diff --git a/src/Umbraco.Tests/Routing/RenderRouteHandlerTests.cs b/src/Umbraco.Tests/Routing/RenderRouteHandlerTests.cs index 84f4f5dbd7..fe2cbdc145 100644 --- a/src/Umbraco.Tests/Routing/RenderRouteHandlerTests.cs +++ b/src/Umbraco.Tests/Routing/RenderRouteHandlerTests.cs @@ -173,7 +173,7 @@ namespace Umbraco.Tests.Routing /// public class CustomDocumentController : RenderMvcController { - public CustomDocumentController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ServiceContext services, CacheHelper applicationCache, ILogger logger, IProfilingLogger profilingLogger) + public CustomDocumentController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ServiceContext services, AppCaches applicationCache, ILogger logger, IProfilingLogger profilingLogger) : base(globalSettings, umbracoContext, services, applicationCache, logger, profilingLogger) { } diff --git a/src/Umbraco.Tests/Runtimes/StandaloneTests.cs b/src/Umbraco.Tests/Runtimes/StandaloneTests.cs index ccb7427907..3a52eea17c 100644 --- a/src/Umbraco.Tests/Runtimes/StandaloneTests.cs +++ b/src/Umbraco.Tests/Runtimes/StandaloneTests.cs @@ -59,7 +59,7 @@ namespace Umbraco.Tests.Runtimes var logger = new ConsoleLogger(); var profiler = new LogProfiler(logger); var profilingLogger = new ProfilingLogger(logger, profiler); - var appCaches = new CacheHelper(); // fixme has HttpRuntime stuff? + var appCaches = new AppCaches(); // fixme has HttpRuntime stuff? var databaseFactory = new UmbracoDatabaseFactory(logger, new Lazy(() => factory.GetInstance())); var typeLoader = new TypeLoader(appCaches.RuntimeCache, LocalTempStorage.Default, profilingLogger); var mainDom = new SimpleMainDom(); @@ -239,7 +239,7 @@ namespace Umbraco.Tests.Runtimes var logger = new ConsoleLogger(); var profiler = Mock.Of(); var profilingLogger = new ProfilingLogger(logger, profiler); - var appCaches = CacheHelper.Disabled; + var appCaches = AppCaches.Disabled; var databaseFactory = Mock.Of(); var typeLoader = new TypeLoader(appCaches.RuntimeCache, LocalTempStorage.Default, profilingLogger); var runtimeState = Mock.Of(); diff --git a/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs b/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs index 3a0cb00ea9..5d4fa4f182 100644 --- a/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs +++ b/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs @@ -37,10 +37,10 @@ namespace Umbraco.Tests.Scoping .Add(() => Composition.TypeLoader.GetCacheRefreshers()); } - protected override CacheHelper GetCacheHelper() + protected override AppCaches GetCacheHelper() { // this is what's created core web runtime - return new CacheHelper( + return new AppCaches( new DeepCloneRuntimeCacheProvider(new ObjectCacheRuntimeCacheProvider()), new StaticCacheProvider(), NullCacheProvider.Instance, diff --git a/src/Umbraco.Tests/Services/ContentServicePerformanceTest.cs b/src/Umbraco.Tests/Services/ContentServicePerformanceTest.cs index 3aefa88a50..c56f66fc94 100644 --- a/src/Umbraco.Tests/Services/ContentServicePerformanceTest.cs +++ b/src/Umbraco.Tests/Services/ContentServicePerformanceTest.cs @@ -163,11 +163,11 @@ namespace Umbraco.Tests.Services var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var tRepository = new TemplateRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); - var tagRepo = new TagRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger); - var ctRepository = new ContentTypeRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, tRepository); - var languageRepository = new LanguageRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger); - var repository = new DocumentRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, ctRepository, tRepository, tagRepo, languageRepository, Mock.Of()); + var tRepository = new TemplateRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); + var tagRepo = new TagRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger); + var ctRepository = new ContentTypeRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, tRepository); + var languageRepository = new LanguageRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger); + var repository = new DocumentRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, ctRepository, tRepository, tagRepo, languageRepository, Mock.Of()); // Act Stopwatch watch = Stopwatch.StartNew(); @@ -196,11 +196,11 @@ namespace Umbraco.Tests.Services var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var tRepository = new TemplateRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); - var tagRepo = new TagRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger); - var ctRepository = new ContentTypeRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, tRepository); - var languageRepository = new LanguageRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger); - var repository = new DocumentRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, ctRepository, tRepository, tagRepo, languageRepository, Mock.Of()); + var tRepository = new TemplateRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); + var tagRepo = new TagRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger); + var ctRepository = new ContentTypeRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, tRepository); + var languageRepository = new LanguageRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger); + var repository = new DocumentRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, ctRepository, tRepository, tagRepo, languageRepository, Mock.Of()); // Act Stopwatch watch = Stopwatch.StartNew(); @@ -227,11 +227,11 @@ namespace Umbraco.Tests.Services var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var tRepository = new TemplateRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); - var tagRepo = new TagRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger); - var ctRepository = new ContentTypeRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, tRepository); - var languageRepository = new LanguageRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger); - var repository = new DocumentRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, ctRepository, tRepository, tagRepo, languageRepository, Mock.Of()); + var tRepository = new TemplateRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); + var tagRepo = new TagRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger); + var ctRepository = new ContentTypeRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, tRepository); + var languageRepository = new LanguageRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger); + var repository = new DocumentRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, ctRepository, tRepository, tagRepo, languageRepository, Mock.Of()); // Act var contents = repository.GetMany(); @@ -261,11 +261,11 @@ namespace Umbraco.Tests.Services var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var tRepository = new TemplateRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); - var tagRepo = new TagRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger); - var ctRepository = new ContentTypeRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, tRepository); - var languageRepository = new LanguageRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger); - var repository = new DocumentRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, ctRepository, tRepository, tagRepo, languageRepository, Mock.Of()); + var tRepository = new TemplateRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); + var tagRepo = new TagRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger); + var ctRepository = new ContentTypeRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, tRepository); + var languageRepository = new LanguageRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger); + var repository = new DocumentRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, ctRepository, tRepository, tagRepo, languageRepository, Mock.Of()); // Act var contents = repository.GetMany(); diff --git a/src/Umbraco.Tests/Services/ContentServiceTests.cs b/src/Umbraco.Tests/Services/ContentServiceTests.cs index 0f48a9c99a..799ce6a47c 100644 --- a/src/Umbraco.Tests/Services/ContentServiceTests.cs +++ b/src/Umbraco.Tests/Services/ContentServiceTests.cs @@ -3037,11 +3037,11 @@ namespace Umbraco.Tests.Services private DocumentRepository CreateRepository(IScopeProvider provider, out ContentTypeRepository contentTypeRepository) { var accessor = (IScopeAccessor) provider; - var templateRepository = new TemplateRepository(accessor, CacheHelper.Disabled, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); - var tagRepository = new TagRepository(accessor, CacheHelper.Disabled, Logger); - contentTypeRepository = new ContentTypeRepository(accessor, CacheHelper.Disabled, Logger, templateRepository); - var languageRepository = new LanguageRepository(accessor, CacheHelper.Disabled, Logger); - var repository = new DocumentRepository(accessor, CacheHelper.Disabled, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of()); + var templateRepository = new TemplateRepository(accessor, AppCaches.Disabled, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); + var tagRepository = new TagRepository(accessor, AppCaches.Disabled, Logger); + contentTypeRepository = new ContentTypeRepository(accessor, AppCaches.Disabled, Logger, templateRepository); + var languageRepository = new LanguageRepository(accessor, AppCaches.Disabled, Logger); + var repository = new DocumentRepository(accessor, AppCaches.Disabled, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of()); return repository; } } diff --git a/src/Umbraco.Tests/Services/MacroServiceTests.cs b/src/Umbraco.Tests/Services/MacroServiceTests.cs index 52cc8ab0d1..69e816585e 100644 --- a/src/Umbraco.Tests/Services/MacroServiceTests.cs +++ b/src/Umbraco.Tests/Services/MacroServiceTests.cs @@ -26,7 +26,7 @@ namespace Umbraco.Tests.Services var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var repository = new MacroRepository((IScopeAccessor) provider, CacheHelper.Disabled, Mock.Of()); + var repository = new MacroRepository((IScopeAccessor) provider, AppCaches.Disabled, Mock.Of()); repository.Save(new Macro("test1", "Test1", "~/views/macropartials/test1.cshtml", MacroTypes.PartialView)); repository.Save(new Macro("test2", "Test2", "~/views/macropartials/test2.cshtml", MacroTypes.PartialView)); diff --git a/src/Umbraco.Tests/Templates/TemplateRepositoryTests.cs b/src/Umbraco.Tests/Templates/TemplateRepositoryTests.cs index 795d79ced1..ececf46a18 100644 --- a/src/Umbraco.Tests/Templates/TemplateRepositoryTests.cs +++ b/src/Umbraco.Tests/Templates/TemplateRepositoryTests.cs @@ -15,7 +15,7 @@ namespace Umbraco.Tests.Templates [TestFixture] public class TemplateRepositoryTests { - private readonly Mock _cacheMock = new Mock(); + private readonly Mock _cacheMock = new Mock(); private readonly Mock _templateConfigMock = new Mock(); private readonly IFileSystems _fileSystems = Mock.Of(); private TemplateRepository _templateRepository; diff --git a/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestControllerActivatorBase.cs b/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestControllerActivatorBase.cs index 9e2a2156ee..94e38d6872 100644 --- a/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestControllerActivatorBase.cs +++ b/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestControllerActivatorBase.cs @@ -151,7 +151,7 @@ namespace Umbraco.Tests.TestHelpers.ControllerTesting urlHelper.Setup(provider => provider.GetUrl(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) .Returns(UrlInfo.Url("/hello/world/1234")); - var membershipHelper = new MembershipHelper(new TestUmbracoContextAccessor(umbCtx), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), null, Mock.Of(), Mock.Of()); + var membershipHelper = new MembershipHelper(new TestUmbracoContextAccessor(umbCtx), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), null, Mock.Of(), Mock.Of()); var umbHelper = new UmbracoHelper(umbCtx, Mock.Of(), diff --git a/src/Umbraco.Tests/TestHelpers/TestObjects.cs b/src/Umbraco.Tests/TestHelpers/TestObjects.cs index 14ffeb743f..29eb649c48 100644 --- a/src/Umbraco.Tests/TestHelpers/TestObjects.cs +++ b/src/Umbraco.Tests/TestHelpers/TestObjects.cs @@ -90,7 +90,7 @@ namespace Umbraco.Tests.TestHelpers /// just mock the services to be passed to the ctor of the ServiceContext. public ServiceContext GetServiceContext( IScopeProvider scopeProvider, IScopeAccessor scopeAccessor, - CacheHelper cache, + AppCaches cache, ILogger logger, IGlobalSettings globalSettings, IUmbracoSettingsSection umbracoSettings, diff --git a/src/Umbraco.Tests/Testing/TestingTests/MockTests.cs b/src/Umbraco.Tests/Testing/TestingTests/MockTests.cs index c413cb0e94..575f14e818 100644 --- a/src/Umbraco.Tests/Testing/TestingTests/MockTests.cs +++ b/src/Umbraco.Tests/Testing/TestingTests/MockTests.cs @@ -56,7 +56,7 @@ namespace Umbraco.Tests.Testing.TestingTests Composition.Register(_ => Mock.Of()); Composition.Register(_ => Mock.Of()); Composition.Register(_ => Mock.Of()); - Composition.Register(_ => CacheHelper.Disabled); + Composition.Register(_ => AppCaches.Disabled); Composition.Register(); // ReSharper disable once UnusedVariable @@ -65,7 +65,7 @@ namespace Umbraco.Tests.Testing.TestingTests Mock.Of(), Mock.Of(), Mock.Of(), - new MembershipHelper(new TestUmbracoContextAccessor(umbracoContext), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), null, Mock.Of(), Mock.Of()), + new MembershipHelper(new TestUmbracoContextAccessor(umbracoContext), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), null, Mock.Of(), Mock.Of()), ServiceContext.CreatePartial()); Assert.Pass(); } diff --git a/src/Umbraco.Tests/Testing/UmbracoTestBase.cs b/src/Umbraco.Tests/Testing/UmbracoTestBase.cs index a79531af74..c980f9c1ee 100644 --- a/src/Umbraco.Tests/Testing/UmbracoTestBase.cs +++ b/src/Umbraco.Tests/Testing/UmbracoTestBase.cs @@ -101,7 +101,7 @@ namespace Umbraco.Tests.Testing protected virtual IProfilingLogger ProfilingLogger => Factory.GetInstance(); - protected CacheHelper CacheHelper => Factory.GetInstance(); + protected AppCaches AppCaches => Factory.GetInstance(); protected virtual ISqlSyntaxProvider SqlSyntax => Factory.GetInstance(); @@ -199,9 +199,9 @@ namespace Umbraco.Tests.Testing return (logger, profiler); } - protected virtual CacheHelper GetCacheHelper() + protected virtual AppCaches GetCacheHelper() { - return CacheHelper.Disabled; + return AppCaches.Disabled; } protected virtual void ComposeWeb() diff --git a/src/Umbraco.Tests/Web/Mvc/SurfaceControllerTests.cs b/src/Umbraco.Tests/Web/Mvc/SurfaceControllerTests.cs index 35e8f0a937..03844b5d72 100644 --- a/src/Umbraco.Tests/Web/Mvc/SurfaceControllerTests.cs +++ b/src/Umbraco.Tests/Web/Mvc/SurfaceControllerTests.cs @@ -132,7 +132,7 @@ namespace Umbraco.Tests.Web.Mvc Mock.Of(), Mock.Of(), Mock.Of(), - new MembershipHelper(new TestUmbracoContextAccessor(umbracoContext), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), null, Mock.Of(), Mock.Of()), + new MembershipHelper(new TestUmbracoContextAccessor(umbracoContext), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), null, Mock.Of(), Mock.Of()), ServiceContext.CreatePartial()); var ctrl = new TestSurfaceController(umbracoContext, helper); @@ -185,7 +185,7 @@ namespace Umbraco.Tests.Web.Mvc public class TestSurfaceController : SurfaceController { public TestSurfaceController(UmbracoContext ctx, UmbracoHelper helper = null) - : base(ctx, null, ServiceContext.CreatePartial(), Mock.Of(), null, null) + : base(ctx, null, ServiceContext.CreatePartial(), Mock.Of(), null, null) { if (helper != null) { diff --git a/src/Umbraco.Web/Cache/ApplicationCacheRefresher.cs b/src/Umbraco.Web/Cache/ApplicationCacheRefresher.cs index c1ab217642..cf93b44215 100644 --- a/src/Umbraco.Web/Cache/ApplicationCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/ApplicationCacheRefresher.cs @@ -5,8 +5,8 @@ namespace Umbraco.Web.Cache { public sealed class ApplicationCacheRefresher : CacheRefresherBase { - public ApplicationCacheRefresher(CacheHelper cacheHelper) - : base(cacheHelper) + public ApplicationCacheRefresher(AppCaches appCaches) + : base(appCaches) { } #region Define @@ -25,7 +25,7 @@ namespace Umbraco.Web.Cache public override void RefreshAll() { - CacheHelper.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationsCacheKey); + AppCaches.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationsCacheKey); base.RefreshAll(); } @@ -37,7 +37,7 @@ namespace Umbraco.Web.Cache public override void Remove(int id) { - CacheHelper.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationsCacheKey); + AppCaches.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationsCacheKey); base.Remove(id); } diff --git a/src/Umbraco.Web/Cache/ApplicationTreeCacheRefresher.cs b/src/Umbraco.Web/Cache/ApplicationTreeCacheRefresher.cs index 247c33c361..72fceec631 100644 --- a/src/Umbraco.Web/Cache/ApplicationTreeCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/ApplicationTreeCacheRefresher.cs @@ -5,8 +5,8 @@ namespace Umbraco.Web.Cache { public sealed class ApplicationTreeCacheRefresher : CacheRefresherBase { - public ApplicationTreeCacheRefresher(CacheHelper cacheHelper) - : base(cacheHelper) + public ApplicationTreeCacheRefresher(AppCaches appCaches) + : base(appCaches) { } #region Define @@ -25,7 +25,7 @@ namespace Umbraco.Web.Cache public override void RefreshAll() { - CacheHelper.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationTreeCacheKey); + AppCaches.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationTreeCacheKey); base.RefreshAll(); } @@ -37,7 +37,7 @@ namespace Umbraco.Web.Cache public override void Remove(int id) { - CacheHelper.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationTreeCacheKey); + AppCaches.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationTreeCacheKey); base.Remove(id); } diff --git a/src/Umbraco.Web/Cache/ContentCacheRefresher.cs b/src/Umbraco.Web/Cache/ContentCacheRefresher.cs index b0192e9e75..3ae2f8e3dd 100644 --- a/src/Umbraco.Web/Cache/ContentCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/ContentCacheRefresher.cs @@ -20,8 +20,8 @@ namespace Umbraco.Web.Cache private readonly IdkMap _idkMap; private readonly IDomainService _domainService; - public ContentCacheRefresher(CacheHelper cacheHelper, IPublishedSnapshotService publishedSnapshotService, IdkMap idkMap, IDomainService domainService) - : base(cacheHelper) + public ContentCacheRefresher(AppCaches appCaches, IPublishedSnapshotService publishedSnapshotService, IdkMap idkMap, IDomainService domainService) + : base(appCaches) { _publishedSnapshotService = publishedSnapshotService; _idkMap = idkMap; @@ -44,10 +44,10 @@ namespace Umbraco.Web.Cache public override void Refresh(JsonPayload[] payloads) { - CacheHelper.RuntimeCache.ClearCacheObjectTypes(); + AppCaches.RuntimeCache.ClearCacheObjectTypes(); var idsRemoved = new HashSet(); - var isolatedCache = CacheHelper.IsolatedRuntimeCache.GetOrCreateCache(); + var isolatedCache = AppCaches.IsolatedRuntimeCache.GetOrCreateCache(); foreach (var payload in payloads) { @@ -103,7 +103,7 @@ namespace Umbraco.Web.Cache { // when a public version changes Current.ApplicationCache.ClearPartialViewCache(); - MacroCacheRefresher.ClearMacroContentCache(CacheHelper); // just the content + MacroCacheRefresher.ClearMacroContentCache(AppCaches); // just the content } base.Refresh(payloads); @@ -153,17 +153,17 @@ namespace Umbraco.Web.Cache #region Indirect - public static void RefreshContentTypes(CacheHelper cacheHelper) + public static void RefreshContentTypes(AppCaches appCaches) { // we could try to have a mechanism to notify the PublishedCachesService // and figure out whether published items were modified or not... keep it // simple for now, just clear the whole thing - cacheHelper.ClearPartialViewCache(); - MacroCacheRefresher.ClearMacroContentCache(cacheHelper); // just the content + appCaches.ClearPartialViewCache(); + MacroCacheRefresher.ClearMacroContentCache(appCaches); // just the content - cacheHelper.IsolatedRuntimeCache.ClearCache(); - cacheHelper.IsolatedRuntimeCache.ClearCache(); + appCaches.IsolatedRuntimeCache.ClearCache(); + appCaches.IsolatedRuntimeCache.ClearCache(); } #endregion diff --git a/src/Umbraco.Web/Cache/ContentTypeCacheRefresher.cs b/src/Umbraco.Web/Cache/ContentTypeCacheRefresher.cs index c1b99d25ec..90b6e79ae1 100644 --- a/src/Umbraco.Web/Cache/ContentTypeCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/ContentTypeCacheRefresher.cs @@ -13,8 +13,8 @@ namespace Umbraco.Web.Cache private readonly IPublishedSnapshotService _publishedSnapshotService; private readonly IdkMap _idkMap; - public ContentTypeCacheRefresher(CacheHelper cacheHelper, IPublishedSnapshotService publishedSnapshotService, IdkMap idkMap) - : base(cacheHelper) + public ContentTypeCacheRefresher(AppCaches appCaches, IPublishedSnapshotService publishedSnapshotService, IdkMap idkMap) + : base(appCaches) { _publishedSnapshotService = publishedSnapshotService; _idkMap = idkMap; @@ -65,15 +65,15 @@ namespace Umbraco.Web.Cache if (payloads.Any(x => x.ItemType == typeof(IContentType).Name)) // don't try to be clever - refresh all - ContentCacheRefresher.RefreshContentTypes(CacheHelper); + ContentCacheRefresher.RefreshContentTypes(AppCaches); if (payloads.Any(x => x.ItemType == typeof(IMediaType).Name)) // don't try to be clever - refresh all - MediaCacheRefresher.RefreshMediaTypes(CacheHelper); + MediaCacheRefresher.RefreshMediaTypes(AppCaches); if (payloads.Any(x => x.ItemType == typeof(IMemberType).Name)) // don't try to be clever - refresh all - MemberCacheRefresher.RefreshMemberTypes(CacheHelper); + MemberCacheRefresher.RefreshMemberTypes(AppCaches); // notify _publishedSnapshotService.Notify(payloads); diff --git a/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs b/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs index be17c28067..e1a8f05e39 100644 --- a/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs @@ -15,8 +15,8 @@ namespace Umbraco.Web.Cache private readonly IPublishedSnapshotService _publishedSnapshotService; private readonly IdkMap _idkMap; - public DataTypeCacheRefresher(CacheHelper cacheHelper, IPublishedSnapshotService publishedSnapshotService, IdkMap idkMap) - : base(cacheHelper) + public DataTypeCacheRefresher(AppCaches appCaches, IPublishedSnapshotService publishedSnapshotService, IdkMap idkMap) + : base(appCaches) { _publishedSnapshotService = publishedSnapshotService; _idkMap = idkMap; @@ -49,7 +49,7 @@ namespace Umbraco.Web.Cache ClearAllIsolatedCacheByEntityType(); ClearAllIsolatedCacheByEntityType(); - var dataTypeCache = CacheHelper.IsolatedRuntimeCache.GetCache(); + var dataTypeCache = AppCaches.IsolatedRuntimeCache.GetCache(); foreach (var payload in payloads) { diff --git a/src/Umbraco.Web/Cache/DictionaryCacheRefresher.cs b/src/Umbraco.Web/Cache/DictionaryCacheRefresher.cs index 7dadee87b1..525b4d2157 100644 --- a/src/Umbraco.Web/Cache/DictionaryCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/DictionaryCacheRefresher.cs @@ -6,8 +6,8 @@ namespace Umbraco.Web.Cache { public sealed class DictionaryCacheRefresher : CacheRefresherBase { - public DictionaryCacheRefresher(CacheHelper cacheHelper) - : base(cacheHelper) + public DictionaryCacheRefresher(AppCaches appCaches) + : base(appCaches) { } #region Define diff --git a/src/Umbraco.Web/Cache/DomainCacheRefresher.cs b/src/Umbraco.Web/Cache/DomainCacheRefresher.cs index 6907a654ff..37b0a483a6 100644 --- a/src/Umbraco.Web/Cache/DomainCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/DomainCacheRefresher.cs @@ -10,8 +10,8 @@ namespace Umbraco.Web.Cache { private readonly IPublishedSnapshotService _publishedSnapshotService; - public DomainCacheRefresher(CacheHelper cacheHelper, IPublishedSnapshotService publishedSnapshotService) - : base(cacheHelper) + public DomainCacheRefresher(AppCaches appCaches, IPublishedSnapshotService publishedSnapshotService) + : base(appCaches) { _publishedSnapshotService = publishedSnapshotService; } diff --git a/src/Umbraco.Web/Cache/LanguageCacheRefresher.cs b/src/Umbraco.Web/Cache/LanguageCacheRefresher.cs index bee12020cb..f5fe5075eb 100644 --- a/src/Umbraco.Web/Cache/LanguageCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/LanguageCacheRefresher.cs @@ -10,8 +10,8 @@ namespace Umbraco.Web.Cache { public sealed class LanguageCacheRefresher : CacheRefresherBase { - public LanguageCacheRefresher(CacheHelper cacheHelper, IPublishedSnapshotService publishedSnapshotService, IDomainService domainService) - : base(cacheHelper) + public LanguageCacheRefresher(AppCaches appCaches, IPublishedSnapshotService publishedSnapshotService, IDomainService domainService) + : base(appCaches) { _publishedSnapshotService = publishedSnapshotService; _domainService = domainService; diff --git a/src/Umbraco.Web/Cache/MacroCacheRefresher.cs b/src/Umbraco.Web/Cache/MacroCacheRefresher.cs index a4af601379..cdeb2ffdd0 100644 --- a/src/Umbraco.Web/Cache/MacroCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/MacroCacheRefresher.cs @@ -12,8 +12,8 @@ namespace Umbraco.Web.Cache { public sealed class MacroCacheRefresher : JsonCacheRefresherBase { - public MacroCacheRefresher(CacheHelper cacheHelper) - : base(cacheHelper) + public MacroCacheRefresher(AppCaches appCaches) + : base(appCaches) { } #region Define @@ -33,11 +33,11 @@ namespace Umbraco.Web.Cache public override void RefreshAll() { foreach (var prefix in GetAllMacroCacheKeys()) - CacheHelper.RuntimeCache.ClearCacheByKeySearch(prefix); + AppCaches.RuntimeCache.ClearCacheByKeySearch(prefix); ClearAllIsolatedCacheByEntityType(); - CacheHelper.RuntimeCache.ClearCacheObjectTypes(); + AppCaches.RuntimeCache.ClearCacheObjectTypes(); base.RefreshAll(); } @@ -49,9 +49,9 @@ namespace Umbraco.Web.Cache foreach (var payload in payloads) { foreach (var alias in GetCacheKeysForAlias(payload.Alias)) - CacheHelper.RuntimeCache.ClearCacheByKeySearch(alias); + AppCaches.RuntimeCache.ClearCacheByKeySearch(alias); - var macroRepoCache = CacheHelper.IsolatedRuntimeCache.GetCache(); + var macroRepoCache = AppCaches.IsolatedRuntimeCache.GetCache(); if (macroRepoCache) { macroRepoCache.Result.ClearCacheItem(RepositoryCacheKeys.GetKey(payload.Id)); @@ -110,9 +110,9 @@ namespace Umbraco.Web.Cache return GetAllMacroCacheKeys().Select(x => x + alias).ToArray(); } - public static void ClearMacroContentCache(CacheHelper cacheHelper) + public static void ClearMacroContentCache(AppCaches appCaches) { - cacheHelper.RuntimeCache.ClearCacheObjectTypes(); + appCaches.RuntimeCache.ClearCacheObjectTypes(); } #endregion diff --git a/src/Umbraco.Web/Cache/MediaCacheRefresher.cs b/src/Umbraco.Web/Cache/MediaCacheRefresher.cs index 4abf7d8787..a6ccd7e005 100644 --- a/src/Umbraco.Web/Cache/MediaCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/MediaCacheRefresher.cs @@ -18,8 +18,8 @@ namespace Umbraco.Web.Cache private readonly IPublishedSnapshotService _publishedSnapshotService; private readonly IdkMap _idkMap; - public MediaCacheRefresher(CacheHelper cacheHelper, IPublishedSnapshotService publishedSnapshotService, IdkMap idkMap) - : base(cacheHelper) + public MediaCacheRefresher(AppCaches appCaches, IPublishedSnapshotService publishedSnapshotService, IdkMap idkMap) + : base(appCaches) { _publishedSnapshotService = publishedSnapshotService; _idkMap = idkMap; @@ -49,7 +49,7 @@ namespace Umbraco.Web.Cache { Current.ApplicationCache.ClearPartialViewCache(); - var mediaCache = CacheHelper.IsolatedRuntimeCache.GetCache(); + var mediaCache = AppCaches.IsolatedRuntimeCache.GetCache(); foreach (var payload in payloads) { @@ -119,9 +119,9 @@ namespace Umbraco.Web.Cache #region Indirect - public static void RefreshMediaTypes(CacheHelper cacheHelper) + public static void RefreshMediaTypes(AppCaches appCaches) { - cacheHelper.IsolatedRuntimeCache.ClearCache(); + appCaches.IsolatedRuntimeCache.ClearCache(); } #endregion diff --git a/src/Umbraco.Web/Cache/MemberCacheRefresher.cs b/src/Umbraco.Web/Cache/MemberCacheRefresher.cs index 237daa39b4..29c102e7a2 100644 --- a/src/Umbraco.Web/Cache/MemberCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/MemberCacheRefresher.cs @@ -11,8 +11,8 @@ namespace Umbraco.Web.Cache { private readonly IdkMap _idkMap; - public MemberCacheRefresher(CacheHelper cacheHelper, IdkMap idkMap) - : base(cacheHelper) + public MemberCacheRefresher(AppCaches appCaches, IdkMap idkMap) + : base(appCaches) { _idkMap = idkMap; } @@ -58,9 +58,9 @@ namespace Umbraco.Web.Cache private void ClearCache(int id) { _idkMap.ClearCache(id); - CacheHelper.ClearPartialViewCache(); + AppCaches.ClearPartialViewCache(); - var memberCache = CacheHelper.IsolatedRuntimeCache.GetCache(); + var memberCache = AppCaches.IsolatedRuntimeCache.GetCache(); if (memberCache) memberCache.Result.ClearCacheItem(RepositoryCacheKeys.GetKey(id)); } @@ -69,9 +69,9 @@ namespace Umbraco.Web.Cache #region Indirect - public static void RefreshMemberTypes(CacheHelper cacheHelper) + public static void RefreshMemberTypes(AppCaches appCaches) { - cacheHelper.IsolatedRuntimeCache.ClearCache(); + appCaches.IsolatedRuntimeCache.ClearCache(); } #endregion diff --git a/src/Umbraco.Web/Cache/MemberGroupCacheRefresher.cs b/src/Umbraco.Web/Cache/MemberGroupCacheRefresher.cs index 4540f0b495..9368b0f9f4 100644 --- a/src/Umbraco.Web/Cache/MemberGroupCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/MemberGroupCacheRefresher.cs @@ -8,8 +8,8 @@ namespace Umbraco.Web.Cache { public sealed class MemberGroupCacheRefresher : JsonCacheRefresherBase { - public MemberGroupCacheRefresher(CacheHelper cacheHelper) - : base(cacheHelper) + public MemberGroupCacheRefresher(AppCaches appCaches) + : base(appCaches) { } #region Define @@ -49,7 +49,7 @@ namespace Umbraco.Web.Cache // Since we cache by group name, it could be problematic when renaming to // previously existing names - see http://issues.umbraco.org/issue/U4-10846. // To work around this, just clear all the cache items - CacheHelper.IsolatedRuntimeCache.ClearCache(); + AppCaches.IsolatedRuntimeCache.ClearCache(); } #endregion diff --git a/src/Umbraco.Web/Cache/PublicAccessCacheRefresher.cs b/src/Umbraco.Web/Cache/PublicAccessCacheRefresher.cs index 7c3af1129f..59c8231ed2 100644 --- a/src/Umbraco.Web/Cache/PublicAccessCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/PublicAccessCacheRefresher.cs @@ -6,8 +6,8 @@ namespace Umbraco.Web.Cache { public sealed class PublicAccessCacheRefresher : CacheRefresherBase { - public PublicAccessCacheRefresher(CacheHelper cacheHelper) - : base(cacheHelper) + public PublicAccessCacheRefresher(AppCaches appCaches) + : base(appCaches) { } #region Define diff --git a/src/Umbraco.Web/Cache/RelationTypeCacheRefresher.cs b/src/Umbraco.Web/Cache/RelationTypeCacheRefresher.cs index 4dd7282f98..8b1c8581cd 100644 --- a/src/Umbraco.Web/Cache/RelationTypeCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/RelationTypeCacheRefresher.cs @@ -8,8 +8,8 @@ namespace Umbraco.Web.Cache { public sealed class RelationTypeCacheRefresher : CacheRefresherBase { - public RelationTypeCacheRefresher(CacheHelper cacheHelper) - : base(cacheHelper) + public RelationTypeCacheRefresher(AppCaches appCaches) + : base(appCaches) { } #region Define @@ -34,7 +34,7 @@ namespace Umbraco.Web.Cache public override void Refresh(int id) { - var cache = CacheHelper.IsolatedRuntimeCache.GetCache(); + var cache = AppCaches.IsolatedRuntimeCache.GetCache(); if (cache) cache.Result.ClearCacheItem(RepositoryCacheKeys.GetKey(id)); base.Refresh(id); } @@ -47,7 +47,7 @@ namespace Umbraco.Web.Cache public override void Remove(int id) { - var cache = CacheHelper.IsolatedRuntimeCache.GetCache(); + var cache = AppCaches.IsolatedRuntimeCache.GetCache(); if (cache) cache.Result.ClearCacheItem(RepositoryCacheKeys.GetKey(id)); base.Remove(id); } diff --git a/src/Umbraco.Web/Cache/TemplateCacheRefresher.cs b/src/Umbraco.Web/Cache/TemplateCacheRefresher.cs index 6f76d148cc..7ff7c6fdb6 100644 --- a/src/Umbraco.Web/Cache/TemplateCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/TemplateCacheRefresher.cs @@ -9,8 +9,8 @@ namespace Umbraco.Web.Cache { private readonly IdkMap _idkMap; - public TemplateCacheRefresher(CacheHelper cacheHelper, IdkMap idkMap) - : base(cacheHelper) + public TemplateCacheRefresher(AppCaches appCaches, IdkMap idkMap) + : base(appCaches) { _idkMap = idkMap; } @@ -52,7 +52,7 @@ namespace Umbraco.Web.Cache private void RemoveFromCache(int id) { _idkMap.ClearCache(id); - CacheHelper.RuntimeCache.ClearCacheItem($"{CacheKeys.TemplateFrontEndCacheKey}{id}"); + AppCaches.RuntimeCache.ClearCacheItem($"{CacheKeys.TemplateFrontEndCacheKey}{id}"); //need to clear the runtime cache for templates ClearAllIsolatedCacheByEntityType(); diff --git a/src/Umbraco.Web/Cache/UserCacheRefresher.cs b/src/Umbraco.Web/Cache/UserCacheRefresher.cs index ae57fc902a..a502a7554f 100644 --- a/src/Umbraco.Web/Cache/UserCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/UserCacheRefresher.cs @@ -8,8 +8,8 @@ namespace Umbraco.Web.Cache { public sealed class UserCacheRefresher : CacheRefresherBase { - public UserCacheRefresher(CacheHelper cacheHelper) - : base(cacheHelper) + public UserCacheRefresher(AppCaches appCaches) + : base(appCaches) { } #region Define @@ -40,7 +40,7 @@ namespace Umbraco.Web.Cache public override void Remove(int id) { - var userCache = CacheHelper.IsolatedRuntimeCache.GetCache(); + var userCache = AppCaches.IsolatedRuntimeCache.GetCache(); if (userCache) userCache.Result.ClearCacheItem(RepositoryCacheKeys.GetKey(id)); diff --git a/src/Umbraco.Web/Cache/UserGroupCacheRefresher.cs b/src/Umbraco.Web/Cache/UserGroupCacheRefresher.cs index deb49ad624..4dea595c85 100644 --- a/src/Umbraco.Web/Cache/UserGroupCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/UserGroupCacheRefresher.cs @@ -14,8 +14,8 @@ namespace Umbraco.Web.Cache /// public sealed class UserGroupCacheRefresher : CacheRefresherBase { - public UserGroupCacheRefresher(CacheHelper cacheHelper) - : base(cacheHelper) + public UserGroupCacheRefresher(AppCaches appCaches) + : base(appCaches) { } #region Define @@ -35,7 +35,7 @@ namespace Umbraco.Web.Cache public override void RefreshAll() { ClearAllIsolatedCacheByEntityType(); - var userGroupCache = CacheHelper.IsolatedRuntimeCache.GetCache(); + var userGroupCache = AppCaches.IsolatedRuntimeCache.GetCache(); if (userGroupCache) { userGroupCache.Result.ClearCacheByKeySearch(UserGroupRepository.GetByAliasCacheKeyPrefix); @@ -55,7 +55,7 @@ namespace Umbraco.Web.Cache public override void Remove(int id) { - var userGroupCache = CacheHelper.IsolatedRuntimeCache.GetCache(); + var userGroupCache = AppCaches.IsolatedRuntimeCache.GetCache(); if (userGroupCache) { userGroupCache.Result.ClearCacheItem(RepositoryCacheKeys.GetKey(id)); diff --git a/src/Umbraco.Web/Cache/UserGroupPermissionsCacheRefresher.cs b/src/Umbraco.Web/Cache/UserGroupPermissionsCacheRefresher.cs index bd2ad50ef5..37e02a0149 100644 --- a/src/Umbraco.Web/Cache/UserGroupPermissionsCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/UserGroupPermissionsCacheRefresher.cs @@ -8,8 +8,8 @@ namespace Umbraco.Web.Cache [EditorBrowsable(EditorBrowsableState.Never)] public sealed class UserGroupPermissionsCacheRefresher : CacheRefresherBase { - public UserGroupPermissionsCacheRefresher(CacheHelper cacheHelper) - : base(cacheHelper) + public UserGroupPermissionsCacheRefresher(AppCaches appCaches) + : base(appCaches) { } #region Define diff --git a/src/Umbraco.Web/CacheHelperExtensions.cs b/src/Umbraco.Web/CacheHelperExtensions.cs index d7aa838a09..3c5ea1930d 100644 --- a/src/Umbraco.Web/CacheHelperExtensions.cs +++ b/src/Umbraco.Web/CacheHelperExtensions.cs @@ -19,7 +19,7 @@ namespace Umbraco.Web /// /// Outputs and caches a partial view in MVC /// - /// + /// /// /// /// @@ -28,7 +28,7 @@ namespace Umbraco.Web /// /// public static IHtmlString CachedPartialView( - this CacheHelper cacheHelper, + this AppCaches appCaches, HtmlHelper htmlHelper, string partialViewName, object model, @@ -43,7 +43,7 @@ namespace Umbraco.Web return htmlHelper.Partial(partialViewName, model, viewData); } - return cacheHelper.RuntimeCache.GetCacheItem( + return appCaches.RuntimeCache.GetCacheItem( PartialViewCacheKey + cacheKey, () => htmlHelper.Partial(partialViewName, model, viewData), priority: CacheItemPriority.NotRemovable, //not removable, the same as macros (apparently issue #27610) @@ -53,10 +53,10 @@ namespace Umbraco.Web /// /// Clears the cache for partial views /// - /// - public static void ClearPartialViewCache(this CacheHelper cacheHelper) + /// + public static void ClearPartialViewCache(this AppCaches appCaches) { - cacheHelper.RuntimeCache.ClearCacheByKeySearch(PartialViewCacheKey); + appCaches.RuntimeCache.ClearCacheByKeySearch(PartialViewCacheKey); } } } diff --git a/src/Umbraco.Web/Composing/Current.cs b/src/Umbraco.Web/Composing/Current.cs index 1e8f3d17f7..ed1853c351 100644 --- a/src/Umbraco.Web/Composing/Current.cs +++ b/src/Umbraco.Web/Composing/Current.cs @@ -203,7 +203,7 @@ namespace Umbraco.Web.Composing public static IProfilingLogger ProfilingLogger => CoreCurrent.ProfilingLogger; - public static CacheHelper ApplicationCache => CoreCurrent.ApplicationCache; + public static AppCaches ApplicationCache => CoreCurrent.ApplicationCache; public static ServiceContext Services => CoreCurrent.Services; diff --git a/src/Umbraco.Web/Controllers/UmbLoginController.cs b/src/Umbraco.Web/Controllers/UmbLoginController.cs index fc6613200c..684925c3e3 100644 --- a/src/Umbraco.Web/Controllers/UmbLoginController.cs +++ b/src/Umbraco.Web/Controllers/UmbLoginController.cs @@ -16,7 +16,7 @@ namespace Umbraco.Web.Controllers { } - public UmbLoginController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, CacheHelper applicationCache, ILogger logger, IProfilingLogger profilingLogger) + public UmbLoginController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches applicationCache, ILogger logger, IProfilingLogger profilingLogger) : base(umbracoContext, databaseFactory, services, applicationCache, logger, profilingLogger) { } diff --git a/src/Umbraco.Web/Controllers/UmbLoginStatusController.cs b/src/Umbraco.Web/Controllers/UmbLoginStatusController.cs index 83f4ae04a1..3f394824f6 100644 --- a/src/Umbraco.Web/Controllers/UmbLoginStatusController.cs +++ b/src/Umbraco.Web/Controllers/UmbLoginStatusController.cs @@ -18,7 +18,7 @@ namespace Umbraco.Web.Controllers { } - public UmbLoginStatusController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, CacheHelper applicationCache, ILogger logger, IProfilingLogger profilingLogger) : base(umbracoContext, databaseFactory, services, applicationCache, logger, profilingLogger) + public UmbLoginStatusController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches applicationCache, ILogger logger, IProfilingLogger profilingLogger) : base(umbracoContext, databaseFactory, services, applicationCache, logger, profilingLogger) { } diff --git a/src/Umbraco.Web/Controllers/UmbProfileController.cs b/src/Umbraco.Web/Controllers/UmbProfileController.cs index 7ee8385edc..459d1b1829 100644 --- a/src/Umbraco.Web/Controllers/UmbProfileController.cs +++ b/src/Umbraco.Web/Controllers/UmbProfileController.cs @@ -19,7 +19,7 @@ namespace Umbraco.Web.Controllers { } - public UmbProfileController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, CacheHelper applicationCache, ILogger logger, IProfilingLogger profilingLogger) : base(umbracoContext, databaseFactory, services, applicationCache, logger, profilingLogger) + public UmbProfileController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches applicationCache, ILogger logger, IProfilingLogger profilingLogger) : base(umbracoContext, databaseFactory, services, applicationCache, logger, profilingLogger) { } diff --git a/src/Umbraco.Web/Controllers/UmbRegisterController.cs b/src/Umbraco.Web/Controllers/UmbRegisterController.cs index 5a5024dad9..0288995b1f 100644 --- a/src/Umbraco.Web/Controllers/UmbRegisterController.cs +++ b/src/Umbraco.Web/Controllers/UmbRegisterController.cs @@ -18,7 +18,7 @@ namespace Umbraco.Web.Controllers { } - public UmbRegisterController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, CacheHelper applicationCache, ILogger logger, IProfilingLogger profilingLogger) : base(umbracoContext, databaseFactory, services, applicationCache, logger, profilingLogger) + public UmbRegisterController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches applicationCache, ILogger logger, IProfilingLogger profilingLogger) : base(umbracoContext, databaseFactory, services, applicationCache, logger, profilingLogger) { } diff --git a/src/Umbraco.Web/Editors/AuthenticationController.cs b/src/Umbraco.Web/Editors/AuthenticationController.cs index 231ec9ba67..d1c9ec48bb 100644 --- a/src/Umbraco.Web/Editors/AuthenticationController.cs +++ b/src/Umbraco.Web/Editors/AuthenticationController.cs @@ -52,7 +52,7 @@ namespace Umbraco.Web.Editors /// /// Initializes a new instance of the class with all its dependencies. /// - public AuthenticationController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) + public AuthenticationController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) : base(globalSettings, umbracoContextAccessor, sqlContext, services, applicationCache, logger, runtimeState) { } diff --git a/src/Umbraco.Web/Editors/BackOfficeController.cs b/src/Umbraco.Web/Editors/BackOfficeController.cs index 6294a0377f..414c248041 100644 --- a/src/Umbraco.Web/Editors/BackOfficeController.cs +++ b/src/Umbraco.Web/Editors/BackOfficeController.cs @@ -49,7 +49,7 @@ namespace Umbraco.Web.Editors private const string TokenPasswordResetCode = "PasswordResetCode"; private static readonly string[] TempDataTokenNames = { TokenExternalSignInError, TokenPasswordResetCode }; - public BackOfficeController(ManifestParser manifestParser, UmbracoFeatures features, IGlobalSettings globalSettings, UmbracoContext umbracoContext, ServiceContext services, CacheHelper applicationCache, ILogger logger, IProfilingLogger profilingLogger, IRuntimeState runtimeState) + public BackOfficeController(ManifestParser manifestParser, UmbracoFeatures features, IGlobalSettings globalSettings, UmbracoContext umbracoContext, ServiceContext services, AppCaches applicationCache, ILogger logger, IProfilingLogger profilingLogger, IRuntimeState runtimeState) : base(globalSettings, umbracoContext, services, applicationCache, logger, profilingLogger) { _manifestParser = manifestParser; diff --git a/src/Umbraco.Web/Editors/ContentTypeController.cs b/src/Umbraco.Web/Editors/ContentTypeController.cs index 670d37e7a7..84ce177eef 100644 --- a/src/Umbraco.Web/Editors/ContentTypeController.cs +++ b/src/Umbraco.Web/Editors/ContentTypeController.cs @@ -56,7 +56,7 @@ namespace Umbraco.Web.Editors IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, PropertyEditorCollection propertyEditors, - ServiceContext services, CacheHelper applicationCache, + ServiceContext services, AppCaches applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) : base(cultureDictionaryFactory, globalSettings, umbracoContextAccessor, sqlContext, services, applicationCache, logger, runtimeState) { diff --git a/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs b/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs index 898208319a..8d23a34c5e 100644 --- a/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs +++ b/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs @@ -33,7 +33,7 @@ namespace Umbraco.Web.Editors private readonly ICultureDictionaryFactory _cultureDictionaryFactory; private ICultureDictionary _cultureDictionary; - protected ContentTypeControllerBase(ICultureDictionaryFactory cultureDictionaryFactory, IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) : base(globalSettings, umbracoContextAccessor, sqlContext, services, applicationCache, logger, runtimeState) + protected ContentTypeControllerBase(ICultureDictionaryFactory cultureDictionaryFactory, IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) : base(globalSettings, umbracoContextAccessor, sqlContext, services, applicationCache, logger, runtimeState) { _cultureDictionaryFactory = cultureDictionaryFactory; } diff --git a/src/Umbraco.Web/Editors/DashboardController.cs b/src/Umbraco.Web/Editors/DashboardController.cs index 8960f110c3..3fdf1b78c8 100644 --- a/src/Umbraco.Web/Editors/DashboardController.cs +++ b/src/Umbraco.Web/Editors/DashboardController.cs @@ -38,7 +38,7 @@ namespace Umbraco.Web.Editors /// /// Initializes a new instance of the with all its dependencies. /// - public DashboardController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState, Dashboards dashboards) + public DashboardController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches applicationCache, IProfilingLogger logger, IRuntimeState runtimeState, Dashboards dashboards) : base(globalSettings, umbracoContextAccessor, sqlContext, services, applicationCache, logger, runtimeState) { _dashboards = dashboards; diff --git a/src/Umbraco.Web/Editors/MediaTypeController.cs b/src/Umbraco.Web/Editors/MediaTypeController.cs index f2b8fd3dda..b8617e6f94 100644 --- a/src/Umbraco.Web/Editors/MediaTypeController.cs +++ b/src/Umbraco.Web/Editors/MediaTypeController.cs @@ -37,7 +37,7 @@ namespace Umbraco.Web.Editors [MediaTypeControllerControllerConfiguration] public class MediaTypeController : ContentTypeControllerBase { - public MediaTypeController(ICultureDictionaryFactory cultureDictionaryFactory, IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) : base(cultureDictionaryFactory, globalSettings, umbracoContextAccessor, sqlContext, services, applicationCache, logger, runtimeState) + public MediaTypeController(ICultureDictionaryFactory cultureDictionaryFactory, IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) : base(cultureDictionaryFactory, globalSettings, umbracoContextAccessor, sqlContext, services, applicationCache, logger, runtimeState) { } diff --git a/src/Umbraco.Web/Editors/MemberTypeController.cs b/src/Umbraco.Web/Editors/MemberTypeController.cs index 3abc0035d3..4ba5204e4d 100644 --- a/src/Umbraco.Web/Editors/MemberTypeController.cs +++ b/src/Umbraco.Web/Editors/MemberTypeController.cs @@ -30,7 +30,7 @@ namespace Umbraco.Web.Editors [UmbracoTreeAuthorize(new string[] { Constants.Trees.MemberTypes, Constants.Trees.Members})] public class MemberTypeController : ContentTypeControllerBase { - public MemberTypeController(ICultureDictionaryFactory cultureDictionaryFactory, IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) : base(cultureDictionaryFactory, globalSettings, umbracoContextAccessor, sqlContext, services, applicationCache, logger, runtimeState) + public MemberTypeController(ICultureDictionaryFactory cultureDictionaryFactory, IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) : base(cultureDictionaryFactory, globalSettings, umbracoContextAccessor, sqlContext, services, applicationCache, logger, runtimeState) { } diff --git a/src/Umbraco.Web/Editors/PackageInstallController.cs b/src/Umbraco.Web/Editors/PackageInstallController.cs index 05d1e2a7a3..f59fd360ed 100644 --- a/src/Umbraco.Web/Editors/PackageInstallController.cs +++ b/src/Umbraco.Web/Editors/PackageInstallController.cs @@ -45,7 +45,7 @@ namespace Umbraco.Web.Editors public class PackageInstallController : UmbracoAuthorizedJsonController { public PackageInstallController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, - ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, + ISqlContext sqlContext, ServiceContext services, AppCaches applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) : base(globalSettings, umbracoContextAccessor, sqlContext, services, applicationCache, logger, runtimeState) { diff --git a/src/Umbraco.Web/Editors/UmbracoAuthorizedJsonController.cs b/src/Umbraco.Web/Editors/UmbracoAuthorizedJsonController.cs index 3baa5e85ff..8cb9408044 100644 --- a/src/Umbraco.Web/Editors/UmbracoAuthorizedJsonController.cs +++ b/src/Umbraco.Web/Editors/UmbracoAuthorizedJsonController.cs @@ -37,7 +37,7 @@ namespace Umbraco.Web.Editors /// /// /// - protected UmbracoAuthorizedJsonController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) : base(globalSettings, umbracoContextAccessor, sqlContext, services, applicationCache, logger, runtimeState) + protected UmbracoAuthorizedJsonController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) : base(globalSettings, umbracoContextAccessor, sqlContext, services, applicationCache, logger, runtimeState) { } } diff --git a/src/Umbraco.Web/Mvc/PluginController.cs b/src/Umbraco.Web/Mvc/PluginController.cs index a8d73fe575..a8e7f1f0d1 100644 --- a/src/Umbraco.Web/Mvc/PluginController.cs +++ b/src/Umbraco.Web/Mvc/PluginController.cs @@ -50,7 +50,7 @@ namespace Umbraco.Web.Mvc /// /// Gets or sets the application cache. /// - public CacheHelper ApplicationCache { get; } + public AppCaches ApplicationCache { get; } /// /// Gets or sets the logger. @@ -93,14 +93,14 @@ namespace Umbraco.Web.Mvc Current.Factory.GetInstance(), Current.Factory.GetInstance(), Current.Factory.GetInstance(), - Current.Factory.GetInstance(), + Current.Factory.GetInstance(), Current.Factory.GetInstance(), Current.Factory.GetInstance() ) { } - protected PluginController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, CacheHelper applicationCache, ILogger logger, IProfilingLogger profilingLogger) + protected PluginController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches applicationCache, ILogger logger, IProfilingLogger profilingLogger) { UmbracoContext = umbracoContext; DatabaseFactory = databaseFactory; diff --git a/src/Umbraco.Web/Mvc/RenderMvcController.cs b/src/Umbraco.Web/Mvc/RenderMvcController.cs index 44a6a9346d..dc775450bf 100644 --- a/src/Umbraco.Web/Mvc/RenderMvcController.cs +++ b/src/Umbraco.Web/Mvc/RenderMvcController.cs @@ -24,7 +24,7 @@ namespace Umbraco.Web.Mvc ActionInvoker = new RenderActionInvoker(); } - public RenderMvcController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ServiceContext services, CacheHelper applicationCache, ILogger logger, IProfilingLogger profilingLogger) + public RenderMvcController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ServiceContext services, AppCaches applicationCache, ILogger logger, IProfilingLogger profilingLogger) : base(globalSettings, umbracoContext, services, applicationCache, logger, profilingLogger) { ActionInvoker = new RenderActionInvoker(); diff --git a/src/Umbraco.Web/Mvc/SurfaceController.cs b/src/Umbraco.Web/Mvc/SurfaceController.cs index b3e67e4b2b..1035d43739 100644 --- a/src/Umbraco.Web/Mvc/SurfaceController.cs +++ b/src/Umbraco.Web/Mvc/SurfaceController.cs @@ -21,7 +21,7 @@ namespace Umbraco.Web.Mvc { } - protected SurfaceController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, CacheHelper applicationCache, ILogger logger, IProfilingLogger profilingLogger) + protected SurfaceController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches applicationCache, ILogger logger, IProfilingLogger profilingLogger) : base(umbracoContext, databaseFactory, services, applicationCache, logger, profilingLogger) { } diff --git a/src/Umbraco.Web/Mvc/UmbracoAuthorizedController.cs b/src/Umbraco.Web/Mvc/UmbracoAuthorizedController.cs index 2f8f7a6e76..7084b79271 100644 --- a/src/Umbraco.Web/Mvc/UmbracoAuthorizedController.cs +++ b/src/Umbraco.Web/Mvc/UmbracoAuthorizedController.cs @@ -20,7 +20,7 @@ namespace Umbraco.Web.Mvc protected UmbracoAuthorizedController() { } - protected UmbracoAuthorizedController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ServiceContext services, CacheHelper applicationCache, ILogger logger, IProfilingLogger profilingLogger) + protected UmbracoAuthorizedController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ServiceContext services, AppCaches applicationCache, ILogger logger, IProfilingLogger profilingLogger) : base(globalSettings, umbracoContext, services, applicationCache, logger, profilingLogger) { } } diff --git a/src/Umbraco.Web/Mvc/UmbracoController.cs b/src/Umbraco.Web/Mvc/UmbracoController.cs index 36f688b714..7d451321bc 100644 --- a/src/Umbraco.Web/Mvc/UmbracoController.cs +++ b/src/Umbraco.Web/Mvc/UmbracoController.cs @@ -48,7 +48,7 @@ namespace Umbraco.Web.Mvc /// /// Gets or sets the application cache. /// - public CacheHelper ApplicationCache { get; set; } + public AppCaches ApplicationCache { get; set; } /// /// Gets or sets the logger. @@ -83,14 +83,14 @@ namespace Umbraco.Web.Mvc Current.Factory.GetInstance(), Current.Factory.GetInstance(), Current.Factory.GetInstance(), - Current.Factory.GetInstance(), + Current.Factory.GetInstance(), Current.Factory.GetInstance(), Current.Factory.GetInstance() ) { } - protected UmbracoController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ServiceContext services, CacheHelper applicationCache, ILogger logger, IProfilingLogger profilingLogger) + protected UmbracoController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ServiceContext services, AppCaches applicationCache, ILogger logger, IProfilingLogger profilingLogger) { GlobalSettings = globalSettings; UmbracoContext = umbracoContext; diff --git a/src/Umbraco.Web/Mvc/UmbracoViewPageOfTModel.cs b/src/Umbraco.Web/Mvc/UmbracoViewPageOfTModel.cs index 394aa39dd9..2c5c0395a4 100644 --- a/src/Umbraco.Web/Mvc/UmbracoViewPageOfTModel.cs +++ b/src/Umbraco.Web/Mvc/UmbracoViewPageOfTModel.cs @@ -39,7 +39,7 @@ namespace Umbraco.Web.Mvc /// /// Gets or sets the application cache. /// - public CacheHelper ApplicationCache { get; set; } + public AppCaches ApplicationCache { get; set; } // fixme // previously, Services and ApplicationCache would derive from UmbracoContext.Application, which @@ -110,12 +110,12 @@ namespace Umbraco.Web.Mvc protected UmbracoViewPage() : this( Current.Factory.GetInstance(), - Current.Factory.GetInstance() + Current.Factory.GetInstance() ) { } - protected UmbracoViewPage(ServiceContext services, CacheHelper applicationCache) + protected UmbracoViewPage(ServiceContext services, AppCaches applicationCache) { Services = services; ApplicationCache = applicationCache; diff --git a/src/Umbraco.Web/Runtime/WebRuntime.cs b/src/Umbraco.Web/Runtime/WebRuntime.cs index ad1a4851f0..c69a3bec8b 100644 --- a/src/Umbraco.Web/Runtime/WebRuntime.cs +++ b/src/Umbraco.Web/Runtime/WebRuntime.cs @@ -59,7 +59,7 @@ namespace Umbraco.Web.Runtime protected override IProfiler GetProfiler() => _webProfiler; - protected override CacheHelper GetAppCaches() => new CacheHelper( + protected override AppCaches GetAppCaches() => new AppCaches( // we need to have the dep clone runtime cache provider to ensure // all entities are cached properly (cloned in and cloned out) new DeepCloneRuntimeCacheProvider(new HttpRuntimeCacheProvider(HttpRuntime.Cache)), diff --git a/src/Umbraco.Web/Security/MembershipHelper.cs b/src/Umbraco.Web/Security/MembershipHelper.cs index eb4c24aabc..6ae8ff8c96 100644 --- a/src/Umbraco.Web/Security/MembershipHelper.cs +++ b/src/Umbraco.Web/Security/MembershipHelper.cs @@ -32,7 +32,7 @@ namespace Umbraco.Web.Security private readonly IUserService _userService; private readonly IPublicAccessService _publicAccessService; private readonly PublishedRouter _publishedRouter; - private readonly CacheHelper _appCaches; + private readonly AppCaches _appCaches; private readonly ILogger _logger; #region Constructors @@ -47,7 +47,7 @@ namespace Umbraco.Web.Security IUserService userService, IPublicAccessService publicAccessService, PublishedRouter publishedRouter, - CacheHelper appCaches, + AppCaches appCaches, ILogger logger ) { diff --git a/src/Umbraco.Web/Services/ApplicationTreeService.cs b/src/Umbraco.Web/Services/ApplicationTreeService.cs index 86bfc5d0bb..2ddec054c7 100644 --- a/src/Umbraco.Web/Services/ApplicationTreeService.cs +++ b/src/Umbraco.Web/Services/ApplicationTreeService.cs @@ -19,7 +19,7 @@ namespace Umbraco.Web.Services internal class ApplicationTreeService : IApplicationTreeService { private readonly ILogger _logger; - private readonly CacheHelper _cache; + private readonly AppCaches _cache; private readonly TypeLoader _typeLoader; private Lazy> _allAvailableTrees; internal const string TreeConfigFileName = "trees.config"; @@ -27,7 +27,7 @@ namespace Umbraco.Web.Services private static readonly object Locker = new object(); private readonly Lazy>> _groupedTrees; - public ApplicationTreeService(ILogger logger, CacheHelper cache, TypeLoader typeLoader) + public ApplicationTreeService(ILogger logger, AppCaches cache, TypeLoader typeLoader) { _logger = logger; _cache = cache; diff --git a/src/Umbraco.Web/Services/SectionService.cs b/src/Umbraco.Web/Services/SectionService.cs index 6337db67f9..2d06141292 100644 --- a/src/Umbraco.Web/Services/SectionService.cs +++ b/src/Umbraco.Web/Services/SectionService.cs @@ -23,7 +23,7 @@ namespace Umbraco.Web.Services private readonly Lazy> _allAvailableSections; private readonly IApplicationTreeService _applicationTreeService; private readonly IScopeProvider _scopeProvider; - private readonly CacheHelper _cache; + private readonly AppCaches _cache; internal const string AppConfigFileName = "applications.config"; private static string _appConfig; private static readonly object Locker = new object(); @@ -32,7 +32,7 @@ namespace Umbraco.Web.Services IUserService userService, IApplicationTreeService applicationTreeService, IScopeProvider scopeProvider, - CacheHelper cache) + AppCaches cache) { _applicationTreeService = applicationTreeService ?? throw new ArgumentNullException(nameof(applicationTreeService)); _cache = cache ?? throw new ArgumentNullException(nameof(cache)); diff --git a/src/Umbraco.Web/TagsController.cs b/src/Umbraco.Web/TagsController.cs index 181b9f7da2..784f1d9883 100644 --- a/src/Umbraco.Web/TagsController.cs +++ b/src/Umbraco.Web/TagsController.cs @@ -29,7 +29,7 @@ namespace Umbraco.Web.WebServices /// /// Initializes a new instance of the with all its dependencies. /// - public TagsController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) + public TagsController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) : base(globalSettings, umbracoContextAccessor, sqlContext, services, applicationCache, logger, runtimeState) { } diff --git a/src/Umbraco.Web/WebApi/UmbracoApiController.cs b/src/Umbraco.Web/WebApi/UmbracoApiController.cs index 3db3610cc2..a779632def 100644 --- a/src/Umbraco.Web/WebApi/UmbracoApiController.cs +++ b/src/Umbraco.Web/WebApi/UmbracoApiController.cs @@ -23,7 +23,7 @@ namespace Umbraco.Web.WebApi /// /// Initialize a new instance of the with all its dependencies. /// - protected UmbracoApiController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) + protected UmbracoApiController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) : base(globalSettings, umbracoContextAccessor, sqlContext, services, applicationCache, logger, runtimeState) { } } diff --git a/src/Umbraco.Web/WebApi/UmbracoApiControllerBase.cs b/src/Umbraco.Web/WebApi/UmbracoApiControllerBase.cs index 21b88cc919..44457fbef1 100644 --- a/src/Umbraco.Web/WebApi/UmbracoApiControllerBase.cs +++ b/src/Umbraco.Web/WebApi/UmbracoApiControllerBase.cs @@ -39,7 +39,7 @@ namespace Umbraco.Web.WebApi Current.Factory.GetInstance(), Current.Factory.GetInstance(), Current.Factory.GetInstance(), - Current.Factory.GetInstance(), + Current.Factory.GetInstance(), Current.Factory.GetInstance(), Current.Factory.GetInstance() ) @@ -48,7 +48,7 @@ namespace Umbraco.Web.WebApi /// /// Initializes a new instance of the class with all its dependencies. /// - protected UmbracoApiControllerBase(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) + protected UmbracoApiControllerBase(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) { GlobalSettings = globalSettings; _umbracoContextAccessor = umbracoContextAccessor; @@ -88,7 +88,7 @@ namespace Umbraco.Web.WebApi /// /// Gets the application cache. /// - public CacheHelper ApplicationCache { get; } + public AppCaches ApplicationCache { get; } /// /// Gets the logger. diff --git a/src/Umbraco.Web/WebApi/UmbracoAuthorizedApiController.cs b/src/Umbraco.Web/WebApi/UmbracoAuthorizedApiController.cs index 4ae9c00a47..1d20857efd 100644 --- a/src/Umbraco.Web/WebApi/UmbracoAuthorizedApiController.cs +++ b/src/Umbraco.Web/WebApi/UmbracoAuthorizedApiController.cs @@ -40,7 +40,7 @@ namespace Umbraco.Web.WebApi /// /// Initializes a new instance of the class with all its dependencies. /// - protected UmbracoAuthorizedApiController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, CacheHelper applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) + protected UmbracoAuthorizedApiController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches applicationCache, IProfilingLogger logger, IRuntimeState runtimeState) : base(globalSettings, umbracoContextAccessor, sqlContext, services, applicationCache, logger, runtimeState) { } From 1667e914cd4354f9edcb45cedeaf0d4b3108faad Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 17 Jan 2019 18:38:55 +1100 Subject: [PATCH 127/437] Allows the tree collection to be manipulated by devs on startup, renames some things --- src/Umbraco.Web/Runtime/WebRuntimeComposer.cs | 13 +++++-------- src/Umbraco.Web/Services/ITreeService.cs | 8 ++++---- src/Umbraco.Web/Services/TreeService.cs | 8 ++++---- .../Trees/ApplicationTreeController.cs | 2 +- .../Trees/BackOfficeSectionCollectionBuilder.cs | 9 ++------- src/Umbraco.Web/Trees/ITree.cs | 3 ++- src/Umbraco.Web/Trees/Tree.cs | 2 +- src/Umbraco.Web/Trees/TreeCollectionBuilder.cs | 15 +++++++-------- 8 files changed, 26 insertions(+), 34 deletions(-) diff --git a/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs b/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs index f21c040a37..1a0bf8d1b0 100644 --- a/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs +++ b/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs @@ -1,15 +1,13 @@ -using System.Web; +using System.Linq; +using System.Web; using System.Web.Security; using Examine; using Microsoft.AspNet.SignalR; using Umbraco.Core; using Umbraco.Core.Components; using Umbraco.Core.Composing; -using Umbraco.Core.Configuration; using Umbraco.Core.Dictionary; using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Models.ContentEditing; using Umbraco.Core.Models.PublishedContent; using Umbraco.Core.PropertyEditors; using Umbraco.Core.PropertyEditors.ValueConverters; @@ -23,9 +21,7 @@ using Umbraco.Web.Dictionary; using Umbraco.Web.Editors; using Umbraco.Web.Features; using Umbraco.Web.HealthCheck; -using Umbraco.Web.Models.ContentEditing; using Umbraco.Web.Models.PublishedContent; -using Umbraco.Web.Models.Trees; using Umbraco.Web.Mvc; using Umbraco.Web.PublishedCache; using Umbraco.Web.Routing; @@ -207,12 +203,13 @@ namespace Umbraco.Web.Runtime .Append(); // register back office trees - foreach (var treeControllerType in umbracoApiControllerTypes) + foreach (var treeControllerType in umbracoApiControllerTypes + .Where(x => typeof(TreeControllerBase).IsAssignableFrom(x))) { var attribute = treeControllerType.GetCustomAttribute(false); if (attribute == null) continue; var tree = new Tree(attribute.SortOrder, attribute.ApplicationAlias, attribute.TreeAlias, attribute.TreeTitle, treeControllerType, attribute.IsSingleNodeTree); - composition.WithCollectionBuilder().AddTree(tree); + composition.WithCollectionBuilder().Trees.Add(tree); } } } diff --git a/src/Umbraco.Web/Services/ITreeService.cs b/src/Umbraco.Web/Services/ITreeService.cs index 5172e4b7b7..96787086c6 100644 --- a/src/Umbraco.Web/Services/ITreeService.cs +++ b/src/Umbraco.Web/Services/ITreeService.cs @@ -26,16 +26,16 @@ namespace Umbraco.Web.Services /// /// Gets the application tree for the applcation with the specified alias /// - /// The application alias. + /// The application alias. /// Returns a ApplicationTree Array - IEnumerable GetApplicationTrees(string applicationAlias); + IEnumerable GetTrees(string sectionAlias); /// /// Gets the grouped application trees for the application with the specified alias /// - /// + /// /// - IDictionary> GetGroupedApplicationTrees(string applicationAlias); + IDictionary> GetGroupedTrees(string sectionAlias); } } diff --git a/src/Umbraco.Web/Services/TreeService.cs b/src/Umbraco.Web/Services/TreeService.cs index 8389c27a19..f58dce59bc 100644 --- a/src/Umbraco.Web/Services/TreeService.cs +++ b/src/Umbraco.Web/Services/TreeService.cs @@ -24,13 +24,13 @@ namespace Umbraco.Web.Services public IEnumerable GetAll() => _treeCollection; /// - public IEnumerable GetApplicationTrees(string applicationAlias) - => GetAll().Where(x => x.ApplicationAlias.InvariantEquals(applicationAlias)).OrderBy(x => x.SortOrder).ToList(); + public IEnumerable GetTrees(string sectionAlias) + => GetAll().Where(x => x.ApplicationAlias.InvariantEquals(sectionAlias)).OrderBy(x => x.SortOrder).ToList(); - public IDictionary> GetGroupedApplicationTrees(string applicationAlias) + public IDictionary> GetGroupedTrees(string sectionAlias) { var result = new Dictionary>(); - var foundTrees = GetApplicationTrees(applicationAlias).ToList(); + var foundTrees = GetTrees(sectionAlias).ToList(); foreach(var treeGroup in _groupedTrees.Value) { List resultGroup = null; diff --git a/src/Umbraco.Web/Trees/ApplicationTreeController.cs b/src/Umbraco.Web/Trees/ApplicationTreeController.cs index 5a0f72c8dc..5433f3c157 100644 --- a/src/Umbraco.Web/Trees/ApplicationTreeController.cs +++ b/src/Umbraco.Web/Trees/ApplicationTreeController.cs @@ -60,7 +60,7 @@ namespace Umbraco.Web.Trees if (string.IsNullOrEmpty(application)) throw new HttpResponseException(HttpStatusCode.NotFound); //find all tree definitions that have the current application alias - var groupedTrees = _treeService.GetGroupedApplicationTrees(application); + var groupedTrees = _treeService.GetGroupedTrees(application); var allTrees = groupedTrees.Values.SelectMany(x => x).ToList(); if (string.IsNullOrEmpty(tree) == false || allTrees.Count == 1) diff --git a/src/Umbraco.Web/Trees/BackOfficeSectionCollectionBuilder.cs b/src/Umbraco.Web/Trees/BackOfficeSectionCollectionBuilder.cs index ec5833f79c..3228cd309f 100644 --- a/src/Umbraco.Web/Trees/BackOfficeSectionCollectionBuilder.cs +++ b/src/Umbraco.Web/Trees/BackOfficeSectionCollectionBuilder.cs @@ -12,12 +12,6 @@ namespace Umbraco.Web.Trees { protected override BackOfficeSectionCollectionBuilder This => this; - // need to inject dependencies in the collection, so override creation - public override BackOfficeSectionCollection CreateCollection(IFactory factory) - { - return new BackOfficeSectionCollection(CreateItems(factory)); - } - protected override IEnumerable CreateItems(IFactory factory) { // get the manifest parser just-in-time - injecting it in the ctor would mean that @@ -25,7 +19,8 @@ namespace Umbraco.Web.Trees // its dependencies too, and that can create cycles or other oddities var manifestParser = factory.GetInstance(); - return base.CreateItems(factory).Concat(manifestParser.Manifest.Sections.Select(x => new ManifestBackOfficeSection(x.Key, x.Value))); + return base.CreateItems(factory) + .Concat(manifestParser.Manifest.Sections.Select(x => new ManifestBackOfficeSection(x.Key, x.Value))); } private class ManifestBackOfficeSection : IBackOfficeSection diff --git a/src/Umbraco.Web/Trees/ITree.cs b/src/Umbraco.Web/Trees/ITree.cs index f408ce5e60..867beda20e 100644 --- a/src/Umbraco.Web/Trees/ITree.cs +++ b/src/Umbraco.Web/Trees/ITree.cs @@ -1,7 +1,8 @@ namespace Umbraco.Web.Trees { //fixme - we don't really use this, it is nice to have the treecontroller, attribute and ApplicationTree streamlined to implement this but it's not used - public interface ITree + //leave as internal for now, maybe we'll use in the future, means we could pass around ITree + internal interface ITree { /// /// Gets or sets the sort order. diff --git a/src/Umbraco.Web/Trees/Tree.cs b/src/Umbraco.Web/Trees/Tree.cs index 3bac5bae58..39f5cec1eb 100644 --- a/src/Umbraco.Web/Trees/Tree.cs +++ b/src/Umbraco.Web/Trees/Tree.cs @@ -43,7 +43,7 @@ namespace Umbraco.Web.Trees public Type TreeControllerType { get; } - public static string GetRootNodeDisplayName(ITree tree, ILocalizedTextService textService) + internal static string GetRootNodeDisplayName(ITree tree, ILocalizedTextService textService) { var label = $"[{tree.TreeAlias}]"; diff --git a/src/Umbraco.Web/Trees/TreeCollectionBuilder.cs b/src/Umbraco.Web/Trees/TreeCollectionBuilder.cs index 143b8e308b..ae2675bac9 100644 --- a/src/Umbraco.Web/Trees/TreeCollectionBuilder.cs +++ b/src/Umbraco.Web/Trees/TreeCollectionBuilder.cs @@ -3,16 +3,15 @@ using Umbraco.Core.Composing; namespace Umbraco.Web.Trees { - //fixme - how will we allow users to modify these items? they will need to be able to change the ApplicationTree's registered (i.e. sort order, section) - public class TreeCollectionBuilder : CollectionBuilderBase + public class TreeCollectionBuilder : ICollectionBuilder { - private readonly List _instances = new List(); + /// + /// expose the list of trees which developers can manipulate before the collection is created + /// + public List Trees { get; } = new List(); - public void AddTree(Tree tree) - { - _instances.Add(tree); - } + public TreeCollection CreateCollection(IFactory factory) => new TreeCollection(Trees); - protected override IEnumerable CreateItems(IFactory factory) => _instances; + public void RegisterWith(IRegister register) => register.Register(CreateCollection, Lifetime.Singleton); } } From 8aaaf4439abf7f5b57bc7a3fb4444118e8855d47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Thu, 17 Jan 2019 10:12:28 +0100 Subject: [PATCH 128/437] Changed UI for resizable handler --- .../src/less/application/grid.less | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/application/grid.less b/src/Umbraco.Web.UI.Client/src/less/application/grid.less index a7b4bd0011..073d1b5721 100644 --- a/src/Umbraco.Web.UI.Client/src/less/application/grid.less +++ b/src/Umbraco.Web.UI.Client/src/less/application/grid.less @@ -41,9 +41,9 @@ body { #mainwrapper { position: absolute; - top: 0; - left: 0; - right: 0; + top: 0; + left: 0; + right: 0; bottom: 0; margin: 0; } @@ -56,10 +56,10 @@ body.umb-drawer-is-visible #mainwrapper{ position: absolute; top: 0px; bottom: 0px; - right: 0px; + right: 0px; left: 0px; z-index: 10; - margin: 0 + margin: 0; } #umb-notifications-wrapper { @@ -151,17 +151,23 @@ body.umb-drawer-is-visible #mainwrapper{ } .ui-resizable-e { - cursor: e-resize; - width: 4px; + cursor: col-resize; + width: 10px; right: -5px; top: 0; bottom: 0; - background-color: @gray-10; - border: solid 1px @purple-l3; - border-top: none; - border-bottom: none; position:absolute; z-index:9999 !important; + + &:hover::after { + content: ''; + position: absolute; + background-color: @gray-8; + top: 0; + bottom: 0; + width: 1px; + right: 5px; + } } @media (min-width: 1101px) { From d6c2fec5d20d4e3f8c69cb1b90d18ca45b060526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Thu, 17 Jan 2019 10:16:04 +0100 Subject: [PATCH 129/437] Added UI hover for expansion panel --- .../src/less/components/html/umb-expansion-panel.less | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/components/html/umb-expansion-panel.less b/src/Umbraco.Web.UI.Client/src/less/components/html/umb-expansion-panel.less index 26347c8501..2d1cbd10ff 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/html/umb-expansion-panel.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/html/umb-expansion-panel.less @@ -13,6 +13,10 @@ cursor: pointer; justify-content: space-between; color: @black; + + &:hover .umb-expansion-panel__expand { + color: @gray-6; + } } .umb-expansion-panel__expand { @@ -22,4 +26,4 @@ .umb-expansion-panel__content { padding: 20px; border-top: 1px solid @gray-9; -} \ No newline at end of file +} From 0bee01e0eeea61ba2861a9e3b16f3594ea9a9396 Mon Sep 17 00:00:00 2001 From: Stephan Date: Thu, 17 Jan 2019 11:01:23 +0100 Subject: [PATCH 130/437] Great AppCaches renaming --- src/Umbraco.Core/Cache/AppCaches.cs | 75 +++-- .../Cache/AppPolicedCacheDictionary.cs | 74 +++++ .../Cache/CacheProviderExtensions.cs | 24 +- src/Umbraco.Core/Cache/CacheRefresherBase.cs | 2 +- src/Umbraco.Core/Cache/DeepCloneAppCache.cs | 157 ++++++++++ .../Cache/DeepCloneRuntimeCacheProvider.cs | 155 ---------- .../Cache/DefaultRepositoryCachePolicy.cs | 30 +- .../Cache/DictionaryCacheProvider.cs | 178 ++++------- ...rBase.cs => FastDictionaryAppCacheBase.cs} | 242 ++++++++------- .../Cache/FastDictionaryCacheProvider.cs | 162 ++++++++++ .../Cache/FullDataSetRepositoryCachePolicy.cs | 8 +- ...acheProvider.cs => HttpRequestAppCache.cs} | 157 +++++----- src/Umbraco.Core/Cache/IAppCache.cs | 94 ++++++ src/Umbraco.Core/Cache/IAppPolicedCache.cs | 54 ++++ src/Umbraco.Core/Cache/ICacheProvider.cs | 68 ----- .../Cache/IRuntimeCacheProvider.cs | 35 --- src/Umbraco.Core/Cache/IsolatedCaches.cs | 41 +++ .../Cache/IsolatedRuntimeCache.cs | 91 ------ src/Umbraco.Core/Cache/NoAppCache.cs | 82 +++++ .../Cache/NoCacheRepositoryCachePolicy.cs | 2 +- src/Umbraco.Core/Cache/NullCacheProvider.cs | 66 ---- ...acheProvider.cs => ObjectCacheAppCache.cs} | 283 +++++++++--------- .../Cache/RepositoryCachePolicyBase.cs | 10 +- .../SingleItemsOnlyRepositoryCachePolicy.cs | 2 +- src/Umbraco.Core/Cache/StaticCacheProvider.cs | 79 ----- ...CacheProvider.cs => WebCachingAppCache.cs} | 118 +++----- src/Umbraco.Core/Composing/TypeLoader.cs | 8 +- src/Umbraco.Core/ConfigsExtensions.cs | 2 +- .../Configuration/Grid/GridConfig.cs | 2 +- .../Configuration/Grid/GridEditorsConfig.cs | 4 +- src/Umbraco.Core/Manifest/ManifestParser.cs | 6 +- src/Umbraco.Core/Models/UserExtensions.cs | 2 +- .../Implement/ConsentRepository.cs | 2 +- .../Implement/DictionaryRepository.cs | 12 +- .../Implement/RepositoryBaseOfTIdTEntity.cs | 12 +- src/Umbraco.Core/Runtime/CoreRuntime.cs | 8 +- src/Umbraco.Core/Scoping/IScope.cs | 2 +- src/Umbraco.Core/Scoping/Scope.cs | 10 +- .../LocalizedTextServiceFileSources.cs | 6 +- src/Umbraco.Core/Umbraco.Core.csproj | 23 +- src/Umbraco.Tests/Cache/CacheProviderTests.cs | 94 +++--- .../DeepCloneRuntimeCacheProviderTests.cs | 16 +- .../Cache/DefaultCachePolicyTests.cs | 26 +- .../Cache/FullDataSetCachePolicyTests.cs | 32 +- .../Cache/HttpRequestCacheProviderTests.cs | 14 +- .../Cache/HttpRuntimeCacheProviderTests.cs | 16 +- .../Cache/ObjectCacheProviderTests.cs | 8 +- .../PublishedContentCacheTests.cs | 2 +- .../PublishedMediaCacheTests.cs | 8 +- .../Cache/RuntimeCacheProviderTests.cs | 4 +- .../Cache/SingleItemsOnlyCachePolicyTests.cs | 10 +- .../Composing/ComposingTestBase.cs | 2 +- .../Composing/TypeLoaderTests.cs | 2 +- src/Umbraco.Tests/CoreThings/UdiTests.cs | 2 +- .../FrontEnd/UmbracoHelperTests.cs | 2 +- src/Umbraco.Tests/Macros/MacroTests.cs | 8 +- .../Manifest/ManifestParserTests.cs | 2 +- src/Umbraco.Tests/Models/ContentTests.cs | 6 +- .../Repositories/DocumentRepositoryTest.cs | 8 +- .../Repositories/MediaRepositoryTest.cs | 8 +- .../Published/PropertyCacheLevelTests.cs | 4 +- .../PublishedContentSnapshotTestBase.cs | 2 +- .../PublishedContent/PublishedContentTests.cs | 2 +- .../PublishedContent/PublishedMediaTests.cs | 20 +- .../SolidPublishedSnapshot.cs | 4 +- .../Scoping/ScopedRepositoryTests.cs | 54 ++-- .../TestHelpers/BaseUsingSqlCeSyntax.cs | 2 +- .../TestHelpers/TestWithDatabaseBase.cs | 2 +- src/Umbraco.Tests/Testing/UmbracoTestBase.cs | 6 +- .../Web/Mvc/UmbracoViewPageTests.cs | 2 +- .../Web/TemplateUtilitiesTests.cs | 2 +- .../Cache/ApplicationCacheRefresher.cs | 4 +- .../Cache/ApplicationTreeCacheRefresher.cs | 4 +- .../Cache/ContentCacheRefresher.cs | 12 +- .../Cache/DataTypeCacheRefresher.cs | 2 +- src/Umbraco.Web/Cache/MacroCacheRefresher.cs | 12 +- src/Umbraco.Web/Cache/MediaCacheRefresher.cs | 8 +- src/Umbraco.Web/Cache/MemberCacheRefresher.cs | 6 +- .../Cache/MemberGroupCacheRefresher.cs | 2 +- .../Cache/RelationTypeCacheRefresher.cs | 8 +- .../Cache/TemplateCacheRefresher.cs | 2 +- src/Umbraco.Web/Cache/UserCacheRefresher.cs | 4 +- .../Cache/UserGroupCacheRefresher.cs | 10 +- src/Umbraco.Web/CacheHelperExtensions.cs | 2 +- .../Dictionary/UmbracoCultureDictionary.cs | 6 +- .../Editors/ExamineManagementController.cs | 10 +- src/Umbraco.Web/Editors/UsersController.cs | 2 +- src/Umbraco.Web/Macros/MacroRenderer.cs | 2 +- .../Models/Mapping/UserMapperProfile.cs | 2 +- .../PublishedCache/IPublishedSnapshot.cs | 4 +- .../PublishedCache/NuCache/ContentCache.cs | 8 +- .../PublishedCache/NuCache/MediaCache.cs | 8 +- .../PublishedCache/NuCache/MemberCache.cs | 4 +- .../PublishedCache/NuCache/Property.cs | 6 +- .../NuCache/PublishedContent.cs | 10 +- .../NuCache/PublishedSnapshot.cs | 8 +- .../NuCache/PublishedSnapshotService.cs | 8 +- .../PublishedElementPropertyBase.cs | 6 +- .../DictionaryPublishedContent.cs | 4 +- .../PublishedContentCache.cs | 6 +- .../XmlPublishedCache/PublishedMediaCache.cs | 12 +- .../XmlPublishedCache/PublishedMemberCache.cs | 4 +- .../XmlPublishedCache/PublishedSnapshot.cs | 4 +- .../PublishedSnapshotService.cs | 6 +- .../XmlPublishedCache/XmlPublishedContent.cs | 10 +- src/Umbraco.Web/Runtime/WebRuntime.cs | 10 +- .../Services/ApplicationTreeService.cs | 2 +- src/Umbraco.Web/Services/SectionService.cs | 2 +- 108 files changed, 1538 insertions(+), 1440 deletions(-) create mode 100644 src/Umbraco.Core/Cache/AppPolicedCacheDictionary.cs create mode 100644 src/Umbraco.Core/Cache/DeepCloneAppCache.cs delete mode 100644 src/Umbraco.Core/Cache/DeepCloneRuntimeCacheProvider.cs rename src/Umbraco.Core/Cache/{DictionaryCacheProviderBase.cs => FastDictionaryAppCacheBase.cs} (81%) create mode 100644 src/Umbraco.Core/Cache/FastDictionaryCacheProvider.cs rename src/Umbraco.Core/Cache/{HttpRequestCacheProvider.cs => HttpRequestAppCache.cs} (53%) create mode 100644 src/Umbraco.Core/Cache/IAppCache.cs create mode 100644 src/Umbraco.Core/Cache/IAppPolicedCache.cs delete mode 100644 src/Umbraco.Core/Cache/ICacheProvider.cs delete mode 100644 src/Umbraco.Core/Cache/IRuntimeCacheProvider.cs create mode 100644 src/Umbraco.Core/Cache/IsolatedCaches.cs delete mode 100644 src/Umbraco.Core/Cache/IsolatedRuntimeCache.cs create mode 100644 src/Umbraco.Core/Cache/NoAppCache.cs delete mode 100644 src/Umbraco.Core/Cache/NullCacheProvider.cs rename src/Umbraco.Core/Cache/{ObjectCacheRuntimeCacheProvider.cs => ObjectCacheAppCache.cs} (73%) delete mode 100644 src/Umbraco.Core/Cache/StaticCacheProvider.cs rename src/Umbraco.Core/Cache/{HttpRuntimeCacheProvider.cs => WebCachingAppCache.cs} (68%) diff --git a/src/Umbraco.Core/Cache/AppCaches.cs b/src/Umbraco.Core/Cache/AppCaches.cs index 7dd95624ef..6372bccbab 100644 --- a/src/Umbraco.Core/Cache/AppCaches.cs +++ b/src/Umbraco.Core/Cache/AppCaches.cs @@ -4,47 +4,41 @@ using System.Web; namespace Umbraco.Core.Cache { /// - /// Represents the application-wide caches. + /// Represents the application caches. /// public class AppCaches { /// - /// Initializes a new instance for use in the web + /// Initializes a new instance of the for use in a web application. /// public AppCaches() - : this( - new HttpRuntimeCacheProvider(HttpRuntime.Cache), - new StaticCacheProvider(), - new HttpRequestCacheProvider(), - new IsolatedRuntimeCache(t => new ObjectCacheRuntimeCacheProvider())) - { - } + : this(HttpRuntime.Cache) + { } /// - /// Initializes a new instance for use in the web + /// Initializes a new instance of the for use in a web application. /// public AppCaches(System.Web.Caching.Cache cache) : this( - new HttpRuntimeCacheProvider(cache), - new StaticCacheProvider(), - new HttpRequestCacheProvider(), - new IsolatedRuntimeCache(t => new ObjectCacheRuntimeCacheProvider())) - { - } + new WebCachingAppCache(cache), + new DictionaryCacheProvider(), + new HttpRequestAppCache(), + new IsolatedCaches(t => new ObjectCacheAppCache())) + { } /// - /// Initializes a new instance based on the provided providers + /// Initializes a new instance of the with cache providers. /// public AppCaches( - IRuntimeCacheProvider httpCacheProvider, - ICacheProvider staticCacheProvider, - ICacheProvider requestCacheProvider, - IsolatedRuntimeCache isolatedCacheManager) + IAppPolicedCache runtimeCache, + IAppCache staticCacheProvider, + IAppCache requestCache, + IsolatedCaches isolatedCaches) { - RuntimeCache = httpCacheProvider ?? throw new ArgumentNullException(nameof(httpCacheProvider)); + RuntimeCache = runtimeCache ?? throw new ArgumentNullException(nameof(runtimeCache)); StaticCache = staticCacheProvider ?? throw new ArgumentNullException(nameof(staticCacheProvider)); - RequestCache = requestCacheProvider ?? throw new ArgumentNullException(nameof(requestCacheProvider)); - IsolatedRuntimeCache = isolatedCacheManager ?? throw new ArgumentNullException(nameof(isolatedCacheManager)); + RequestCache = requestCache ?? throw new ArgumentNullException(nameof(requestCache)); + IsolatedCaches = isolatedCaches ?? throw new ArgumentNullException(nameof(isolatedCaches)); } /// @@ -54,7 +48,7 @@ namespace Umbraco.Core.Cache /// When used by repositories, all cache policies apply, but the underlying caches do not cache anything. /// Used by tests. /// - public static AppCaches Disabled { get; } = new AppCaches(NullCacheProvider.Instance, NullCacheProvider.Instance, NullCacheProvider.Instance, new IsolatedRuntimeCache(_ => NullCacheProvider.Instance)); + public static AppCaches Disabled { get; } = new AppCaches(NoAppCache.Instance, NoAppCache.Instance, NoAppCache.Instance, new IsolatedCaches(_ => NoAppCache.Instance)); /// /// Gets the special no-cache instance. @@ -63,27 +57,42 @@ namespace Umbraco.Core.Cache /// When used by repositories, all cache policies are bypassed. /// Used by repositories that do no cache. /// - public static AppCaches NoCache { get; } = new AppCaches(NullCacheProvider.Instance, NullCacheProvider.Instance, NullCacheProvider.Instance, new IsolatedRuntimeCache(_ => NullCacheProvider.Instance)); + public static AppCaches NoCache { get; } = new AppCaches(NoAppCache.Instance, NoAppCache.Instance, NoAppCache.Instance, new IsolatedCaches(_ => NoAppCache.Instance)); /// - /// Returns the current Request cache + /// Gets the per-request cache. /// - public ICacheProvider RequestCache { get; internal set; } + /// + /// The per-request caches works on top of the current HttpContext items. + /// fixme - what about non-web applications? + /// + public IAppCache RequestCache { get; } /// /// Returns the current Runtime cache /// - public ICacheProvider StaticCache { get; internal set; } + /// + /// fixme - what is this? why not use RuntimeCache? + /// + public IAppCache StaticCache { get; } /// - /// Returns the current Runtime cache + /// Gets the runtime cache. /// - public IRuntimeCacheProvider RuntimeCache { get; internal set; } + /// + /// The runtime cache is the main application cache. + /// + public IAppPolicedCache RuntimeCache { get; } /// - /// Returns the current Isolated Runtime cache manager + /// Gets the isolated caches. /// - public IsolatedRuntimeCache IsolatedRuntimeCache { get; internal set; } + /// + /// Isolated caches are used by e.g. repositories, to ensure that each cached entity + /// type has its own cache, so that lookups are fast and the repository does not need to + /// search through all keys on a global scale. + /// + public IsolatedCaches IsolatedCaches { get; } } diff --git a/src/Umbraco.Core/Cache/AppPolicedCacheDictionary.cs b/src/Umbraco.Core/Cache/AppPolicedCacheDictionary.cs new file mode 100644 index 0000000000..51cc3c4c53 --- /dev/null +++ b/src/Umbraco.Core/Cache/AppPolicedCacheDictionary.cs @@ -0,0 +1,74 @@ +using System; +using System.Collections.Concurrent; + +namespace Umbraco.Core.Cache +{ + /// + /// Provides a base class for implementing a dictionary of . + /// + /// The type of the dictionary key. + public abstract class AppPolicedCacheDictionary + { + private readonly ConcurrentDictionary _caches = new ConcurrentDictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + protected AppPolicedCacheDictionary(Func cacheFactory) + { + CacheFactory = cacheFactory; + } + + /// + /// Gets the internal cache factory, for tests only! + /// + internal readonly Func CacheFactory; + + /// + /// Gets or creates a cache. + /// + public IAppPolicedCache GetOrCreate(TKey key) + => _caches.GetOrAdd(key, k => CacheFactory(k)); + + /// + /// Tries to get a cache. + /// + public Attempt Get(TKey key) + => _caches.TryGetValue(key, out var cache) ? Attempt.Succeed(cache) : Attempt.Fail(); + + /// + /// Removes a cache. + /// + public void Remove(TKey key) + { + _caches.TryRemove(key, out _); + } + + /// + /// Removes all caches. + /// + public void RemoveAll() + { + _caches.Clear(); + } + + /// + /// Clears a cache. + /// + public void ClearCache(TKey key) + { + if (_caches.TryGetValue(key, out var cache)) + cache.Clear(); + } + + /// + /// Clears all caches. + /// + public void ClearAllCaches() + { + foreach (var cache in _caches.Values) + cache.Clear(); + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Cache/CacheProviderExtensions.cs b/src/Umbraco.Core/Cache/CacheProviderExtensions.cs index e42cb4d9ad..0e41b981fb 100644 --- a/src/Umbraco.Core/Cache/CacheProviderExtensions.cs +++ b/src/Umbraco.Core/Cache/CacheProviderExtensions.cs @@ -10,7 +10,7 @@ namespace Umbraco.Core.Cache /// public static class CacheProviderExtensions { - public static T GetCacheItem(this IRuntimeCacheProvider provider, + public static T GetCacheItem(this IAppPolicedCache provider, string cacheKey, Func getCacheItem, TimeSpan? timeout, @@ -19,11 +19,11 @@ namespace Umbraco.Core.Cache CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null) { - var result = provider.GetCacheItem(cacheKey, () => getCacheItem(), timeout, isSliding, priority, removedCallback, dependentFiles); + var result = provider.Get(cacheKey, () => getCacheItem(), timeout, isSliding, priority, removedCallback, dependentFiles); return result == null ? default(T) : result.TryConvertTo().Result; } - public static void InsertCacheItem(this IRuntimeCacheProvider provider, + public static void InsertCacheItem(this IAppPolicedCache provider, string cacheKey, Func getCacheItem, TimeSpan? timeout = null, @@ -32,24 +32,24 @@ namespace Umbraco.Core.Cache CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null) { - provider.InsertCacheItem(cacheKey, () => getCacheItem(), timeout, isSliding, priority, removedCallback, dependentFiles); + provider.Insert(cacheKey, () => getCacheItem(), timeout, isSliding, priority, removedCallback, dependentFiles); } - public static IEnumerable GetCacheItemsByKeySearch(this ICacheProvider provider, string keyStartsWith) + public static IEnumerable GetCacheItemsByKeySearch(this IAppCache provider, string keyStartsWith) { - var result = provider.GetCacheItemsByKeySearch(keyStartsWith); + var result = provider.SearchByKey(keyStartsWith); return result.Select(x => x.TryConvertTo().Result); } - public static IEnumerable GetCacheItemsByKeyExpression(this ICacheProvider provider, string regexString) + public static IEnumerable GetCacheItemsByKeyExpression(this IAppCache provider, string regexString) { - var result = provider.GetCacheItemsByKeyExpression(regexString); + var result = provider.SearchByRegex(regexString); return result.Select(x => x.TryConvertTo().Result); } - public static T GetCacheItem(this ICacheProvider provider, string cacheKey) + public static T GetCacheItem(this IAppCache provider, string cacheKey) { - var result = provider.GetCacheItem(cacheKey); + var result = provider.Get(cacheKey); if (result == null) { return default(T); @@ -57,9 +57,9 @@ namespace Umbraco.Core.Cache return result.TryConvertTo().Result; } - public static T GetCacheItem(this ICacheProvider provider, string cacheKey, Func getCacheItem) + public static T GetCacheItem(this IAppCache provider, string cacheKey, Func getCacheItem) { - var result = provider.GetCacheItem(cacheKey, () => getCacheItem()); + var result = provider.Get(cacheKey, () => getCacheItem()); if (result == null) { return default(T); diff --git a/src/Umbraco.Core/Cache/CacheRefresherBase.cs b/src/Umbraco.Core/Cache/CacheRefresherBase.cs index 5e6ec593af..bfa16ff3fa 100644 --- a/src/Umbraco.Core/Cache/CacheRefresherBase.cs +++ b/src/Umbraco.Core/Cache/CacheRefresherBase.cs @@ -102,7 +102,7 @@ namespace Umbraco.Core.Cache protected void ClearAllIsolatedCacheByEntityType() where TEntity : class, IEntity { - AppCaches.IsolatedRuntimeCache.ClearCache(); + AppCaches.IsolatedCaches.ClearCache(); } /// diff --git a/src/Umbraco.Core/Cache/DeepCloneAppCache.cs b/src/Umbraco.Core/Cache/DeepCloneAppCache.cs new file mode 100644 index 0000000000..cdc66f1db7 --- /dev/null +++ b/src/Umbraco.Core/Cache/DeepCloneAppCache.cs @@ -0,0 +1,157 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web.Caching; +using Umbraco.Core.Models; +using Umbraco.Core.Models.Entities; + +namespace Umbraco.Core.Cache +{ + /// + /// Implements by wrapping an inner other + /// instance, and ensuring that all inserts and returns are deep cloned copies of the cache item, + /// when the item is deep-cloneable. + /// + internal class DeepCloneAppCache : IAppPolicedCache + { + /// + /// Initializes a new instance of the class. + /// + public DeepCloneAppCache(IAppPolicedCache innerCache) + { + var type = typeof (DeepCloneAppCache); + + if (innerCache.GetType() == type) + throw new InvalidOperationException($"A {type} cannot wrap another instance of itself."); + + InnerCache = innerCache; + } + + /// + /// Gets the inner cache. + /// + public IAppPolicedCache InnerCache { get; } + + /// + public object Get(string key) + { + var item = InnerCache.Get(key); + return CheckCloneableAndTracksChanges(item); + } + + /// + public object Get(string key, Func factory) + { + var cached = InnerCache.Get(key, () => + { + var result = FastDictionaryAppCacheBase.GetSafeLazy(factory); + var value = result.Value; // force evaluation now - this may throw if cacheItem throws, and then nothing goes into cache + // do not store null values (backward compat), clone / reset to go into the cache + return value == null ? null : CheckCloneableAndTracksChanges(value); + }); + return CheckCloneableAndTracksChanges(cached); + } + + /// + public IEnumerable SearchByKey(string keyStartsWith) + { + return InnerCache.SearchByKey(keyStartsWith) + .Select(CheckCloneableAndTracksChanges); + } + + /// + public IEnumerable SearchByRegex(string regex) + { + return InnerCache.SearchByRegex(regex) + .Select(CheckCloneableAndTracksChanges); + } + + /// + public object Get(string key, Func factory, TimeSpan? timeout, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null) + { + var cached = InnerCache.Get(key, () => + { + var result = FastDictionaryAppCacheBase.GetSafeLazy(factory); + var value = result.Value; // force evaluation now - this may throw if cacheItem throws, and then nothing goes into cache + // do not store null values (backward compat), clone / reset to go into the cache + return value == null ? null : CheckCloneableAndTracksChanges(value); + + // clone / reset to go into the cache + }, timeout, isSliding, priority, removedCallback, dependentFiles); + + // clone / reset to go into the cache + return CheckCloneableAndTracksChanges(cached); + } + + /// + public void Insert(string key, Func factory, TimeSpan? timeout = null, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null) + { + InnerCache.Insert(key, () => + { + var result = FastDictionaryAppCacheBase.GetSafeLazy(factory); + var value = result.Value; // force evaluation now - this may throw if cacheItem throws, and then nothing goes into cache + // do not store null values (backward compat), clone / reset to go into the cache + return value == null ? null : CheckCloneableAndTracksChanges(value); + }, timeout, isSliding, priority, removedCallback, dependentFiles); + } + + /// + public void Clear() + { + InnerCache.Clear(); + } + + /// + public void Clear(string key) + { + InnerCache.Clear(key); + } + + /// + public void ClearOfType(string typeName) + { + InnerCache.ClearOfType(typeName); + } + + /// + public void ClearOfType() + { + InnerCache.ClearOfType(); + } + + /// + public void ClearOfType(Func predicate) + { + InnerCache.ClearOfType(predicate); + } + + /// + public void ClearByKey(string keyStartsWith) + { + InnerCache.ClearByKey(keyStartsWith); + } + + /// + public void ClearByRegex(string regex) + { + InnerCache.ClearByRegex(regex); + } + + private static object CheckCloneableAndTracksChanges(object input) + { + if (input is IDeepCloneable cloneable) + { + input = cloneable.DeepClone(); + } + + // reset dirty initial properties + if (input is IRememberBeingDirty tracksChanges) + { + tracksChanges.ResetDirtyProperties(false); + input = tracksChanges; + } + + return input; + } + } +} diff --git a/src/Umbraco.Core/Cache/DeepCloneRuntimeCacheProvider.cs b/src/Umbraco.Core/Cache/DeepCloneRuntimeCacheProvider.cs deleted file mode 100644 index 255d7b526d..0000000000 --- a/src/Umbraco.Core/Cache/DeepCloneRuntimeCacheProvider.cs +++ /dev/null @@ -1,155 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web.Caching; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; - -namespace Umbraco.Core.Cache -{ - /// - /// Interface describing this cache provider as a wrapper for another - /// - internal interface IRuntimeCacheProviderWrapper - { - IRuntimeCacheProvider InnerProvider { get; } - } - - /// - /// A wrapper for any IRuntimeCacheProvider that ensures that all inserts and returns - /// are a deep cloned copy of the item when the item is IDeepCloneable and that tracks changes are - /// reset if the object is TracksChangesEntityBase - /// - internal class DeepCloneRuntimeCacheProvider : IRuntimeCacheProvider, IRuntimeCacheProviderWrapper - { - public IRuntimeCacheProvider InnerProvider { get; } - - public DeepCloneRuntimeCacheProvider(IRuntimeCacheProvider innerProvider) - { - var type = typeof (DeepCloneRuntimeCacheProvider); - - if (innerProvider.GetType() == type) - throw new InvalidOperationException($"A {type} cannot wrap another instance of {type}."); - - InnerProvider = innerProvider; - } - - #region Clear - doesn't require any changes - - public void ClearAllCache() - { - InnerProvider.ClearAllCache(); - } - - public void ClearCacheItem(string key) - { - InnerProvider.ClearCacheItem(key); - } - - public void ClearCacheObjectTypes(string typeName) - { - InnerProvider.ClearCacheObjectTypes(typeName); - } - - public void ClearCacheObjectTypes() - { - InnerProvider.ClearCacheObjectTypes(); - } - - public void ClearCacheObjectTypes(Func predicate) - { - InnerProvider.ClearCacheObjectTypes(predicate); - } - - public void ClearCacheByKeySearch(string keyStartsWith) - { - InnerProvider.ClearCacheByKeySearch(keyStartsWith); - } - - public void ClearCacheByKeyExpression(string regexString) - { - InnerProvider.ClearCacheByKeyExpression(regexString); - } - - #endregion - - public IEnumerable GetCacheItemsByKeySearch(string keyStartsWith) - { - return InnerProvider.GetCacheItemsByKeySearch(keyStartsWith) - .Select(CheckCloneableAndTracksChanges); - } - - public IEnumerable GetCacheItemsByKeyExpression(string regexString) - { - return InnerProvider.GetCacheItemsByKeyExpression(regexString) - .Select(CheckCloneableAndTracksChanges); - } - - public object GetCacheItem(string cacheKey) - { - var item = InnerProvider.GetCacheItem(cacheKey); - return CheckCloneableAndTracksChanges(item); - } - - public object GetCacheItem(string cacheKey, Func getCacheItem) - { - var cached = InnerProvider.GetCacheItem(cacheKey, () => - { - var result = DictionaryCacheProviderBase.GetSafeLazy(getCacheItem); - var value = result.Value; // force evaluation now - this may throw if cacheItem throws, and then nothing goes into cache - if (value == null) return null; // do not store null values (backward compat) - - return CheckCloneableAndTracksChanges(value); - }); - return CheckCloneableAndTracksChanges(cached); - } - - public object GetCacheItem(string cacheKey, Func getCacheItem, TimeSpan? timeout, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null) - { - var cached = InnerProvider.GetCacheItem(cacheKey, () => - { - var result = DictionaryCacheProviderBase.GetSafeLazy(getCacheItem); - var value = result.Value; // force evaluation now - this may throw if cacheItem throws, and then nothing goes into cache - if (value == null) return null; // do not store null values (backward compat) - - // clone / reset to go into the cache - return CheckCloneableAndTracksChanges(value); - }, timeout, isSliding, priority, removedCallback, dependentFiles); - - // clone / reset to go into the cache - return CheckCloneableAndTracksChanges(cached); - } - - public void InsertCacheItem(string cacheKey, Func getCacheItem, TimeSpan? timeout = null, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null) - { - InnerProvider.InsertCacheItem(cacheKey, () => - { - var result = DictionaryCacheProviderBase.GetSafeLazy(getCacheItem); - var value = result.Value; // force evaluation now - this may throw if cacheItem throws, and then nothing goes into cache - if (value == null) return null; // do not store null values (backward compat) - - // clone / reset to go into the cache - return CheckCloneableAndTracksChanges(value); - }, timeout, isSliding, priority, removedCallback, dependentFiles); - } - - private static object CheckCloneableAndTracksChanges(object input) - { - var cloneable = input as IDeepCloneable; - if (cloneable != null) - { - input = cloneable.DeepClone(); - } - - // reset dirty initial properties (U4-1946) - var tracksChanges = input as IRememberBeingDirty; - if (tracksChanges != null) - { - tracksChanges.ResetDirtyProperties(false); - input = tracksChanges; - } - - return input; - } - } -} diff --git a/src/Umbraco.Core/Cache/DefaultRepositoryCachePolicy.cs b/src/Umbraco.Core/Cache/DefaultRepositoryCachePolicy.cs index 8387f547d3..6f160cd552 100644 --- a/src/Umbraco.Core/Cache/DefaultRepositoryCachePolicy.cs +++ b/src/Umbraco.Core/Cache/DefaultRepositoryCachePolicy.cs @@ -23,7 +23,7 @@ namespace Umbraco.Core.Cache private static readonly TEntity[] EmptyEntities = new TEntity[0]; // const private readonly RepositoryCachePolicyOptions _options; - public DefaultRepositoryCachePolicy(IRuntimeCacheProvider cache, IScopeAccessor scopeAccessor, RepositoryCachePolicyOptions options) + public DefaultRepositoryCachePolicy(IAppPolicedCache cache, IScopeAccessor scopeAccessor, RepositoryCachePolicyOptions options) : base(cache, scopeAccessor) { _options = options ?? throw new ArgumentNullException(nameof(options)); @@ -42,7 +42,7 @@ namespace Umbraco.Core.Cache protected virtual void InsertEntity(string cacheKey, TEntity entity) { - Cache.InsertCacheItem(cacheKey, () => entity, TimeSpan.FromMinutes(5), true); + Cache.Insert(cacheKey, () => entity, TimeSpan.FromMinutes(5), true); } protected virtual void InsertEntities(TId[] ids, TEntity[] entities) @@ -52,7 +52,7 @@ namespace Umbraco.Core.Cache // getting all of them, and finding nothing. // if we can cache a zero count, cache an empty array, // for as long as the cache is not cleared (no expiration) - Cache.InsertCacheItem(GetEntityTypeCacheKey(), () => EmptyEntities); + Cache.Insert(GetEntityTypeCacheKey(), () => EmptyEntities); } else { @@ -60,7 +60,7 @@ namespace Umbraco.Core.Cache foreach (var entity in entities) { var capture = entity; - Cache.InsertCacheItem(GetEntityCacheKey(entity.Id), () => capture, TimeSpan.FromMinutes(5), true); + Cache.Insert(GetEntityCacheKey(entity.Id), () => capture, TimeSpan.FromMinutes(5), true); } } } @@ -77,21 +77,21 @@ namespace Umbraco.Core.Cache // just to be safe, we cannot cache an item without an identity if (entity.HasIdentity) { - Cache.InsertCacheItem(GetEntityCacheKey(entity.Id), () => entity, TimeSpan.FromMinutes(5), true); + Cache.Insert(GetEntityCacheKey(entity.Id), () => entity, TimeSpan.FromMinutes(5), true); } // if there's a GetAllCacheAllowZeroCount cache, ensure it is cleared - Cache.ClearCacheItem(GetEntityTypeCacheKey()); + Cache.Clear(GetEntityTypeCacheKey()); } catch { // if an exception is thrown we need to remove the entry from cache, // this is ONLY a work around because of the way // that we cache entities: http://issues.umbraco.org/issue/U4-4259 - Cache.ClearCacheItem(GetEntityCacheKey(entity.Id)); + Cache.Clear(GetEntityCacheKey(entity.Id)); // if there's a GetAllCacheAllowZeroCount cache, ensure it is cleared - Cache.ClearCacheItem(GetEntityTypeCacheKey()); + Cache.Clear(GetEntityTypeCacheKey()); throw; } @@ -109,21 +109,21 @@ namespace Umbraco.Core.Cache // just to be safe, we cannot cache an item without an identity if (entity.HasIdentity) { - Cache.InsertCacheItem(GetEntityCacheKey(entity.Id), () => entity, TimeSpan.FromMinutes(5), true); + Cache.Insert(GetEntityCacheKey(entity.Id), () => entity, TimeSpan.FromMinutes(5), true); } // if there's a GetAllCacheAllowZeroCount cache, ensure it is cleared - Cache.ClearCacheItem(GetEntityTypeCacheKey()); + Cache.Clear(GetEntityTypeCacheKey()); } catch { // if an exception is thrown we need to remove the entry from cache, // this is ONLY a work around because of the way // that we cache entities: http://issues.umbraco.org/issue/U4-4259 - Cache.ClearCacheItem(GetEntityCacheKey(entity.Id)); + Cache.Clear(GetEntityCacheKey(entity.Id)); // if there's a GetAllCacheAllowZeroCount cache, ensure it is cleared - Cache.ClearCacheItem(GetEntityTypeCacheKey()); + Cache.Clear(GetEntityTypeCacheKey()); throw; } @@ -142,9 +142,9 @@ namespace Umbraco.Core.Cache { // whatever happens, clear the cache var cacheKey = GetEntityCacheKey(entity.Id); - Cache.ClearCacheItem(cacheKey); + Cache.Clear(cacheKey); // if there's a GetAllCacheAllowZeroCount cache, ensure it is cleared - Cache.ClearCacheItem(GetEntityTypeCacheKey()); + Cache.Clear(GetEntityTypeCacheKey()); } } @@ -238,7 +238,7 @@ namespace Umbraco.Core.Cache /// public override void ClearAll() { - Cache.ClearCacheByKeySearch(GetEntityTypeCacheKey()); + Cache.ClearByKey(GetEntityTypeCacheKey()); } } } diff --git a/src/Umbraco.Core/Cache/DictionaryCacheProvider.cs b/src/Umbraco.Core/Cache/DictionaryCacheProvider.cs index 98dceb80b0..2ff5f6ea83 100644 --- a/src/Umbraco.Core/Cache/DictionaryCacheProvider.cs +++ b/src/Umbraco.Core/Cache/DictionaryCacheProvider.cs @@ -1,147 +1,97 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; -using System.Linq; using System.Text.RegularExpressions; -using Umbraco.Core.Composing; namespace Umbraco.Core.Cache { - internal class DictionaryCacheProvider : ICacheProvider + /// + /// Implements on top of a concurrent dictionary. + /// + public class DictionaryCacheProvider : IAppCache { - private readonly ConcurrentDictionary> _items - = new ConcurrentDictionary>(); + /// + /// Gets the internal items dictionary, for tests only! + /// + internal readonly ConcurrentDictionary Items = new ConcurrentDictionary(); - // for tests - internal ConcurrentDictionary> Items => _items; - - public void ClearAllCache() + /// + public virtual object Get(string key) { - _items.Clear(); + // fixme throws if non-existing, shouldn't it return null? + return Items[key]; } - public void ClearCacheItem(string key) + /// + public virtual object Get(string key, Func factory) { - _items.TryRemove(key, out _); + return Items.GetOrAdd(key, _ => factory()); } - public void ClearCacheObjectTypes(string typeName) + /// + public virtual IEnumerable SearchByKey(string keyStartsWith) { - var type = TypeFinder.GetTypeByName(typeName); - if (type == null) return; - var isInterface = type.IsInterface; - - foreach (var kvp in _items - .Where(x => - { - // entry.Value is Lazy and not null, its value may be null - // remove null values as well, does not hurt - // get non-created as NonCreatedValue & exceptions as null - var value = DictionaryCacheProviderBase.GetSafeLazyValue(x.Value, true); - - // if T is an interface remove anything that implements that interface - // otherwise remove exact types (not inherited types) - return value == null || (isInterface ? (type.IsInstanceOfType(value)) : (value.GetType() == type)); - })) - _items.TryRemove(kvp.Key, out _); + var items = new List(); + foreach (var (key, value) in Items) + if (key.InvariantStartsWith(keyStartsWith)) + items.Add(value); + return items; } - public void ClearCacheObjectTypes() + /// + public IEnumerable SearchByRegex(string regex) + { + var compiled = new Regex(regex, RegexOptions.Compiled); + var items = new List(); + foreach (var (key, value) in Items) + if (compiled.IsMatch(key)) + items.Add(value); + return items; + } + + /// + public virtual void Clear() + { + Items.Clear(); + } + + /// + public virtual void Clear(string key) + { + Items.TryRemove(key, out _); + } + + /// + public virtual void ClearOfType(string typeName) + { + Items.RemoveAll(kvp => kvp.Value != null && kvp.Value.GetType().ToString().InvariantEquals(typeName)); + } + + /// + public virtual void ClearOfType() { var typeOfT = typeof(T); - var isInterface = typeOfT.IsInterface; - - foreach (var kvp in _items - .Where(x => - { - // entry.Value is Lazy and not null, its value may be null - // remove null values as well, does not hurt - // compare on exact type, don't use "is" - // get non-created as NonCreatedValue & exceptions as null - var value = DictionaryCacheProviderBase.GetSafeLazyValue(x.Value, true); - - // if T is an interface remove anything that implements that interface - // otherwise remove exact types (not inherited types) - return value == null || (isInterface ? (value is T) : (value.GetType() == typeOfT)); - })) - _items.TryRemove(kvp.Key, out _); + Items.RemoveAll(kvp => kvp.Value != null && kvp.Value.GetType() == typeOfT); } - public void ClearCacheObjectTypes(Func predicate) + /// + public virtual void ClearOfType(Func predicate) { var typeOfT = typeof(T); - var isInterface = typeOfT.IsInterface; - - foreach (var kvp in _items - .Where(x => - { - // entry.Value is Lazy and not null, its value may be null - // remove null values as well, does not hurt - // compare on exact type, don't use "is" - // get non-created as NonCreatedValue & exceptions as null - var value = DictionaryCacheProviderBase.GetSafeLazyValue(x.Value, true); - if (value == null) return true; - - // if T is an interface remove anything that implements that interface - // otherwise remove exact types (not inherited types) - return (isInterface ? (value is T) : (value.GetType() == typeOfT)) - // run predicate on the 'public key' part only, ie without prefix - && predicate(x.Key, (T)value); - })) - _items.TryRemove(kvp.Key, out _); + Items.RemoveAll(kvp => kvp.Value != null && kvp.Value.GetType() == typeOfT && predicate(kvp.Key, (T)kvp.Value)); } - public void ClearCacheByKeySearch(string keyStartsWith) + /// + public virtual void ClearByKey(string keyStartsWith) { - foreach (var ikvp in _items - .Where(kvp => kvp.Key.InvariantStartsWith(keyStartsWith))) - _items.TryRemove(ikvp.Key, out _); + Items.RemoveAll(kvp => kvp.Key.InvariantStartsWith(keyStartsWith)); } - public void ClearCacheByKeyExpression(string regexString) + /// + public virtual void ClearByRegex(string regex) { - foreach (var ikvp in _items - .Where(kvp => Regex.IsMatch(kvp.Key, regexString))) - _items.TryRemove(ikvp.Key, out _); - } - - public IEnumerable GetCacheItemsByKeySearch(string keyStartsWith) - { - return _items - .Where(kvp => kvp.Key.InvariantStartsWith(keyStartsWith)) - .Select(kvp => DictionaryCacheProviderBase.GetSafeLazyValue(kvp.Value)) - .Where(x => x != null); - } - - public IEnumerable GetCacheItemsByKeyExpression(string regexString) - { - return _items - .Where(kvp => Regex.IsMatch(kvp.Key, regexString)) - .Select(kvp => DictionaryCacheProviderBase.GetSafeLazyValue(kvp.Value)) - .Where(x => x != null); - } - - public object GetCacheItem(string cacheKey) - { - _items.TryGetValue(cacheKey, out var result); // else null - return result == null ? null : DictionaryCacheProviderBase.GetSafeLazyValue(result); // return exceptions as null - } - - public object GetCacheItem(string cacheKey, Func getCacheItem) - { - var result = _items.GetOrAdd(cacheKey, k => DictionaryCacheProviderBase.GetSafeLazy(getCacheItem)); - - var value = result.Value; // will not throw (safe lazy) - if (!(value is DictionaryCacheProviderBase.ExceptionHolder eh)) - return value; - - // and... it's in the cache anyway - so contrary to other cache providers, - // which would trick with GetSafeLazyValue, we need to remove by ourselves, - // in order NOT to cache exceptions - - _items.TryRemove(cacheKey, out result); - eh.Exception.Throw(); // throw once! - return null; // never reached + var compiled = new Regex(regex, RegexOptions.Compiled); + Items.RemoveAll(kvp => compiled.IsMatch(kvp.Key)); } } } diff --git a/src/Umbraco.Core/Cache/DictionaryCacheProviderBase.cs b/src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs similarity index 81% rename from src/Umbraco.Core/Cache/DictionaryCacheProviderBase.cs rename to src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs index f556d47a8e..371ab90a57 100644 --- a/src/Umbraco.Core/Cache/DictionaryCacheProviderBase.cs +++ b/src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs @@ -8,7 +8,10 @@ using Umbraco.Core.Composing; namespace Umbraco.Core.Cache { - internal abstract class DictionaryCacheProviderBase : ICacheProvider + /// + /// Provides a base class to fast, dictionary-based implementations. + /// + internal abstract class FastDictionaryAppCacheBase : IAppCache { // prefix cache keys so we know which one are ours protected const string CacheItemPrefix = "umbrtmche"; @@ -16,82 +19,75 @@ namespace Umbraco.Core.Cache // an object that represent a value that has not been created yet protected internal static readonly object ValueNotCreated = new object(); - // manupulate the underlying cache entries - // these *must* be called from within the appropriate locks - // and use the full prefixed cache keys - protected abstract IEnumerable GetDictionaryEntries(); - protected abstract void RemoveEntry(string key); - protected abstract object GetEntry(string key); + #region IAppCache - // read-write lock the underlying cache - //protected abstract IDisposable ReadLock { get; } - //protected abstract IDisposable WriteLock { get; } - - protected abstract void EnterReadLock(); - protected abstract void ExitReadLock(); - protected abstract void EnterWriteLock(); - protected abstract void ExitWriteLock(); - - protected string GetCacheKey(string key) + /// + public virtual object Get(string key) { - return string.Format("{0}-{1}", CacheItemPrefix, key); - } - - protected internal static Lazy GetSafeLazy(Func getCacheItem) - { - // try to generate the value and if it fails, - // wrap in an ExceptionHolder - would be much simpler - // to just use lazy.IsValueFaulted alas that field is - // internal - return new Lazy(() => - { - try - { - return getCacheItem(); - } - catch (Exception e) - { - return new ExceptionHolder(ExceptionDispatchInfo.Capture(e)); - } - }); - } - - protected internal static object GetSafeLazyValue(Lazy lazy, bool onlyIfValueIsCreated = false) - { - // if onlyIfValueIsCreated, do not trigger value creation - // must return something, though, to differenciate from null values - if (onlyIfValueIsCreated && lazy.IsValueCreated == false) return ValueNotCreated; - - // if execution has thrown then lazy.IsValueCreated is false - // and lazy.IsValueFaulted is true (but internal) so we use our - // own exception holder (see Lazy source code) to return null - if (lazy.Value is ExceptionHolder) return null; - - // we have a value and execution has not thrown so returning - // here does not throw - unless we're re-entering, take care of it + key = GetCacheKey(key); + Lazy result; try { - return lazy.Value; + EnterReadLock(); + result = GetEntry(key) as Lazy; // null if key not found } - catch (InvalidOperationException e) + finally { - throw new InvalidOperationException("The method that computes a value for the cache has tried to read that value from the cache.", e); + ExitReadLock(); } + return result == null ? null : GetSafeLazyValue(result); // return exceptions as null } - internal class ExceptionHolder + /// + public abstract object Get(string key, Func factory); + + /// + public virtual IEnumerable SearchByKey(string keyStartsWith) { - public ExceptionHolder(ExceptionDispatchInfo e) + var plen = CacheItemPrefix.Length + 1; + IEnumerable entries; + try { - Exception = e; + EnterReadLock(); + entries = GetDictionaryEntries() + .Where(x => ((string)x.Key).Substring(plen).InvariantStartsWith(keyStartsWith)) + .ToArray(); // evaluate while locked + } + finally + { + ExitReadLock(); } - public ExceptionDispatchInfo Exception { get; } + return entries + .Select(x => GetSafeLazyValue((Lazy)x.Value)) // return exceptions as null + .Where(x => x != null); // backward compat, don't store null values in the cache } - #region Clear + /// + public virtual IEnumerable SearchByRegex(string regex) + { + const string prefix = CacheItemPrefix + "-"; + var compiled = new Regex(regex, RegexOptions.Compiled); + var plen = prefix.Length; + IEnumerable entries; + try + { + EnterReadLock(); + entries = GetDictionaryEntries() + .Where(x => compiled.IsMatch(((string)x.Key).Substring(plen))) + .ToArray(); // evaluate while locked + } + finally + { + ExitReadLock(); + } + return entries + .Select(x => GetSafeLazyValue((Lazy)x.Value)) // return exceptions as null + .Where(x => x != null); // backward compat, don't store null values in the cache + } - public virtual void ClearAllCache() + /// + public virtual void Clear() { try { @@ -106,7 +102,8 @@ namespace Umbraco.Core.Cache } } - public virtual void ClearCacheItem(string key) + /// + public virtual void Clear(string key) { var cacheKey = GetCacheKey(key); try @@ -120,7 +117,8 @@ namespace Umbraco.Core.Cache } } - public virtual void ClearCacheObjectTypes(string typeName) + /// + public virtual void ClearOfType(string typeName) { var type = TypeFinder.GetTypeByName(typeName); if (type == null) return; @@ -149,7 +147,8 @@ namespace Umbraco.Core.Cache } } - public virtual void ClearCacheObjectTypes() + /// + public virtual void ClearOfType() { var typeOfT = typeof(T); var isInterface = typeOfT.IsInterface; @@ -178,7 +177,8 @@ namespace Umbraco.Core.Cache } } - public virtual void ClearCacheObjectTypes(Func predicate) + /// + public virtual void ClearOfType(Func predicate) { var typeOfT = typeof(T); var isInterface = typeOfT.IsInterface; @@ -210,7 +210,8 @@ namespace Umbraco.Core.Cache } } - public virtual void ClearCacheByKeySearch(string keyStartsWith) + /// + public virtual void ClearByKey(string keyStartsWith) { var plen = CacheItemPrefix.Length + 1; try @@ -227,14 +228,16 @@ namespace Umbraco.Core.Cache } } - public virtual void ClearCacheByKeyExpression(string regexString) + /// + public virtual void ClearByRegex(string regex) { + var compiled = new Regex(regex, RegexOptions.Compiled); var plen = CacheItemPrefix.Length + 1; try { EnterWriteLock(); foreach (var entry in GetDictionaryEntries() - .Where(x => Regex.IsMatch(((string)x.Key).Substring(plen), regexString)) + .Where(x => compiled.IsMatch(((string)x.Key).Substring(plen))) .ToArray()) RemoveEntry((string) entry.Key); } @@ -246,67 +249,80 @@ namespace Umbraco.Core.Cache #endregion - #region Get + #region Dictionary - public virtual IEnumerable GetCacheItemsByKeySearch(string keyStartsWith) + // manipulate the underlying cache entries + // these *must* be called from within the appropriate locks + // and use the full prefixed cache keys + protected abstract IEnumerable GetDictionaryEntries(); + protected abstract void RemoveEntry(string key); + protected abstract object GetEntry(string key); + + // read-write lock the underlying cache + //protected abstract IDisposable ReadLock { get; } + //protected abstract IDisposable WriteLock { get; } + + protected abstract void EnterReadLock(); + protected abstract void ExitReadLock(); + protected abstract void EnterWriteLock(); + protected abstract void ExitWriteLock(); + + protected string GetCacheKey(string key) { - var plen = CacheItemPrefix.Length + 1; - IEnumerable entries; - try - { - EnterReadLock(); - entries = GetDictionaryEntries() - .Where(x => ((string)x.Key).Substring(plen).InvariantStartsWith(keyStartsWith)) - .ToArray(); // evaluate while locked - } - finally - { - ExitReadLock(); - } - - return entries - .Select(x => GetSafeLazyValue((Lazy)x.Value)) // return exceptions as null - .Where(x => x != null); // backward compat, don't store null values in the cache + return $"{CacheItemPrefix}-{key}"; } - public virtual IEnumerable GetCacheItemsByKeyExpression(string regexString) + protected internal static Lazy GetSafeLazy(Func getCacheItem) { - const string prefix = CacheItemPrefix + "-"; - var plen = prefix.Length; - IEnumerable entries; - try + // try to generate the value and if it fails, + // wrap in an ExceptionHolder - would be much simpler + // to just use lazy.IsValueFaulted alas that field is + // internal + return new Lazy(() => { - EnterReadLock(); - entries = GetDictionaryEntries() - .Where(x => Regex.IsMatch(((string)x.Key).Substring(plen), regexString)) - .ToArray(); // evaluate while locked - } - finally - { - ExitReadLock(); - } - return entries - .Select(x => GetSafeLazyValue((Lazy)x.Value)) // return exceptions as null - .Where(x => x != null); // backward compat, don't store null values in the cache + try + { + return getCacheItem(); + } + catch (Exception e) + { + return new ExceptionHolder(ExceptionDispatchInfo.Capture(e)); + } + }); } - public virtual object GetCacheItem(string cacheKey) + protected internal static object GetSafeLazyValue(Lazy lazy, bool onlyIfValueIsCreated = false) { - cacheKey = GetCacheKey(cacheKey); - Lazy result; + // if onlyIfValueIsCreated, do not trigger value creation + // must return something, though, to differentiate from null values + if (onlyIfValueIsCreated && lazy.IsValueCreated == false) return ValueNotCreated; + + // if execution has thrown then lazy.IsValueCreated is false + // and lazy.IsValueFaulted is true (but internal) so we use our + // own exception holder (see Lazy source code) to return null + if (lazy.Value is ExceptionHolder) return null; + + // we have a value and execution has not thrown so returning + // here does not throw - unless we're re-entering, take care of it try { - EnterReadLock(); - result = GetEntry(cacheKey) as Lazy; // null if key not found + return lazy.Value; } - finally + catch (InvalidOperationException e) { - ExitReadLock(); + throw new InvalidOperationException("The method that computes a value for the cache has tried to read that value from the cache.", e); } - return result == null ? null : GetSafeLazyValue(result); // return exceptions as null } - public abstract object GetCacheItem(string cacheKey, Func getCacheItem); + internal class ExceptionHolder + { + public ExceptionHolder(ExceptionDispatchInfo e) + { + Exception = e; + } + + public ExceptionDispatchInfo Exception { get; } + } #endregion } diff --git a/src/Umbraco.Core/Cache/FastDictionaryCacheProvider.cs b/src/Umbraco.Core/Cache/FastDictionaryCacheProvider.cs new file mode 100644 index 0000000000..a3863dac52 --- /dev/null +++ b/src/Umbraco.Core/Cache/FastDictionaryCacheProvider.cs @@ -0,0 +1,162 @@ +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Linq; +using System.Text.RegularExpressions; +using Umbraco.Core.Composing; + +namespace Umbraco.Core.Cache +{ + /// + /// Implements a fast on top of a concurrent dictionary. + /// + internal class FastDictionaryCacheProvider : IAppCache + { + /// + /// Gets the internal items dictionary, for tests only! + /// + internal readonly ConcurrentDictionary> Items = new ConcurrentDictionary>(); + + /// + public object Get(string cacheKey) + { + Items.TryGetValue(cacheKey, out var result); // else null + return result == null ? null : FastDictionaryAppCacheBase.GetSafeLazyValue(result); // return exceptions as null + } + + /// + public object Get(string cacheKey, Func getCacheItem) + { + var result = Items.GetOrAdd(cacheKey, k => FastDictionaryAppCacheBase.GetSafeLazy(getCacheItem)); + + var value = result.Value; // will not throw (safe lazy) + if (!(value is FastDictionaryAppCacheBase.ExceptionHolder eh)) + return value; + + // and... it's in the cache anyway - so contrary to other cache providers, + // which would trick with GetSafeLazyValue, we need to remove by ourselves, + // in order NOT to cache exceptions + + Items.TryRemove(cacheKey, out result); + eh.Exception.Throw(); // throw once! + return null; // never reached + } + + /// + public IEnumerable SearchByKey(string keyStartsWith) + { + return Items + .Where(kvp => kvp.Key.InvariantStartsWith(keyStartsWith)) + .Select(kvp => FastDictionaryAppCacheBase.GetSafeLazyValue(kvp.Value)) + .Where(x => x != null); + } + + /// + public IEnumerable SearchByRegex(string regex) + { + var compiled = new Regex(regex, RegexOptions.Compiled); + return Items + .Where(kvp => compiled.IsMatch(kvp.Key)) + .Select(kvp => FastDictionaryAppCacheBase.GetSafeLazyValue(kvp.Value)) + .Where(x => x != null); + } + + /// + public void Clear() + { + Items.Clear(); + } + + /// + public void Clear(string key) + { + Items.TryRemove(key, out _); + } + + /// + public void ClearOfType(string typeName) + { + var type = TypeFinder.GetTypeByName(typeName); + if (type == null) return; + var isInterface = type.IsInterface; + + foreach (var kvp in Items + .Where(x => + { + // entry.Value is Lazy and not null, its value may be null + // remove null values as well, does not hurt + // get non-created as NonCreatedValue & exceptions as null + var value = FastDictionaryAppCacheBase.GetSafeLazyValue(x.Value, true); + + // if T is an interface remove anything that implements that interface + // otherwise remove exact types (not inherited types) + return value == null || (isInterface ? (type.IsInstanceOfType(value)) : (value.GetType() == type)); + })) + Items.TryRemove(kvp.Key, out _); + } + + /// + public void ClearOfType() + { + var typeOfT = typeof(T); + var isInterface = typeOfT.IsInterface; + + foreach (var kvp in Items + .Where(x => + { + // entry.Value is Lazy and not null, its value may be null + // remove null values as well, does not hurt + // compare on exact type, don't use "is" + // get non-created as NonCreatedValue & exceptions as null + var value = FastDictionaryAppCacheBase.GetSafeLazyValue(x.Value, true); + + // if T is an interface remove anything that implements that interface + // otherwise remove exact types (not inherited types) + return value == null || (isInterface ? (value is T) : (value.GetType() == typeOfT)); + })) + Items.TryRemove(kvp.Key, out _); + } + + /// + public void ClearOfType(Func predicate) + { + var typeOfT = typeof(T); + var isInterface = typeOfT.IsInterface; + + foreach (var kvp in Items + .Where(x => + { + // entry.Value is Lazy and not null, its value may be null + // remove null values as well, does not hurt + // compare on exact type, don't use "is" + // get non-created as NonCreatedValue & exceptions as null + var value = FastDictionaryAppCacheBase.GetSafeLazyValue(x.Value, true); + if (value == null) return true; + + // if T is an interface remove anything that implements that interface + // otherwise remove exact types (not inherited types) + return (isInterface ? (value is T) : (value.GetType() == typeOfT)) + // run predicate on the 'public key' part only, ie without prefix + && predicate(x.Key, (T)value); + })) + Items.TryRemove(kvp.Key, out _); + } + + /// + public void ClearByKey(string keyStartsWith) + { + foreach (var ikvp in Items + .Where(kvp => kvp.Key.InvariantStartsWith(keyStartsWith))) + Items.TryRemove(ikvp.Key, out _); + } + + /// + public void ClearByRegex(string regex) + { + var compiled = new Regex(regex, RegexOptions.Compiled); + foreach (var ikvp in Items + .Where(kvp => compiled.IsMatch(kvp.Key))) + Items.TryRemove(ikvp.Key, out _); + } + } +} diff --git a/src/Umbraco.Core/Cache/FullDataSetRepositoryCachePolicy.cs b/src/Umbraco.Core/Cache/FullDataSetRepositoryCachePolicy.cs index 319d84d41f..3bc4c9d059 100644 --- a/src/Umbraco.Core/Cache/FullDataSetRepositoryCachePolicy.cs +++ b/src/Umbraco.Core/Cache/FullDataSetRepositoryCachePolicy.cs @@ -24,7 +24,7 @@ namespace Umbraco.Core.Cache private readonly Func _entityGetId; private readonly bool _expires; - public FullDataSetRepositoryCachePolicy(IRuntimeCacheProvider cache, IScopeAccessor scopeAccessor, Func entityGetId, bool expires) + public FullDataSetRepositoryCachePolicy(IAppPolicedCache cache, IScopeAccessor scopeAccessor, Func entityGetId, bool expires) : base(cache, scopeAccessor) { _entityGetId = entityGetId; @@ -55,11 +55,11 @@ namespace Umbraco.Core.Cache if (_expires) { - Cache.InsertCacheItem(key, () => new DeepCloneableList(entities), TimeSpan.FromMinutes(5), true); + Cache.Insert(key, () => new DeepCloneableList(entities), TimeSpan.FromMinutes(5), true); } else { - Cache.InsertCacheItem(key, () => new DeepCloneableList(entities)); + Cache.Insert(key, () => new DeepCloneableList(entities)); } } @@ -171,7 +171,7 @@ namespace Umbraco.Core.Cache /// public override void ClearAll() { - Cache.ClearCacheItem(GetEntityTypeCacheKey()); + Cache.Clear(GetEntityTypeCacheKey()); } } } diff --git a/src/Umbraco.Core/Cache/HttpRequestCacheProvider.cs b/src/Umbraco.Core/Cache/HttpRequestAppCache.cs similarity index 53% rename from src/Umbraco.Core/Cache/HttpRequestCacheProvider.cs rename to src/Umbraco.Core/Cache/HttpRequestAppCache.cs index 52c230ff71..dcb2621d75 100644 --- a/src/Umbraco.Core/Cache/HttpRequestCacheProvider.cs +++ b/src/Umbraco.Core/Cache/HttpRequestAppCache.cs @@ -7,54 +7,83 @@ using System.Web; namespace Umbraco.Core.Cache { /// - /// A cache provider that caches items in the HttpContext.Items + /// Implements a fast on top of HttpContext.Items. /// /// - /// If the Items collection is null, then this provider has no effect + /// If no current HttpContext items can be found (no current HttpContext, + /// or no Items...) then this cache acts as a pass-through and does not cache + /// anything. /// - internal class HttpRequestCacheProvider : DictionaryCacheProviderBase + internal class HttpRequestAppCache : FastDictionaryAppCacheBase { - // context provider - // the idea is that there is only one, application-wide HttpRequestCacheProvider instance, - // that is initialized with a method that returns the "current" context. - // NOTE - // but then it is initialized with () => new HttpContextWrapper(HttpContent.Current) - // which is higly inefficient because it creates a new wrapper each time we refer to _context() - // so replace it with _context1 and _context2 below + a way to get context.Items. - //private readonly Func _context; - - // NOTE - // and then in almost 100% cases _context2 will be () => HttpContext.Current - // so why not bring that logic in here and fallback on to HttpContext.Current when - // _context1 is null? - //private readonly HttpContextBase _context1; - //private readonly Func _context2; private readonly HttpContextBase _context; - private IDictionary ContextItems - { - //get { return _context1 != null ? _context1.Items : _context2().Items; } - get { return _context != null ? _context.Items : HttpContext.Current.Items; } - } - - private bool HasContextItems - { - get { return (_context != null && _context.Items != null) || HttpContext.Current != null; } - } - - // for unit tests - public HttpRequestCacheProvider(HttpContextBase context) + /// + /// Initializes a new instance of the class with a context, for unit tests! + /// + public HttpRequestAppCache(HttpContextBase context) { _context = context; } - // main constructor - // will use HttpContext.Current - public HttpRequestCacheProvider(/*Func context*/) + /// + /// Initializes a new instance of the class. + /// + /// + /// Will use HttpContext.Current. + /// fixme - should use IHttpContextAccessor + /// + public HttpRequestAppCache() + { } + + private IDictionary ContextItems => _context?.Items ?? HttpContext.Current?.Items; + + private bool HasContextItems => _context?.Items != null || HttpContext.Current != null; + + /// + public override object Get(string key, Func factory) { - //_context2 = context; + //no place to cache so just return the callback result + if (HasContextItems == false) return factory(); + + key = GetCacheKey(key); + + Lazy result; + + try + { + EnterWriteLock(); + result = ContextItems[key] as Lazy; // null if key not found + + // cannot create value within the lock, so if result.IsValueCreated is false, just + // do nothing here - means that if creation throws, a race condition could cause + // more than one thread to reach the return statement below and throw - accepted. + + if (result == null || GetSafeLazyValue(result, true) == null) // get non-created as NonCreatedValue & exceptions as null + { + result = GetSafeLazy(factory); + ContextItems[key] = result; + } + } + finally + { + ExitWriteLock(); + } + + // using GetSafeLazy and GetSafeLazyValue ensures that we don't cache + // exceptions (but try again and again) and silently eat them - however at + // some point we have to report them - so need to re-throw here + + // this does not throw anymore + //return result.Value; + + var value = result.Value; // will not throw (safe lazy) + if (value is ExceptionHolder eh) eh.Exception.Throw(); // throw once! + return value; } + #region Entries + protected override IEnumerable GetDictionaryEntries() { const string prefix = CacheItemPrefix + "-"; @@ -62,7 +91,7 @@ namespace Umbraco.Core.Cache if (HasContextItems == false) return Enumerable.Empty(); return ContextItems.Cast() - .Where(x => x.Key is string && ((string)x.Key).StartsWith(prefix)); + .Where(x => x.Key is string s && s.StartsWith(prefix)); } protected override void RemoveEntry(string key) @@ -77,6 +106,8 @@ namespace Umbraco.Core.Cache return HasContextItems ? ContextItems[key] : null; } + #endregion + #region Lock private bool _entered; @@ -103,59 +134,5 @@ namespace Umbraco.Core.Cache } #endregion - - #region Get - - public override object GetCacheItem(string cacheKey, Func getCacheItem) - { - //no place to cache so just return the callback result - if (HasContextItems == false) return getCacheItem(); - - cacheKey = GetCacheKey(cacheKey); - - Lazy result; - - try - { - EnterWriteLock(); - result = ContextItems[cacheKey] as Lazy; // null if key not found - - // cannot create value within the lock, so if result.IsValueCreated is false, just - // do nothing here - means that if creation throws, a race condition could cause - // more than one thread to reach the return statement below and throw - accepted. - - if (result == null || GetSafeLazyValue(result, true) == null) // get non-created as NonCreatedValue & exceptions as null - { - result = GetSafeLazy(getCacheItem); - ContextItems[cacheKey] = result; - } - } - finally - { - ExitWriteLock(); - } - - // using GetSafeLazy and GetSafeLazyValue ensures that we don't cache - // exceptions (but try again and again) and silently eat them - however at - // some point we have to report them - so need to re-throw here - - // this does not throw anymore - //return result.Value; - - var value = result.Value; // will not throw (safe lazy) - if (value is ExceptionHolder eh) eh.Exception.Throw(); // throw once! - return value; - } - - #endregion - - #region Insert - #endregion - - private class NoopLocker : DisposableObjectSlim - { - protected override void DisposeResources() - { } - } } } diff --git a/src/Umbraco.Core/Cache/IAppCache.cs b/src/Umbraco.Core/Cache/IAppCache.cs new file mode 100644 index 0000000000..674781f6d6 --- /dev/null +++ b/src/Umbraco.Core/Cache/IAppCache.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; + +namespace Umbraco.Core.Cache +{ + /// + /// Defines an application cache. + /// + public interface IAppCache + { + /// + /// Gets an item identified by its key. + /// + /// The key of the item. + /// The item, or null if the item was not found. + object Get(string key); + + /// + /// Gets or creates an item identified by its key. + /// + /// The key of the item. + /// A factory function that can create the item. + /// The item. + object Get(string key, Func factory); + + /// + /// Gets items with a key starting with the specified value. + /// + /// The StartsWith value to use in the search. + /// Items matching the search. + IEnumerable SearchByKey(string keyStartsWith); + + /// + /// Gets items with a key matching a regular expression. + /// + /// The regular expression. + /// Items matching the search. + IEnumerable SearchByRegex(string regex); + + /// + /// Removes all items from the cache. + /// + void Clear(); + + /// + /// Removes an item identified by its key from the cache. + /// + /// The key of the item. + void Clear(string key); + + /// + /// Removes items of a specified type from the cache. + /// + /// The name of the type to remove. + /// + /// If the type is an interface, then all items of a type implementing that interface are + /// removed. Otherwise, only items of that exact type are removed (items of type inheriting from + /// the specified type are not removed). + /// Performs a case-sensitive search. + /// + void ClearOfType(string typeName); + + /// + /// Removes items of a specified type from the cache. + /// + /// The type of the items to remove. + /// If the type is an interface, then all items of a type implementing that interface are + /// removed. Otherwise, only items of that exact type are removed (items of type inheriting from + /// the specified type are not removed). + void ClearOfType(); + + /// + /// Removes items of a specified type from the cache. + /// + /// The type of the items to remove. + /// The predicate to satisfy. + /// If the type is an interface, then all items of a type implementing that interface are + /// removed. Otherwise, only items of that exact type are removed (items of type inheriting from + /// the specified type are not removed). + void ClearOfType(Func predicate); + + /// + /// Clears items with a key starting with the specified value. + /// + /// The StartsWith value to use in the search. + void ClearByKey(string keyStartsWith); + + /// + /// Clears items with a key matching a regular expression. + /// + /// The regular expression. + void ClearByRegex(string regex); + } +} diff --git a/src/Umbraco.Core/Cache/IAppPolicedCache.cs b/src/Umbraco.Core/Cache/IAppPolicedCache.cs new file mode 100644 index 0000000000..0aee7584df --- /dev/null +++ b/src/Umbraco.Core/Cache/IAppPolicedCache.cs @@ -0,0 +1,54 @@ +using System; +using System.Web.Caching; + +// fixme should this be/support non-web? + +namespace Umbraco.Core.Cache +{ + /// + /// Defines an application cache that support cache policies. + /// + /// A cache policy can be used to cache with timeouts, + /// or depending on files, and with a remove callback, etc. + public interface IAppPolicedCache : IAppCache + { + /// + /// Gets an item identified by its key. + /// + /// The key of the item. + /// A factory function that can create the item. + /// An optional cache timeout. + /// An optional value indicating whether the cache timeout is sliding (default is false). + /// An optional cache priority (default is Normal). + /// An optional callback to handle removals. + /// Files the cache entry depends on. + /// The item. + object Get( + string key, + Func factory, + TimeSpan? timeout, + bool isSliding = false, + CacheItemPriority priority = CacheItemPriority.Normal, + CacheItemRemovedCallback removedCallback = null, + string[] dependentFiles = null); + + /// + /// Inserts an item. + /// + /// The key of the item. + /// A factory function that can create the item. + /// An optional cache timeout. + /// An optional value indicating whether the cache timeout is sliding (default is false). + /// An optional cache priority (default is Normal). + /// An optional callback to handle removals. + /// Files the cache entry depends on. + void Insert( + string key, + Func factory, + TimeSpan? timeout = null, + bool isSliding = false, + CacheItemPriority priority = CacheItemPriority.Normal, + CacheItemRemovedCallback removedCallback = null, + string[] dependentFiles = null); + } +} diff --git a/src/Umbraco.Core/Cache/ICacheProvider.cs b/src/Umbraco.Core/Cache/ICacheProvider.cs deleted file mode 100644 index 177f7570c2..0000000000 --- a/src/Umbraco.Core/Cache/ICacheProvider.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace Umbraco.Core.Cache -{ - /// - /// An interface for implementing a basic cache provider - /// - public interface ICacheProvider - { - /// - /// Removes all items from the cache. - /// - void ClearAllCache(); - - /// - /// Removes an item from the cache, identified by its key. - /// - /// The key of the item. - void ClearCacheItem(string key); - - /// - /// Removes items from the cache, of a specified type. - /// - /// The name of the type to remove. - /// - /// If the type is an interface, then all items of a type implementing that interface are - /// removed. Otherwise, only items of that exact type are removed (items of type inheriting from - /// the specified type are not removed). - /// Performs a case-sensitive search. - /// - void ClearCacheObjectTypes(string typeName); - - /// - /// Removes items from the cache, of a specified type. - /// - /// The type of the items to remove. - /// If the type is an interface, then all items of a type implementing that interface are - /// removed. Otherwise, only items of that exact type are removed (items of type inheriting from - /// the specified type are not removed). - void ClearCacheObjectTypes(); - - /// - /// Removes items from the cache, of a specified type, satisfying a predicate. - /// - /// The type of the items to remove. - /// The predicate to satisfy. - /// If the type is an interface, then all items of a type implementing that interface are - /// removed. Otherwise, only items of that exact type are removed (items of type inheriting from - /// the specified type are not removed). - void ClearCacheObjectTypes(Func predicate); - - void ClearCacheByKeySearch(string keyStartsWith); - void ClearCacheByKeyExpression(string regexString); - - IEnumerable GetCacheItemsByKeySearch(string keyStartsWith); - IEnumerable GetCacheItemsByKeyExpression(string regexString); - - /// - /// Returns an item with a given key - /// - /// - /// - object GetCacheItem(string cacheKey); - - object GetCacheItem(string cacheKey, Func getCacheItem); - } -} diff --git a/src/Umbraco.Core/Cache/IRuntimeCacheProvider.cs b/src/Umbraco.Core/Cache/IRuntimeCacheProvider.cs deleted file mode 100644 index 9f3d687e1d..0000000000 --- a/src/Umbraco.Core/Cache/IRuntimeCacheProvider.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Runtime.Caching; -using System.Text; -using System.Web.Caching; -using CacheItemPriority = System.Web.Caching.CacheItemPriority; - -namespace Umbraco.Core.Cache -{ - /// - /// An abstract class for implementing a runtime cache provider - /// - /// - /// - public interface IRuntimeCacheProvider : ICacheProvider - { - object GetCacheItem( - string cacheKey, - Func getCacheItem, - TimeSpan? timeout, - bool isSliding = false, - CacheItemPriority priority = CacheItemPriority.Normal, - CacheItemRemovedCallback removedCallback = null, - string[] dependentFiles = null); - - void InsertCacheItem( - string cacheKey, - Func getCacheItem, - TimeSpan? timeout = null, - bool isSliding = false, - CacheItemPriority priority = CacheItemPriority.Normal, - CacheItemRemovedCallback removedCallback = null, - string[] dependentFiles = null); - - } -} diff --git a/src/Umbraco.Core/Cache/IsolatedCaches.cs b/src/Umbraco.Core/Cache/IsolatedCaches.cs new file mode 100644 index 0000000000..bc624be20d --- /dev/null +++ b/src/Umbraco.Core/Cache/IsolatedCaches.cs @@ -0,0 +1,41 @@ +using System; + +namespace Umbraco.Core.Cache +{ + /// + /// Represents a dictionary of for types. + /// + /// + /// Isolated caches are used by e.g. repositories, to ensure that each cached entity + /// type has its own cache, so that lookups are fast and the repository does not need to + /// search through all keys on a global scale. + /// + public class IsolatedCaches : AppPolicedCacheDictionary + { + /// + /// Initializes a new instance of the class. + /// + /// + public IsolatedCaches(Func cacheFactory) + : base(cacheFactory) + { } + + /// + /// Gets a cache. + /// + public IAppPolicedCache GetOrCreate() + => GetOrCreate(typeof(T)); + + /// + /// Tries to get a cache. + /// + public Attempt Get() + => Get(typeof(T)); + + /// + /// Clears a cache. + /// + public void ClearCache() + => ClearCache(typeof(T)); + } +} diff --git a/src/Umbraco.Core/Cache/IsolatedRuntimeCache.cs b/src/Umbraco.Core/Cache/IsolatedRuntimeCache.cs deleted file mode 100644 index ee73a17532..0000000000 --- a/src/Umbraco.Core/Cache/IsolatedRuntimeCache.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Concurrent; - -namespace Umbraco.Core.Cache -{ - /// - /// Used to get/create/manipulate isolated runtime cache - /// - /// - /// This is useful for repository level caches to ensure that cache lookups by key are fast so - /// that the repository doesn't need to search through all keys on a global scale. - /// - public class IsolatedRuntimeCache - { - internal Func CacheFactory { get; set; } - - /// - /// Constructor that allows specifying a factory for the type of runtime isolated cache to create - /// - /// - public IsolatedRuntimeCache(Func cacheFactory) - { - CacheFactory = cacheFactory; - } - - private readonly ConcurrentDictionary _isolatedCache = new ConcurrentDictionary(); - - /// - /// Returns an isolated runtime cache for a given type - /// - /// - /// - public IRuntimeCacheProvider GetOrCreateCache() - { - return _isolatedCache.GetOrAdd(typeof(T), type => CacheFactory(type)); - } - - /// - /// Returns an isolated runtime cache for a given type - /// - /// - public IRuntimeCacheProvider GetOrCreateCache(Type type) - { - return _isolatedCache.GetOrAdd(type, t => CacheFactory(t)); - } - - /// - /// Tries to get a cache by the type specified - /// - /// - /// - public Attempt GetCache() - { - IRuntimeCacheProvider cache; - if (_isolatedCache.TryGetValue(typeof(T), out cache)) - { - return Attempt.Succeed(cache); - } - return Attempt.Fail(); - } - - /// - /// Clears all values inside this isolated runtime cache - /// - /// - /// - public void ClearCache() - { - IRuntimeCacheProvider cache; - if (_isolatedCache.TryGetValue(typeof(T), out cache)) - { - cache.ClearAllCache(); - } - } - - /// - /// Clears all of the isolated caches - /// - public void ClearAllCaches() - { - foreach (var key in _isolatedCache.Keys) - { - IRuntimeCacheProvider cache; - if (_isolatedCache.TryRemove(key, out cache)) - { - cache.ClearAllCache(); - } - } - } - } -} diff --git a/src/Umbraco.Core/Cache/NoAppCache.cs b/src/Umbraco.Core/Cache/NoAppCache.cs new file mode 100644 index 0000000000..8a7e15cb29 --- /dev/null +++ b/src/Umbraco.Core/Cache/NoAppCache.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web.Caching; + +namespace Umbraco.Core.Cache +{ + /// + /// Implements and do not cache. + /// + public class NoAppCache : IAppPolicedCache + { + private NoAppCache() { } + + /// + /// Gets the singleton instance. + /// + public static NoAppCache Instance { get; } = new NoAppCache(); + + /// + public virtual object Get(string cacheKey) + { + return null; + } + + /// + public virtual object Get(string cacheKey, Func factory) + { + return factory(); + } + + /// + public virtual IEnumerable SearchByKey(string keyStartsWith) + { + return Enumerable.Empty(); + } + + /// + public IEnumerable SearchByRegex(string regex) + { + return Enumerable.Empty(); + } + + /// + public object Get(string key, Func factory, TimeSpan? timeout, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null) + { + return factory(); + } + + /// + public void Insert(string key, Func factory, TimeSpan? timeout = null, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null) + { } + + /// + public virtual void Clear() + { } + + /// + public virtual void Clear(string key) + { } + + /// + public virtual void ClearOfType(string typeName) + { } + + /// + public virtual void ClearOfType() + { } + + /// + public virtual void ClearOfType(Func predicate) + { } + + /// + public virtual void ClearByKey(string keyStartsWith) + { } + + /// + public virtual void ClearByRegex(string regex) + { } + } +} diff --git a/src/Umbraco.Core/Cache/NoCacheRepositoryCachePolicy.cs b/src/Umbraco.Core/Cache/NoCacheRepositoryCachePolicy.cs index a3e7335d7f..acc67be679 100644 --- a/src/Umbraco.Core/Cache/NoCacheRepositoryCachePolicy.cs +++ b/src/Umbraco.Core/Cache/NoCacheRepositoryCachePolicy.cs @@ -13,7 +13,7 @@ namespace Umbraco.Core.Cache public static NoCacheRepositoryCachePolicy Instance { get; } = new NoCacheRepositoryCachePolicy(); - public IRepositoryCachePolicy Scoped(IRuntimeCacheProvider runtimeCache, IScope scope) + public IRepositoryCachePolicy Scoped(IAppPolicedCache runtimeCache, IScope scope) { throw new NotImplementedException(); } diff --git a/src/Umbraco.Core/Cache/NullCacheProvider.cs b/src/Umbraco.Core/Cache/NullCacheProvider.cs deleted file mode 100644 index 78286f75e2..0000000000 --- a/src/Umbraco.Core/Cache/NullCacheProvider.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web.Caching; - -namespace Umbraco.Core.Cache -{ - /// - /// Represents a cache provider that does not cache anything. - /// - public class NullCacheProvider : IRuntimeCacheProvider - { - private NullCacheProvider() { } - - public static NullCacheProvider Instance { get; } = new NullCacheProvider(); - - public virtual void ClearAllCache() - { } - - public virtual void ClearCacheItem(string key) - { } - - public virtual void ClearCacheObjectTypes(string typeName) - { } - - public virtual void ClearCacheObjectTypes() - { } - - public virtual void ClearCacheObjectTypes(Func predicate) - { } - - public virtual void ClearCacheByKeySearch(string keyStartsWith) - { } - - public virtual void ClearCacheByKeyExpression(string regexString) - { } - - public virtual IEnumerable GetCacheItemsByKeySearch(string keyStartsWith) - { - return Enumerable.Empty(); - } - - public IEnumerable GetCacheItemsByKeyExpression(string regexString) - { - return Enumerable.Empty(); - } - - public virtual object GetCacheItem(string cacheKey) - { - return default(object); - } - - public virtual object GetCacheItem(string cacheKey, Func getCacheItem) - { - return getCacheItem(); - } - - public object GetCacheItem(string cacheKey, Func getCacheItem, TimeSpan? timeout, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null) - { - return getCacheItem(); - } - - public void InsertCacheItem(string cacheKey, Func getCacheItem, TimeSpan? timeout = null, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null) - { } - } -} diff --git a/src/Umbraco.Core/Cache/ObjectCacheRuntimeCacheProvider.cs b/src/Umbraco.Core/Cache/ObjectCacheAppCache.cs similarity index 73% rename from src/Umbraco.Core/Cache/ObjectCacheRuntimeCacheProvider.cs rename to src/Umbraco.Core/Cache/ObjectCacheAppCache.cs index 8a844bbc9b..9c5917a53c 100644 --- a/src/Umbraco.Core/Cache/ObjectCacheRuntimeCacheProvider.cs +++ b/src/Umbraco.Core/Cache/ObjectCacheAppCache.cs @@ -11,31 +11,142 @@ using CacheItemPriority = System.Web.Caching.CacheItemPriority; namespace Umbraco.Core.Cache { /// - /// Represents a cache provider that caches item in a . - /// A cache provider that wraps the logic of a System.Runtime.Caching.ObjectCache + /// Implements on top of a . /// - /// The is created with name "in-memory". That name is - /// used to retrieve configuration options. It does not identify the memory cache, i.e. - /// each instance of this class has its own, independent, memory cache. - public class ObjectCacheRuntimeCacheProvider : IRuntimeCacheProvider + public class ObjectCacheAppCache : IAppPolicedCache { private readonly ReaderWriterLockSlim _locker = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion); - internal ObjectCache MemoryCache; /// - /// Used for debugging + /// Initializes a new instance of the . /// - internal Guid InstanceId { get; private set; } - - public ObjectCacheRuntimeCacheProvider() + public ObjectCacheAppCache() { + // the MemoryCache is created with name "in-memory". That name is + // used to retrieve configuration options. It does not identify the memory cache, i.e. + // each instance of this class has its own, independent, memory cache. MemoryCache = new MemoryCache("in-memory"); - InstanceId = Guid.NewGuid(); } - #region Clear + /// + /// Gets the internal memory cache, for tests only! + /// + internal readonly ObjectCache MemoryCache; - public virtual void ClearAllCache() + /// + public object Get(string key) + { + Lazy result; + try + { + _locker.EnterReadLock(); + result = MemoryCache.Get(key) as Lazy; // null if key not found + } + finally + { + if (_locker.IsReadLockHeld) + _locker.ExitReadLock(); + } + return result == null ? null : FastDictionaryAppCacheBase.GetSafeLazyValue(result); // return exceptions as null + } + + /// + public object Get(string key, Func factory) + { + return Get(key, factory, null); + } + + /// + public IEnumerable SearchByKey(string keyStartsWith) + { + KeyValuePair[] entries; + try + { + _locker.EnterReadLock(); + entries = MemoryCache + .Where(x => x.Key.InvariantStartsWith(keyStartsWith)) + .ToArray(); // evaluate while locked + } + finally + { + if (_locker.IsReadLockHeld) + _locker.ExitReadLock(); + } + return entries + .Select(x => FastDictionaryAppCacheBase.GetSafeLazyValue((Lazy)x.Value)) // return exceptions as null + .Where(x => x != null) // backward compat, don't store null values in the cache + .ToList(); + } + + /// + public IEnumerable SearchByRegex(string regex) + { + var compiled = new Regex(regex, RegexOptions.Compiled); + + KeyValuePair[] entries; + try + { + _locker.EnterReadLock(); + entries = MemoryCache + .Where(x => compiled.IsMatch(x.Key)) + .ToArray(); // evaluate while locked + } + finally + { + if (_locker.IsReadLockHeld) + _locker.ExitReadLock(); + } + return entries + .Select(x => FastDictionaryAppCacheBase.GetSafeLazyValue((Lazy)x.Value)) // return exceptions as null + .Where(x => x != null) // backward compat, don't store null values in the cache + .ToList(); + } + + /// + public object Get(string key, Func factory, TimeSpan? timeout, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null) + { + // see notes in HttpRuntimeCacheProvider + + Lazy result; + + using (var lck = new UpgradeableReadLock(_locker)) + { + result = MemoryCache.Get(key) as Lazy; + if (result == null || FastDictionaryAppCacheBase.GetSafeLazyValue(result, true) == null) // get non-created as NonCreatedValue & exceptions as null + { + result = FastDictionaryAppCacheBase.GetSafeLazy(factory); + var policy = GetPolicy(timeout, isSliding, removedCallback, dependentFiles); + + lck.UpgradeToWriteLock(); + //NOTE: This does an add or update + MemoryCache.Set(key, result, policy); + } + } + + //return result.Value; + + var value = result.Value; // will not throw (safe lazy) + if (value is FastDictionaryAppCacheBase.ExceptionHolder eh) eh.Exception.Throw(); // throw once! + return value; + } + + /// + public void Insert(string key, Func factory, TimeSpan? timeout = null, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null) + { + // NOTE - here also we must insert a Lazy but we can evaluate it right now + // and make sure we don't store a null value. + + var result = FastDictionaryAppCacheBase.GetSafeLazy(factory); + var value = result.Value; // force evaluation now + if (value == null) return; // do not store null values (backward compat) + + var policy = GetPolicy(timeout, isSliding, removedCallback, dependentFiles); + //NOTE: This does an add or update + MemoryCache.Set(key, result, policy); + } + + /// + public virtual void Clear() { try { @@ -50,7 +161,8 @@ namespace Umbraco.Core.Cache } } - public virtual void ClearCacheItem(string key) + /// + public virtual void Clear(string key) { try { @@ -65,7 +177,8 @@ namespace Umbraco.Core.Cache } } - public virtual void ClearCacheObjectTypes(string typeName) + /// + public virtual void ClearOfType(string typeName) { var type = TypeFinder.GetTypeByName(typeName); if (type == null) return; @@ -79,7 +192,7 @@ namespace Umbraco.Core.Cache // x.Value is Lazy and not null, its value may be null // remove null values as well, does not hurt // get non-created as NonCreatedValue & exceptions as null - var value = DictionaryCacheProviderBase.GetSafeLazyValue((Lazy)x.Value, true); + var value = FastDictionaryAppCacheBase.GetSafeLazyValue((Lazy)x.Value, true); // if T is an interface remove anything that implements that interface // otherwise remove exact types (not inherited types) @@ -96,12 +209,13 @@ namespace Umbraco.Core.Cache } } - public virtual void ClearCacheObjectTypes() + /// + public virtual void ClearOfType() { try { _locker.EnterWriteLock(); - var typeOfT = typeof (T); + var typeOfT = typeof(T); var isInterface = typeOfT.IsInterface; foreach (var key in MemoryCache .Where(x => @@ -109,7 +223,7 @@ namespace Umbraco.Core.Cache // x.Value is Lazy and not null, its value may be null // remove null values as well, does not hurt // get non-created as NonCreatedValue & exceptions as null - var value = DictionaryCacheProviderBase.GetSafeLazyValue((Lazy)x.Value, true); + var value = FastDictionaryAppCacheBase.GetSafeLazyValue((Lazy)x.Value, true); // if T is an interface remove anything that implements that interface // otherwise remove exact types (not inherited types) @@ -127,7 +241,8 @@ namespace Umbraco.Core.Cache } } - public virtual void ClearCacheObjectTypes(Func predicate) + /// + public virtual void ClearOfType(Func predicate) { try { @@ -140,7 +255,7 @@ namespace Umbraco.Core.Cache // x.Value is Lazy and not null, its value may be null // remove null values as well, does not hurt // get non-created as NonCreatedValue & exceptions as null - var value = DictionaryCacheProviderBase.GetSafeLazyValue((Lazy)x.Value, true); + var value = FastDictionaryAppCacheBase.GetSafeLazyValue((Lazy)x.Value, true); if (value == null) return true; // if T is an interface remove anything that implements that interface @@ -159,7 +274,8 @@ namespace Umbraco.Core.Cache } } - public virtual void ClearCacheByKeySearch(string keyStartsWith) + /// + public virtual void ClearByKey(string keyStartsWith) { try { @@ -177,13 +293,16 @@ namespace Umbraco.Core.Cache } } - public virtual void ClearCacheByKeyExpression(string regexString) + /// + public virtual void ClearByRegex(string regex) { + var compiled = new Regex(regex, RegexOptions.Compiled); + try { _locker.EnterWriteLock(); foreach (var key in MemoryCache - .Where(x => Regex.IsMatch(x.Key, regexString)) + .Where(x => compiled.IsMatch(x.Key)) .Select(x => x.Key) .ToArray()) // ToArray required to remove MemoryCache.Remove(key); @@ -195,120 +314,6 @@ namespace Umbraco.Core.Cache } } - #endregion - - #region Get - - public IEnumerable GetCacheItemsByKeySearch(string keyStartsWith) - { - KeyValuePair[] entries; - try - { - _locker.EnterReadLock(); - entries = MemoryCache - .Where(x => x.Key.InvariantStartsWith(keyStartsWith)) - .ToArray(); // evaluate while locked - } - finally - { - if (_locker.IsReadLockHeld) - _locker.ExitReadLock(); - } - return entries - .Select(x => DictionaryCacheProviderBase.GetSafeLazyValue((Lazy)x.Value)) // return exceptions as null - .Where(x => x != null) // backward compat, don't store null values in the cache - .ToList(); - } - - public IEnumerable GetCacheItemsByKeyExpression(string regexString) - { - KeyValuePair[] entries; - try - { - _locker.EnterReadLock(); - entries = MemoryCache - .Where(x => Regex.IsMatch(x.Key, regexString)) - .ToArray(); // evaluate while locked - } - finally - { - if (_locker.IsReadLockHeld) - _locker.ExitReadLock(); - } - return entries - .Select(x => DictionaryCacheProviderBase.GetSafeLazyValue((Lazy)x.Value)) // return exceptions as null - .Where(x => x != null) // backward compat, don't store null values in the cache - .ToList(); - } - - public object GetCacheItem(string cacheKey) - { - Lazy result; - try - { - _locker.EnterReadLock(); - result = MemoryCache.Get(cacheKey) as Lazy; // null if key not found - } - finally - { - if (_locker.IsReadLockHeld) - _locker.ExitReadLock(); - } - return result == null ? null : DictionaryCacheProviderBase.GetSafeLazyValue(result); // return exceptions as null - } - - public object GetCacheItem(string cacheKey, Func getCacheItem) - { - return GetCacheItem(cacheKey, getCacheItem, null); - } - - public object GetCacheItem(string cacheKey, Func getCacheItem, TimeSpan? timeout, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null) - { - // see notes in HttpRuntimeCacheProvider - - Lazy result; - - using (var lck = new UpgradeableReadLock(_locker)) - { - result = MemoryCache.Get(cacheKey) as Lazy; - if (result == null || DictionaryCacheProviderBase.GetSafeLazyValue(result, true) == null) // get non-created as NonCreatedValue & exceptions as null - { - result = DictionaryCacheProviderBase.GetSafeLazy(getCacheItem); - var policy = GetPolicy(timeout, isSliding, removedCallback, dependentFiles); - - lck.UpgradeToWriteLock(); - //NOTE: This does an add or update - MemoryCache.Set(cacheKey, result, policy); - } - } - - //return result.Value; - - var value = result.Value; // will not throw (safe lazy) - if (value is DictionaryCacheProviderBase.ExceptionHolder eh) eh.Exception.Throw(); // throw once! - return value; - } - - #endregion - - #region Insert - - public void InsertCacheItem(string cacheKey, Func getCacheItem, TimeSpan? timeout = null, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null) - { - // NOTE - here also we must insert a Lazy but we can evaluate it right now - // and make sure we don't store a null value. - - var result = DictionaryCacheProviderBase.GetSafeLazy(getCacheItem); - var value = result.Value; // force evaluation now - if (value == null) return; // do not store null values (backward compat) - - var policy = GetPolicy(timeout, isSliding, removedCallback, dependentFiles); - //NOTE: This does an add or update - MemoryCache.Set(cacheKey, result, policy); - } - - #endregion - private static CacheItemPolicy GetPolicy(TimeSpan? timeout = null, bool isSliding = false, CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null) { var absolute = isSliding ? ObjectCache.InfiniteAbsoluteExpiration : (timeout == null ? ObjectCache.InfiniteAbsoluteExpiration : DateTime.Now.Add(timeout.Value)); diff --git a/src/Umbraco.Core/Cache/RepositoryCachePolicyBase.cs b/src/Umbraco.Core/Cache/RepositoryCachePolicyBase.cs index 2d21d410a7..f8bba4b033 100644 --- a/src/Umbraco.Core/Cache/RepositoryCachePolicyBase.cs +++ b/src/Umbraco.Core/Cache/RepositoryCachePolicyBase.cs @@ -13,16 +13,16 @@ namespace Umbraco.Core.Cache internal abstract class RepositoryCachePolicyBase : IRepositoryCachePolicy where TEntity : class, IEntity { - private readonly IRuntimeCacheProvider _globalCache; + private readonly IAppPolicedCache _globalCache; private readonly IScopeAccessor _scopeAccessor; - protected RepositoryCachePolicyBase(IRuntimeCacheProvider globalCache, IScopeAccessor scopeAccessor) + protected RepositoryCachePolicyBase(IAppPolicedCache globalCache, IScopeAccessor scopeAccessor) { _globalCache = globalCache ?? throw new ArgumentNullException(nameof(globalCache)); _scopeAccessor = scopeAccessor ?? throw new ArgumentNullException(nameof(scopeAccessor)); } - protected IRuntimeCacheProvider Cache + protected IAppPolicedCache Cache { get { @@ -32,9 +32,9 @@ namespace Umbraco.Core.Cache case RepositoryCacheMode.Default: return _globalCache; case RepositoryCacheMode.Scoped: - return ambientScope.IsolatedRuntimeCache.GetOrCreateCache(); + return ambientScope.IsolatedCaches.GetOrCreate(); case RepositoryCacheMode.None: - return NullCacheProvider.Instance; + return NoAppCache.Instance; default: throw new NotSupportedException($"Repository cache mode {ambientScope.RepositoryCacheMode} is not supported."); } diff --git a/src/Umbraco.Core/Cache/SingleItemsOnlyRepositoryCachePolicy.cs b/src/Umbraco.Core/Cache/SingleItemsOnlyRepositoryCachePolicy.cs index d89524d4f9..714798a47c 100644 --- a/src/Umbraco.Core/Cache/SingleItemsOnlyRepositoryCachePolicy.cs +++ b/src/Umbraco.Core/Cache/SingleItemsOnlyRepositoryCachePolicy.cs @@ -16,7 +16,7 @@ namespace Umbraco.Core.Cache internal class SingleItemsOnlyRepositoryCachePolicy : DefaultRepositoryCachePolicy where TEntity : class, IEntity { - public SingleItemsOnlyRepositoryCachePolicy(IRuntimeCacheProvider cache, IScopeAccessor scopeAccessor, RepositoryCachePolicyOptions options) + public SingleItemsOnlyRepositoryCachePolicy(IAppPolicedCache cache, IScopeAccessor scopeAccessor, RepositoryCachePolicyOptions options) : base(cache, scopeAccessor, options) { } diff --git a/src/Umbraco.Core/Cache/StaticCacheProvider.cs b/src/Umbraco.Core/Cache/StaticCacheProvider.cs deleted file mode 100644 index 1604add4d7..0000000000 --- a/src/Umbraco.Core/Cache/StaticCacheProvider.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; -using System.Text.RegularExpressions; - -namespace Umbraco.Core.Cache -{ - /// - /// Represents a cache provider that statically caches item in a concurrent dictionary. - /// - public class StaticCacheProvider : ICacheProvider - { - internal readonly ConcurrentDictionary StaticCache = new ConcurrentDictionary(); - - public virtual void ClearAllCache() - { - StaticCache.Clear(); - } - - public virtual void ClearCacheItem(string key) - { - object val; - StaticCache.TryRemove(key, out val); - } - - public virtual void ClearCacheObjectTypes(string typeName) - { - StaticCache.RemoveAll(kvp => kvp.Value != null && kvp.Value.GetType().ToString().InvariantEquals(typeName)); - } - - public virtual void ClearCacheObjectTypes() - { - var typeOfT = typeof(T); - StaticCache.RemoveAll(kvp => kvp.Value != null && kvp.Value.GetType() == typeOfT); - } - - public virtual void ClearCacheObjectTypes(Func predicate) - { - var typeOfT = typeof(T); - StaticCache.RemoveAll(kvp => kvp.Value != null && kvp.Value.GetType() == typeOfT && predicate(kvp.Key, (T)kvp.Value)); - } - - public virtual void ClearCacheByKeySearch(string keyStartsWith) - { - StaticCache.RemoveAll(kvp => kvp.Key.InvariantStartsWith(keyStartsWith)); - } - - public virtual void ClearCacheByKeyExpression(string regexString) - { - StaticCache.RemoveAll(kvp => Regex.IsMatch(kvp.Key, regexString)); - } - - public virtual IEnumerable GetCacheItemsByKeySearch(string keyStartsWith) - { - return (from KeyValuePair c in StaticCache - where c.Key.InvariantStartsWith(keyStartsWith) - select c.Value).ToList(); - } - - public IEnumerable GetCacheItemsByKeyExpression(string regexString) - { - return (from KeyValuePair c in StaticCache - where Regex.IsMatch(c.Key, regexString) - select c.Value).ToList(); - } - - public virtual object GetCacheItem(string cacheKey) - { - var result = StaticCache[cacheKey]; - return result; - } - - public virtual object GetCacheItem(string cacheKey, Func getCacheItem) - { - return StaticCache.GetOrAdd(cacheKey, key => getCacheItem()); - } - } -} diff --git a/src/Umbraco.Core/Cache/HttpRuntimeCacheProvider.cs b/src/Umbraco.Core/Cache/WebCachingAppCache.cs similarity index 68% rename from src/Umbraco.Core/Cache/HttpRuntimeCacheProvider.cs rename to src/Umbraco.Core/Cache/WebCachingAppCache.cs index 835c5d1ee6..b762fcda07 100644 --- a/src/Umbraco.Core/Cache/HttpRuntimeCacheProvider.cs +++ b/src/Umbraco.Core/Cache/WebCachingAppCache.cs @@ -4,14 +4,15 @@ using System.Collections.Generic; using System.Linq; using System.Threading; using System.Web.Caching; -using CacheItemPriority = System.Web.Caching.CacheItemPriority; namespace Umbraco.Core.Cache { /// + /// Implements on top of a . /// A CacheProvider that wraps the logic of the HttpRuntime.Cache /// - internal class HttpRuntimeCacheProvider : DictionaryCacheProviderBase, IRuntimeCacheProvider + /// The underlying cache is expected to be HttpRuntime.Cache. + internal class WebCachingAppCache : FastDictionaryAppCacheBase, IAppPolicedCache { // locker object that supports upgradeable read locking // does not need to support recursion if we implement the cache correctly and ensure @@ -21,16 +22,43 @@ namespace Umbraco.Core.Cache private readonly System.Web.Caching.Cache _cache; /// - /// Used for debugging + /// Initializes a new instance of the class. /// - internal Guid InstanceId { get; private set; } - - public HttpRuntimeCacheProvider(System.Web.Caching.Cache cache) + public WebCachingAppCache(System.Web.Caching.Cache cache) { _cache = cache; - InstanceId = Guid.NewGuid(); } + /// + public override object Get(string key, Func factory) + { + return Get(key, factory, null, dependentFiles: null); + } + + /// + public object Get(string key, Func factory, TimeSpan? timeout, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null) + { + CacheDependency dependency = null; + if (dependentFiles != null && dependentFiles.Any()) + { + dependency = new CacheDependency(dependentFiles); + } + return Get(key, factory, timeout, isSliding, priority, removedCallback, dependency); + } + + /// + public void Insert(string key, Func factory, TimeSpan? timeout = null, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null) + { + CacheDependency dependency = null; + if (dependentFiles != null && dependentFiles.Any()) + { + dependency = new CacheDependency(dependentFiles); + } + Insert(key, factory, timeout, isSliding, priority, removedCallback, dependency); + } + + #region Dictionary + protected override IEnumerable GetDictionaryEntries() { const string prefix = CacheItemPrefix + "-"; @@ -48,6 +76,8 @@ namespace Umbraco.Core.Cache return _cache.Get(key); } + #endregion + #region Lock protected override void EnterReadLock() @@ -74,33 +104,9 @@ namespace Umbraco.Core.Cache #endregion - #region Get - - /// - /// Gets (and adds if necessary) an item from the cache with all of the default parameters - /// - /// - /// - /// - public override object GetCacheItem(string cacheKey, Func getCacheItem) + private object Get(string key, Func factory, TimeSpan? timeout, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, CacheDependency dependency = null) { - return GetCacheItem(cacheKey, getCacheItem, null, dependentFiles: null); - } - - /// - /// This overload is here for legacy purposes - /// - /// - /// - /// - /// - /// - /// - /// - /// - internal object GetCacheItem(string cacheKey, Func getCacheItem, TimeSpan? timeout, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, CacheDependency dependency = null) - { - cacheKey = GetCacheKey(cacheKey); + key = GetCacheKey(key); // NOTE - because we don't know what getCacheItem does, how long it will take and whether it will hang, // getCacheItem should run OUTSIDE of the global application lock else we run into lock contention and @@ -133,7 +139,7 @@ namespace Umbraco.Core.Cache try { _locker.EnterReadLock(); - result = _cache.Get(cacheKey) as Lazy; // null if key not found + result = _cache.Get(key) as Lazy; // null if key not found } finally { @@ -145,7 +151,7 @@ namespace Umbraco.Core.Cache using (var lck = new UpgradeableReadLock(_locker)) { - result = _cache.Get(cacheKey) as Lazy; // null if key not found + result = _cache.Get(key) as Lazy; // null if key not found // cannot create value within the lock, so if result.IsValueCreated is false, just // do nothing here - means that if creation throws, a race condition could cause @@ -153,13 +159,13 @@ namespace Umbraco.Core.Cache if (result == null || GetSafeLazyValue(result, true) == null) // get non-created as NonCreatedValue & exceptions as null { - result = GetSafeLazy(getCacheItem); + result = GetSafeLazy(factory); var absolute = isSliding ? System.Web.Caching.Cache.NoAbsoluteExpiration : (timeout == null ? System.Web.Caching.Cache.NoAbsoluteExpiration : DateTime.Now.Add(timeout.Value)); var sliding = isSliding == false ? System.Web.Caching.Cache.NoSlidingExpiration : (timeout ?? System.Web.Caching.Cache.NoSlidingExpiration); lck.UpgradeToWriteLock(); //NOTE: 'Insert' on System.Web.Caching.Cache actually does an add or update! - _cache.Insert(cacheKey, result, dependency, absolute, sliding, priority, removedCallback); + _cache.Insert(key, result, dependency, absolute, sliding, priority, removedCallback); } } @@ -175,31 +181,7 @@ namespace Umbraco.Core.Cache return value; } - public object GetCacheItem(string cacheKey, Func getCacheItem, TimeSpan? timeout, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null) - { - CacheDependency dependency = null; - if (dependentFiles != null && dependentFiles.Any()) - { - dependency = new CacheDependency(dependentFiles); - } - return GetCacheItem(cacheKey, getCacheItem, timeout, isSliding, priority, removedCallback, dependency); - } - - #endregion - - #region Insert - - /// - /// This overload is here for legacy purposes - /// - /// - /// - /// - /// - /// - /// - /// - internal void InsertCacheItem(string cacheKey, Func getCacheItem, TimeSpan? timeout = null, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, CacheDependency dependency = null) + private void Insert(string cacheKey, Func getCacheItem, TimeSpan? timeout = null, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, CacheDependency dependency = null) { // NOTE - here also we must insert a Lazy but we can evaluate it right now // and make sure we don't store a null value. @@ -225,17 +207,5 @@ namespace Umbraco.Core.Cache _locker.ExitWriteLock(); } } - - public void InsertCacheItem(string cacheKey, Func getCacheItem, TimeSpan? timeout = null, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null) - { - CacheDependency dependency = null; - if (dependentFiles != null && dependentFiles.Any()) - { - dependency = new CacheDependency(dependentFiles); - } - InsertCacheItem(cacheKey, getCacheItem, timeout, isSliding, priority, removedCallback, dependency); - } - - #endregion } } diff --git a/src/Umbraco.Core/Composing/TypeLoader.cs b/src/Umbraco.Core/Composing/TypeLoader.cs index acb12ab575..fe277676d7 100644 --- a/src/Umbraco.Core/Composing/TypeLoader.cs +++ b/src/Umbraco.Core/Composing/TypeLoader.cs @@ -29,7 +29,7 @@ namespace Umbraco.Core.Composing { private const string CacheKey = "umbraco-types.list"; - private readonly IRuntimeCacheProvider _runtimeCache; + private readonly IAppPolicedCache _runtimeCache; private readonly IProfilingLogger _logger; private readonly Dictionary _types = new Dictionary(); @@ -51,7 +51,7 @@ namespace Umbraco.Core.Composing /// The application runtime cache. /// Files storage mode. /// A profiling logger. - public TypeLoader(IRuntimeCacheProvider runtimeCache, LocalTempStorage localTempStorage, IProfilingLogger logger) + public TypeLoader(IAppPolicedCache runtimeCache, LocalTempStorage localTempStorage, IProfilingLogger logger) : this(runtimeCache, localTempStorage, logger, true) { } @@ -62,7 +62,7 @@ namespace Umbraco.Core.Composing /// Files storage mode. /// A profiling logger. /// Whether to detect changes using hashes. - internal TypeLoader(IRuntimeCacheProvider runtimeCache, LocalTempStorage localTempStorage, IProfilingLogger logger, bool detectChanges) + internal TypeLoader(IAppPolicedCache runtimeCache, LocalTempStorage localTempStorage, IProfilingLogger logger, bool detectChanges) { _runtimeCache = runtimeCache ?? throw new ArgumentNullException(nameof(runtimeCache)); _localTempStorage = localTempStorage == LocalTempStorage.Unknown ? LocalTempStorage.Default : localTempStorage; @@ -478,7 +478,7 @@ namespace Umbraco.Core.Composing var typesHashFilePath = GetTypesHashFilePath(); DeleteFile(typesHashFilePath, FileDeleteTimeout); - _runtimeCache.ClearCacheItem(CacheKey); + _runtimeCache.Clear(CacheKey); } private Stream GetFileStream(string path, FileMode fileMode, FileAccess fileAccess, FileShare fileShare, int timeoutMilliseconds) diff --git a/src/Umbraco.Core/ConfigsExtensions.cs b/src/Umbraco.Core/ConfigsExtensions.cs index 1414dbc852..9b2abda53c 100644 --- a/src/Umbraco.Core/ConfigsExtensions.cs +++ b/src/Umbraco.Core/ConfigsExtensions.cs @@ -46,7 +46,7 @@ namespace Umbraco.Core configs.Add(() => new CoreDebug()); // GridConfig depends on runtime caches, manifest parsers... and cannot be available during composition - configs.Add(factory => new GridConfig(factory.GetInstance(), factory.GetInstance(), configDir, factory.GetInstance().Debug)); + configs.Add(factory => new GridConfig(factory.GetInstance(), factory.GetInstance(), configDir, factory.GetInstance().Debug)); } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/Grid/GridConfig.cs b/src/Umbraco.Core/Configuration/Grid/GridConfig.cs index 6c16a5e7ef..979eccb839 100644 --- a/src/Umbraco.Core/Configuration/Grid/GridConfig.cs +++ b/src/Umbraco.Core/Configuration/Grid/GridConfig.cs @@ -6,7 +6,7 @@ namespace Umbraco.Core.Configuration.Grid { class GridConfig : IGridConfig { - public GridConfig(ILogger logger, IRuntimeCacheProvider runtimeCache, DirectoryInfo configFolder, bool isDebug) + public GridConfig(ILogger logger, IAppPolicedCache runtimeCache, DirectoryInfo configFolder, bool isDebug) { EditorsConfig = new GridEditorsConfig(logger, runtimeCache, configFolder, isDebug); } diff --git a/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs b/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs index 94249aa135..121b74194c 100644 --- a/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs +++ b/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs @@ -13,11 +13,11 @@ namespace Umbraco.Core.Configuration.Grid internal class GridEditorsConfig : IGridEditorsConfig { private readonly ILogger _logger; - private readonly IRuntimeCacheProvider _runtimeCache; + private readonly IAppPolicedCache _runtimeCache; private readonly DirectoryInfo _configFolder; private readonly bool _isDebug; - public GridEditorsConfig(ILogger logger, IRuntimeCacheProvider runtimeCache, DirectoryInfo configFolder, bool isDebug) + public GridEditorsConfig(ILogger logger, IAppPolicedCache runtimeCache, DirectoryInfo configFolder, bool isDebug) { _logger = logger; _runtimeCache = runtimeCache; diff --git a/src/Umbraco.Core/Manifest/ManifestParser.cs b/src/Umbraco.Core/Manifest/ManifestParser.cs index 59753df66a..fd344674af 100644 --- a/src/Umbraco.Core/Manifest/ManifestParser.cs +++ b/src/Umbraco.Core/Manifest/ManifestParser.cs @@ -20,7 +20,7 @@ namespace Umbraco.Core.Manifest { private static readonly string Utf8Preamble = Encoding.UTF8.GetString(Encoding.UTF8.GetPreamble()); - private readonly IRuntimeCacheProvider _cache; + private readonly IAppPolicedCache _cache; private readonly ILogger _logger; private readonly ManifestValueValidatorCollection _validators; @@ -29,14 +29,14 @@ namespace Umbraco.Core.Manifest /// /// Initializes a new instance of the class. /// - public ManifestParser(IRuntimeCacheProvider cache, ManifestValueValidatorCollection validators, ILogger logger) + public ManifestParser(IAppPolicedCache cache, ManifestValueValidatorCollection validators, ILogger logger) : this(cache, validators, "~/App_Plugins", logger) { } /// /// Initializes a new instance of the class. /// - private ManifestParser(IRuntimeCacheProvider cache, ManifestValueValidatorCollection validators, string path, ILogger logger) + private ManifestParser(IAppPolicedCache cache, ManifestValueValidatorCollection validators, string path, ILogger logger) { _cache = cache ?? throw new ArgumentNullException(nameof(cache)); _validators = validators ?? throw new ArgumentNullException(nameof(validators)); diff --git a/src/Umbraco.Core/Models/UserExtensions.cs b/src/Umbraco.Core/Models/UserExtensions.cs index ba4d8cf590..7db3e3adbe 100644 --- a/src/Umbraco.Core/Models/UserExtensions.cs +++ b/src/Umbraco.Core/Models/UserExtensions.cs @@ -54,7 +54,7 @@ namespace Umbraco.Core.Models /// /// A list of 5 different sized avatar URLs /// - internal static string[] GetUserAvatarUrls(this IUser user, ICacheProvider staticCache) + internal static string[] GetUserAvatarUrls(this IUser user, IAppCache staticCache) { // If FIPS is required, never check the Gravatar service as it only supports MD5 hashing. // Unfortunately, if the FIPS setting is enabled on Windows, using MD5 will throw an exception diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ConsentRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ConsentRepository.cs index bd55654809..8df9bf686d 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ConsentRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ConsentRepository.cs @@ -86,7 +86,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement Database.Update(dto); entity.ResetDirtyProperties(); - IsolatedCache.ClearCacheItem(RepositoryCacheKeys.GetKey(entity.Id)); + IsolatedCache.Clear(RepositoryCacheKeys.GetKey(entity.Id)); } /// diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DictionaryRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DictionaryRepository.cs index 3517fb3545..9b191d830c 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/DictionaryRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DictionaryRepository.cs @@ -174,8 +174,8 @@ namespace Umbraco.Core.Persistence.Repositories.Implement entity.ResetDirtyProperties(); //Clear the cache entries that exist by uniqueid/item key - IsolatedCache.ClearCacheItem(RepositoryCacheKeys.GetKey(entity.ItemKey)); - IsolatedCache.ClearCacheItem(RepositoryCacheKeys.GetKey(entity.Key)); + IsolatedCache.Clear(RepositoryCacheKeys.GetKey(entity.ItemKey)); + IsolatedCache.Clear(RepositoryCacheKeys.GetKey(entity.Key)); } protected override void PersistDeletedItem(IDictionaryItem entity) @@ -186,8 +186,8 @@ namespace Umbraco.Core.Persistence.Repositories.Implement Database.Delete("WHERE id = @Id", new { Id = entity.Key }); //Clear the cache entries that exist by uniqueid/item key - IsolatedCache.ClearCacheItem(RepositoryCacheKeys.GetKey(entity.ItemKey)); - IsolatedCache.ClearCacheItem(RepositoryCacheKeys.GetKey(entity.Key)); + IsolatedCache.Clear(RepositoryCacheKeys.GetKey(entity.ItemKey)); + IsolatedCache.Clear(RepositoryCacheKeys.GetKey(entity.Key)); entity.DeleteDate = DateTime.Now; } @@ -203,8 +203,8 @@ namespace Umbraco.Core.Persistence.Repositories.Implement Database.Delete("WHERE id = @Id", new { Id = dto.UniqueId }); //Clear the cache entries that exist by uniqueid/item key - IsolatedCache.ClearCacheItem(RepositoryCacheKeys.GetKey(dto.Key)); - IsolatedCache.ClearCacheItem(RepositoryCacheKeys.GetKey(dto.UniqueId)); + IsolatedCache.Clear(RepositoryCacheKeys.GetKey(dto.Key)); + IsolatedCache.Clear(RepositoryCacheKeys.GetKey(dto.UniqueId)); } } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs index 2626f60123..f106949c77 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs @@ -30,7 +30,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement protected AppCaches GlobalCache { get; } - protected IRuntimeCacheProvider GlobalIsolatedCache => GlobalCache.IsolatedRuntimeCache.GetOrCreateCache(); + protected IAppPolicedCache GlobalIsolatedCache => GlobalCache.IsolatedCaches.GetOrCreate(); protected IScopeAccessor ScopeAccessor { get; } @@ -60,18 +60,18 @@ namespace Umbraco.Core.Persistence.Repositories.Implement /// Gets the isolated cache. /// /// Depends on the ambient scope cache mode. - protected IRuntimeCacheProvider IsolatedCache + protected IAppPolicedCache IsolatedCache { get { switch (AmbientScope.RepositoryCacheMode) { case RepositoryCacheMode.Default: - return GlobalCache.IsolatedRuntimeCache.GetOrCreateCache(); + return GlobalCache.IsolatedCaches.GetOrCreate(); case RepositoryCacheMode.Scoped: - return AmbientScope.IsolatedRuntimeCache.GetOrCreateCache(); + return AmbientScope.IsolatedCaches.GetOrCreate(); case RepositoryCacheMode.None: - return NullCacheProvider.Instance; + return NoAppCache.Instance; default: throw new Exception("oops: cache mode."); } @@ -157,7 +157,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement /// /// Adds or Updates an entity of type TEntity /// - /// This method is backed by an cache + /// This method is backed by an cache /// public void Save(TEntity entity) { diff --git a/src/Umbraco.Core/Runtime/CoreRuntime.cs b/src/Umbraco.Core/Runtime/CoreRuntime.cs index f29109b9d2..e37b5e254e 100644 --- a/src/Umbraco.Core/Runtime/CoreRuntime.cs +++ b/src/Umbraco.Core/Runtime/CoreRuntime.cs @@ -332,10 +332,10 @@ namespace Umbraco.Core.Runtime // is overriden by the web runtime return new AppCaches( - new DeepCloneRuntimeCacheProvider(new ObjectCacheRuntimeCacheProvider()), - new StaticCacheProvider(), - NullCacheProvider.Instance, - new IsolatedRuntimeCache(type => new DeepCloneRuntimeCacheProvider(new ObjectCacheRuntimeCacheProvider()))); + new DeepCloneAppCache(new ObjectCacheAppCache()), + new DictionaryCacheProvider(), + NoAppCache.Instance, + new IsolatedCaches(type => new DeepCloneAppCache(new ObjectCacheAppCache()))); } // by default, returns null, meaning that Umbraco should auto-detect the application root path. diff --git a/src/Umbraco.Core/Scoping/IScope.cs b/src/Umbraco.Core/Scoping/IScope.cs index eefc964965..de4eef0a08 100644 --- a/src/Umbraco.Core/Scoping/IScope.cs +++ b/src/Umbraco.Core/Scoping/IScope.cs @@ -38,7 +38,7 @@ namespace Umbraco.Core.Scoping /// /// Gets the scope isolated cache. /// - IsolatedRuntimeCache IsolatedRuntimeCache { get; } + IsolatedCaches IsolatedCaches { get; } /// /// Completes the scope. diff --git a/src/Umbraco.Core/Scoping/Scope.cs b/src/Umbraco.Core/Scoping/Scope.cs index b8d4d7b430..aa08016d3c 100644 --- a/src/Umbraco.Core/Scoping/Scope.cs +++ b/src/Umbraco.Core/Scoping/Scope.cs @@ -34,7 +34,7 @@ namespace Umbraco.Core.Scoping private bool _disposed; private bool? _completed; - private IsolatedRuntimeCache _isolatedRuntimeCache; + private IsolatedCaches _isolatedCaches; private IUmbracoDatabase _database; private EventMessages _messages; private ICompletable _fscope; @@ -177,14 +177,14 @@ namespace Umbraco.Core.Scoping } /// - public IsolatedRuntimeCache IsolatedRuntimeCache + public IsolatedCaches IsolatedCaches { get { - if (ParentScope != null) return ParentScope.IsolatedRuntimeCache; + if (ParentScope != null) return ParentScope.IsolatedCaches; - return _isolatedRuntimeCache ?? (_isolatedRuntimeCache - = new IsolatedRuntimeCache(type => new DeepCloneRuntimeCacheProvider(new ObjectCacheRuntimeCacheProvider()))); + return _isolatedCaches ?? (_isolatedCaches + = new IsolatedCaches(type => new DeepCloneAppCache(new ObjectCacheAppCache()))); } } diff --git a/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs b/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs index 3b3f90a412..5577508adb 100644 --- a/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs +++ b/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs @@ -17,7 +17,7 @@ namespace Umbraco.Core.Services.Implement public class LocalizedTextServiceFileSources { private readonly ILogger _logger; - private readonly IRuntimeCacheProvider _cache; + private readonly IAppPolicedCache _cache; private readonly IEnumerable _supplementFileSources; private readonly DirectoryInfo _fileSourceFolder; @@ -37,7 +37,7 @@ namespace Umbraco.Core.Services.Implement /// public LocalizedTextServiceFileSources( ILogger logger, - IRuntimeCacheProvider cache, + IAppPolicedCache cache, DirectoryInfo fileSourceFolder, IEnumerable supplementFileSources) { @@ -140,7 +140,7 @@ namespace Umbraco.Core.Services.Implement /// /// /// - public LocalizedTextServiceFileSources(ILogger logger, IRuntimeCacheProvider cache, DirectoryInfo fileSourceFolder) + public LocalizedTextServiceFileSources(ILogger logger, IAppPolicedCache cache, DirectoryInfo fileSourceFolder) : this(logger, cache, fileSourceFolder, Enumerable.Empty()) { diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 79162c06ad..41f2bc4951 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -109,6 +109,7 @@ + @@ -118,29 +119,29 @@ - + - - + + - - - + + + - - + + - - + + - + diff --git a/src/Umbraco.Tests/Cache/CacheProviderTests.cs b/src/Umbraco.Tests/Cache/CacheProviderTests.cs index d060df3c56..f2288cbaf2 100644 --- a/src/Umbraco.Tests/Cache/CacheProviderTests.cs +++ b/src/Umbraco.Tests/Cache/CacheProviderTests.cs @@ -9,7 +9,7 @@ namespace Umbraco.Tests.Cache { public abstract class CacheProviderTests { - internal abstract ICacheProvider Provider { get; } + internal abstract IAppCache Provider { get; } protected abstract int GetTotalItemCount { get; } [SetUp] @@ -21,7 +21,7 @@ namespace Umbraco.Tests.Cache [TearDown] public virtual void TearDown() { - Provider.ClearAllCache(); + Provider.Clear(); } [Test] @@ -32,11 +32,11 @@ namespace Umbraco.Tests.Cache Assert.Ignore("Do not run for StaticCacheProvider."); Exception exception = null; - var result = Provider.GetCacheItem("blah", () => + var result = Provider.Get("blah", () => { try { - var result2 = Provider.GetCacheItem("blah"); + var result2 = Provider.Get("blah"); } catch (Exception e) { @@ -56,7 +56,7 @@ namespace Umbraco.Tests.Cache object result; try { - result = Provider.GetCacheItem("Blah", () => + result = Provider.Get("Blah", () => { counter++; throw new Exception("Do not cache this"); @@ -66,7 +66,7 @@ namespace Umbraco.Tests.Cache try { - result = Provider.GetCacheItem("Blah", () => + result = Provider.Get("Blah", () => { counter++; throw new Exception("Do not cache this"); @@ -85,13 +85,13 @@ namespace Umbraco.Tests.Cache object result; - result = Provider.GetCacheItem("Blah", () => + result = Provider.Get("Blah", () => { counter++; return ""; }); - result = Provider.GetCacheItem("Blah", () => + result = Provider.Get("Blah", () => { counter++; return ""; @@ -108,14 +108,14 @@ namespace Umbraco.Tests.Cache var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2"); var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3"); var cacheContent4 = new LiteralControl(); - Provider.GetCacheItem("Test1", () => cacheContent1); - Provider.GetCacheItem("Tester2", () => cacheContent2); - Provider.GetCacheItem("Tes3", () => cacheContent3); - Provider.GetCacheItem("different4", () => cacheContent4); + Provider.Get("Test1", () => cacheContent1); + Provider.Get("Tester2", () => cacheContent2); + Provider.Get("Tes3", () => cacheContent3); + Provider.Get("different4", () => cacheContent4); Assert.AreEqual(4, GetTotalItemCount); - var result = Provider.GetCacheItemsByKeySearch("Tes"); + var result = Provider.SearchByKey("Tes"); Assert.AreEqual(3, result.Count()); } @@ -127,14 +127,14 @@ namespace Umbraco.Tests.Cache var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2"); var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3"); var cacheContent4 = new LiteralControl(); - Provider.GetCacheItem("TTes1t", () => cacheContent1); - Provider.GetCacheItem("Tester2", () => cacheContent2); - Provider.GetCacheItem("Tes3", () => cacheContent3); - Provider.GetCacheItem("different4", () => cacheContent4); + Provider.Get("TTes1t", () => cacheContent1); + Provider.Get("Tester2", () => cacheContent2); + Provider.Get("Tes3", () => cacheContent3); + Provider.Get("different4", () => cacheContent4); Assert.AreEqual(4, GetTotalItemCount); - Provider.ClearCacheByKeyExpression("^\\w+es\\d.*"); + Provider.ClearByRegex("^\\w+es\\d.*"); Assert.AreEqual(2, GetTotalItemCount); } @@ -146,14 +146,14 @@ namespace Umbraco.Tests.Cache var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2"); var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3"); var cacheContent4 = new LiteralControl(); - Provider.GetCacheItem("Test1", () => cacheContent1); - Provider.GetCacheItem("Tester2", () => cacheContent2); - Provider.GetCacheItem("Tes3", () => cacheContent3); - Provider.GetCacheItem("different4", () => cacheContent4); + Provider.Get("Test1", () => cacheContent1); + Provider.Get("Tester2", () => cacheContent2); + Provider.Get("Tes3", () => cacheContent3); + Provider.Get("different4", () => cacheContent4); Assert.AreEqual(4, GetTotalItemCount); - Provider.ClearCacheByKeySearch("Test"); + Provider.ClearByKey("Test"); Assert.AreEqual(2, GetTotalItemCount); } @@ -165,15 +165,15 @@ namespace Umbraco.Tests.Cache var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2"); var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3"); var cacheContent4 = new LiteralControl(); - Provider.GetCacheItem("Test1", () => cacheContent1); - Provider.GetCacheItem("Test2", () => cacheContent2); - Provider.GetCacheItem("Test3", () => cacheContent3); - Provider.GetCacheItem("Test4", () => cacheContent4); + Provider.Get("Test1", () => cacheContent1); + Provider.Get("Test2", () => cacheContent2); + Provider.Get("Test3", () => cacheContent3); + Provider.Get("Test4", () => cacheContent4); Assert.AreEqual(4, GetTotalItemCount); - Provider.ClearCacheItem("Test1"); - Provider.ClearCacheItem("Test2"); + Provider.Clear("Test1"); + Provider.Clear("Test2"); Assert.AreEqual(2, GetTotalItemCount); } @@ -185,14 +185,14 @@ namespace Umbraco.Tests.Cache var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2"); var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3"); var cacheContent4 = new LiteralControl(); - Provider.GetCacheItem("Test1", () => cacheContent1); - Provider.GetCacheItem("Test2", () => cacheContent2); - Provider.GetCacheItem("Test3", () => cacheContent3); - Provider.GetCacheItem("Test4", () => cacheContent4); + Provider.Get("Test1", () => cacheContent1); + Provider.Get("Test2", () => cacheContent2); + Provider.Get("Test3", () => cacheContent3); + Provider.Get("Test4", () => cacheContent4); Assert.AreEqual(4, GetTotalItemCount); - Provider.ClearAllCache(); + Provider.Clear(); Assert.AreEqual(0, GetTotalItemCount); } @@ -201,7 +201,7 @@ namespace Umbraco.Tests.Cache public void Can_Add_When_Not_Available() { var cacheContent1 = new MacroCacheContent(new LiteralControl(), "Test1"); - Provider.GetCacheItem("Test1", () => cacheContent1); + Provider.Get("Test1", () => cacheContent1); Assert.AreEqual(1, GetTotalItemCount); } @@ -209,8 +209,8 @@ namespace Umbraco.Tests.Cache public void Can_Get_When_Available() { var cacheContent1 = new MacroCacheContent(new LiteralControl(), "Test1"); - var result = Provider.GetCacheItem("Test1", () => cacheContent1); - var result2 = Provider.GetCacheItem("Test1", () => cacheContent1); + var result = Provider.Get("Test1", () => cacheContent1); + var result2 = Provider.Get("Test1", () => cacheContent1); Assert.AreEqual(1, GetTotalItemCount); Assert.AreEqual(result, result2); } @@ -222,15 +222,15 @@ namespace Umbraco.Tests.Cache var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2"); var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3"); var cacheContent4 = new LiteralControl(); - Provider.GetCacheItem("Test1", () => cacheContent1); - Provider.GetCacheItem("Test2", () => cacheContent2); - Provider.GetCacheItem("Test3", () => cacheContent3); - Provider.GetCacheItem("Test4", () => cacheContent4); + Provider.Get("Test1", () => cacheContent1); + Provider.Get("Test2", () => cacheContent2); + Provider.Get("Test3", () => cacheContent3); + Provider.Get("Test4", () => cacheContent4); Assert.AreEqual(4, GetTotalItemCount); //Provider.ClearCacheObjectTypes("umbraco.MacroCacheContent"); - Provider.ClearCacheObjectTypes(typeof(MacroCacheContent).ToString()); + Provider.ClearOfType(typeof(MacroCacheContent).ToString()); Assert.AreEqual(1, GetTotalItemCount); } @@ -242,14 +242,14 @@ namespace Umbraco.Tests.Cache var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2"); var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3"); var cacheContent4 = new LiteralControl(); - Provider.GetCacheItem("Test1", () => cacheContent1); - Provider.GetCacheItem("Test2", () => cacheContent2); - Provider.GetCacheItem("Test3", () => cacheContent3); - Provider.GetCacheItem("Test4", () => cacheContent4); + Provider.Get("Test1", () => cacheContent1); + Provider.Get("Test2", () => cacheContent2); + Provider.Get("Test3", () => cacheContent3); + Provider.Get("Test4", () => cacheContent4); Assert.AreEqual(4, GetTotalItemCount); - Provider.ClearCacheObjectTypes(); + Provider.ClearOfType(); Assert.AreEqual(1, GetTotalItemCount); } diff --git a/src/Umbraco.Tests/Cache/DeepCloneRuntimeCacheProviderTests.cs b/src/Umbraco.Tests/Cache/DeepCloneRuntimeCacheProviderTests.cs index 169100153e..5158989a8b 100644 --- a/src/Umbraco.Tests/Cache/DeepCloneRuntimeCacheProviderTests.cs +++ b/src/Umbraco.Tests/Cache/DeepCloneRuntimeCacheProviderTests.cs @@ -16,7 +16,7 @@ namespace Umbraco.Tests.Cache [TestFixture] public class DeepCloneRuntimeCacheProviderTests : RuntimeCacheProviderTests { - private DeepCloneRuntimeCacheProvider _provider; + private DeepCloneAppCache _provider; protected override int GetTotalItemCount { @@ -26,15 +26,15 @@ namespace Umbraco.Tests.Cache public override void Setup() { base.Setup(); - _provider = new DeepCloneRuntimeCacheProvider(new HttpRuntimeCacheProvider(HttpRuntime.Cache)); + _provider = new DeepCloneAppCache(new WebCachingAppCache(HttpRuntime.Cache)); } - internal override ICacheProvider Provider + internal override IAppCache Provider { get { return _provider; } } - internal override IRuntimeCacheProvider RuntimeProvider + internal override IAppPolicedCache RuntimeProvider { get { return _provider; } } @@ -75,15 +75,15 @@ namespace Umbraco.Tests.Cache public void DoesNotCacheExceptions() { string value; - Assert.Throws(() => { value = (string)_provider.GetCacheItem("key", () => GetValue(1)); }); - Assert.Throws(() => { value = (string)_provider.GetCacheItem("key", () => GetValue(2)); }); + Assert.Throws(() => { value = (string)_provider.Get("key", () => GetValue(1)); }); + Assert.Throws(() => { value = (string)_provider.Get("key", () => GetValue(2)); }); // does not throw - value = (string)_provider.GetCacheItem("key", () => GetValue(3)); + value = (string)_provider.Get("key", () => GetValue(3)); Assert.AreEqual("succ3", value); // cache - value = (string)_provider.GetCacheItem("key", () => GetValue(4)); + value = (string)_provider.Get("key", () => GetValue(4)); Assert.AreEqual("succ3", value); } diff --git a/src/Umbraco.Tests/Cache/DefaultCachePolicyTests.cs b/src/Umbraco.Tests/Cache/DefaultCachePolicyTests.cs index 37488600c7..0f649328fe 100644 --- a/src/Umbraco.Tests/Cache/DefaultCachePolicyTests.cs +++ b/src/Umbraco.Tests/Cache/DefaultCachePolicyTests.cs @@ -28,8 +28,8 @@ namespace Umbraco.Tests.Cache public void Caches_Single() { var isCached = false; - var cache = new Mock(); - cache.Setup(x => x.InsertCacheItem(It.IsAny(), It.IsAny>(), It.IsAny(), It.IsAny(), + var cache = new Mock(); + cache.Setup(x => x.Insert(It.IsAny(), It.IsAny>(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) .Callback(() => { @@ -45,8 +45,8 @@ namespace Umbraco.Tests.Cache [Test] public void Get_Single_From_Cache() { - var cache = new Mock(); - cache.Setup(x => x.GetCacheItem(It.IsAny())).Returns(new AuditItem(1, AuditType.Copy, 123, "test", "blah")); + var cache = new Mock(); + cache.Setup(x => x.Get(It.IsAny())).Returns(new AuditItem(1, AuditType.Copy, 123, "test", "blah")); var defaultPolicy = new DefaultRepositoryCachePolicy(cache.Object, DefaultAccessor, new RepositoryCachePolicyOptions()); @@ -58,14 +58,14 @@ namespace Umbraco.Tests.Cache public void Caches_Per_Id_For_Get_All() { var cached = new List(); - var cache = new Mock(); - cache.Setup(x => x.InsertCacheItem(It.IsAny(), It.IsAny>(), It.IsAny(), It.IsAny(), + var cache = new Mock(); + cache.Setup(x => x.Insert(It.IsAny(), It.IsAny>(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) .Callback((string cacheKey, Func o, TimeSpan? t, bool b, CacheItemPriority cip, CacheItemRemovedCallback circ, string[] s) => { cached.Add(cacheKey); }); - cache.Setup(x => x.GetCacheItemsByKeySearch(It.IsAny())).Returns(new AuditItem[] {}); + cache.Setup(x => x.SearchByKey(It.IsAny())).Returns(new AuditItem[] {}); var defaultPolicy = new DefaultRepositoryCachePolicy(cache.Object, DefaultAccessor, new RepositoryCachePolicyOptions()); @@ -81,8 +81,8 @@ namespace Umbraco.Tests.Cache [Test] public void Get_All_Without_Ids_From_Cache() { - var cache = new Mock(); - cache.Setup(x => x.GetCacheItemsByKeySearch(It.IsAny())).Returns(new[] + var cache = new Mock(); + cache.Setup(x => x.SearchByKey(It.IsAny())).Returns(new[] { new AuditItem(1, AuditType.Copy, 123, "test", "blah"), new AuditItem(2, AuditType.Copy, 123, "test", "blah2") @@ -98,8 +98,8 @@ namespace Umbraco.Tests.Cache public void If_CreateOrUpdate_Throws_Cache_Is_Removed() { var cacheCleared = false; - var cache = new Mock(); - cache.Setup(x => x.ClearCacheItem(It.IsAny())) + var cache = new Mock(); + cache.Setup(x => x.Clear(It.IsAny())) .Callback(() => { cacheCleared = true; @@ -124,8 +124,8 @@ namespace Umbraco.Tests.Cache public void If_Removes_Throws_Cache_Is_Removed() { var cacheCleared = false; - var cache = new Mock(); - cache.Setup(x => x.ClearCacheItem(It.IsAny())) + var cache = new Mock(); + cache.Setup(x => x.Clear(It.IsAny())) .Callback(() => { cacheCleared = true; diff --git a/src/Umbraco.Tests/Cache/FullDataSetCachePolicyTests.cs b/src/Umbraco.Tests/Cache/FullDataSetCachePolicyTests.cs index 404587bcfa..7c5a1524d2 100644 --- a/src/Umbraco.Tests/Cache/FullDataSetCachePolicyTests.cs +++ b/src/Umbraco.Tests/Cache/FullDataSetCachePolicyTests.cs @@ -37,8 +37,8 @@ namespace Umbraco.Tests.Cache }; var isCached = false; - var cache = new Mock(); - cache.Setup(x => x.InsertCacheItem(It.IsAny(), It.IsAny>(), It.IsAny(), It.IsAny(), + var cache = new Mock(); + cache.Setup(x => x.Insert(It.IsAny(), It.IsAny>(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) .Callback(() => { @@ -60,8 +60,8 @@ namespace Umbraco.Tests.Cache new AuditItem(2, AuditType.Copy, 123, "test", "blah2") }; - var cache = new Mock(); - cache.Setup(x => x.GetCacheItem(It.IsAny())).Returns(new AuditItem(1, AuditType.Copy, 123, "test", "blah")); + var cache = new Mock(); + cache.Setup(x => x.Get(It.IsAny())).Returns(new AuditItem(1, AuditType.Copy, 123, "test", "blah")); var defaultPolicy = new FullDataSetRepositoryCachePolicy(cache.Object, DefaultAccessor, item => item.Id, false); @@ -78,8 +78,8 @@ namespace Umbraco.Tests.Cache IList list = null; - var cache = new Mock(); - cache.Setup(x => x.InsertCacheItem(It.IsAny(), It.IsAny>(), It.IsAny(), It.IsAny(), + var cache = new Mock(); + cache.Setup(x => x.Insert(It.IsAny(), It.IsAny>(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) .Callback((string cacheKey, Func o, TimeSpan? t, bool b, CacheItemPriority cip, CacheItemRemovedCallback circ, string[] s) => { @@ -87,7 +87,7 @@ namespace Umbraco.Tests.Cache list = o() as IList; }); - cache.Setup(x => x.GetCacheItem(It.IsAny())).Returns(() => + cache.Setup(x => x.Get(It.IsAny())).Returns(() => { //return null if this is the first pass return cached.Any() ? new DeepCloneableList(ListCloneBehavior.CloneOnce) : null; @@ -121,8 +121,8 @@ namespace Umbraco.Tests.Cache var cached = new List(); IList list = null; - var cache = new Mock(); - cache.Setup(x => x.InsertCacheItem(It.IsAny(), It.IsAny>(), It.IsAny(), It.IsAny(), + var cache = new Mock(); + cache.Setup(x => x.Insert(It.IsAny(), It.IsAny>(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) .Callback((string cacheKey, Func o, TimeSpan? t, bool b, CacheItemPriority cip, CacheItemRemovedCallback circ, string[] s) => { @@ -130,7 +130,7 @@ namespace Umbraco.Tests.Cache list = o() as IList; }); - cache.Setup(x => x.GetCacheItem(It.IsAny())).Returns(new AuditItem[] { }); + cache.Setup(x => x.Get(It.IsAny())).Returns(new AuditItem[] { }); var defaultPolicy = new FullDataSetRepositoryCachePolicy(cache.Object, DefaultAccessor, item => item.Id, false); @@ -145,9 +145,9 @@ namespace Umbraco.Tests.Cache { var getAll = new[] { (AuditItem)null }; - var cache = new Mock(); + var cache = new Mock(); - cache.Setup(x => x.GetCacheItem(It.IsAny())).Returns(() => new DeepCloneableList(ListCloneBehavior.CloneOnce) + cache.Setup(x => x.Get(It.IsAny())).Returns(() => new DeepCloneableList(ListCloneBehavior.CloneOnce) { new AuditItem(1, AuditType.Copy, 123, "test", "blah"), new AuditItem(2, AuditType.Copy, 123, "test", "blah2") @@ -169,8 +169,8 @@ namespace Umbraco.Tests.Cache }; var cacheCleared = false; - var cache = new Mock(); - cache.Setup(x => x.ClearCacheItem(It.IsAny())) + var cache = new Mock(); + cache.Setup(x => x.Clear(It.IsAny())) .Callback(() => { cacheCleared = true; @@ -201,8 +201,8 @@ namespace Umbraco.Tests.Cache }; var cacheCleared = false; - var cache = new Mock(); - cache.Setup(x => x.ClearCacheItem(It.IsAny())) + var cache = new Mock(); + cache.Setup(x => x.Clear(It.IsAny())) .Callback(() => { cacheCleared = true; diff --git a/src/Umbraco.Tests/Cache/HttpRequestCacheProviderTests.cs b/src/Umbraco.Tests/Cache/HttpRequestCacheProviderTests.cs index cbb8d4e49d..f442319d7f 100644 --- a/src/Umbraco.Tests/Cache/HttpRequestCacheProviderTests.cs +++ b/src/Umbraco.Tests/Cache/HttpRequestCacheProviderTests.cs @@ -7,17 +7,17 @@ namespace Umbraco.Tests.Cache [TestFixture] public class HttpRequestCacheProviderTests : CacheProviderTests { - private HttpRequestCacheProvider _provider; + private HttpRequestAppCache _provider; private FakeHttpContextFactory _ctx; public override void Setup() { base.Setup(); _ctx = new FakeHttpContextFactory("http://localhost/test"); - _provider = new HttpRequestCacheProvider(_ctx.HttpContext); + _provider = new HttpRequestAppCache(_ctx.HttpContext); } - internal override ICacheProvider Provider + internal override IAppCache Provider { get { return _provider; } } @@ -31,22 +31,22 @@ namespace Umbraco.Tests.Cache [TestFixture] public class StaticCacheProviderTests : CacheProviderTests { - private StaticCacheProvider _provider; + private DictionaryCacheProvider _provider; public override void Setup() { base.Setup(); - _provider = new StaticCacheProvider(); + _provider = new DictionaryCacheProvider(); } - internal override ICacheProvider Provider + internal override IAppCache Provider { get { return _provider; } } protected override int GetTotalItemCount { - get { return _provider.StaticCache.Count; } + get { return _provider.Items.Count; } } } } diff --git a/src/Umbraco.Tests/Cache/HttpRuntimeCacheProviderTests.cs b/src/Umbraco.Tests/Cache/HttpRuntimeCacheProviderTests.cs index 679b8c5125..56f3303e9c 100644 --- a/src/Umbraco.Tests/Cache/HttpRuntimeCacheProviderTests.cs +++ b/src/Umbraco.Tests/Cache/HttpRuntimeCacheProviderTests.cs @@ -9,7 +9,7 @@ namespace Umbraco.Tests.Cache [TestFixture] public class HttpRuntimeCacheProviderTests : RuntimeCacheProviderTests { - private HttpRuntimeCacheProvider _provider; + private WebCachingAppCache _provider; protected override int GetTotalItemCount { @@ -19,15 +19,15 @@ namespace Umbraco.Tests.Cache public override void Setup() { base.Setup(); - _provider = new HttpRuntimeCacheProvider(HttpRuntime.Cache); + _provider = new WebCachingAppCache(HttpRuntime.Cache); } - internal override ICacheProvider Provider + internal override IAppCache Provider { get { return _provider; } } - internal override IRuntimeCacheProvider RuntimeProvider + internal override IAppPolicedCache RuntimeProvider { get { return _provider; } } @@ -36,15 +36,15 @@ namespace Umbraco.Tests.Cache public void DoesNotCacheExceptions() { string value; - Assert.Throws(() => { value = (string)_provider.GetCacheItem("key", () => GetValue(1)); }); - Assert.Throws(() => { value = (string)_provider.GetCacheItem("key", () => GetValue(2)); }); + Assert.Throws(() => { value = (string)_provider.Get("key", () => GetValue(1)); }); + Assert.Throws(() => { value = (string)_provider.Get("key", () => GetValue(2)); }); // does not throw - value = (string)_provider.GetCacheItem("key", () => GetValue(3)); + value = (string)_provider.Get("key", () => GetValue(3)); Assert.AreEqual("succ3", value); // cache - value = (string)_provider.GetCacheItem("key", () => GetValue(4)); + value = (string)_provider.Get("key", () => GetValue(4)); Assert.AreEqual("succ3", value); } diff --git a/src/Umbraco.Tests/Cache/ObjectCacheProviderTests.cs b/src/Umbraco.Tests/Cache/ObjectCacheProviderTests.cs index e373fdda4d..6ed7f590e0 100644 --- a/src/Umbraco.Tests/Cache/ObjectCacheProviderTests.cs +++ b/src/Umbraco.Tests/Cache/ObjectCacheProviderTests.cs @@ -10,7 +10,7 @@ namespace Umbraco.Tests.Cache [TestFixture] public class ObjectCacheProviderTests : RuntimeCacheProviderTests { - private ObjectCacheRuntimeCacheProvider _provider; + private ObjectCacheAppCache _provider; protected override int GetTotalItemCount { @@ -20,15 +20,15 @@ namespace Umbraco.Tests.Cache public override void Setup() { base.Setup(); - _provider = new ObjectCacheRuntimeCacheProvider(); + _provider = new ObjectCacheAppCache(); } - internal override ICacheProvider Provider + internal override IAppCache Provider { get { return _provider; } } - internal override IRuntimeCacheProvider RuntimeProvider + internal override IAppPolicedCache RuntimeProvider { get { return _provider; } } diff --git a/src/Umbraco.Tests/Cache/PublishedCache/PublishedContentCacheTests.cs b/src/Umbraco.Tests/Cache/PublishedCache/PublishedContentCacheTests.cs index 12ea87087d..79d0dfb9da 100644 --- a/src/Umbraco.Tests/Cache/PublishedCache/PublishedContentCacheTests.cs +++ b/src/Umbraco.Tests/Cache/PublishedCache/PublishedContentCacheTests.cs @@ -63,7 +63,7 @@ namespace Umbraco.Tests.Cache.PublishedCache _xml = new XmlDocument(); _xml.LoadXml(GetXml()); var xmlStore = new XmlStore(() => _xml, null, null, null); - var cacheProvider = new StaticCacheProvider(); + var cacheProvider = new DictionaryCacheProvider(); var domainCache = new DomainCache(ServiceContext.DomainService, DefaultCultureAccessor); var publishedShapshot = new Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedSnapshot( new PublishedContentCache(xmlStore, domainCache, cacheProvider, globalSettings, new SiteDomainHelper(), ContentTypesCache, null, null), diff --git a/src/Umbraco.Tests/Cache/PublishedCache/PublishedMediaCacheTests.cs b/src/Umbraco.Tests/Cache/PublishedCache/PublishedMediaCacheTests.cs index 6add88009d..ee16a1dede 100644 --- a/src/Umbraco.Tests/Cache/PublishedCache/PublishedMediaCacheTests.cs +++ b/src/Umbraco.Tests/Cache/PublishedCache/PublishedMediaCacheTests.cs @@ -75,7 +75,7 @@ namespace Umbraco.Tests.Cache.PublishedCache var mChild2 = MakeNewMedia("Child2", mType, user, mRoot2.Id); var ctx = GetUmbracoContext("/test"); - var cache = new PublishedMediaCache(new XmlStore((XmlDocument) null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new StaticCacheProvider(), ContentTypesCache, Factory.GetInstance()); + var cache = new PublishedMediaCache(new XmlStore((XmlDocument) null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryCacheProvider(), ContentTypesCache, Factory.GetInstance()); var roots = cache.GetAtRoot(); Assert.AreEqual(2, roots.Count()); Assert.IsTrue(roots.Select(x => x.Id).ContainsAll(new[] {mRoot1.Id, mRoot2.Id})); @@ -93,7 +93,7 @@ namespace Umbraco.Tests.Cache.PublishedCache //var publishedMedia = PublishedMediaTests.GetNode(mRoot.Id, GetUmbracoContext("/test", 1234)); var umbracoContext = GetUmbracoContext("/test"); - var cache = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), Current.Services.MediaService, Current.Services.UserService, new StaticCacheProvider(), ContentTypesCache, Factory.GetInstance()); + var cache = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), Current.Services.MediaService, Current.Services.UserService, new DictionaryCacheProvider(), ContentTypesCache, Factory.GetInstance()); var publishedMedia = cache.GetById(mRoot.Id); Assert.IsNotNull(publishedMedia); @@ -204,7 +204,7 @@ namespace Umbraco.Tests.Cache.PublishedCache var result = new SearchResult("1234", 1, () => fields.ToDictionary(x => x.Key, x => new List { x.Value })); - var store = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new StaticCacheProvider(), ContentTypesCache, Factory.GetInstance()); + var store = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryCacheProvider(), ContentTypesCache, Factory.GetInstance()); var doc = store.CreateFromCacheValues(store.ConvertFromSearchResult(result)); DoAssert(doc, 1234, key, templateIdVal: null, 0, "/media/test.jpg", "Image", 23, "Shannon", "Shannon", 0, 0, "-1,1234", DateTime.Parse("2012-07-17T10:34:09"), DateTime.Parse("2012-07-16T10:34:09"), 2); @@ -220,7 +220,7 @@ namespace Umbraco.Tests.Cache.PublishedCache var xmlDoc = GetMediaXml(); ((XmlElement)xmlDoc.DocumentElement.FirstChild).SetAttribute("key", key.ToString()); var navigator = xmlDoc.SelectSingleNode("/root/Image").CreateNavigator(); - var cache = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new StaticCacheProvider(), ContentTypesCache, Factory.GetInstance()); + var cache = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryCacheProvider(), ContentTypesCache, Factory.GetInstance()); var doc = cache.CreateFromCacheValues(cache.ConvertFromXPathNavigator(navigator, true)); DoAssert(doc, 2000, key, templateIdVal: null, 2, "image1", "Image", 23, "Shannon", "Shannon", 33, 33, "-1,2000", DateTime.Parse("2012-06-12T14:13:17"), DateTime.Parse("2012-07-20T18:50:43"), 1); diff --git a/src/Umbraco.Tests/Cache/RuntimeCacheProviderTests.cs b/src/Umbraco.Tests/Cache/RuntimeCacheProviderTests.cs index e45dfd4250..08eb5e9a60 100644 --- a/src/Umbraco.Tests/Cache/RuntimeCacheProviderTests.cs +++ b/src/Umbraco.Tests/Cache/RuntimeCacheProviderTests.cs @@ -8,7 +8,7 @@ namespace Umbraco.Tests.Cache public abstract class RuntimeCacheProviderTests : CacheProviderTests { - internal abstract IRuntimeCacheProvider RuntimeProvider { get; } + internal abstract IAppPolicedCache RuntimeProvider { get; } [Test] @@ -16,7 +16,7 @@ namespace Umbraco.Tests.Cache public void Can_Add_And_Expire_Struct_Strongly_Typed_With_Null() { var now = DateTime.Now; - RuntimeProvider.InsertCacheItem("DateTimeTest", () => now, new TimeSpan(0, 0, 0, 0, 200)); + RuntimeProvider.Insert("DateTimeTest", () => now, new TimeSpan(0, 0, 0, 0, 200)); Assert.AreEqual(now, Provider.GetCacheItem("DateTimeTest")); Assert.AreEqual(now, Provider.GetCacheItem("DateTimeTest")); diff --git a/src/Umbraco.Tests/Cache/SingleItemsOnlyCachePolicyTests.cs b/src/Umbraco.Tests/Cache/SingleItemsOnlyCachePolicyTests.cs index 1c2227f79b..2b37d85801 100644 --- a/src/Umbraco.Tests/Cache/SingleItemsOnlyCachePolicyTests.cs +++ b/src/Umbraco.Tests/Cache/SingleItemsOnlyCachePolicyTests.cs @@ -28,14 +28,14 @@ namespace Umbraco.Tests.Cache public void Get_All_Doesnt_Cache() { var cached = new List(); - var cache = new Mock(); - cache.Setup(x => x.InsertCacheItem(It.IsAny(), It.IsAny>(), It.IsAny(), It.IsAny(), + var cache = new Mock(); + cache.Setup(x => x.Insert(It.IsAny(), It.IsAny>(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) .Callback((string cacheKey, Func o, TimeSpan? t, bool b, CacheItemPriority cip, CacheItemRemovedCallback circ, string[] s) => { cached.Add(cacheKey); }); - cache.Setup(x => x.GetCacheItemsByKeySearch(It.IsAny())).Returns(new AuditItem[] { }); + cache.Setup(x => x.SearchByKey(It.IsAny())).Returns(new AuditItem[] { }); var defaultPolicy = new SingleItemsOnlyRepositoryCachePolicy(cache.Object, DefaultAccessor, new RepositoryCachePolicyOptions()); @@ -52,8 +52,8 @@ namespace Umbraco.Tests.Cache public void Caches_Single() { var isCached = false; - var cache = new Mock(); - cache.Setup(x => x.InsertCacheItem(It.IsAny(), It.IsAny>(), It.IsAny(), It.IsAny(), + var cache = new Mock(); + cache.Setup(x => x.Insert(It.IsAny(), It.IsAny>(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) .Callback(() => { diff --git a/src/Umbraco.Tests/Composing/ComposingTestBase.cs b/src/Umbraco.Tests/Composing/ComposingTestBase.cs index 48850afd97..407d953509 100644 --- a/src/Umbraco.Tests/Composing/ComposingTestBase.cs +++ b/src/Umbraco.Tests/Composing/ComposingTestBase.cs @@ -21,7 +21,7 @@ namespace Umbraco.Tests.Composing { ProfilingLogger = new ProfilingLogger(Mock.Of(), Mock.Of()); - TypeLoader = new TypeLoader(NullCacheProvider.Instance, LocalTempStorage.Default, ProfilingLogger, detectChanges: false) + TypeLoader = new TypeLoader(NoAppCache.Instance, LocalTempStorage.Default, ProfilingLogger, detectChanges: false) { AssembliesToScan = AssembliesToScan }; diff --git a/src/Umbraco.Tests/Composing/TypeLoaderTests.cs b/src/Umbraco.Tests/Composing/TypeLoaderTests.cs index 1649f3675d..add3424599 100644 --- a/src/Umbraco.Tests/Composing/TypeLoaderTests.cs +++ b/src/Umbraco.Tests/Composing/TypeLoaderTests.cs @@ -28,7 +28,7 @@ namespace Umbraco.Tests.Composing public void Initialize() { // this ensures it's reset - _typeLoader = new TypeLoader(NullCacheProvider.Instance, LocalTempStorage.Default, new ProfilingLogger(Mock.Of(), Mock.Of())); + _typeLoader = new TypeLoader(NoAppCache.Instance, LocalTempStorage.Default, new ProfilingLogger(Mock.Of(), Mock.Of())); foreach (var file in Directory.GetFiles(IOHelper.MapPath(SystemDirectories.TempData.EnsureEndsWith('/') + "TypesCache"))) File.Delete(file); diff --git a/src/Umbraco.Tests/CoreThings/UdiTests.cs b/src/Umbraco.Tests/CoreThings/UdiTests.cs index 2b4ace8810..35080e8c24 100644 --- a/src/Umbraco.Tests/CoreThings/UdiTests.cs +++ b/src/Umbraco.Tests/CoreThings/UdiTests.cs @@ -26,7 +26,7 @@ namespace Umbraco.Tests.CoreThings var container = new Mock(); var globalSettings = SettingsForTests.GenerateMockGlobalSettings(); container.Setup(x => x.GetInstance(typeof(TypeLoader))).Returns( - new TypeLoader(NullCacheProvider.Instance, LocalTempStorage.Default, new ProfilingLogger(Mock.Of(), Mock.Of()))); + new TypeLoader(NoAppCache.Instance, LocalTempStorage.Default, new ProfilingLogger(Mock.Of(), Mock.Of()))); Current.Factory = container.Object; Udi.ResetUdiTypes(); diff --git a/src/Umbraco.Tests/FrontEnd/UmbracoHelperTests.cs b/src/Umbraco.Tests/FrontEnd/UmbracoHelperTests.cs index 7508395c64..088ef6b54b 100644 --- a/src/Umbraco.Tests/FrontEnd/UmbracoHelperTests.cs +++ b/src/Umbraco.Tests/FrontEnd/UmbracoHelperTests.cs @@ -413,7 +413,7 @@ namespace Umbraco.Tests.FrontEnd container .Setup(x => x.GetInstance(typeof(TypeLoader))) .Returns(new TypeLoader( - NullCacheProvider.Instance, + NoAppCache.Instance, LocalTempStorage.Default, new ProfilingLogger(Mock.Of(), Mock.Of()) ) diff --git a/src/Umbraco.Tests/Macros/MacroTests.cs b/src/Umbraco.Tests/Macros/MacroTests.cs index 23e198b778..225bd17618 100644 --- a/src/Umbraco.Tests/Macros/MacroTests.cs +++ b/src/Umbraco.Tests/Macros/MacroTests.cs @@ -22,10 +22,10 @@ namespace Umbraco.Tests.Macros { //we DO want cache enabled for these tests var cacheHelper = new AppCaches( - new ObjectCacheRuntimeCacheProvider(), - new StaticCacheProvider(), - NullCacheProvider.Instance, - new IsolatedRuntimeCache(type => new ObjectCacheRuntimeCacheProvider())); + new ObjectCacheAppCache(), + new DictionaryCacheProvider(), + NoAppCache.Instance, + new IsolatedCaches(type => new ObjectCacheAppCache())); //Current.ApplicationContext = new ApplicationContext(cacheHelper, new ProfilingLogger(Mock.Of(), Mock.Of())); Current.Reset(); diff --git a/src/Umbraco.Tests/Manifest/ManifestParserTests.cs b/src/Umbraco.Tests/Manifest/ManifestParserTests.cs index ce3d1d705c..74f9fd7157 100644 --- a/src/Umbraco.Tests/Manifest/ManifestParserTests.cs +++ b/src/Umbraco.Tests/Manifest/ManifestParserTests.cs @@ -44,7 +44,7 @@ namespace Umbraco.Tests.Manifest new RequiredValidator(Mock.Of()), new RegexValidator(Mock.Of(), null) }; - _parser = new ManifestParser(NullCacheProvider.Instance, new ManifestValueValidatorCollection(validators), Mock.Of()); + _parser = new ManifestParser(NoAppCache.Instance, new ManifestValueValidatorCollection(validators), Mock.Of()); } [Test] diff --git a/src/Umbraco.Tests/Models/ContentTests.cs b/src/Umbraco.Tests/Models/ContentTests.cs index ea5614fb85..14f766fba1 100644 --- a/src/Umbraco.Tests/Models/ContentTests.cs +++ b/src/Umbraco.Tests/Models/ContentTests.cs @@ -232,8 +232,8 @@ namespace Umbraco.Tests.Models content.UpdateDate = DateTime.Now; content.WriterId = 23; - var runtimeCache = new ObjectCacheRuntimeCacheProvider(); - runtimeCache.InsertCacheItem(content.Id.ToString(CultureInfo.InvariantCulture), () => content); + var runtimeCache = new ObjectCacheAppCache(); + runtimeCache.Insert(content.Id.ToString(CultureInfo.InvariantCulture), () => content); var proflog = GetTestProfilingLogger(); @@ -241,7 +241,7 @@ namespace Umbraco.Tests.Models { for (int j = 0; j < 1000; j++) { - var clone = runtimeCache.GetCacheItem(content.Id.ToString(CultureInfo.InvariantCulture)); + var clone = runtimeCache.Get(content.Id.ToString(CultureInfo.InvariantCulture)); } } diff --git a/src/Umbraco.Tests/Persistence/Repositories/DocumentRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/DocumentRepositoryTest.cs index 772147f5ad..1641631f43 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/DocumentRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/DocumentRepositoryTest.cs @@ -76,10 +76,10 @@ namespace Umbraco.Tests.Persistence.Repositories public void CacheActiveForIntsAndGuids() { var realCache = new AppCaches( - new ObjectCacheRuntimeCacheProvider(), - new StaticCacheProvider(), - new StaticCacheProvider(), - new IsolatedRuntimeCache(t => new ObjectCacheRuntimeCacheProvider())); + new ObjectCacheAppCache(), + new DictionaryCacheProvider(), + new DictionaryCacheProvider(), + new IsolatedCaches(t => new ObjectCacheAppCache())); var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) diff --git a/src/Umbraco.Tests/Persistence/Repositories/MediaRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/MediaRepositoryTest.cs index 5e1900b29e..33c8524bb4 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/MediaRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/MediaRepositoryTest.cs @@ -47,10 +47,10 @@ namespace Umbraco.Tests.Persistence.Repositories MediaTypeRepository mediaTypeRepository; var realCache = new AppCaches( - new ObjectCacheRuntimeCacheProvider(), - new StaticCacheProvider(), - new StaticCacheProvider(), - new IsolatedRuntimeCache(t => new ObjectCacheRuntimeCacheProvider())); + new ObjectCacheAppCache(), + new DictionaryCacheProvider(), + new DictionaryCacheProvider(), + new IsolatedCaches(t => new ObjectCacheAppCache())); var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) diff --git a/src/Umbraco.Tests/Published/PropertyCacheLevelTests.cs b/src/Umbraco.Tests/Published/PropertyCacheLevelTests.cs index 33a595626e..04444855fb 100644 --- a/src/Umbraco.Tests/Published/PropertyCacheLevelTests.cs +++ b/src/Umbraco.Tests/Published/PropertyCacheLevelTests.cs @@ -118,8 +118,8 @@ namespace Umbraco.Tests.Published publishedContentTypeFactory.CreatePropertyType("prop1", 1), }); - var elementsCache = new DictionaryCacheProvider(); - var snapshotCache = new DictionaryCacheProvider(); + var elementsCache = new FastDictionaryCacheProvider(); + var snapshotCache = new FastDictionaryCacheProvider(); var publishedSnapshot = new Mock(); publishedSnapshot.Setup(x => x.SnapshotCache).Returns(snapshotCache); diff --git a/src/Umbraco.Tests/PublishedContent/PublishedContentSnapshotTestBase.cs b/src/Umbraco.Tests/PublishedContent/PublishedContentSnapshotTestBase.cs index 6b280832da..5b1dcde728 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedContentSnapshotTestBase.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedContentSnapshotTestBase.cs @@ -40,7 +40,7 @@ namespace Umbraco.Tests.PublishedContent Composition.RegisterUnique(f => new PublishedModelFactory(f.GetInstance().GetTypes())); } - protected override TypeLoader CreateTypeLoader(IRuntimeCacheProvider runtimeCache, IGlobalSettings globalSettings, IProfilingLogger logger) + protected override TypeLoader CreateTypeLoader(IAppPolicedCache runtimeCache, IGlobalSettings globalSettings, IProfilingLogger logger) { var pluginManager = base.CreateTypeLoader(runtimeCache, globalSettings, logger); diff --git a/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs b/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs index 603464e18b..e798be82c4 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs @@ -74,7 +74,7 @@ namespace Umbraco.Tests.PublishedContent ContentTypesCache.GetPublishedContentTypeByAlias = alias => alias.InvariantEquals("home") ? homeType : anythingType; } - protected override TypeLoader CreateTypeLoader(IRuntimeCacheProvider runtimeCache, IGlobalSettings globalSettings, IProfilingLogger logger) + protected override TypeLoader CreateTypeLoader(IAppPolicedCache runtimeCache, IGlobalSettings globalSettings, IProfilingLogger logger) { var pluginManager = base.CreateTypeLoader(runtimeCache, globalSettings, logger); diff --git a/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs b/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs index 4f55b4fd71..4257e3dabb 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs @@ -68,7 +68,7 @@ namespace Umbraco.Tests.PublishedContent internal IPublishedContent GetNode(int id, UmbracoContext umbracoContext) { var cache = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), - ServiceContext.MediaService, ServiceContext.UserService, new StaticCacheProvider(), ContentTypesCache, + ServiceContext.MediaService, ServiceContext.UserService, new DictionaryCacheProvider(), ContentTypesCache, Factory.GetInstance()); var doc = cache.GetById(id); Assert.IsNotNull(doc); @@ -126,7 +126,7 @@ namespace Umbraco.Tests.PublishedContent var searcher = indexer.GetSearcher(); var ctx = GetUmbracoContext("/test"); - var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new StaticCacheProvider(), ContentTypesCache, Factory.GetInstance()); + var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new DictionaryCacheProvider(), ContentTypesCache, Factory.GetInstance()); //we are using the media.xml media to test the examine results implementation, see the media.xml file in the ExamineHelpers namespace var publishedMedia = cache.GetById(1111); @@ -156,7 +156,7 @@ namespace Umbraco.Tests.PublishedContent var searcher = indexer.GetSearcher(); var ctx = GetUmbracoContext("/test"); - var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new StaticCacheProvider(), ContentTypesCache, Factory.GetInstance()); + var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new DictionaryCacheProvider(), ContentTypesCache, Factory.GetInstance()); //ensure it is found var publishedMedia = cache.GetById(3113); @@ -203,7 +203,7 @@ namespace Umbraco.Tests.PublishedContent var searcher = indexer.GetSearcher(); var ctx = GetUmbracoContext("/test"); - var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new StaticCacheProvider(), ContentTypesCache, Factory.GetInstance()); + var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new DictionaryCacheProvider(), ContentTypesCache, Factory.GetInstance()); //we are using the media.xml media to test the examine results implementation, see the media.xml file in the ExamineHelpers namespace var publishedMedia = cache.GetById(1111); @@ -231,7 +231,7 @@ namespace Umbraco.Tests.PublishedContent var searcher = indexer.GetSearcher(); var ctx = GetUmbracoContext("/test"); - var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new StaticCacheProvider(), ContentTypesCache, Factory.GetInstance()); + var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new DictionaryCacheProvider(), ContentTypesCache, Factory.GetInstance()); //we are using the media.xml media to test the examine results implementation, see the media.xml file in the ExamineHelpers namespace var publishedMedia = cache.GetById(1111); @@ -259,7 +259,7 @@ namespace Umbraco.Tests.PublishedContent var searcher = indexer.GetSearcher(); var ctx = GetUmbracoContext("/test"); - var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new StaticCacheProvider(), ContentTypesCache, Factory.GetInstance()); + var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new DictionaryCacheProvider(), ContentTypesCache, Factory.GetInstance()); //we are using the media.xml media to test the examine results implementation, see the media.xml file in the ExamineHelpers namespace var publishedMedia = cache.GetById(1111); @@ -288,7 +288,7 @@ namespace Umbraco.Tests.PublishedContent var ctx = GetUmbracoContext("/test"); var searcher = indexer.GetSearcher(); - var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new StaticCacheProvider(), ContentTypesCache, Factory.GetInstance()); + var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new DictionaryCacheProvider(), ContentTypesCache, Factory.GetInstance()); //we are using the media.xml media to test the examine results implementation, see the media.xml file in the ExamineHelpers namespace var publishedMedia = cache.GetById(3113); @@ -314,7 +314,7 @@ namespace Umbraco.Tests.PublishedContent var ctx = GetUmbracoContext("/test"); var searcher = indexer.GetSearcher(); - var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new StaticCacheProvider(), ContentTypesCache, Factory.GetInstance()); + var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new DictionaryCacheProvider(), ContentTypesCache, Factory.GetInstance()); //we are using the media.xml media to test the examine results implementation, see the media.xml file in the ExamineHelpers namespace var publishedMedia = cache.GetById(3113); @@ -482,7 +482,7 @@ namespace Umbraco.Tests.PublishedContent "); var node = xml.DescendantsAndSelf("Image").Single(x => (int)x.Attribute("id") == nodeId); - var publishedMedia = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new StaticCacheProvider(), ContentTypesCache, Factory.GetInstance()); + var publishedMedia = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryCacheProvider(), ContentTypesCache, Factory.GetInstance()); var nav = node.CreateNavigator(); @@ -502,7 +502,7 @@ namespace Umbraco.Tests.PublishedContent var errorXml = new XElement("error", string.Format("No media is maching '{0}'", 1234)); var nav = errorXml.CreateNavigator(); - var publishedMedia = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new StaticCacheProvider(), ContentTypesCache, Factory.GetInstance()); + var publishedMedia = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryCacheProvider(), ContentTypesCache, Factory.GetInstance()); var converted = publishedMedia.ConvertFromXPathNodeIterator(nav.Select("/"), 1234); Assert.IsNull(converted); diff --git a/src/Umbraco.Tests/PublishedContent/SolidPublishedSnapshot.cs b/src/Umbraco.Tests/PublishedContent/SolidPublishedSnapshot.cs index deaecf821e..f7077ecb3a 100644 --- a/src/Umbraco.Tests/PublishedContent/SolidPublishedSnapshot.cs +++ b/src/Umbraco.Tests/PublishedContent/SolidPublishedSnapshot.cs @@ -36,9 +36,9 @@ namespace Umbraco.Tests.PublishedContent public void Resync() { } - public ICacheProvider SnapshotCache => null; + public IAppCache SnapshotCache => null; - public ICacheProvider ElementsCache => null; + public IAppCache ElementsCache => null; } class SolidPublishedContentCache : PublishedCacheBase, IPublishedContentCache, IPublishedMediaCache diff --git a/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs b/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs index 5d4fa4f182..6e01de1670 100644 --- a/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs +++ b/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs @@ -41,10 +41,10 @@ namespace Umbraco.Tests.Scoping { // this is what's created core web runtime return new AppCaches( - new DeepCloneRuntimeCacheProvider(new ObjectCacheRuntimeCacheProvider()), - new StaticCacheProvider(), - NullCacheProvider.Instance, - new IsolatedRuntimeCache(type => new DeepCloneRuntimeCacheProvider(new ObjectCacheRuntimeCacheProvider()))); + new DeepCloneAppCache(new ObjectCacheAppCache()), + new DictionaryCacheProvider(), + NoAppCache.Instance, + new IsolatedCaches(type => new DeepCloneAppCache(new ObjectCacheAppCache()))); } [TearDown] @@ -60,13 +60,13 @@ namespace Umbraco.Tests.Scoping { var scopeProvider = ScopeProvider; var service = Current.Services.UserService; - var globalCache = Current.ApplicationCache.IsolatedRuntimeCache.GetOrCreateCache(typeof(IUser)); + var globalCache = Current.ApplicationCache.IsolatedCaches.GetOrCreate(typeof(IUser)); var user = (IUser)new User("name", "email", "username", "rawPassword"); service.Save(user); // global cache contains the entity - var globalCached = (IUser) globalCache.GetCacheItem(GetCacheIdKey(user.Id), () => null); + var globalCached = (IUser) globalCache.Get(GetCacheIdKey(user.Id), () => null); Assert.IsNotNull(globalCached); Assert.AreEqual(user.Id, globalCached.Id); Assert.AreEqual("name", globalCached.Name); @@ -85,20 +85,20 @@ namespace Umbraco.Tests.Scoping Assert.AreSame(scope, scopeProvider.AmbientScope); // scope has its own isolated cache - var scopedCache = scope.IsolatedRuntimeCache.GetOrCreateCache(typeof (IUser)); + var scopedCache = scope.IsolatedCaches.GetOrCreate(typeof (IUser)); Assert.AreNotSame(globalCache, scopedCache); user.Name = "changed"; service.Save(user); // scoped cache contains the "new" entity - var scopeCached = (IUser) scopedCache.GetCacheItem(GetCacheIdKey(user.Id), () => null); + var scopeCached = (IUser) scopedCache.Get(GetCacheIdKey(user.Id), () => null); Assert.IsNotNull(scopeCached); Assert.AreEqual(user.Id, scopeCached.Id); Assert.AreEqual("changed", scopeCached.Name); // global cache is unchanged - globalCached = (IUser) globalCache.GetCacheItem(GetCacheIdKey(user.Id), () => null); + globalCached = (IUser) globalCache.Get(GetCacheIdKey(user.Id), () => null); Assert.IsNotNull(globalCached); Assert.AreEqual(user.Id, globalCached.Id); Assert.AreEqual("name", globalCached.Name); @@ -108,7 +108,7 @@ namespace Umbraco.Tests.Scoping } Assert.IsNull(scopeProvider.AmbientScope); - globalCached = (IUser) globalCache.GetCacheItem(GetCacheIdKey(user.Id), () => null); + globalCached = (IUser) globalCache.Get(GetCacheIdKey(user.Id), () => null); if (complete) { // global cache has been cleared @@ -125,7 +125,7 @@ namespace Umbraco.Tests.Scoping Assert.AreEqual(complete ? "changed" : "name", user.Name); // global cache contains the entity again - globalCached = (IUser) globalCache.GetCacheItem(GetCacheIdKey(user.Id), () => null); + globalCached = (IUser) globalCache.Get(GetCacheIdKey(user.Id), () => null); Assert.IsNotNull(globalCached); Assert.AreEqual(user.Id, globalCached.Id); Assert.AreEqual(complete ? "changed" : "name", globalCached.Name); @@ -137,18 +137,18 @@ namespace Umbraco.Tests.Scoping { var scopeProvider = ScopeProvider; var service = Current.Services.LocalizationService; - var globalCache = Current.ApplicationCache.IsolatedRuntimeCache.GetOrCreateCache(typeof (ILanguage)); + var globalCache = Current.ApplicationCache.IsolatedCaches.GetOrCreate(typeof (ILanguage)); var lang = (ILanguage) new Language("fr-FR"); service.Save(lang); // global cache has been flushed, reload - var globalFullCached = (IEnumerable) globalCache.GetCacheItem(GetCacheTypeKey(), () => null); + var globalFullCached = (IEnumerable) globalCache.Get(GetCacheTypeKey(), () => null); Assert.IsNull(globalFullCached); var reload = service.GetLanguageById(lang.Id); // global cache contains the entity - globalFullCached = (IEnumerable) globalCache.GetCacheItem(GetCacheTypeKey(), () => null); + globalFullCached = (IEnumerable) globalCache.Get(GetCacheTypeKey(), () => null); Assert.IsNotNull(globalFullCached); var globalCached = globalFullCached.First(x => x.Id == lang.Id); Assert.IsNotNull(globalCached); @@ -166,19 +166,19 @@ namespace Umbraco.Tests.Scoping Assert.AreSame(scope, scopeProvider.AmbientScope); // scope has its own isolated cache - var scopedCache = scope.IsolatedRuntimeCache.GetOrCreateCache(typeof (ILanguage)); + var scopedCache = scope.IsolatedCaches.GetOrCreate(typeof (ILanguage)); Assert.AreNotSame(globalCache, scopedCache); lang.IsoCode = "de-DE"; service.Save(lang); // scoped cache has been flushed, reload - var scopeFullCached = (IEnumerable) scopedCache.GetCacheItem(GetCacheTypeKey(), () => null); + var scopeFullCached = (IEnumerable) scopedCache.Get(GetCacheTypeKey(), () => null); Assert.IsNull(scopeFullCached); reload = service.GetLanguageById(lang.Id); // scoped cache contains the "new" entity - scopeFullCached = (IEnumerable) scopedCache.GetCacheItem(GetCacheTypeKey(), () => null); + scopeFullCached = (IEnumerable) scopedCache.Get(GetCacheTypeKey(), () => null); Assert.IsNotNull(scopeFullCached); var scopeCached = scopeFullCached.First(x => x.Id == lang.Id); Assert.IsNotNull(scopeCached); @@ -186,7 +186,7 @@ namespace Umbraco.Tests.Scoping Assert.AreEqual("de-DE", scopeCached.IsoCode); // global cache is unchanged - globalFullCached = (IEnumerable) globalCache.GetCacheItem(GetCacheTypeKey(), () => null); + globalFullCached = (IEnumerable) globalCache.Get(GetCacheTypeKey(), () => null); Assert.IsNotNull(globalFullCached); globalCached = globalFullCached.First(x => x.Id == lang.Id); Assert.IsNotNull(globalCached); @@ -198,7 +198,7 @@ namespace Umbraco.Tests.Scoping } Assert.IsNull(scopeProvider.AmbientScope); - globalFullCached = (IEnumerable) globalCache.GetCacheItem(GetCacheTypeKey(), () => null); + globalFullCached = (IEnumerable) globalCache.Get(GetCacheTypeKey(), () => null); if (complete) { // global cache has been cleared @@ -215,7 +215,7 @@ namespace Umbraco.Tests.Scoping Assert.AreEqual(complete ? "de-DE" : "fr-FR", lang.IsoCode); // global cache contains the entity again - globalFullCached = (IEnumerable) globalCache.GetCacheItem(GetCacheTypeKey(), () => null); + globalFullCached = (IEnumerable) globalCache.Get(GetCacheTypeKey(), () => null); Assert.IsNotNull(globalFullCached); globalCached = globalFullCached.First(x => x.Id == lang.Id); Assert.IsNotNull(globalCached); @@ -229,7 +229,7 @@ namespace Umbraco.Tests.Scoping { var scopeProvider = ScopeProvider; var service = Current.Services.LocalizationService; - var globalCache = Current.ApplicationCache.IsolatedRuntimeCache.GetOrCreateCache(typeof (IDictionaryItem)); + var globalCache = Current.ApplicationCache.IsolatedCaches.GetOrCreate(typeof (IDictionaryItem)); var lang = (ILanguage)new Language("fr-FR"); service.Save(lang); @@ -242,7 +242,7 @@ namespace Umbraco.Tests.Scoping service.Save(item); // global cache contains the entity - var globalCached = (IDictionaryItem) globalCache.GetCacheItem(GetCacheIdKey(item.Id), () => null); + var globalCached = (IDictionaryItem) globalCache.Get(GetCacheIdKey(item.Id), () => null); Assert.IsNotNull(globalCached); Assert.AreEqual(item.Id, globalCached.Id); Assert.AreEqual("item-key", globalCached.ItemKey); @@ -258,20 +258,20 @@ namespace Umbraco.Tests.Scoping Assert.AreSame(scope, scopeProvider.AmbientScope); // scope has its own isolated cache - var scopedCache = scope.IsolatedRuntimeCache.GetOrCreateCache(typeof (IDictionaryItem)); + var scopedCache = scope.IsolatedCaches.GetOrCreate(typeof (IDictionaryItem)); Assert.AreNotSame(globalCache, scopedCache); item.ItemKey = "item-changed"; service.Save(item); // scoped cache contains the "new" entity - var scopeCached = (IDictionaryItem) scopedCache.GetCacheItem(GetCacheIdKey(item.Id), () => null); + var scopeCached = (IDictionaryItem) scopedCache.Get(GetCacheIdKey(item.Id), () => null); Assert.IsNotNull(scopeCached); Assert.AreEqual(item.Id, scopeCached.Id); Assert.AreEqual("item-changed", scopeCached.ItemKey); // global cache is unchanged - globalCached = (IDictionaryItem) globalCache.GetCacheItem(GetCacheIdKey(item.Id), () => null); + globalCached = (IDictionaryItem) globalCache.Get(GetCacheIdKey(item.Id), () => null); Assert.IsNotNull(globalCached); Assert.AreEqual(item.Id, globalCached.Id); Assert.AreEqual("item-key", globalCached.ItemKey); @@ -281,7 +281,7 @@ namespace Umbraco.Tests.Scoping } Assert.IsNull(scopeProvider.AmbientScope); - globalCached = (IDictionaryItem) globalCache.GetCacheItem(GetCacheIdKey(item.Id), () => null); + globalCached = (IDictionaryItem) globalCache.Get(GetCacheIdKey(item.Id), () => null); if (complete) { // global cache has been cleared @@ -298,7 +298,7 @@ namespace Umbraco.Tests.Scoping Assert.AreEqual(complete ? "item-changed" : "item-key", item.ItemKey); // global cache contains the entity again - globalCached = (IDictionaryItem) globalCache.GetCacheItem(GetCacheIdKey(item.Id), () => null); + globalCached = (IDictionaryItem) globalCache.Get(GetCacheIdKey(item.Id), () => null); Assert.IsNotNull(globalCached); Assert.AreEqual(item.Id, globalCached.Id); Assert.AreEqual(complete ? "item-changed" : "item-key", globalCached.ItemKey); diff --git a/src/Umbraco.Tests/TestHelpers/BaseUsingSqlCeSyntax.cs b/src/Umbraco.Tests/TestHelpers/BaseUsingSqlCeSyntax.cs index 7fd2f0f18b..35fcc853d4 100644 --- a/src/Umbraco.Tests/TestHelpers/BaseUsingSqlCeSyntax.cs +++ b/src/Umbraco.Tests/TestHelpers/BaseUsingSqlCeSyntax.cs @@ -38,7 +38,7 @@ namespace Umbraco.Tests.TestHelpers var container = RegisterFactory.Create(); var logger = new ProfilingLogger(Mock.Of(), Mock.Of()); - var typeLoader = new TypeLoader(NullCacheProvider.Instance, + var typeLoader = new TypeLoader(NoAppCache.Instance, LocalTempStorage.Default, logger, false); diff --git a/src/Umbraco.Tests/TestHelpers/TestWithDatabaseBase.cs b/src/Umbraco.Tests/TestHelpers/TestWithDatabaseBase.cs index 0729aa0b6e..2deb30bbdd 100644 --- a/src/Umbraco.Tests/TestHelpers/TestWithDatabaseBase.cs +++ b/src/Umbraco.Tests/TestHelpers/TestWithDatabaseBase.cs @@ -246,7 +246,7 @@ namespace Umbraco.Tests.TestHelpers protected virtual IPublishedSnapshotService CreatePublishedSnapshotService() { - var cache = NullCacheProvider.Instance; + var cache = NoAppCache.Instance; ContentTypesCache = new PublishedContentTypeCache( Factory.GetInstance(), diff --git a/src/Umbraco.Tests/Testing/UmbracoTestBase.cs b/src/Umbraco.Tests/Testing/UmbracoTestBase.cs index c980f9c1ee..2d6e01b6bb 100644 --- a/src/Umbraco.Tests/Testing/UmbracoTestBase.cs +++ b/src/Umbraco.Tests/Testing/UmbracoTestBase.cs @@ -245,7 +245,7 @@ namespace Umbraco.Tests.Testing .ComposeWebMappingProfiles(); } - protected virtual TypeLoader GetTypeLoader(IRuntimeCacheProvider runtimeCache, IGlobalSettings globalSettings, IProfilingLogger logger, UmbracoTestOptions.TypeLoader option) + protected virtual TypeLoader GetTypeLoader(IAppPolicedCache runtimeCache, IGlobalSettings globalSettings, IProfilingLogger logger, UmbracoTestOptions.TypeLoader option) { switch (option) { @@ -260,13 +260,13 @@ namespace Umbraco.Tests.Testing } } - protected virtual TypeLoader CreateTypeLoader(IRuntimeCacheProvider runtimeCache, IGlobalSettings globalSettings, IProfilingLogger logger) + protected virtual TypeLoader CreateTypeLoader(IAppPolicedCache runtimeCache, IGlobalSettings globalSettings, IProfilingLogger logger) { return CreateCommonTypeLoader(runtimeCache, globalSettings, logger); } // common to all tests = cannot be overriden - private static TypeLoader CreateCommonTypeLoader(IRuntimeCacheProvider runtimeCache, IGlobalSettings globalSettings, IProfilingLogger logger) + private static TypeLoader CreateCommonTypeLoader(IAppPolicedCache runtimeCache, IGlobalSettings globalSettings, IProfilingLogger logger) { return new TypeLoader(runtimeCache, globalSettings.LocalTempStorageLocation, logger, false) { diff --git a/src/Umbraco.Tests/Web/Mvc/UmbracoViewPageTests.cs b/src/Umbraco.Tests/Web/Mvc/UmbracoViewPageTests.cs index 192b0975d1..133cbb2ee7 100644 --- a/src/Umbraco.Tests/Web/Mvc/UmbracoViewPageTests.cs +++ b/src/Umbraco.Tests/Web/Mvc/UmbracoViewPageTests.cs @@ -415,7 +415,7 @@ namespace Umbraco.Tests.Web.Mvc // CacheHelper.CreateDisabledCacheHelper(), // new ProfilingLogger(logger, Mock.Of())) { /*IsReady = true*/ }; - var cache = NullCacheProvider.Instance; + var cache = NoAppCache.Instance; //var provider = new ScopeUnitOfWorkProvider(databaseFactory, new RepositoryFactory(Mock.Of())); var scopeProvider = TestObjects.GetScopeProvider(Mock.Of()); var factory = Mock.Of(); diff --git a/src/Umbraco.Tests/Web/TemplateUtilitiesTests.cs b/src/Umbraco.Tests/Web/TemplateUtilitiesTests.cs index 047d0b0b8f..e95ae7b785 100644 --- a/src/Umbraco.Tests/Web/TemplateUtilitiesTests.cs +++ b/src/Umbraco.Tests/Web/TemplateUtilitiesTests.cs @@ -39,7 +39,7 @@ namespace Umbraco.Tests.Web // fixme - bad in a unit test - but Udi has a static ctor that wants it?! var factory = new Mock(); factory.Setup(x => x.GetInstance(typeof(TypeLoader))).Returns( - new TypeLoader(NullCacheProvider.Instance, LocalTempStorage.Default, new ProfilingLogger(Mock.Of(), Mock.Of()))); + new TypeLoader(NoAppCache.Instance, LocalTempStorage.Default, new ProfilingLogger(Mock.Of(), Mock.Of()))); factory.Setup(x => x.GetInstance(typeof (ServiceContext))).Returns(serviceContext); var settings = SettingsForTests.GetDefaultUmbracoSettings(); diff --git a/src/Umbraco.Web/Cache/ApplicationCacheRefresher.cs b/src/Umbraco.Web/Cache/ApplicationCacheRefresher.cs index cf93b44215..751b2194b7 100644 --- a/src/Umbraco.Web/Cache/ApplicationCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/ApplicationCacheRefresher.cs @@ -25,7 +25,7 @@ namespace Umbraco.Web.Cache public override void RefreshAll() { - AppCaches.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationsCacheKey); + AppCaches.RuntimeCache.Clear(CacheKeys.ApplicationsCacheKey); base.RefreshAll(); } @@ -37,7 +37,7 @@ namespace Umbraco.Web.Cache public override void Remove(int id) { - AppCaches.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationsCacheKey); + AppCaches.RuntimeCache.Clear(CacheKeys.ApplicationsCacheKey); base.Remove(id); } diff --git a/src/Umbraco.Web/Cache/ApplicationTreeCacheRefresher.cs b/src/Umbraco.Web/Cache/ApplicationTreeCacheRefresher.cs index 72fceec631..4d2dcd8efb 100644 --- a/src/Umbraco.Web/Cache/ApplicationTreeCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/ApplicationTreeCacheRefresher.cs @@ -25,7 +25,7 @@ namespace Umbraco.Web.Cache public override void RefreshAll() { - AppCaches.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationTreeCacheKey); + AppCaches.RuntimeCache.Clear(CacheKeys.ApplicationTreeCacheKey); base.RefreshAll(); } @@ -37,7 +37,7 @@ namespace Umbraco.Web.Cache public override void Remove(int id) { - AppCaches.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationTreeCacheKey); + AppCaches.RuntimeCache.Clear(CacheKeys.ApplicationTreeCacheKey); base.Remove(id); } diff --git a/src/Umbraco.Web/Cache/ContentCacheRefresher.cs b/src/Umbraco.Web/Cache/ContentCacheRefresher.cs index 3ae2f8e3dd..36397540b6 100644 --- a/src/Umbraco.Web/Cache/ContentCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/ContentCacheRefresher.cs @@ -44,14 +44,14 @@ namespace Umbraco.Web.Cache public override void Refresh(JsonPayload[] payloads) { - AppCaches.RuntimeCache.ClearCacheObjectTypes(); + AppCaches.RuntimeCache.ClearOfType(); var idsRemoved = new HashSet(); - var isolatedCache = AppCaches.IsolatedRuntimeCache.GetOrCreateCache(); + var isolatedCache = AppCaches.IsolatedCaches.GetOrCreate(); foreach (var payload in payloads) { - isolatedCache.ClearCacheItem(RepositoryCacheKeys.GetKey(payload.Id)); + isolatedCache.Clear(RepositoryCacheKeys.GetKey(payload.Id)); _idkMap.ClearCache(payload.Id); @@ -59,7 +59,7 @@ namespace Umbraco.Web.Cache if (payload.ChangeTypes.HasTypesAny(TreeChangeTypes.RefreshBranch | TreeChangeTypes.Remove)) { var pathid = "," + payload.Id + ","; - isolatedCache.ClearCacheObjectTypes((k, v) => v.Path.Contains(pathid)); + isolatedCache.ClearOfType((k, v) => v.Path.Contains(pathid)); } //if the item is being completely removed, we need to refresh the domains cache if any domain was assigned to the content @@ -162,8 +162,8 @@ namespace Umbraco.Web.Cache appCaches.ClearPartialViewCache(); MacroCacheRefresher.ClearMacroContentCache(appCaches); // just the content - appCaches.IsolatedRuntimeCache.ClearCache(); - appCaches.IsolatedRuntimeCache.ClearCache(); + appCaches.IsolatedCaches.ClearCache(); + appCaches.IsolatedCaches.ClearCache(); } #endregion diff --git a/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs b/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs index e1a8f05e39..f3d1337403 100644 --- a/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs @@ -49,7 +49,7 @@ namespace Umbraco.Web.Cache ClearAllIsolatedCacheByEntityType(); ClearAllIsolatedCacheByEntityType(); - var dataTypeCache = AppCaches.IsolatedRuntimeCache.GetCache(); + var dataTypeCache = AppCaches.IsolatedCaches.Get(); foreach (var payload in payloads) { diff --git a/src/Umbraco.Web/Cache/MacroCacheRefresher.cs b/src/Umbraco.Web/Cache/MacroCacheRefresher.cs index cdeb2ffdd0..6b739b4f49 100644 --- a/src/Umbraco.Web/Cache/MacroCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/MacroCacheRefresher.cs @@ -33,11 +33,11 @@ namespace Umbraco.Web.Cache public override void RefreshAll() { foreach (var prefix in GetAllMacroCacheKeys()) - AppCaches.RuntimeCache.ClearCacheByKeySearch(prefix); + AppCaches.RuntimeCache.ClearByKey(prefix); ClearAllIsolatedCacheByEntityType(); - AppCaches.RuntimeCache.ClearCacheObjectTypes(); + AppCaches.RuntimeCache.ClearOfType(); base.RefreshAll(); } @@ -49,12 +49,12 @@ namespace Umbraco.Web.Cache foreach (var payload in payloads) { foreach (var alias in GetCacheKeysForAlias(payload.Alias)) - AppCaches.RuntimeCache.ClearCacheByKeySearch(alias); + AppCaches.RuntimeCache.ClearByKey(alias); - var macroRepoCache = AppCaches.IsolatedRuntimeCache.GetCache(); + var macroRepoCache = AppCaches.IsolatedCaches.Get(); if (macroRepoCache) { - macroRepoCache.Result.ClearCacheItem(RepositoryCacheKeys.GetKey(payload.Id)); + macroRepoCache.Result.Clear(RepositoryCacheKeys.GetKey(payload.Id)); } }; @@ -112,7 +112,7 @@ namespace Umbraco.Web.Cache public static void ClearMacroContentCache(AppCaches appCaches) { - appCaches.RuntimeCache.ClearCacheObjectTypes(); + appCaches.RuntimeCache.ClearOfType(); } #endregion diff --git a/src/Umbraco.Web/Cache/MediaCacheRefresher.cs b/src/Umbraco.Web/Cache/MediaCacheRefresher.cs index a6ccd7e005..cdaf43dac3 100644 --- a/src/Umbraco.Web/Cache/MediaCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/MediaCacheRefresher.cs @@ -49,7 +49,7 @@ namespace Umbraco.Web.Cache { Current.ApplicationCache.ClearPartialViewCache(); - var mediaCache = AppCaches.IsolatedRuntimeCache.GetCache(); + var mediaCache = AppCaches.IsolatedCaches.Get(); foreach (var payload in payloads) { @@ -61,13 +61,13 @@ namespace Umbraco.Web.Cache // repository cache // it *was* done for each pathId but really that does not make sense // only need to do it for the current media - mediaCache.Result.ClearCacheItem(RepositoryCacheKeys.GetKey(payload.Id)); + mediaCache.Result.Clear(RepositoryCacheKeys.GetKey(payload.Id)); // remove those that are in the branch if (payload.ChangeTypes.HasTypesAny(TreeChangeTypes.RefreshBranch | TreeChangeTypes.Remove)) { var pathid = "," + payload.Id + ","; - mediaCache.Result.ClearCacheObjectTypes((_, v) => v.Path.Contains(pathid)); + mediaCache.Result.ClearOfType((_, v) => v.Path.Contains(pathid)); } } } @@ -121,7 +121,7 @@ namespace Umbraco.Web.Cache public static void RefreshMediaTypes(AppCaches appCaches) { - appCaches.IsolatedRuntimeCache.ClearCache(); + appCaches.IsolatedCaches.ClearCache(); } #endregion diff --git a/src/Umbraco.Web/Cache/MemberCacheRefresher.cs b/src/Umbraco.Web/Cache/MemberCacheRefresher.cs index 29c102e7a2..1565b1c849 100644 --- a/src/Umbraco.Web/Cache/MemberCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/MemberCacheRefresher.cs @@ -60,9 +60,9 @@ namespace Umbraco.Web.Cache _idkMap.ClearCache(id); AppCaches.ClearPartialViewCache(); - var memberCache = AppCaches.IsolatedRuntimeCache.GetCache(); + var memberCache = AppCaches.IsolatedCaches.Get(); if (memberCache) - memberCache.Result.ClearCacheItem(RepositoryCacheKeys.GetKey(id)); + memberCache.Result.Clear(RepositoryCacheKeys.GetKey(id)); } #endregion @@ -71,7 +71,7 @@ namespace Umbraco.Web.Cache public static void RefreshMemberTypes(AppCaches appCaches) { - appCaches.IsolatedRuntimeCache.ClearCache(); + appCaches.IsolatedCaches.ClearCache(); } #endregion diff --git a/src/Umbraco.Web/Cache/MemberGroupCacheRefresher.cs b/src/Umbraco.Web/Cache/MemberGroupCacheRefresher.cs index 9368b0f9f4..3e195cec5e 100644 --- a/src/Umbraco.Web/Cache/MemberGroupCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/MemberGroupCacheRefresher.cs @@ -49,7 +49,7 @@ namespace Umbraco.Web.Cache // Since we cache by group name, it could be problematic when renaming to // previously existing names - see http://issues.umbraco.org/issue/U4-10846. // To work around this, just clear all the cache items - AppCaches.IsolatedRuntimeCache.ClearCache(); + AppCaches.IsolatedCaches.ClearCache(); } #endregion diff --git a/src/Umbraco.Web/Cache/RelationTypeCacheRefresher.cs b/src/Umbraco.Web/Cache/RelationTypeCacheRefresher.cs index 8b1c8581cd..c9c8b47bbf 100644 --- a/src/Umbraco.Web/Cache/RelationTypeCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/RelationTypeCacheRefresher.cs @@ -34,8 +34,8 @@ namespace Umbraco.Web.Cache public override void Refresh(int id) { - var cache = AppCaches.IsolatedRuntimeCache.GetCache(); - if (cache) cache.Result.ClearCacheItem(RepositoryCacheKeys.GetKey(id)); + var cache = AppCaches.IsolatedCaches.Get(); + if (cache) cache.Result.Clear(RepositoryCacheKeys.GetKey(id)); base.Refresh(id); } @@ -47,8 +47,8 @@ namespace Umbraco.Web.Cache public override void Remove(int id) { - var cache = AppCaches.IsolatedRuntimeCache.GetCache(); - if (cache) cache.Result.ClearCacheItem(RepositoryCacheKeys.GetKey(id)); + var cache = AppCaches.IsolatedCaches.Get(); + if (cache) cache.Result.Clear(RepositoryCacheKeys.GetKey(id)); base.Remove(id); } diff --git a/src/Umbraco.Web/Cache/TemplateCacheRefresher.cs b/src/Umbraco.Web/Cache/TemplateCacheRefresher.cs index 7ff7c6fdb6..eda3b6eef4 100644 --- a/src/Umbraco.Web/Cache/TemplateCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/TemplateCacheRefresher.cs @@ -52,7 +52,7 @@ namespace Umbraco.Web.Cache private void RemoveFromCache(int id) { _idkMap.ClearCache(id); - AppCaches.RuntimeCache.ClearCacheItem($"{CacheKeys.TemplateFrontEndCacheKey}{id}"); + AppCaches.RuntimeCache.Clear($"{CacheKeys.TemplateFrontEndCacheKey}{id}"); //need to clear the runtime cache for templates ClearAllIsolatedCacheByEntityType(); diff --git a/src/Umbraco.Web/Cache/UserCacheRefresher.cs b/src/Umbraco.Web/Cache/UserCacheRefresher.cs index a502a7554f..922a9df385 100644 --- a/src/Umbraco.Web/Cache/UserCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/UserCacheRefresher.cs @@ -40,9 +40,9 @@ namespace Umbraco.Web.Cache public override void Remove(int id) { - var userCache = AppCaches.IsolatedRuntimeCache.GetCache(); + var userCache = AppCaches.IsolatedCaches.Get(); if (userCache) - userCache.Result.ClearCacheItem(RepositoryCacheKeys.GetKey(id)); + userCache.Result.Clear(RepositoryCacheKeys.GetKey(id)); base.Remove(id); } diff --git a/src/Umbraco.Web/Cache/UserGroupCacheRefresher.cs b/src/Umbraco.Web/Cache/UserGroupCacheRefresher.cs index 4dea595c85..cfdf8f3669 100644 --- a/src/Umbraco.Web/Cache/UserGroupCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/UserGroupCacheRefresher.cs @@ -35,10 +35,10 @@ namespace Umbraco.Web.Cache public override void RefreshAll() { ClearAllIsolatedCacheByEntityType(); - var userGroupCache = AppCaches.IsolatedRuntimeCache.GetCache(); + var userGroupCache = AppCaches.IsolatedCaches.Get(); if (userGroupCache) { - userGroupCache.Result.ClearCacheByKeySearch(UserGroupRepository.GetByAliasCacheKeyPrefix); + userGroupCache.Result.ClearByKey(UserGroupRepository.GetByAliasCacheKeyPrefix); } //We'll need to clear all user cache too @@ -55,11 +55,11 @@ namespace Umbraco.Web.Cache public override void Remove(int id) { - var userGroupCache = AppCaches.IsolatedRuntimeCache.GetCache(); + var userGroupCache = AppCaches.IsolatedCaches.Get(); if (userGroupCache) { - userGroupCache.Result.ClearCacheItem(RepositoryCacheKeys.GetKey(id)); - userGroupCache.Result.ClearCacheByKeySearch(UserGroupRepository.GetByAliasCacheKeyPrefix); + userGroupCache.Result.Clear(RepositoryCacheKeys.GetKey(id)); + userGroupCache.Result.ClearByKey(UserGroupRepository.GetByAliasCacheKeyPrefix); } //we don't know what user's belong to this group without doing a look up so we'll need to just clear them all diff --git a/src/Umbraco.Web/CacheHelperExtensions.cs b/src/Umbraco.Web/CacheHelperExtensions.cs index 3c5ea1930d..ae8df63415 100644 --- a/src/Umbraco.Web/CacheHelperExtensions.cs +++ b/src/Umbraco.Web/CacheHelperExtensions.cs @@ -56,7 +56,7 @@ namespace Umbraco.Web /// public static void ClearPartialViewCache(this AppCaches appCaches) { - appCaches.RuntimeCache.ClearCacheByKeySearch(PartialViewCacheKey); + appCaches.RuntimeCache.ClearByKey(PartialViewCacheKey); } } } diff --git a/src/Umbraco.Web/Dictionary/UmbracoCultureDictionary.cs b/src/Umbraco.Web/Dictionary/UmbracoCultureDictionary.cs index f30f8e9745..5234bf9fa7 100644 --- a/src/Umbraco.Web/Dictionary/UmbracoCultureDictionary.cs +++ b/src/Umbraco.Web/Dictionary/UmbracoCultureDictionary.cs @@ -21,7 +21,7 @@ namespace Umbraco.Web.Dictionary public class DefaultCultureDictionary : Core.Dictionary.ICultureDictionary { private readonly ILocalizationService _localizationService; - private readonly ICacheProvider _requestCacheProvider; + private readonly IAppCache _requestCacheProvider; private readonly CultureInfo _specificCulture; public DefaultCultureDictionary() @@ -30,7 +30,7 @@ namespace Umbraco.Web.Dictionary } - public DefaultCultureDictionary(ILocalizationService localizationService, ICacheProvider requestCacheProvider) + public DefaultCultureDictionary(ILocalizationService localizationService, IAppCache requestCacheProvider) { _localizationService = localizationService ?? throw new ArgumentNullException(nameof(localizationService)); _requestCacheProvider = requestCacheProvider ?? throw new ArgumentNullException(nameof(requestCacheProvider)); @@ -42,7 +42,7 @@ namespace Umbraco.Web.Dictionary _specificCulture = specificCulture ?? throw new ArgumentNullException(nameof(specificCulture)); } - public DefaultCultureDictionary(CultureInfo specificCulture, ILocalizationService localizationService, ICacheProvider requestCacheProvider) + public DefaultCultureDictionary(CultureInfo specificCulture, ILocalizationService localizationService, IAppCache requestCacheProvider) { _localizationService = localizationService ?? throw new ArgumentNullException(nameof(localizationService)); _requestCacheProvider = requestCacheProvider ?? throw new ArgumentNullException(nameof(requestCacheProvider)); diff --git a/src/Umbraco.Web/Editors/ExamineManagementController.cs b/src/Umbraco.Web/Editors/ExamineManagementController.cs index b583babee3..db9de424a9 100644 --- a/src/Umbraco.Web/Editors/ExamineManagementController.cs +++ b/src/Umbraco.Web/Editors/ExamineManagementController.cs @@ -29,12 +29,12 @@ namespace Umbraco.Web.Editors { private readonly IExamineManager _examineManager; private readonly ILogger _logger; - private readonly IRuntimeCacheProvider _runtimeCacheProvider; + private readonly IAppPolicedCache _runtimeCacheProvider; private readonly IndexRebuilder _indexRebuilder; public ExamineManagementController(IExamineManager examineManager, ILogger logger, - IRuntimeCacheProvider runtimeCacheProvider, + IAppPolicedCache runtimeCacheProvider, IndexRebuilder indexRebuilder) { _examineManager = examineManager; @@ -114,7 +114,7 @@ namespace Umbraco.Web.Editors throw new HttpResponseException(validate); var cacheKey = "temp_indexing_op_" + indexName; - var found = ApplicationCache.RuntimeCache.GetCacheItem(cacheKey); + var found = ApplicationCache.RuntimeCache.Get(cacheKey); //if its still there then it's not done return found != null @@ -153,7 +153,7 @@ namespace Umbraco.Web.Editors var cacheKey = "temp_indexing_op_" + index.Name; //put temp val in cache which is used as a rudimentary way to know when the indexing is done - ApplicationCache.RuntimeCache.InsertCacheItem(cacheKey, () => "tempValue", TimeSpan.FromMinutes(5)); + ApplicationCache.RuntimeCache.Insert(cacheKey, () => "tempValue", TimeSpan.FromMinutes(5)); _indexRebuilder.RebuildIndex(indexName); @@ -269,7 +269,7 @@ namespace Umbraco.Web.Editors >($"Rebuilding index '{indexer.Name}' done, {indexer.CommitCount} items committed (can differ from the number of items in the index)"); var cacheKey = "temp_indexing_op_" + indexer.Name; - _runtimeCacheProvider.ClearCacheItem(cacheKey); + _runtimeCacheProvider.Clear(cacheKey); } } } diff --git a/src/Umbraco.Web/Editors/UsersController.cs b/src/Umbraco.Web/Editors/UsersController.cs index e46e83c6e4..15cfda9ffd 100644 --- a/src/Umbraco.Web/Editors/UsersController.cs +++ b/src/Umbraco.Web/Editors/UsersController.cs @@ -63,7 +63,7 @@ namespace Umbraco.Web.Editors return await PostSetAvatarInternal(Request, Services.UserService, ApplicationCache.StaticCache, id); } - internal static async Task PostSetAvatarInternal(HttpRequestMessage request, IUserService userService, ICacheProvider staticCache, int id) + internal static async Task PostSetAvatarInternal(HttpRequestMessage request, IUserService userService, IAppCache staticCache, int id) { if (request.Content.IsMimeMultipartContent() == false) { diff --git a/src/Umbraco.Web/Macros/MacroRenderer.cs b/src/Umbraco.Web/Macros/MacroRenderer.cs index e0a0fd65c8..0bcdb3225b 100755 --- a/src/Umbraco.Web/Macros/MacroRenderer.cs +++ b/src/Umbraco.Web/Macros/MacroRenderer.cs @@ -152,7 +152,7 @@ namespace Umbraco.Web.Macros macroContent.Date = DateTime.Now; var cache = Current.ApplicationCache.RuntimeCache; - cache.InsertCacheItem( + cache.Insert( CacheKeys.MacroContentCacheKey + model.CacheIdentifier, () => macroContent, new TimeSpan(0, 0, model.CacheDuration), diff --git a/src/Umbraco.Web/Models/Mapping/UserMapperProfile.cs b/src/Umbraco.Web/Models/Mapping/UserMapperProfile.cs index 8261dda0d4..4b27af3120 100644 --- a/src/Umbraco.Web/Models/Mapping/UserMapperProfile.cs +++ b/src/Umbraco.Web/Models/Mapping/UserMapperProfile.cs @@ -22,7 +22,7 @@ namespace Umbraco.Web.Models.Mapping => entity is ContentEntitySlim contentEntity ? contentEntity.ContentTypeIcon : null; public UserMapperProfile(ILocalizedTextService textService, IUserService userService, IEntityService entityService, ISectionService sectionService, - IRuntimeCacheProvider runtimeCache, ActionCollection actions, IGlobalSettings globalSettings) + IAppPolicedCache runtimeCache, ActionCollection actions, IGlobalSettings globalSettings) { var userGroupDefaultPermissionsResolver = new UserGroupDefaultPermissionsResolver(textService, actions); diff --git a/src/Umbraco.Web/PublishedCache/IPublishedSnapshot.cs b/src/Umbraco.Web/PublishedCache/IPublishedSnapshot.cs index 0636eb808c..0865e61f08 100644 --- a/src/Umbraco.Web/PublishedCache/IPublishedSnapshot.cs +++ b/src/Umbraco.Web/PublishedCache/IPublishedSnapshot.cs @@ -36,7 +36,7 @@ namespace Umbraco.Web.PublishedCache /// /// The snapshot-level cache belongs to this snapshot only. /// - ICacheProvider SnapshotCache { get; } + IAppCache SnapshotCache { get; } /// /// Gets the elements-level cache. @@ -45,7 +45,7 @@ namespace Umbraco.Web.PublishedCache /// The elements-level cache is shared by all snapshots relying on the same elements, /// ie all snapshots built on top of unchanging content / media / etc. /// - ICacheProvider ElementsCache { get; } + IAppCache ElementsCache { get; } /// /// Forces the preview mode. diff --git a/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs b/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs index 817c363fa5..566ab240c1 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs @@ -21,8 +21,8 @@ namespace Umbraco.Web.PublishedCache.NuCache internal class ContentCache : PublishedCacheBase, IPublishedContentCache, INavigableData, IDisposable { private readonly ContentStore.Snapshot _snapshot; - private readonly ICacheProvider _snapshotCache; - private readonly ICacheProvider _elementsCache; + private readonly IAppCache _snapshotCache; + private readonly IAppCache _elementsCache; private readonly DomainHelper _domainHelper; private readonly IGlobalSettings _globalSettings; private readonly ILocalizationService _localizationService; @@ -34,7 +34,7 @@ namespace Umbraco.Web.PublishedCache.NuCache // it's too late for UmbracoContext which has captured previewDefault and stuff into these ctor vars // but, no, UmbracoContext returns snapshot.Content which comes from elements SO a resync should create a new cache - public ContentCache(bool previewDefault, ContentStore.Snapshot snapshot, ICacheProvider snapshotCache, ICacheProvider elementsCache, DomainHelper domainHelper, IGlobalSettings globalSettings, ILocalizationService localizationService) + public ContentCache(bool previewDefault, ContentStore.Snapshot snapshot, IAppCache snapshotCache, IAppCache elementsCache, DomainHelper domainHelper, IGlobalSettings globalSettings, ILocalizationService localizationService) : base(previewDefault) { _snapshot = snapshot; @@ -259,7 +259,7 @@ namespace Umbraco.Web.PublishedCache.NuCache return GetAtRootNoCache(preview); // note: ToArray is important here, we want to cache the result, not the function! - return (IEnumerable)cache.GetCacheItem( + return (IEnumerable)cache.Get( CacheKeys.ContentCacheRoots(preview), () => GetAtRootNoCache(preview).ToArray()); } diff --git a/src/Umbraco.Web/PublishedCache/NuCache/MediaCache.cs b/src/Umbraco.Web/PublishedCache/NuCache/MediaCache.cs index f107b52a40..28c7c38c36 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/MediaCache.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/MediaCache.cs @@ -13,12 +13,12 @@ namespace Umbraco.Web.PublishedCache.NuCache internal class MediaCache : PublishedCacheBase, IPublishedMediaCache, INavigableData, IDisposable { private readonly ContentStore.Snapshot _snapshot; - private readonly ICacheProvider _snapshotCache; - private readonly ICacheProvider _elementsCache; + private readonly IAppCache _snapshotCache; + private readonly IAppCache _elementsCache; #region Constructors - public MediaCache(bool previewDefault, ContentStore.Snapshot snapshot, ICacheProvider snapshotCache, ICacheProvider elementsCache) + public MediaCache(bool previewDefault, ContentStore.Snapshot snapshot, IAppCache snapshotCache, IAppCache elementsCache) : base(previewDefault) { _snapshot = snapshot; @@ -63,7 +63,7 @@ namespace Umbraco.Web.PublishedCache.NuCache return GetAtRootNoCache(); // note: ToArray is important here, we want to cache the result, not the function! - return (IEnumerable)cache.GetCacheItem( + return (IEnumerable)cache.Get( CacheKeys.MediaCacheRoots(false), // ignore preview, only 1 key! () => GetAtRootNoCache().ToArray()); } diff --git a/src/Umbraco.Web/PublishedCache/NuCache/MemberCache.cs b/src/Umbraco.Web/PublishedCache/NuCache/MemberCache.cs index f2392c9c3d..ecf099f90b 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/MemberCache.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/MemberCache.cs @@ -19,12 +19,12 @@ namespace Umbraco.Web.PublishedCache.NuCache private readonly IPublishedSnapshotAccessor _publishedSnapshotAccessor; public readonly IVariationContextAccessor VariationContextAccessor; private readonly IEntityXmlSerializer _entitySerializer; - private readonly ICacheProvider _snapshotCache; + private readonly IAppCache _snapshotCache; private readonly IMemberService _memberService; private readonly PublishedContentTypeCache _contentTypeCache; private readonly bool _previewDefault; - public MemberCache(bool previewDefault, ICacheProvider snapshotCache, IMemberService memberService, PublishedContentTypeCache contentTypeCache, IPublishedSnapshotAccessor publishedSnapshotAccessor, IVariationContextAccessor variationContextAccessor, IEntityXmlSerializer entitySerializer) + public MemberCache(bool previewDefault, IAppCache snapshotCache, IMemberService memberService, PublishedContentTypeCache contentTypeCache, IPublishedSnapshotAccessor publishedSnapshotAccessor, IVariationContextAccessor variationContextAccessor, IEntityXmlSerializer entitySerializer) { _snapshotCache = snapshotCache; _publishedSnapshotAccessor = publishedSnapshotAccessor; diff --git a/src/Umbraco.Web/PublishedCache/NuCache/Property.cs b/src/Umbraco.Web/PublishedCache/NuCache/Property.cs index 132c4b6d59..2c8bc94d90 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/Property.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/Property.cs @@ -125,7 +125,7 @@ namespace Umbraco.Web.PublishedCache.NuCache { CacheValues cacheValues; PublishedSnapshot publishedSnapshot; - ICacheProvider cache; + IAppCache cache; switch (cacheLevel) { case PropertyCacheLevel.None: @@ -161,11 +161,11 @@ namespace Umbraco.Web.PublishedCache.NuCache return cacheValues; } - private CacheValues GetCacheValues(ICacheProvider cache) + private CacheValues GetCacheValues(IAppCache cache) { if (cache == null) // no cache, don't cache return new CacheValues(); - return (CacheValues) cache.GetCacheItem(ValuesCacheKey, () => new CacheValues()); + return (CacheValues) cache.Get(ValuesCacheKey, () => new CacheValues()); } // this is always invoked from within a lock, so does not require its own lock diff --git a/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs b/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs index 25e5244d32..65b7a1560a 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs @@ -48,7 +48,7 @@ namespace Umbraco.Web.PublishedCache.NuCache var cache = GetCurrentSnapshotCache(); return cache == null ? GetProfileNameByIdNoCache(id) - : (string)cache.GetCacheItem(CacheKeys.ProfileName(id), () => GetProfileNameByIdNoCache(id)); + : (string)cache.Get(CacheKeys.ProfileName(id), () => GetProfileNameByIdNoCache(id)); } private static string GetProfileNameByIdNoCache(int id) @@ -328,7 +328,7 @@ namespace Umbraco.Web.PublishedCache.NuCache return GetChildren(); // note: ToArray is important here, we want to cache the result, not the function! - return (IEnumerable)cache.GetCacheItem(ChildrenCacheKey, () => GetChildren().ToArray()); + return (IEnumerable)cache.Get(ChildrenCacheKey, () => GetChildren().ToArray()); } } @@ -383,7 +383,7 @@ namespace Umbraco.Web.PublishedCache.NuCache #region Caching // beware what you use that one for - you don't want to cache its result - private ICacheProvider GetAppropriateCache() + private IAppCache GetAppropriateCache() { var publishedSnapshot = (PublishedSnapshot)_publishedSnapshotAccessor.PublishedSnapshot; var cache = publishedSnapshot == null @@ -394,7 +394,7 @@ namespace Umbraco.Web.PublishedCache.NuCache return cache; } - private ICacheProvider GetCurrentSnapshotCache() + private IAppCache GetCurrentSnapshotCache() { var publishedSnapshot = (PublishedSnapshot)_publishedSnapshotAccessor.PublishedSnapshot; return publishedSnapshot?.SnapshotCache; @@ -436,7 +436,7 @@ namespace Umbraco.Web.PublishedCache.NuCache var cache = GetAppropriateCache(); if (cache == null) return new PublishedContent(this).CreateModel(); - return (IPublishedContent)cache.GetCacheItem(AsPreviewingCacheKey, () => new PublishedContent(this).CreateModel()); + return (IPublishedContent)cache.Get(AsPreviewingCacheKey, () => new PublishedContent(this).CreateModel()); } // used by Navigable.Source,... diff --git a/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshot.cs b/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshot.cs index 9b8982c69c..2ceced75eb 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshot.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshot.cs @@ -25,8 +25,8 @@ namespace Umbraco.Web.PublishedCache.NuCache public MediaCache MediaCache; public MemberCache MemberCache; public DomainCache DomainCache; - public ICacheProvider SnapshotCache; - public ICacheProvider ElementsCache; + public IAppCache SnapshotCache; + public IAppCache ElementsCache; public void Dispose() { @@ -48,9 +48,9 @@ namespace Umbraco.Web.PublishedCache.NuCache #region Caches - public ICacheProvider SnapshotCache => Elements.SnapshotCache; + public IAppCache SnapshotCache => Elements.SnapshotCache; - public ICacheProvider ElementsCache => Elements.ElementsCache; + public IAppCache ElementsCache => Elements.ElementsCache; #endregion diff --git a/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs b/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs index 36f3472c31..bcb1c6ede3 100755 --- a/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs @@ -932,7 +932,7 @@ namespace Umbraco.Web.PublishedCache.NuCache #region Create, Get Published Snapshot private long _contentGen, _mediaGen, _domainGen; - private ICacheProvider _elementsCache; + private IAppCache _elementsCache; public override IPublishedSnapshot CreatePublishedSnapshot(string previewToken) { @@ -960,7 +960,7 @@ namespace Umbraco.Web.PublishedCache.NuCache ContentStore.Snapshot contentSnap, mediaSnap; SnapDictionary.Snapshot domainSnap; - ICacheProvider elementsCache; + IAppCache elementsCache; lock (_storesLock) { var scopeContext = _scopeProvider.Context; @@ -998,11 +998,11 @@ namespace Umbraco.Web.PublishedCache.NuCache _contentGen = contentSnap.Gen; _mediaGen = mediaSnap.Gen; _domainGen = domainSnap.Gen; - elementsCache = _elementsCache = new DictionaryCacheProvider(); + elementsCache = _elementsCache = new FastDictionaryCacheProvider(); } } - var snapshotCache = new StaticCacheProvider(); + var snapshotCache = new DictionaryCacheProvider(); var memberTypeCache = new PublishedContentTypeCache(null, null, _serviceContext.MemberTypeService, _publishedContentTypeFactory, _logger); diff --git a/src/Umbraco.Web/PublishedCache/PublishedElementPropertyBase.cs b/src/Umbraco.Web/PublishedCache/PublishedElementPropertyBase.cs index cff1e40b69..6d69b96e0c 100644 --- a/src/Umbraco.Web/PublishedCache/PublishedElementPropertyBase.cs +++ b/src/Umbraco.Web/PublishedCache/PublishedElementPropertyBase.cs @@ -106,7 +106,7 @@ namespace Umbraco.Web.PublishedCache } } - private ICacheProvider GetSnapshotCache() + private IAppCache GetSnapshotCache() { // cache within the snapshot cache, unless previewing, then use the snapshot or // elements cache (if we don't want to pollute the elements cache with short-lived @@ -135,12 +135,12 @@ namespace Umbraco.Web.PublishedCache case PropertyCacheLevel.Elements: // cache within the elements cache, depending... var snapshotCache = GetSnapshotCache(); - cacheValues = (CacheValues) snapshotCache?.GetCacheItem(ValuesCacheKey, () => new CacheValues()) ?? new CacheValues(); + cacheValues = (CacheValues) snapshotCache?.Get(ValuesCacheKey, () => new CacheValues()) ?? new CacheValues(); break; case PropertyCacheLevel.Snapshot: // cache within the snapshot cache var facadeCache = _publishedSnapshotAccessor?.PublishedSnapshot?.SnapshotCache; - cacheValues = (CacheValues) facadeCache?.GetCacheItem(ValuesCacheKey, () => new CacheValues()) ?? new CacheValues(); + cacheValues = (CacheValues) facadeCache?.Get(ValuesCacheKey, () => new CacheValues()) ?? new CacheValues(); break; default: throw new InvalidOperationException("Invalid cache level."); diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DictionaryPublishedContent.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DictionaryPublishedContent.cs index 6f6a39144a..ea38af314f 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DictionaryPublishedContent.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DictionaryPublishedContent.cs @@ -35,7 +35,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache Func getParent, Func> getChildren, Func getProperty, - ICacheProvider cacheProvider, + IAppCache cacheProvider, PublishedContentTypeCache contentTypeCache, XPathNavigator nav, bool fromExamine) @@ -133,7 +133,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache //private readonly Func> _getChildren; private readonly Lazy> _getChildren; private readonly Func _getProperty; - private readonly ICacheProvider _cacheProvider; + private readonly IAppCache _cacheProvider; /// /// Returns 'Media' as the item type diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs index e022e36fc0..67813ce9f6 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs @@ -15,7 +15,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache { internal class PublishedContentCache : PublishedCacheBase, IPublishedContentCache { - private readonly ICacheProvider _cacheProvider; + private readonly IAppCache _cacheProvider; private readonly IGlobalSettings _globalSettings; private readonly RoutesCache _routesCache; private readonly IDomainCache _domainCache; @@ -30,7 +30,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache public PublishedContentCache( XmlStore xmlStore, // an XmlStore containing the master xml IDomainCache domainCache, // an IDomainCache implementation - ICacheProvider cacheProvider, // an ICacheProvider that should be at request-level + IAppCache cacheProvider, // an ICacheProvider that should be at request-level IGlobalSettings globalSettings, ISiteDomainHelper siteDomainHelper, PublishedContentTypeCache contentTypeCache, // a PublishedContentType cache @@ -517,7 +517,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache // clear recursive properties cached by XmlPublishedContent.GetProperty // assume that nothing else is going to cache IPublishedProperty items (else would need to do ByKeySearch) // NOTE also clears all the media cache properties, which is OK (see media cache) - _cacheProvider.ClearCacheObjectTypes(); + _cacheProvider.ClearOfType(); //_cacheProvider.ClearCacheByKeySearch("XmlPublishedCache.PublishedContentCache:RecursiveProperty-"); } diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs index 09b76b5c2e..3ead5a5166 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs @@ -43,9 +43,9 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache private readonly IEntityXmlSerializer _entitySerializer; // must be specified by the ctor - private readonly ICacheProvider _cacheProvider; + private readonly IAppCache _cacheProvider; - public PublishedMediaCache(XmlStore xmlStore, IMediaService mediaService, IUserService userService, ICacheProvider cacheProvider, PublishedContentTypeCache contentTypeCache, IEntityXmlSerializer entitySerializer) + public PublishedMediaCache(XmlStore xmlStore, IMediaService mediaService, IUserService userService, IAppCache cacheProvider, PublishedContentTypeCache contentTypeCache, IEntityXmlSerializer entitySerializer) : base(false) { _mediaService = mediaService ?? throw new ArgumentNullException(nameof(mediaService)); @@ -66,7 +66,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache /// /// /// - internal PublishedMediaCache(IMediaService mediaService, IUserService userService, ISearcher searchProvider, ICacheProvider cacheProvider, PublishedContentTypeCache contentTypeCache, IEntityXmlSerializer entitySerializer) + internal PublishedMediaCache(IMediaService mediaService, IUserService userService, ISearcher searchProvider, IAppCache cacheProvider, PublishedContentTypeCache contentTypeCache, IEntityXmlSerializer entitySerializer) : base(false) { _mediaService = mediaService ?? throw new ArgumentNullException(nameof(mediaService)); @@ -678,7 +678,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache var cache = Current.ApplicationCache.RuntimeCache; var key = PublishedMediaCacheKey + id; - return (CacheValues)cache.GetCacheItem(key, () => func(id), _publishedMediaCacheTimespan); + return (CacheValues)cache.Get(key, () => func(id), _publishedMediaCacheTimespan); } internal static void ClearCache(int id) @@ -696,11 +696,11 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache // cache.ClearCacheItem(PublishedMediaCacheKey + GetValuesValue(exist.Values, "parentID")); // clear the item - cache.ClearCacheItem(key); + cache.Clear(key); // clear all children - in case we moved and their path has changed var fid = "/" + sid + "/"; - cache.ClearCacheObjectTypes((k, v) => + cache.ClearOfType((k, v) => GetValuesValue(v.Values, "path", "__Path").Contains(fid)); } diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMemberCache.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMemberCache.cs index 2328a1cefd..a622a4934c 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMemberCache.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMemberCache.cs @@ -13,11 +13,11 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache class PublishedMemberCache : IPublishedMemberCache { private readonly IMemberService _memberService; - private readonly ICacheProvider _requestCache; + private readonly IAppCache _requestCache; private readonly XmlStore _xmlStore; private readonly PublishedContentTypeCache _contentTypeCache; - public PublishedMemberCache(XmlStore xmlStore, ICacheProvider requestCacheProvider, IMemberService memberService, PublishedContentTypeCache contentTypeCache) + public PublishedMemberCache(XmlStore xmlStore, IAppCache requestCacheProvider, IMemberService memberService, PublishedContentTypeCache contentTypeCache) { _requestCache = requestCacheProvider; _memberService = memberService; diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedSnapshot.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedSnapshot.cs index 61ea7d2534..b9243309a2 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedSnapshot.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedSnapshot.cs @@ -38,10 +38,10 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache public IDomainCache Domains { get; } /// - public ICacheProvider SnapshotCache => null; + public IAppCache SnapshotCache => null; /// - public ICacheProvider ElementsCache => null; + public IAppCache ElementsCache => null; /// public IDisposable ForcedPreview(bool preview, Action callback = null) diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedSnapshotService.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedSnapshotService.cs index e286e9d95c..c4ce05c9a9 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedSnapshotService.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedSnapshotService.cs @@ -30,7 +30,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache private readonly IMemberService _memberService; private readonly IMediaService _mediaService; private readonly IUserService _userService; - private readonly ICacheProvider _requestCache; + private readonly IAppCache _requestCache; private readonly IGlobalSettings _globalSettings; private readonly IDefaultCultureAccessor _defaultCultureAccessor; private readonly ISiteDomainHelper _siteDomainHelper; @@ -42,7 +42,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache public PublishedSnapshotService(ServiceContext serviceContext, IPublishedContentTypeFactory publishedContentTypeFactory, IScopeProvider scopeProvider, - ICacheProvider requestCache, + IAppCache requestCache, IPublishedSnapshotAccessor publishedSnapshotAccessor, IVariationContextAccessor variationContextAccessor, IDocumentRepository documentRepository, IMediaRepository mediaRepository, IMemberRepository memberRepository, IDefaultCultureAccessor defaultCultureAccessor, @@ -63,7 +63,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache internal PublishedSnapshotService(ServiceContext serviceContext, IPublishedContentTypeFactory publishedContentTypeFactory, IScopeProvider scopeProvider, - ICacheProvider requestCache, + IAppCache requestCache, IPublishedSnapshotAccessor publishedSnapshotAccessor, IVariationContextAccessor variationContextAccessor, IDocumentRepository documentRepository, IMediaRepository mediaRepository, IMemberRepository memberRepository, IDefaultCultureAccessor defaultCultureAccessor, diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs index efd4535bd4..a1fda17df1 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs @@ -20,7 +20,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache [XmlType(Namespace = "http://umbraco.org/webservices/")] internal class XmlPublishedContent : PublishedContentBase { - private XmlPublishedContent(XmlNode xmlNode, bool isPreviewing, ICacheProvider cacheProvider, PublishedContentTypeCache contentTypeCache) + private XmlPublishedContent(XmlNode xmlNode, bool isPreviewing, IAppCache cacheProvider, PublishedContentTypeCache contentTypeCache) { _xmlNode = xmlNode; _isPreviewing = isPreviewing; @@ -31,7 +31,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache private readonly XmlNode _xmlNode; private readonly bool _isPreviewing; - private readonly ICacheProvider _cacheProvider; // at snapshot/request level (see PublishedContentCache) + private readonly IAppCache _cacheProvider; // at snapshot/request level (see PublishedContentCache) private readonly PublishedContentTypeCache _contentTypeCache; private readonly object _initializeLock = new object(); @@ -426,7 +426,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache /// Maintains a per-request cache of IPublishedContent items in order to make /// sure that we create only one instance of each for the duration of a request. The /// returned IPublishedContent is a model, if models are enabled. - public static IPublishedContent Get(XmlNode node, bool isPreviewing, ICacheProvider cacheProvider, PublishedContentTypeCache contentTypeCache) + public static IPublishedContent Get(XmlNode node, bool isPreviewing, IAppCache cacheProvider, PublishedContentTypeCache contentTypeCache) { // only 1 per request @@ -434,12 +434,12 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache var id = attrs?.GetNamedItem("id").Value; if (id.IsNullOrWhiteSpace()) throw new InvalidOperationException("Node has no ID attribute."); var key = CacheKeyPrefix + id; // dont bother with preview, wont change during request in Xml cache - return (IPublishedContent) cacheProvider.GetCacheItem(key, () => (new XmlPublishedContent(node, isPreviewing, cacheProvider, contentTypeCache)).CreateModel()); + return (IPublishedContent) cacheProvider.Get(key, () => (new XmlPublishedContent(node, isPreviewing, cacheProvider, contentTypeCache)).CreateModel()); } public static void ClearRequest() { - Current.ApplicationCache.RequestCache.ClearCacheByKeySearch(CacheKeyPrefix); + Current.ApplicationCache.RequestCache.ClearByKey(CacheKeyPrefix); } private const string CacheKeyPrefix = "CONTENTCACHE_XMLPUBLISHEDCONTENT_"; diff --git a/src/Umbraco.Web/Runtime/WebRuntime.cs b/src/Umbraco.Web/Runtime/WebRuntime.cs index c69a3bec8b..e9d27a2a1c 100644 --- a/src/Umbraco.Web/Runtime/WebRuntime.cs +++ b/src/Umbraco.Web/Runtime/WebRuntime.cs @@ -62,14 +62,14 @@ namespace Umbraco.Web.Runtime protected override AppCaches GetAppCaches() => new AppCaches( // we need to have the dep clone runtime cache provider to ensure // all entities are cached properly (cloned in and cloned out) - new DeepCloneRuntimeCacheProvider(new HttpRuntimeCacheProvider(HttpRuntime.Cache)), - new StaticCacheProvider(), + new DeepCloneAppCache(new WebCachingAppCache(HttpRuntime.Cache)), + new DictionaryCacheProvider(), // we need request based cache when running in web-based context - new HttpRequestCacheProvider(), - new IsolatedRuntimeCache(type => + new HttpRequestAppCache(), + new IsolatedCaches(type => // we need to have the dep clone runtime cache provider to ensure // all entities are cached properly (cloned in and cloned out) - new DeepCloneRuntimeCacheProvider(new ObjectCacheRuntimeCacheProvider()))); + new DeepCloneAppCache(new ObjectCacheAppCache()))); #endregion } diff --git a/src/Umbraco.Web/Services/ApplicationTreeService.cs b/src/Umbraco.Web/Services/ApplicationTreeService.cs index 2ddec054c7..30d50e136c 100644 --- a/src/Umbraco.Web/Services/ApplicationTreeService.cs +++ b/src/Umbraco.Web/Services/ApplicationTreeService.cs @@ -357,7 +357,7 @@ namespace Umbraco.Web.Services //remove the cache now that it has changed SD: I'm leaving this here even though it // is taken care of by events as well, I think unit tests may rely on it being cleared here. - _cache.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationTreeCacheKey); + _cache.RuntimeCache.Clear(CacheKeys.ApplicationTreeCacheKey); } } } diff --git a/src/Umbraco.Web/Services/SectionService.cs b/src/Umbraco.Web/Services/SectionService.cs index 2d06141292..09972a6dca 100644 --- a/src/Umbraco.Web/Services/SectionService.cs +++ b/src/Umbraco.Web/Services/SectionService.cs @@ -132,7 +132,7 @@ namespace Umbraco.Web.Services //remove the cache so it gets re-read ... SD: I'm leaving this here even though it // is taken care of by events as well, I think unit tests may rely on it being cleared here. - _cache.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationsCacheKey); + _cache.RuntimeCache.Clear(CacheKeys.ApplicationsCacheKey); } } } From d4c714eccd0a6097865998ca9d01ba39e4898517 Mon Sep 17 00:00:00 2001 From: Stephan Date: Thu, 17 Jan 2019 11:19:06 +0100 Subject: [PATCH 131/437] Stop injecting the runtime cache, use AppCaches --- src/Umbraco.Core/Cache/ObjectCacheAppCache.cs | 2 +- .../Composing/Composers/ServicesComposer.cs | 2 +- .../Composing/CompositionExtensions.cs | 1 - src/Umbraco.Core/ConfigsExtensions.cs | 4 ++-- .../Configuration/Grid/GridConfig.cs | 4 ++-- .../Configuration/Grid/GridEditorsConfig.cs | 10 +++++----- src/Umbraco.Core/Manifest/ManifestParser.cs | 9 +++++---- .../Implement/DictionaryRepository.cs | 4 ++-- .../Implement/RepositoryBaseOfTIdTEntity.cs | 12 ++++++------ .../Implement/ServerRegistrationRepository.cs | 2 +- src/Umbraco.Core/Runtime/CoreRuntime.cs | 3 +-- .../LocalizedTextServiceFileSources.cs | 17 ++++++----------- .../Manifest/ManifestParserTests.cs | 2 +- .../Models/Mapping/AutoMapperTests.cs | 2 +- .../Scoping/ScopedRepositoryTests.cs | 2 +- src/Umbraco.Tests/TestHelpers/TestObjects.cs | 2 +- src/Umbraco.Tests/Testing/UmbracoTestBase.cs | 9 ++++----- .../Editors/ExamineManagementController.cs | 15 ++++----------- .../Models/Mapping/UserMapperProfile.cs | 8 ++++---- 19 files changed, 48 insertions(+), 62 deletions(-) diff --git a/src/Umbraco.Core/Cache/ObjectCacheAppCache.cs b/src/Umbraco.Core/Cache/ObjectCacheAppCache.cs index 9c5917a53c..954622fc4b 100644 --- a/src/Umbraco.Core/Cache/ObjectCacheAppCache.cs +++ b/src/Umbraco.Core/Cache/ObjectCacheAppCache.cs @@ -31,7 +31,7 @@ namespace Umbraco.Core.Cache /// /// Gets the internal memory cache, for tests only! /// - internal readonly ObjectCache MemoryCache; + internal ObjectCache MemoryCache { get; private set; } /// public object Get(string key) diff --git a/src/Umbraco.Core/Composing/Composers/ServicesComposer.cs b/src/Umbraco.Core/Composing/Composers/ServicesComposer.cs index 9ed4a7265c..2af7c5a011 100644 --- a/src/Umbraco.Core/Composing/Composers/ServicesComposer.cs +++ b/src/Umbraco.Core/Composing/Composers/ServicesComposer.cs @@ -116,7 +116,7 @@ namespace Umbraco.Core.Composing.Composers return new LocalizedTextServiceFileSources( container.GetInstance(), - container.GetInstance().RuntimeCache, + container.GetInstance(), mainLangFolder, pluginLangFolders.Concat(userLangFolders)); } diff --git a/src/Umbraco.Core/Composing/CompositionExtensions.cs b/src/Umbraco.Core/Composing/CompositionExtensions.cs index 910062688c..c312259b82 100644 --- a/src/Umbraco.Core/Composing/CompositionExtensions.cs +++ b/src/Umbraco.Core/Composing/CompositionExtensions.cs @@ -28,7 +28,6 @@ namespace Umbraco.Core.Composing composition.RegisterUnique(profilingLogger); composition.RegisterUnique(mainDom); composition.RegisterUnique(appCaches); - composition.RegisterUnique(factory => factory.GetInstance().RuntimeCache); composition.RegisterUnique(databaseFactory); composition.RegisterUnique(factory => factory.GetInstance().SqlContext); composition.RegisterUnique(typeLoader); diff --git a/src/Umbraco.Core/ConfigsExtensions.cs b/src/Umbraco.Core/ConfigsExtensions.cs index 9b2abda53c..0fcea5f430 100644 --- a/src/Umbraco.Core/ConfigsExtensions.cs +++ b/src/Umbraco.Core/ConfigsExtensions.cs @@ -46,7 +46,7 @@ namespace Umbraco.Core configs.Add(() => new CoreDebug()); // GridConfig depends on runtime caches, manifest parsers... and cannot be available during composition - configs.Add(factory => new GridConfig(factory.GetInstance(), factory.GetInstance(), configDir, factory.GetInstance().Debug)); + configs.Add(factory => new GridConfig(factory.GetInstance(), factory.GetInstance(), configDir, factory.GetInstance().Debug)); } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/Configuration/Grid/GridConfig.cs b/src/Umbraco.Core/Configuration/Grid/GridConfig.cs index 979eccb839..b2dae09fc9 100644 --- a/src/Umbraco.Core/Configuration/Grid/GridConfig.cs +++ b/src/Umbraco.Core/Configuration/Grid/GridConfig.cs @@ -6,9 +6,9 @@ namespace Umbraco.Core.Configuration.Grid { class GridConfig : IGridConfig { - public GridConfig(ILogger logger, IAppPolicedCache runtimeCache, DirectoryInfo configFolder, bool isDebug) + public GridConfig(ILogger logger, AppCaches appCaches, DirectoryInfo configFolder, bool isDebug) { - EditorsConfig = new GridEditorsConfig(logger, runtimeCache, configFolder, isDebug); + EditorsConfig = new GridEditorsConfig(logger, appCaches, configFolder, isDebug); } public IGridEditorsConfig EditorsConfig { get; } diff --git a/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs b/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs index 121b74194c..e2f99a753b 100644 --- a/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs +++ b/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs @@ -13,14 +13,14 @@ namespace Umbraco.Core.Configuration.Grid internal class GridEditorsConfig : IGridEditorsConfig { private readonly ILogger _logger; - private readonly IAppPolicedCache _runtimeCache; + private readonly AppCaches _appCaches; private readonly DirectoryInfo _configFolder; private readonly bool _isDebug; - public GridEditorsConfig(ILogger logger, IAppPolicedCache runtimeCache, DirectoryInfo configFolder, bool isDebug) + public GridEditorsConfig(ILogger logger, AppCaches appCaches, DirectoryInfo configFolder, bool isDebug) { _logger = logger; - _runtimeCache = runtimeCache; + _appCaches = appCaches; _configFolder = configFolder; _isDebug = isDebug; } @@ -32,7 +32,7 @@ namespace Umbraco.Core.Configuration.Grid List GetResult() { // fixme - should use the common one somehow! + ignoring _appPlugins here! - var parser = new ManifestParser(_runtimeCache, Current.ManifestValidators, _logger); + var parser = new ManifestParser(_appCaches, Current.ManifestValidators, _logger); var editors = new List(); var gridConfig = Path.Combine(_configFolder.FullName, "grid.editors.config.js"); @@ -62,7 +62,7 @@ namespace Umbraco.Core.Configuration.Grid //cache the result if debugging is disabled var result = _isDebug ? GetResult() - : _runtimeCache.GetCacheItem>(typeof(GridEditorsConfig) + ".Editors",GetResult, TimeSpan.FromMinutes(10)); + : _appCaches.RuntimeCache.GetCacheItem>(typeof(GridEditorsConfig) + ".Editors",GetResult, TimeSpan.FromMinutes(10)); return result; } diff --git a/src/Umbraco.Core/Manifest/ManifestParser.cs b/src/Umbraco.Core/Manifest/ManifestParser.cs index fd344674af..40e99bb079 100644 --- a/src/Umbraco.Core/Manifest/ManifestParser.cs +++ b/src/Umbraco.Core/Manifest/ManifestParser.cs @@ -29,16 +29,17 @@ namespace Umbraco.Core.Manifest /// /// Initializes a new instance of the class. /// - public ManifestParser(IAppPolicedCache cache, ManifestValueValidatorCollection validators, ILogger logger) - : this(cache, validators, "~/App_Plugins", logger) + public ManifestParser(AppCaches appCaches, ManifestValueValidatorCollection validators, ILogger logger) + : this(appCaches, validators, "~/App_Plugins", logger) { } /// /// Initializes a new instance of the class. /// - private ManifestParser(IAppPolicedCache cache, ManifestValueValidatorCollection validators, string path, ILogger logger) + private ManifestParser(AppCaches appCaches, ManifestValueValidatorCollection validators, string path, ILogger logger) { - _cache = cache ?? throw new ArgumentNullException(nameof(cache)); + if (appCaches == null) throw new ArgumentNullException(nameof(appCaches)); + _cache = appCaches.RuntimeCache; _validators = validators ?? throw new ArgumentNullException(nameof(validators)); if (string.IsNullOrWhiteSpace(path)) throw new ArgumentNullOrEmptyException(nameof(path)); Path = path; diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DictionaryRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DictionaryRepository.cs index 9b191d830c..be1e28fcc1 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/DictionaryRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DictionaryRepository.cs @@ -224,13 +224,13 @@ namespace Umbraco.Core.Persistence.Repositories.Implement public IDictionaryItem Get(Guid uniqueId) { - var uniqueIdRepo = new DictionaryByUniqueIdRepository(this, ScopeAccessor, GlobalCache, Logger); + var uniqueIdRepo = new DictionaryByUniqueIdRepository(this, ScopeAccessor, AppCaches, Logger); return uniqueIdRepo.Get(uniqueId); } public IDictionaryItem Get(string key) { - var keyRepo = new DictionaryByKeyRepository(this, ScopeAccessor, GlobalCache, Logger); + var keyRepo = new DictionaryByKeyRepository(this, ScopeAccessor, AppCaches, Logger); return keyRepo.Get(key); } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs index f106949c77..6862173786 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs @@ -19,18 +19,18 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { private IRepositoryCachePolicy _cachePolicy; - protected RepositoryBase(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) + protected RepositoryBase(IScopeAccessor scopeAccessor, AppCaches appCaches, ILogger logger) { ScopeAccessor = scopeAccessor ?? throw new ArgumentNullException(nameof(scopeAccessor)); Logger = logger ?? throw new ArgumentNullException(nameof(logger)); - GlobalCache = cache ?? throw new ArgumentNullException(nameof(cache)); + AppCaches = appCaches ?? throw new ArgumentNullException(nameof(appCaches)); } protected ILogger Logger { get; } - protected AppCaches GlobalCache { get; } + protected AppCaches AppCaches { get; } - protected IAppPolicedCache GlobalIsolatedCache => GlobalCache.IsolatedCaches.GetOrCreate(); + protected IAppPolicedCache GlobalIsolatedCache => AppCaches.IsolatedCaches.GetOrCreate(); protected IScopeAccessor ScopeAccessor { get; } @@ -67,7 +67,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement switch (AmbientScope.RepositoryCacheMode) { case RepositoryCacheMode.Default: - return GlobalCache.IsolatedCaches.GetOrCreate(); + return AppCaches.IsolatedCaches.GetOrCreate(); case RepositoryCacheMode.Scoped: return AmbientScope.IsolatedCaches.GetOrCreate(); case RepositoryCacheMode.None: @@ -127,7 +127,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { get { - if (GlobalCache == AppCaches.NoCache) + if (AppCaches == AppCaches.NoCache) return NoCacheRepositoryCachePolicy.Instance; // create the cache policy using IsolatedCache which is either global diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ServerRegistrationRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ServerRegistrationRepository.cs index ead7c066be..298e503736 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ServerRegistrationRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ServerRegistrationRepository.cs @@ -28,7 +28,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // and this is because the repository is special and should not participate in scopes // (cleanup in v8) // - return new FullDataSetRepositoryCachePolicy(GlobalCache.RuntimeCache, ScopeAccessor, GetEntityId, /*expires:*/ false); + return new FullDataSetRepositoryCachePolicy(AppCaches.RuntimeCache, ScopeAccessor, GetEntityId, /*expires:*/ false); } public void ClearCache() diff --git a/src/Umbraco.Core/Runtime/CoreRuntime.cs b/src/Umbraco.Core/Runtime/CoreRuntime.cs index e37b5e254e..6bfe9cdb55 100644 --- a/src/Umbraco.Core/Runtime/CoreRuntime.cs +++ b/src/Umbraco.Core/Runtime/CoreRuntime.cs @@ -102,7 +102,6 @@ namespace Umbraco.Core.Runtime // application caches var appCaches = GetAppCaches(); - var runtimeCache = appCaches.RuntimeCache; // database factory var databaseFactory = GetDatabaseFactory(); @@ -112,7 +111,7 @@ namespace Umbraco.Core.Runtime // type loader var localTempStorage = configs.Global().LocalTempStorageLocation; - var typeLoader = new TypeLoader(runtimeCache, localTempStorage, ProfilingLogger); + var typeLoader = new TypeLoader(appCaches.RuntimeCache, localTempStorage, ProfilingLogger); // runtime state // beware! must use '() => _factory.GetInstance()' and NOT '_factory.GetInstance' diff --git a/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs b/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs index 5577508adb..8c2d277348 100644 --- a/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs +++ b/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs @@ -37,16 +37,16 @@ namespace Umbraco.Core.Services.Implement /// public LocalizedTextServiceFileSources( ILogger logger, - IAppPolicedCache cache, + AppCaches appCaches, DirectoryInfo fileSourceFolder, IEnumerable supplementFileSources) { if (logger == null) throw new ArgumentNullException("logger"); - if (cache == null) throw new ArgumentNullException("cache"); + if (appCaches == null) throw new ArgumentNullException("cache"); if (fileSourceFolder == null) throw new ArgumentNullException("fileSourceFolder"); _logger = logger; - _cache = cache; + _cache = appCaches.RuntimeCache; //Create the lazy source for the _xmlSources _xmlSources = new Lazy>>(() => @@ -137,14 +137,9 @@ namespace Umbraco.Core.Services.Implement /// /// Constructor /// - /// - /// - /// - public LocalizedTextServiceFileSources(ILogger logger, IAppPolicedCache cache, DirectoryInfo fileSourceFolder) - : this(logger, cache, fileSourceFolder, Enumerable.Empty()) - { - - } + public LocalizedTextServiceFileSources(ILogger logger, AppCaches appCaches, DirectoryInfo fileSourceFolder) + : this(logger, appCaches, fileSourceFolder, Enumerable.Empty()) + { } /// /// returns all xml sources for all culture files found in the folder diff --git a/src/Umbraco.Tests/Manifest/ManifestParserTests.cs b/src/Umbraco.Tests/Manifest/ManifestParserTests.cs index 74f9fd7157..3f1e668dc0 100644 --- a/src/Umbraco.Tests/Manifest/ManifestParserTests.cs +++ b/src/Umbraco.Tests/Manifest/ManifestParserTests.cs @@ -44,7 +44,7 @@ namespace Umbraco.Tests.Manifest new RequiredValidator(Mock.Of()), new RegexValidator(Mock.Of(), null) }; - _parser = new ManifestParser(NoAppCache.Instance, new ManifestValueValidatorCollection(validators), Mock.Of()); + _parser = new ManifestParser(AppCaches.Disabled, new ManifestValueValidatorCollection(validators), Mock.Of()); } [Test] diff --git a/src/Umbraco.Tests/Models/Mapping/AutoMapperTests.cs b/src/Umbraco.Tests/Models/Mapping/AutoMapperTests.cs index f48abc1233..57d38e342e 100644 --- a/src/Umbraco.Tests/Models/Mapping/AutoMapperTests.cs +++ b/src/Umbraco.Tests/Models/Mapping/AutoMapperTests.cs @@ -20,7 +20,7 @@ namespace Umbraco.Tests.Models.Mapping base.Compose(); var manifestBuilder = new ManifestParser( - AppCaches.Disabled.RuntimeCache, + AppCaches.Disabled, new ManifestValueValidatorCollection(Enumerable.Empty()), Composition.Logger) { diff --git a/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs b/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs index 6e01de1670..12cd02d2e9 100644 --- a/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs +++ b/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs @@ -37,7 +37,7 @@ namespace Umbraco.Tests.Scoping .Add(() => Composition.TypeLoader.GetCacheRefreshers()); } - protected override AppCaches GetCacheHelper() + protected override AppCaches GetAppCaches() { // this is what's created core web runtime return new AppCaches( diff --git a/src/Umbraco.Tests/TestHelpers/TestObjects.cs b/src/Umbraco.Tests/TestHelpers/TestObjects.cs index 29eb649c48..34c97fcea2 100644 --- a/src/Umbraco.Tests/TestHelpers/TestObjects.cs +++ b/src/Umbraco.Tests/TestHelpers/TestObjects.cs @@ -140,7 +140,7 @@ namespace Umbraco.Tests.TestHelpers return new LocalizedTextServiceFileSources( logger, - cache.RuntimeCache, + cache, mainLangFolder, pluginLangFolders.Concat(userLangFolders)); diff --git a/src/Umbraco.Tests/Testing/UmbracoTestBase.cs b/src/Umbraco.Tests/Testing/UmbracoTestBase.cs index 2d6e01b6bb..fd617b5a21 100644 --- a/src/Umbraco.Tests/Testing/UmbracoTestBase.cs +++ b/src/Umbraco.Tests/Testing/UmbracoTestBase.cs @@ -125,9 +125,9 @@ namespace Umbraco.Tests.Testing var (logger, profiler) = GetLoggers(Options.Logger); var proflogger = new ProfilingLogger(logger, profiler); - var cacheHelper = GetCacheHelper(); + var appCaches = GetAppCaches(); var globalSettings = SettingsForTests.GetDefaultGlobalSettings(); - var typeLoader = GetTypeLoader(cacheHelper.RuntimeCache, globalSettings, proflogger, Options.TypeLoader); + var typeLoader = GetTypeLoader(appCaches.RuntimeCache, globalSettings, proflogger, Options.TypeLoader); var register = RegisterFactory.Create(); @@ -137,8 +137,7 @@ namespace Umbraco.Tests.Testing Composition.RegisterUnique(logger); Composition.RegisterUnique(profiler); Composition.RegisterUnique(proflogger); - Composition.RegisterUnique(cacheHelper); - Composition.RegisterUnique(cacheHelper.RuntimeCache); + Composition.RegisterUnique(appCaches); TestObjects = new TestObjects(register); Compose(); @@ -199,7 +198,7 @@ namespace Umbraco.Tests.Testing return (logger, profiler); } - protected virtual AppCaches GetCacheHelper() + protected virtual AppCaches GetAppCaches() { return AppCaches.Disabled; } diff --git a/src/Umbraco.Web/Editors/ExamineManagementController.cs b/src/Umbraco.Web/Editors/ExamineManagementController.cs index db9de424a9..8d930b8ed7 100644 --- a/src/Umbraco.Web/Editors/ExamineManagementController.cs +++ b/src/Umbraco.Web/Editors/ExamineManagementController.cs @@ -1,26 +1,19 @@ using System; using System.Collections.Generic; -using System.ComponentModel; using System.Linq; using System.Net; using System.Net.Http; -using System.Reflection; using System.Web.Http; using Examine; -using Examine.LuceneEngine; using Examine.LuceneEngine.Providers; -using Lucene.Net.Analysis; -using Lucene.Net.QueryParsers; using Umbraco.Core; using Umbraco.Core.Cache; -using Umbraco.Core.Composing; using Umbraco.Core.Logging; using Umbraco.Examine; using Umbraco.Web.Models.ContentEditing; using Umbraco.Web.Mvc; using Umbraco.Web.Search; using SearchResult = Umbraco.Web.Models.ContentEditing.SearchResult; -using Version = Lucene.Net.Util.Version; namespace Umbraco.Web.Editors { @@ -29,17 +22,17 @@ namespace Umbraco.Web.Editors { private readonly IExamineManager _examineManager; private readonly ILogger _logger; - private readonly IAppPolicedCache _runtimeCacheProvider; + private readonly IAppPolicedCache _runtimeCache; private readonly IndexRebuilder _indexRebuilder; public ExamineManagementController(IExamineManager examineManager, ILogger logger, - IAppPolicedCache runtimeCacheProvider, + AppCaches appCaches, IndexRebuilder indexRebuilder) { _examineManager = examineManager; _logger = logger; - _runtimeCacheProvider = runtimeCacheProvider; + _runtimeCache = appCaches.RuntimeCache; _indexRebuilder = indexRebuilder; } @@ -269,7 +262,7 @@ namespace Umbraco.Web.Editors >($"Rebuilding index '{indexer.Name}' done, {indexer.CommitCount} items committed (can differ from the number of items in the index)"); var cacheKey = "temp_indexing_op_" + indexer.Name; - _runtimeCacheProvider.Clear(cacheKey); + _runtimeCache.Clear(cacheKey); } } } diff --git a/src/Umbraco.Web/Models/Mapping/UserMapperProfile.cs b/src/Umbraco.Web/Models/Mapping/UserMapperProfile.cs index 4b27af3120..b6fc94eb3c 100644 --- a/src/Umbraco.Web/Models/Mapping/UserMapperProfile.cs +++ b/src/Umbraco.Web/Models/Mapping/UserMapperProfile.cs @@ -22,7 +22,7 @@ namespace Umbraco.Web.Models.Mapping => entity is ContentEntitySlim contentEntity ? contentEntity.ContentTypeIcon : null; public UserMapperProfile(ILocalizedTextService textService, IUserService userService, IEntityService entityService, ISectionService sectionService, - IAppPolicedCache runtimeCache, ActionCollection actions, IGlobalSettings globalSettings) + AppCaches appCaches, ActionCollection actions, IGlobalSettings globalSettings) { var userGroupDefaultPermissionsResolver = new UserGroupDefaultPermissionsResolver(textService, actions); @@ -243,7 +243,7 @@ namespace Umbraco.Web.Models.Mapping //Important! Currently we are never mapping to multiple UserDisplay objects but if we start doing that // this will cause an N+1 and we'll need to change how this works. CreateMap() - .ForMember(dest => dest.Avatars, opt => opt.MapFrom(user => user.GetUserAvatarUrls(runtimeCache))) + .ForMember(dest => dest.Avatars, opt => opt.MapFrom(user => user.GetUserAvatarUrls(appCaches.RuntimeCache))) .ForMember(dest => dest.Username, opt => opt.MapFrom(user => user.Username)) .ForMember(dest => dest.LastLoginDate, opt => opt.MapFrom(user => user.LastLoginDate == default(DateTime) ? null : (DateTime?)user.LastLoginDate)) .ForMember(dest => dest.UserGroups, opt => opt.MapFrom(user => user.Groups)) @@ -293,7 +293,7 @@ namespace Umbraco.Web.Models.Mapping //like the load time is waiting. .ForMember(detail => detail.Avatars, - opt => opt.MapFrom(user => user.GetUserAvatarUrls(runtimeCache))) + opt => opt.MapFrom(user => user.GetUserAvatarUrls(appCaches.RuntimeCache))) .ForMember(dest => dest.Username, opt => opt.MapFrom(user => user.Username)) .ForMember(dest => dest.UserGroups, opt => opt.MapFrom(user => user.Groups)) .ForMember(dest => dest.LastLoginDate, opt => opt.MapFrom(user => user.LastLoginDate == default(DateTime) ? null : (DateTime?)user.LastLoginDate)) @@ -313,7 +313,7 @@ namespace Umbraco.Web.Models.Mapping .ForMember(dest => dest.AdditionalData, opt => opt.Ignore()); CreateMap() - .ForMember(dest => dest.Avatars, opt => opt.MapFrom(user => user.GetUserAvatarUrls(runtimeCache))) + .ForMember(dest => dest.Avatars, opt => opt.MapFrom(user => user.GetUserAvatarUrls(appCaches.RuntimeCache))) .ForMember(dest => dest.UserId, opt => opt.MapFrom(user => GetIntId(user.Id))) .ForMember(dest => dest.StartContentIds, opt => opt.MapFrom(user => user.CalculateContentStartNodeIds(entityService))) .ForMember(dest => dest.StartMediaIds, opt => opt.MapFrom(user => user.CalculateMediaStartNodeIds(entityService))) From bcda4c186f1afade963acbf9707362478ca33fa1 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Thu, 17 Jan 2019 12:42:38 +0100 Subject: [PATCH 132/437] Don't allow templates on element types --- .../views/templates/templates.controller.js | 11 ++++- .../views/templates/templates.html | 43 +++++++++++-------- src/Umbraco.Web.UI/Umbraco/config/lang/da.xml | 3 ++ src/Umbraco.Web.UI/Umbraco/config/lang/en.xml | 1 + .../Umbraco/config/lang/en_us.xml | 1 + .../Editors/ContentTypeController.cs | 9 ++++ 6 files changed, 48 insertions(+), 20 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/templates/templates.controller.js b/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/templates/templates.controller.js index 849b5ccd7b..1d825fdf26 100644 --- a/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/templates/templates.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/templates/templates.controller.js @@ -19,13 +19,13 @@ vm.canCreateTemplate = false; vm.updateTemplatePlaceholder = false; vm.loadingTemplates = false; + vm.isElement = $scope.model.isElement; vm.createTemplate = createTemplate; /* ---------- INIT ---------- */ function onInit() { - vm.loadingTemplates = true; entityResource.getAll("Template").then(function (templates) { @@ -86,6 +86,15 @@ vm.canCreateTemplate = existingTemplate ? false : true; } + var unbindWatcher = $scope.$watch("model.isElement", + function(newValue, oldValue) { + vm.isElement = newValue; + } + ); + $scope.$on("$destroy", function () { + unbindWatcher(); + }); + onInit(); } diff --git a/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/templates/templates.html b/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/templates/templates.html index 8084497441..de62e151a3 100644 --- a/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/templates/templates.html +++ b/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/templates/templates.html @@ -1,5 +1,5 @@
- +
@@ -9,29 +9,34 @@
- - + + - - + +
+ + An Element type can't have any templates + diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml index 7a370ba90e..c8a5f5f37e 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml @@ -1225,6 +1225,9 @@ Mange hilsner fra Umbraco robotten Medlem kan redigere Vis på medlemsprofil fane har ingen sorteringsrækkefølge + Er en Element-type + En Element-type er tiltænkt brug i f.eks. Nested Content, ikke i indholdstræet + En Element-type kan ikke have nogen skabeloner Alternativt felt diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml index 987203442a..de6f56ab75 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml @@ -1520,6 +1520,7 @@ To manage your website, simply open the Umbraco back office and start adding con Allow varying by culture Is an Element type An Element type is meant to be used for instance in Nested Content, and not in the tree + An Element type can't have templates assigned Building models 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 1860d3afc9..360dff6195 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml @@ -1561,6 +1561,7 @@ To manage your website, simply open the Umbraco back office and start adding con Allow varying by culture Is an Element type An Element type is meant to be used for instance in Nested Content, and not in the tree + An Element type can't have any templates Add language diff --git a/src/Umbraco.Web/Editors/ContentTypeController.cs b/src/Umbraco.Web/Editors/ContentTypeController.cs index 397f6b3e9d..d7ca2d19f6 100644 --- a/src/Umbraco.Web/Editors/ContentTypeController.cs +++ b/src/Umbraco.Web/Editors/ContentTypeController.cs @@ -263,6 +263,15 @@ namespace Umbraco.Web.Editors } } + //Before we send this model into this saving/mapping pipeline, we also need to do some cleanup on templates. + //If the doc type is an element type, it can't have any templates assigned, so we need to reset the allowed templates here. + if (contentTypeSave.IsElement) + { + contentTypeSave.AllowedTemplates = new string[] { }; + contentTypeSave.DefaultTemplate = null; + } + + var savedCt = PerformPostSave( contentTypeSave: contentTypeSave, getContentType: i => Services.ContentTypeService.Get(i), From 174db6571425972a40ac69e744d10b10334f65e4 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Thu, 17 Jan 2019 13:33:44 +0100 Subject: [PATCH 133/437] 3908 - Query build returns v8 valid statement - and examples of returned items --- .../src/common/services/editor.service.js | 37 +++--- .../querybuilder/querybuilder.html | 70 +++++----- .../Editors/TemplateQueryController.cs | 121 ++++++------------ .../Models/TemplateQuery/QueryCondition.cs | 104 +++++++-------- .../Models/TemplateQuery/QueryResultModel.cs | 2 +- src/Umbraco.Web/PublishedContentExtensions.cs | 65 +--------- 6 files changed, 138 insertions(+), 261 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/services/editor.service.js b/src/Umbraco.Web.UI.Client/src/common/services/editor.service.js index 721efe251c..2427b6249c 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/editor.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/editor.service.js @@ -4,10 +4,10 @@ * * @description * Added in Umbraco 8.0. Application-wide service for handling infinite editing. - * * - * - * + * + * + *

Open a build-in infinite editor (media picker)

Markup example

@@ -97,7 +97,7 @@ When building a custom infinite editor view you can use the same components as a
                 hide-icon="true"
                 hide-description="true">
             
-        
+
             
                 
                     
@@ -166,7 +166,7 @@ When building a custom infinite editor view you can use the same components as a
 
         let editorsKeyboardShorcuts = [];
         var editors = [];
-        
+
         /**
          * @ngdoc method
          * @name umbraco.services.editorService#getEditors
@@ -220,7 +220,7 @@ When building a custom infinite editor view you can use the same components as a
                 editors: editors,
                 editor: editor
             };
-            
+
             eventsService.emit("appState.editors.open", args);
         }
 
@@ -245,7 +245,7 @@ When building a custom infinite editor view you can use the same components as a
 
             // emit event to let components know an editor has been removed
             eventsService.emit("appState.editors.close", args);
-            
+
             // delay required to map the properties to the correct editor due
             // to another delay in the closing animation of the editor
             $timeout(function() {
@@ -287,7 +287,7 @@ When building a custom infinite editor view you can use the same components as a
          * @param {Boolean} editor.create Create new content item
          * @param {Function} editor.submit Callback function when the publish and close button is clicked. Returns the editor model object
          * @param {Function} editor.close Callback function when the close button is clicked.
-         * 
+         *
          * @returns {Object} editor object
          */
         function contentEditor(editor) {
@@ -302,12 +302,12 @@ When building a custom infinite editor view you can use the same components as a
          *
          * @description
          * Opens a content picker in infinite editing, the submit callback returns an array of selected items
-         * 
+         *
          * @param {Object} editor rendering options
          * @param {Boolean} editor.multiPicker Pick one or multiple items
          * @param {Function} editor.submit Callback function when the submit button is clicked. Returns the editor model object
          * @param {Function} editor.close Callback function when the close button is clicked.
-         * 
+         *
          * @returns {Object} editor object
          */
         function contentPicker(editor) {
@@ -523,7 +523,6 @@ When building a custom infinite editor view you can use the same components as a
          */
         function queryBuilder(editor) {
             editor.view = "views/common/infiniteeditors/querybuilder/querybuilder.html";
-            editor.size = "small";
             open(editor);
         }
 
@@ -699,7 +698,7 @@ When building a custom infinite editor view you can use the same components as a
          *
          * @description
          * Opens the section picker in infinite editing, the submit callback returns an array of the selected items
-         * 
+         *
          * @param {Object} editor rendering options
          * @param {Array} editor.availableItems Array of available items.
          * @param {Array} editor.selectedItems Array of selected items. When passed in the selected items will be filtered from the available items.
@@ -721,7 +720,7 @@ When building a custom infinite editor view you can use the same components as a
          *
          * @description
          * Opens a macro picker in infinite editing, the submit callback returns an array of the selected items
-         * 
+         *
          * @param {Callback} editor.submit Submits the editor.
          * @param {Callback} editor.close Closes the editor.
          * @returns {Object} editor object
@@ -739,7 +738,7 @@ When building a custom infinite editor view you can use the same components as a
          *
          * @description
          * Opens a member group picker in infinite editing.
-         * 
+         *
          * @param {Object} editor rendering options
          * @param {Object} editor.multiPicker Pick one or multiple items.
          * @param {Callback} editor.submit Submits the editor.
@@ -753,22 +752,22 @@ When building a custom infinite editor view you can use the same components as a
         }
 
         ///////////////////////
-        
+
         /**
          * @ngdoc method
          * @name umbraco.services.editorService#storeKeyboardShortcuts
          * @methodOf umbraco.services.editorService
          *
          * @description
-         * Internal method to keep track of keyboard shortcuts registered 
+         * Internal method to keep track of keyboard shortcuts registered
          * to each editor so they can be rebound when an editor closes
-         * 
+         *
          */
         function unbindKeyboardShortcuts() {
             const shortcuts = angular.copy(keyboardService.keyboardEvent);
             editorsKeyboardShorcuts.push(shortcuts);
 
-            // unbind the current shortcuts because we only want to 
+            // unbind the current shortcuts because we only want to
             // shortcuts from the newly opened editor working
             for (let [key, value] of Object.entries(shortcuts)) {
                 keyboardService.unbind(key);
@@ -782,7 +781,7 @@ When building a custom infinite editor view you can use the same components as a
          *
          * @description
          * Internal method to rebind keyboard shortcuts for the editor in focus
-         * 
+         *
          */
         function rebindKeyboardShortcuts() {
             // find the shortcuts from the previous editor
diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/querybuilder/querybuilder.html b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/querybuilder/querybuilder.html
index 725871337d..2d2263c19f 100644
--- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/querybuilder/querybuilder.html
+++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/querybuilder/querybuilder.html
@@ -9,7 +9,7 @@
             hide-icon="true"
             hide-description="true">
 		
-		
+
 		
 
 			
@@ -19,14 +19,13 @@
 
 						
- + I want - +
- +
- + from + label="{{vm.query.source.name}}"> - +
- +
- + where and - +
@@ -83,14 +79,13 @@ - +
- +
- + - + - + - - + - + - + - +
- +
- + order by - +
- +
- +
- -
{{model.result.resultCount}} items, returned in {{model.result.executionTime}} ms
- + +
{{model.result.resultCount}} items, returned in N/A ms
+ - +
{{model.result.queryExpression}}
- +
@@ -203,7 +197,7 @@ label-key="general_submit" action="vm.submit(model)"> - + diff --git a/src/Umbraco.Web/Editors/TemplateQueryController.cs b/src/Umbraco.Web/Editors/TemplateQueryController.cs index 00e124cb29..58470e1f3e 100644 --- a/src/Umbraco.Web/Editors/TemplateQueryController.cs +++ b/src/Umbraco.Web/Editors/TemplateQueryController.cs @@ -59,24 +59,19 @@ namespace Umbraco.Web.Editors public QueryResultModel PostTemplateQuery(QueryModel model) { - + var queryResult = new QueryResultModel(); var sb = new StringBuilder(); - var indention = Environment.NewLine + "\t\t\t\t\t\t"; + var indention = Environment.NewLine + " "; sb.Append("Model.Root()"); - //fixme: This timer thing is not correct, it's definitely not timing the resulting query, the timer really isn't important and might as well be removed - var timer = new Stopwatch(); - - timer.Start(); - var currentPage = Umbraco.ContentAtRoot().FirstOrDefault(); - timer.Stop(); var pointerNode = currentPage; + // adjust the "FROM" if (model != null && model.Source != null && model.Source.Id > 0) { @@ -84,26 +79,22 @@ namespace Umbraco.Web.Editors if (targetNode != null) { - var aliases = this.GetChildContentTypeAliases(targetNode, currentPage).Reverse(); + var path = this.GetPathOfContents(targetNode, currentPage).Reverse(); - foreach (var contentTypeAlias in aliases) + foreach (var content in path) { - timer.Start(); - - pointerNode = pointerNode.FirstChild(x => x.ContentType.Alias == contentTypeAlias); + pointerNode = pointerNode.FirstChild(x => x.Key == content.Key); if (pointerNode == null) break; - - timer.Stop(); - - sb.AppendFormat(".FirstChild(\"{0}\")", contentTypeAlias); + sb.Append(indention); + sb.AppendFormat(".FirstChild(Guid.Parse(\"{0}\"))", content.Key); } if (pointerNode == null || pointerNode.Id != model.Source.Id) { - // we did not find the path + // we did not find the path, This will happen if the chosen source is not a descendants sb.Clear(); - sb.AppendFormat("Umbraco.Content({0})", model.Source.Id); + sb.AppendFormat("Umbraco.Content(Guid.Parse(\"{0}\"))",targetNode.Key); pointerNode = targetNode; } } @@ -111,31 +102,21 @@ namespace Umbraco.Web.Editors // TYPE to return if filtered by type IEnumerable contents; + sb.Append(indention); if (model != null && model.ContentType != null && string.IsNullOrEmpty(model.ContentType.Alias) == false) { - timer.Start(); - contents = pointerNode.Children.OfTypes(new[] { model.ContentType.Alias }); + contents = pointerNode.Children(model.ContentType.Alias); - timer.Stop(); - // TODO change to .Children({0}) sb.AppendFormat(".Children(\"{0}\")", model.ContentType.Alias); } else { - timer.Start(); - contents = pointerNode.Children; - timer.Stop(); + contents = pointerNode.Children(); sb.Append(".Children()"); } - //setup 2 clauses, 1 for returning, 1 for testing - var clause = string.Empty; - var tokenizedClause = string.Empty; - // WHERE - var token = 0; - if (model != null) { model.Filters = model.Filters.Where(x => x.ConstraintValue != null); @@ -145,56 +126,25 @@ namespace Umbraco.Web.Editors if (string.IsNullOrEmpty(condition.ConstraintValue)) continue; //x is passed in as the parameter alias for the linq where statement clause - var operation = condition.BuildCondition("x"); - var tokenizedOperation = condition.BuildTokenizedCondition(token); + var operation = condition.BuildCondition("x", contents, Properties); - clause = string.IsNullOrEmpty(clause) ? operation : string.Concat(new[] { clause, " && ", operation }); - tokenizedClause = string.IsNullOrEmpty(tokenizedClause) ? tokenizedOperation : string.Concat(new[] { tokenizedClause, " && ", tokenizedOperation }); - - token++; - } - - if (string.IsNullOrEmpty(clause) == false) - { - timer.Start(); - - //trial-run the tokenized clause to time the execution - //for review - this uses a tonized query rather then the normal linq query. - // fixme - that cannot work anymore now that we have killed dynamic support - //contents = contents.AsQueryable().Where(clause, model.Filters.Select(this.GetConstraintValue).ToArray()); - throw new NotImplementedException(); - - contents = contents.Where(x => x.IsVisible()); - - timer.Stop(); - - //the query to output to the editor - sb.Append(indention); - sb.Append(".Where(x => x.IsVisible())"); + contents = contents.Where(operation.Compile()); sb.Append(indention); - sb.AppendFormat(".Where(x => {0})", clause); + sb.AppendFormat(".Where({0})", operation); } - else - { - timer.Start(); - contents = contents.Where(x => x.IsVisible()); - timer.Stop(); + contents = contents.Where(x => x.IsVisible()); + + //the query to output to the editor + sb.Append(indention); + sb.Append(".Where(x => x.IsVisible())"); - sb.Append(indention); - sb.Append(".Where(x => x.IsVisible())"); - } if (model.Sort != null && string.IsNullOrEmpty(model.Sort.Property.Alias) == false) { - timer.Start(); - contents = this.SortByDefaultPropertyValue(contents, model.Sort); - - timer.Stop(); - sb.Append(indention); if (model.Sort.Direction == "ascending") @@ -209,26 +159,29 @@ namespace Umbraco.Web.Editors if (model.Take > 0) { - timer.Start(); - contents = contents.Take(model.Take); - - timer.Stop(); - sb.Append(indention); sb.AppendFormat(".Take({0})", model.Take); } } + + // Timing should be fairly correct, due to the fact that all the linq statements are yield returned. + Stopwatch timer = new Stopwatch(); + timer.Start(); + var results = contents.ToArray(); + timer.Stop(); + queryResult.QueryExpression = sb.ToString(); + queryResult.ResultCount = results.Count(); queryResult.ExecutionTime = timer.ElapsedMilliseconds; - queryResult.ResultCount = contents.Count(); - queryResult.SampleResults = contents.Take(20).Select(x => new TemplateQueryResult() + queryResult.SampleResults = results.Take(20).Select(x => new TemplateQueryResult() { Icon = "icon-file", Name = x.Name }); + return queryResult; } @@ -273,20 +226,20 @@ namespace Umbraco.Web.Editors } } - private IEnumerable GetChildContentTypeAliases(IPublishedContent targetNode, IPublishedContent current) + private IEnumerable GetPathOfContents(IPublishedContent targetNode, IPublishedContent current) { - var aliases = new List(); + var contents = new List(); - if (targetNode == null || targetNode.Id == current.Id) return aliases; + if (targetNode == null || targetNode.Id == current.Id) return contents; if (targetNode.Id != current.Id) { - aliases.Add(targetNode.ContentType.Alias); + contents.Add(targetNode); } - aliases.AddRange(this.GetChildContentTypeAliases(targetNode.Parent, current)); + contents.AddRange(this.GetPathOfContents(targetNode.Parent, current)); - return aliases; + return contents; } /// diff --git a/src/Umbraco.Web/Models/TemplateQuery/QueryCondition.cs b/src/Umbraco.Web/Models/TemplateQuery/QueryCondition.cs index 9c5f2c80c0..009b568556 100644 --- a/src/Umbraco.Web/Models/TemplateQuery/QueryCondition.cs +++ b/src/Umbraco.Web/Models/TemplateQuery/QueryCondition.cs @@ -1,97 +1,81 @@ -namespace Umbraco.Web.Models.TemplateQuery +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Reflection; +using Umbraco.Core.Models.PublishedContent; + +namespace Umbraco.Web.Models.TemplateQuery { public class QueryCondition { - public PropertyModel Property { get; set; } public OperatorTerm Term { get; set; } public string ConstraintValue { get; set; } } - internal static class QueryConditionExtensions { + private static Lazy StringContainsMethodInfo => + new Lazy(() => typeof(string).GetMethod("Contains", new[] {typeof(string)})); - public static string BuildTokenizedCondition(this QueryCondition condition, int token) + public static Expression> BuildCondition(this QueryCondition condition, + string parameterAlias, IEnumerable contents, IEnumerable properties) { - return condition.BuildConditionString(string.Empty, token); - } - - public static string BuildCondition(this QueryCondition condition, string parameterAlias) - { - return condition.BuildConditionString(parameterAlias + "."); - } - - private static string BuildConditionString(this QueryCondition condition, string prefix, int token = -1) - { - - - - var operand = string.Empty; - var value = string.Empty; - var constraintValue = string.Empty; - - - //if a token is used, use a token placeholder, otherwise, use the actual value - if(token >= 0){ - constraintValue = string.Format("@{0}", token); - }else { - - //modify the format of the constraint value - switch (condition.Property.Type) - { - case "string": - constraintValue = string.Format("\"{0}\"", condition.ConstraintValue); - break; - case "datetime": - constraintValue = string.Format("DateTime.Parse(\"{0}\")", condition.ConstraintValue); - break; - default: - constraintValue = condition.ConstraintValue; - break; - } - + object constraintValue; + switch (condition.Property.Type) + { + case "string": + constraintValue = condition.ConstraintValue; + break; + case "datetime": + constraintValue = DateTime.Parse(condition.ConstraintValue); + break; + default: + constraintValue = Convert.ChangeType(condition.ConstraintValue, typeof(int)); + break; } + var parameterExpression = Expression.Parameter(typeof(IPublishedContent), parameterAlias); + var propertyExpression = Expression.Property(parameterExpression, condition.Property.Alias); + + var valueExpression = Expression.Constant(constraintValue); + Expression bodyExpression; switch (condition.Term.Operator) { - case Operator.Equals: - operand = " == "; - break; case Operator.NotEquals: - operand = " != "; + bodyExpression = Expression.NotEqual(propertyExpression, valueExpression); break; case Operator.GreaterThan: - operand = " > "; + bodyExpression = Expression.GreaterThan(propertyExpression, valueExpression); break; case Operator.GreaterThanEqualTo: - operand = " >= "; + bodyExpression = Expression.GreaterThanOrEqual(propertyExpression, valueExpression); break; case Operator.LessThan: - operand = " < "; + bodyExpression = Expression.LessThan(propertyExpression, valueExpression); break; case Operator.LessThanEqualTo: - operand = " <= "; + bodyExpression = Expression.LessThanOrEqual(propertyExpression, valueExpression); break; case Operator.Contains: - value = string.Format("{0}{1}.Contains({2})", prefix, condition.Property.Alias, constraintValue); + bodyExpression = Expression.Call(propertyExpression, StringContainsMethodInfo.Value, + valueExpression); break; case Operator.NotContains: - value = string.Format("!{0}{1}.Contains({2})", prefix, condition.Property.Alias, constraintValue); + var tempExpression = Expression.Call(propertyExpression, StringContainsMethodInfo.Value, + valueExpression); + bodyExpression = Expression.Equal(tempExpression, Expression.Constant(false)); break; - default : - operand = " == "; + default: + case Operator.Equals: + bodyExpression = Expression.Equal(propertyExpression, valueExpression); break; } + var predicate = + Expression.Lambda>(bodyExpression.Reduce(), parameterExpression); - if (string.IsNullOrEmpty(value) == false) - return value; - - - - return string.Format("{0}{1}{2}{3}", prefix, condition.Property.Alias, operand, constraintValue); + return predicate; } - } } diff --git a/src/Umbraco.Web/Models/TemplateQuery/QueryResultModel.cs b/src/Umbraco.Web/Models/TemplateQuery/QueryResultModel.cs index a1bda3c4ae..46556dc75e 100644 --- a/src/Umbraco.Web/Models/TemplateQuery/QueryResultModel.cs +++ b/src/Umbraco.Web/Models/TemplateQuery/QueryResultModel.cs @@ -9,7 +9,7 @@ namespace Umbraco.Web.Models.TemplateQuery public string QueryExpression { get; set; } public IEnumerable SampleResults { get; set; } public int ResultCount { get; set; } - public double ExecutionTime { get; set; } + public long ExecutionTime { get; set; } public int Take { get; set; } } } diff --git a/src/Umbraco.Web/PublishedContentExtensions.cs b/src/Umbraco.Web/PublishedContentExtensions.cs index d4494c5f91..c4be7869cd 100644 --- a/src/Umbraco.Web/PublishedContentExtensions.cs +++ b/src/Umbraco.Web/PublishedContentExtensions.cs @@ -942,65 +942,6 @@ namespace Umbraco.Web #endregion - #region Axes: following-sibling, preceding-sibling, following, preceding + pseudo-axes up, down, next, previous - - // up pseudo-axe ~ ancestors - // bogus, kept for backward compatibility but we should get rid of it - // better use ancestors - - public static IPublishedContent Up(this IPublishedContent content) - { - return content.Parent; - } - - public static IPublishedContent Up(this IPublishedContent content, int number) - { - if (number < 0) - throw new ArgumentOutOfRangeException(nameof(number), "Must be greater than, or equal to, zero."); - return number == 0 ? content : content.EnumerateAncestors(false).Skip(number).FirstOrDefault(); - } - - public static IPublishedContent Up(this IPublishedContent content, string contentTypeAlias) - { - return string.IsNullOrEmpty(contentTypeAlias) - ? content.Parent - : content.Ancestor(contentTypeAlias); - } - - // down pseudo-axe ~ children (not descendants) - // bogus, kept for backward compatibility but we should get rid of it - // better use descendants - - public static IPublishedContent Down(this IPublishedContent content) - { - return content.Children.FirstOrDefault(); - } - - public static IPublishedContent Down(this IPublishedContent content, int number) - { - if (number < 0) - throw new ArgumentOutOfRangeException(nameof(number), "Must be greater than, or equal to, zero."); - if (number == 0) return content; - - content = content.Children.FirstOrDefault(); - while (content != null && --number > 0) - content = content.Children.FirstOrDefault(); - - return content; - } - - public static IPublishedContent Down(this IPublishedContent content, string contentTypeAlias) - { - if (string.IsNullOrEmpty(contentTypeAlias)) - return content.Children.FirstOrDefault(); - - // note: this is what legacy did, but with a broken Descendant - // so fixing Descendant will change how it works... - return content.Descendant(contentTypeAlias); - } - - #endregion - #region Axes: parent // Parent is native @@ -1034,6 +975,7 @@ namespace Umbraco.Web public static IEnumerable Children(this IPublishedContent content) { if (content == null) throw new ArgumentNullException(nameof(content)); + return content.Children; } @@ -1098,6 +1040,11 @@ namespace Umbraco.Web return content.Children(predicate).FirstOrDefault(); } + public static IPublishedContent FirstChild(this IPublishedContent content, Guid uniqueId) + { + return content.Children(x=>x.Key == uniqueId).FirstOrDefault(); + } + public static T FirstChild(this IPublishedContent content) where T : class, IPublishedContent { From 37b826b82f2fc974d7d103d6472123b4c00970bd Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Thu, 17 Jan 2019 14:07:56 +0100 Subject: [PATCH 134/437] 3908 - Fix for multiple dropdowns opening when clicking on one. --- .../infiniteeditors/querybuilder/querybuilder.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/querybuilder/querybuilder.html b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/querybuilder/querybuilder.html index 2d2263c19f..2e0a31a90a 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/querybuilder/querybuilder.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/querybuilder/querybuilder.html @@ -53,7 +53,7 @@ -
+
where @@ -67,14 +67,14 @@ - + - + {{property.name}} @@ -87,14 +87,14 @@ - + - + {{term.name}} From ae3c8fe08ccac0e67f5b05dae0427c6750eb1c31 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Thu, 17 Jan 2019 14:09:17 +0100 Subject: [PATCH 135/437] 3908 - removed tests for legacy up and down methods --- .../PublishedContent/PublishedContentTests.cs | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs b/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs index 603464e18b..0ae184f203 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs @@ -792,29 +792,6 @@ namespace Umbraco.Tests.PublishedContent Assert.IsTrue(customDoc3.IsDescendantOrSelf(customDoc3)); } - [Test] - public void Up() - { - var doc = GetNode(1173); - - var result = doc.Up(); - - Assert.IsNotNull(result); - - Assert.AreEqual(1046, result.Id); - } - - [Test] - public void Down() - { - var doc = GetNode(1173); - - var result = doc.Down(); - - Assert.IsNotNull(result); - - Assert.AreEqual(1174, result.Id); - } [Test] public void FragmentProperty() From cefa2c9040ed6033aa4774ff253a14fc38334673 Mon Sep 17 00:00:00 2001 From: Nicholas-Westby Date: Wed, 16 Jan 2019 13:42:23 -0800 Subject: [PATCH 136/437] Typo ("thist"). --- .../config/umbracoSettings.Release.config | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web.UI/config/umbracoSettings.Release.config b/src/Umbraco.Web.UI/config/umbracoSettings.Release.config index 2d663aa1fb..3442fefdfe 100644 --- a/src/Umbraco.Web.UI/config/umbracoSettings.Release.config +++ b/src/Umbraco.Web.UI/config/umbracoSettings.Release.config @@ -6,11 +6,11 @@ https://our.umbraco.com/documentation/using-umbraco/config-files/umbracoSettings/ Many of the optional settings are not explicitly listed here but can be found in the online documentation. - --> - + --> + - + @@ -32,7 +32,7 @@ - + your@email.here @@ -61,14 +61,14 @@ true - assets/img/installer.jpg + assets/img/installer.jpg false - + true false From 54faeee8370508fa2dafe9b8942622f216f91458 Mon Sep 17 00:00:00 2001 From: Callum Whyte Date: Thu, 17 Jan 2019 11:19:44 +1100 Subject: [PATCH 137/437] Updating number of active Umbraco sites in installer screen facts --- src/Umbraco.Web.UI.Client/src/installer/installer.service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/installer/installer.service.js b/src/Umbraco.Web.UI.Client/src/installer/installer.service.js index a174de1271..f89f6ae6e7 100644 --- a/src/Umbraco.Web.UI.Client/src/installer/installer.service.js +++ b/src/Umbraco.Web.UI.Client/src/installer/installer.service.js @@ -17,7 +17,7 @@ angular.module("umbraco.install").factory('installerService', function($rootScop //add to umbraco installer facts here var facts = ['Umbraco helped millions of people watch a man jump from the edge of space', - 'Over 440 000 websites are currently powered by Umbraco', + 'Over 500 000 websites are currently powered by Umbraco', "At least 2 people have named their cat 'Umbraco'", 'On an average day, more than 1000 people download Umbraco', 'umbraco.tv is the premier source of Umbraco video tutorials to get you started', From 5a78c000a06cd7db6bd8ed993bb43854cf569dee Mon Sep 17 00:00:00 2001 From: Callum Whyte Date: Thu, 17 Jan 2019 11:21:26 +1100 Subject: [PATCH 138/437] Correcting punctuation in installer screen facts --- .../src/installer/installer.service.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/installer/installer.service.js b/src/Umbraco.Web.UI.Client/src/installer/installer.service.js index f89f6ae6e7..7b802d9f7b 100644 --- a/src/Umbraco.Web.UI.Client/src/installer/installer.service.js +++ b/src/Umbraco.Web.UI.Client/src/installer/installer.service.js @@ -19,14 +19,14 @@ angular.module("umbraco.install").factory('installerService', function($rootScop var facts = ['Umbraco helped millions of people watch a man jump from the edge of space', 'Over 500 000 websites are currently powered by Umbraco', "At least 2 people have named their cat 'Umbraco'", - 'On an average day, more than 1000 people download Umbraco', - 'umbraco.tv is the premier source of Umbraco video tutorials to get you started', - 'You can find the world\'s friendliest CMS community at our.umbraco.com', + 'On an average day more than 1000 people download Umbraco', + 'umbraco.tv is the premier source of Umbraco video tutorials to get you started', + 'You can find the world\'s friendliest CMS community at our.umbraco.com', 'You can become a certified Umbraco developer by attending one of the official courses', 'Umbraco works really well on tablets', 'You have 100% control over your markup and design when crafting a website in Umbraco', 'Umbraco is the best of both worlds: 100% free and open source, and backed by a professional and profitable company', - "There's a pretty big chance, you've visited a website powered by Umbraco today", + "There's a pretty big chance you've visited a website powered by Umbraco today", "'Umbraco-spotting' is the game of spotting big brands running Umbraco", "At least 4 people have the Umbraco logo tattooed on them", "'Umbraco' is the Danish name for an allen key", From e60417925bd02c16aea0ee54e8d393d367a26c24 Mon Sep 17 00:00:00 2001 From: Callum Whyte Date: Thu, 17 Jan 2019 11:28:22 +1100 Subject: [PATCH 139/437] Consistency is king! Fix up " vs ' in installer service facts array --- .../src/installer/installer.service.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/installer/installer.service.js b/src/Umbraco.Web.UI.Client/src/installer/installer.service.js index 7b802d9f7b..4419289744 100644 --- a/src/Umbraco.Web.UI.Client/src/installer/installer.service.js +++ b/src/Umbraco.Web.UI.Client/src/installer/installer.service.js @@ -16,16 +16,16 @@ angular.module("umbraco.install").factory('installerService', function($rootScop }; //add to umbraco installer facts here - var facts = ['Umbraco helped millions of people watch a man jump from the edge of space', - 'Over 500 000 websites are currently powered by Umbraco', + var facts = ["Umbraco helped millions of people watch a man jump from the edge of space", + "Over 500 000 websites are currently powered by Umbraco", "At least 2 people have named their cat 'Umbraco'", - 'On an average day more than 1000 people download Umbraco', - 'umbraco.tv is the premier source of Umbraco video tutorials to get you started', - 'You can find the world\'s friendliest CMS community at our.umbraco.com', - 'You can become a certified Umbraco developer by attending one of the official courses', - 'Umbraco works really well on tablets', - 'You have 100% control over your markup and design when crafting a website in Umbraco', - 'Umbraco is the best of both worlds: 100% free and open source, and backed by a professional and profitable company', + "On an average day more than 1000 people download Umbraco", + "umbraco.tv is the premier source of Umbraco video tutorials to get you started", + "You can find the world's friendliest CMS community at our.umbraco.com", + "You can become a certified Umbraco developer by attending one of the official courses", + "Umbraco works really well on tablets", + "You have 100% control over your markup and design when crafting a website in Umbraco", + "Umbraco is the best of both worlds: 100% free and open source, and backed by a professional and profitable company", "There's a pretty big chance you've visited a website powered by Umbraco today", "'Umbraco-spotting' is the game of spotting big brands running Umbraco", "At least 4 people have the Umbraco logo tattooed on them", From 9d2c4d7b086a9c58d3c15a0bd7541727f7327ad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Thu, 17 Jan 2019 15:57:43 +0100 Subject: [PATCH 140/437] Stick to the same approach on as used on media move dialog --- src/Umbraco.Web.UI.Client/src/views/content/move.html | 2 +- src/Umbraco.Web.UI.Client/src/views/media/move.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/content/move.html b/src/Umbraco.Web.UI.Client/src/views/content/move.html index 2c40a61d18..fb72c38974 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/move.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/move.html @@ -15,7 +15,7 @@ was moved to {{target.name}}
- +

diff --git a/src/Umbraco.Web.UI.Client/src/views/media/move.html b/src/Umbraco.Web.UI.Client/src/views/media/move.html index 6f80b5ab90..2aebda195c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/media/move.html +++ b/src/Umbraco.Web.UI.Client/src/views/media/move.html @@ -27,7 +27,7 @@

- Date: Thu, 17 Jan 2019 20:56:47 +0100 Subject: [PATCH 141/437] Hide "allow as root" and "allowed child node types" for element types --- .../views/documenttypes/views/permissions/permissions.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/permissions/permissions.html b/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/permissions/permissions.html index 0d74c655d7..e890921ad4 100644 --- a/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/permissions/permissions.html +++ b/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/permissions/permissions.html @@ -3,7 +3,7 @@ -
+
@@ -19,7 +19,7 @@
-
+
From 8f205e7d8f8dd91057f5bad3812b9842ffb62f3f Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Thu, 17 Jan 2019 20:57:18 +0100 Subject: [PATCH 142/437] Hide list view config for element types --- .../src/views/documenttypes/views/listview/listview.html | 9 +++++++-- .../views/documenttypes/views/templates/templates.html | 2 +- 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 +- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/listview/listview.html b/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/listview/listview.html index 7d435adc6d..5cd04bd834 100644 --- a/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/listview/listview.html +++ b/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/listview/listview.html @@ -1,4 +1,4 @@ - +
@@ -15,4 +15,9 @@
-
\ No newline at end of file +
+ + This is not applicable for an Element type + diff --git a/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/templates/templates.html b/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/templates/templates.html index de62e151a3..385979a572 100644 --- a/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/templates/templates.html +++ b/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/templates/templates.html @@ -37,6 +37,6 @@ - An Element type can't have any templates + This is not applicable for an Element type
diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml index c8a5f5f37e..e182d46ad9 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml @@ -1227,7 +1227,7 @@ Mange hilsner fra Umbraco robotten fane har ingen sorteringsrækkefølge Er en Element-type En Element-type er tiltænkt brug i f.eks. Nested Content, ikke i indholdstræet - En Element-type kan ikke have nogen skabeloner + Dette benyttes ikke for en Element-type Alternativt felt diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml index de6f56ab75..46efb59378 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml @@ -1520,7 +1520,7 @@ To manage your website, simply open the Umbraco back office and start adding con Allow varying by culture Is an Element type An Element type is meant to be used for instance in Nested Content, and not in the tree - An Element type can't have templates assigned + This is not applicable for an Element type Building models 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 360dff6195..24a08c7526 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml @@ -1561,7 +1561,7 @@ To manage your website, simply open the Umbraco back office and start adding con Allow varying by culture Is an Element type An Element type is meant to be used for instance in Nested Content, and not in the tree - An Element type can't have any templates + This is not applicable for an Element type Add language From fa8a754f88e0ece375b267ff9f2b3bed21031db6 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Thu, 17 Jan 2019 20:57:39 +0100 Subject: [PATCH 143/437] Don't reset templates for element types --- src/Umbraco.Web/Editors/ContentTypeController.cs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/Umbraco.Web/Editors/ContentTypeController.cs b/src/Umbraco.Web/Editors/ContentTypeController.cs index d7ca2d19f6..397f6b3e9d 100644 --- a/src/Umbraco.Web/Editors/ContentTypeController.cs +++ b/src/Umbraco.Web/Editors/ContentTypeController.cs @@ -263,15 +263,6 @@ namespace Umbraco.Web.Editors } } - //Before we send this model into this saving/mapping pipeline, we also need to do some cleanup on templates. - //If the doc type is an element type, it can't have any templates assigned, so we need to reset the allowed templates here. - if (contentTypeSave.IsElement) - { - contentTypeSave.AllowedTemplates = new string[] { }; - contentTypeSave.DefaultTemplate = null; - } - - var savedCt = PerformPostSave( contentTypeSave: contentTypeSave, getContentType: i => Services.ContentTypeService.Get(i), From 5aba1a6bd29c25101485f0b10e8321a3d2f81855 Mon Sep 17 00:00:00 2001 From: Stephan Date: Fri, 18 Jan 2019 07:56:38 +0100 Subject: [PATCH 144/437] IAppPolicedCache is IAppPolicyCache --- src/Umbraco.Core/Cache/AppCaches.cs | 4 ++-- .../Cache/AppPolicedCacheDictionary.cs | 14 +++++++------- src/Umbraco.Core/Cache/CacheProviderExtensions.cs | 4 ++-- src/Umbraco.Core/Cache/DeepCloneAppCache.cs | 8 ++++---- .../Cache/DefaultRepositoryCachePolicy.cs | 2 +- .../Cache/FullDataSetRepositoryCachePolicy.cs | 2 +- .../{IAppPolicedCache.cs => IAppPolicyCache.cs} | 2 +- src/Umbraco.Core/Cache/IsolatedCaches.cs | 8 ++++---- src/Umbraco.Core/Cache/NoAppCache.cs | 4 ++-- .../Cache/NoCacheRepositoryCachePolicy.cs | 2 +- src/Umbraco.Core/Cache/ObjectCacheAppCache.cs | 4 ++-- .../Cache/RepositoryCachePolicyBase.cs | 6 +++--- .../Cache/SingleItemsOnlyRepositoryCachePolicy.cs | 2 +- src/Umbraco.Core/Cache/WebCachingAppCache.cs | 4 ++-- src/Umbraco.Core/Composing/TypeLoader.cs | 6 +++--- src/Umbraco.Core/Manifest/ManifestParser.cs | 2 +- .../Implement/RepositoryBaseOfTIdTEntity.cs | 6 +++--- .../Implement/LocalizedTextServiceFileSources.cs | 2 +- src/Umbraco.Core/Umbraco.Core.csproj | 2 +- .../Cache/DeepCloneRuntimeCacheProviderTests.cs | 2 +- src/Umbraco.Tests/Cache/DefaultCachePolicyTests.cs | 12 ++++++------ .../Cache/FullDataSetCachePolicyTests.cs | 14 +++++++------- .../Cache/HttpRuntimeCacheProviderTests.cs | 2 +- .../Cache/ObjectCacheProviderTests.cs | 2 +- .../Cache/RuntimeCacheProviderTests.cs | 2 +- .../Cache/SingleItemsOnlyCachePolicyTests.cs | 4 ++-- .../PublishedContentSnapshotTestBase.cs | 2 +- .../PublishedContent/PublishedContentTests.cs | 2 +- src/Umbraco.Tests/Testing/UmbracoTestBase.cs | 6 +++--- .../Editors/ExamineManagementController.cs | 2 +- 30 files changed, 67 insertions(+), 67 deletions(-) rename src/Umbraco.Core/Cache/{IAppPolicedCache.cs => IAppPolicyCache.cs} (97%) diff --git a/src/Umbraco.Core/Cache/AppCaches.cs b/src/Umbraco.Core/Cache/AppCaches.cs index 6372bccbab..7e5fa43682 100644 --- a/src/Umbraco.Core/Cache/AppCaches.cs +++ b/src/Umbraco.Core/Cache/AppCaches.cs @@ -30,7 +30,7 @@ namespace Umbraco.Core.Cache /// Initializes a new instance of the with cache providers. ///
public AppCaches( - IAppPolicedCache runtimeCache, + IAppPolicyCache runtimeCache, IAppCache staticCacheProvider, IAppCache requestCache, IsolatedCaches isolatedCaches) @@ -82,7 +82,7 @@ namespace Umbraco.Core.Cache /// /// The runtime cache is the main application cache. /// - public IAppPolicedCache RuntimeCache { get; } + public IAppPolicyCache RuntimeCache { get; } /// /// Gets the isolated caches. diff --git a/src/Umbraco.Core/Cache/AppPolicedCacheDictionary.cs b/src/Umbraco.Core/Cache/AppPolicedCacheDictionary.cs index 51cc3c4c53..5c60dededa 100644 --- a/src/Umbraco.Core/Cache/AppPolicedCacheDictionary.cs +++ b/src/Umbraco.Core/Cache/AppPolicedCacheDictionary.cs @@ -4,18 +4,18 @@ using System.Collections.Concurrent; namespace Umbraco.Core.Cache { /// - /// Provides a base class for implementing a dictionary of . + /// Provides a base class for implementing a dictionary of . /// /// The type of the dictionary key. public abstract class AppPolicedCacheDictionary { - private readonly ConcurrentDictionary _caches = new ConcurrentDictionary(); + private readonly ConcurrentDictionary _caches = new ConcurrentDictionary(); /// /// Initializes a new instance of the class. /// /// - protected AppPolicedCacheDictionary(Func cacheFactory) + protected AppPolicedCacheDictionary(Func cacheFactory) { CacheFactory = cacheFactory; } @@ -23,19 +23,19 @@ namespace Umbraco.Core.Cache /// /// Gets the internal cache factory, for tests only! /// - internal readonly Func CacheFactory; + internal readonly Func CacheFactory; /// /// Gets or creates a cache. /// - public IAppPolicedCache GetOrCreate(TKey key) + public IAppPolicyCache GetOrCreate(TKey key) => _caches.GetOrAdd(key, k => CacheFactory(k)); /// /// Tries to get a cache. /// - public Attempt Get(TKey key) - => _caches.TryGetValue(key, out var cache) ? Attempt.Succeed(cache) : Attempt.Fail(); + public Attempt Get(TKey key) + => _caches.TryGetValue(key, out var cache) ? Attempt.Succeed(cache) : Attempt.Fail(); /// /// Removes a cache. diff --git a/src/Umbraco.Core/Cache/CacheProviderExtensions.cs b/src/Umbraco.Core/Cache/CacheProviderExtensions.cs index 0e41b981fb..d943d19edb 100644 --- a/src/Umbraco.Core/Cache/CacheProviderExtensions.cs +++ b/src/Umbraco.Core/Cache/CacheProviderExtensions.cs @@ -10,7 +10,7 @@ namespace Umbraco.Core.Cache /// public static class CacheProviderExtensions { - public static T GetCacheItem(this IAppPolicedCache provider, + public static T GetCacheItem(this IAppPolicyCache provider, string cacheKey, Func getCacheItem, TimeSpan? timeout, @@ -23,7 +23,7 @@ namespace Umbraco.Core.Cache return result == null ? default(T) : result.TryConvertTo().Result; } - public static void InsertCacheItem(this IAppPolicedCache provider, + public static void InsertCacheItem(this IAppPolicyCache provider, string cacheKey, Func getCacheItem, TimeSpan? timeout = null, diff --git a/src/Umbraco.Core/Cache/DeepCloneAppCache.cs b/src/Umbraco.Core/Cache/DeepCloneAppCache.cs index cdc66f1db7..eff06e2aad 100644 --- a/src/Umbraco.Core/Cache/DeepCloneAppCache.cs +++ b/src/Umbraco.Core/Cache/DeepCloneAppCache.cs @@ -8,16 +8,16 @@ using Umbraco.Core.Models.Entities; namespace Umbraco.Core.Cache { /// - /// Implements by wrapping an inner other + /// Implements by wrapping an inner other /// instance, and ensuring that all inserts and returns are deep cloned copies of the cache item, /// when the item is deep-cloneable. /// - internal class DeepCloneAppCache : IAppPolicedCache + internal class DeepCloneAppCache : IAppPolicyCache { /// /// Initializes a new instance of the class. /// - public DeepCloneAppCache(IAppPolicedCache innerCache) + public DeepCloneAppCache(IAppPolicyCache innerCache) { var type = typeof (DeepCloneAppCache); @@ -30,7 +30,7 @@ namespace Umbraco.Core.Cache /// /// Gets the inner cache. /// - public IAppPolicedCache InnerCache { get; } + public IAppPolicyCache InnerCache { get; } /// public object Get(string key) diff --git a/src/Umbraco.Core/Cache/DefaultRepositoryCachePolicy.cs b/src/Umbraco.Core/Cache/DefaultRepositoryCachePolicy.cs index 6f160cd552..c11309c827 100644 --- a/src/Umbraco.Core/Cache/DefaultRepositoryCachePolicy.cs +++ b/src/Umbraco.Core/Cache/DefaultRepositoryCachePolicy.cs @@ -23,7 +23,7 @@ namespace Umbraco.Core.Cache private static readonly TEntity[] EmptyEntities = new TEntity[0]; // const private readonly RepositoryCachePolicyOptions _options; - public DefaultRepositoryCachePolicy(IAppPolicedCache cache, IScopeAccessor scopeAccessor, RepositoryCachePolicyOptions options) + public DefaultRepositoryCachePolicy(IAppPolicyCache cache, IScopeAccessor scopeAccessor, RepositoryCachePolicyOptions options) : base(cache, scopeAccessor) { _options = options ?? throw new ArgumentNullException(nameof(options)); diff --git a/src/Umbraco.Core/Cache/FullDataSetRepositoryCachePolicy.cs b/src/Umbraco.Core/Cache/FullDataSetRepositoryCachePolicy.cs index 3bc4c9d059..c3b69d9a6d 100644 --- a/src/Umbraco.Core/Cache/FullDataSetRepositoryCachePolicy.cs +++ b/src/Umbraco.Core/Cache/FullDataSetRepositoryCachePolicy.cs @@ -24,7 +24,7 @@ namespace Umbraco.Core.Cache private readonly Func _entityGetId; private readonly bool _expires; - public FullDataSetRepositoryCachePolicy(IAppPolicedCache cache, IScopeAccessor scopeAccessor, Func entityGetId, bool expires) + public FullDataSetRepositoryCachePolicy(IAppPolicyCache cache, IScopeAccessor scopeAccessor, Func entityGetId, bool expires) : base(cache, scopeAccessor) { _entityGetId = entityGetId; diff --git a/src/Umbraco.Core/Cache/IAppPolicedCache.cs b/src/Umbraco.Core/Cache/IAppPolicyCache.cs similarity index 97% rename from src/Umbraco.Core/Cache/IAppPolicedCache.cs rename to src/Umbraco.Core/Cache/IAppPolicyCache.cs index 0aee7584df..90b0ccb9fd 100644 --- a/src/Umbraco.Core/Cache/IAppPolicedCache.cs +++ b/src/Umbraco.Core/Cache/IAppPolicyCache.cs @@ -10,7 +10,7 @@ namespace Umbraco.Core.Cache /// /// A cache policy can be used to cache with timeouts, /// or depending on files, and with a remove callback, etc. - public interface IAppPolicedCache : IAppCache + public interface IAppPolicyCache : IAppCache { /// /// Gets an item identified by its key. diff --git a/src/Umbraco.Core/Cache/IsolatedCaches.cs b/src/Umbraco.Core/Cache/IsolatedCaches.cs index bc624be20d..f070fe8b55 100644 --- a/src/Umbraco.Core/Cache/IsolatedCaches.cs +++ b/src/Umbraco.Core/Cache/IsolatedCaches.cs @@ -3,7 +3,7 @@ namespace Umbraco.Core.Cache { /// - /// Represents a dictionary of for types. + /// Represents a dictionary of for types. /// /// /// Isolated caches are used by e.g. repositories, to ensure that each cached entity @@ -16,20 +16,20 @@ namespace Umbraco.Core.Cache /// Initializes a new instance of the class. /// /// - public IsolatedCaches(Func cacheFactory) + public IsolatedCaches(Func cacheFactory) : base(cacheFactory) { } /// /// Gets a cache. /// - public IAppPolicedCache GetOrCreate() + public IAppPolicyCache GetOrCreate() => GetOrCreate(typeof(T)); /// /// Tries to get a cache. /// - public Attempt Get() + public Attempt Get() => Get(typeof(T)); /// diff --git a/src/Umbraco.Core/Cache/NoAppCache.cs b/src/Umbraco.Core/Cache/NoAppCache.cs index 8a7e15cb29..d3359a30ba 100644 --- a/src/Umbraco.Core/Cache/NoAppCache.cs +++ b/src/Umbraco.Core/Cache/NoAppCache.cs @@ -6,9 +6,9 @@ using System.Web.Caching; namespace Umbraco.Core.Cache { /// - /// Implements and do not cache. + /// Implements and do not cache. /// - public class NoAppCache : IAppPolicedCache + public class NoAppCache : IAppPolicyCache { private NoAppCache() { } diff --git a/src/Umbraco.Core/Cache/NoCacheRepositoryCachePolicy.cs b/src/Umbraco.Core/Cache/NoCacheRepositoryCachePolicy.cs index acc67be679..b1a12ec411 100644 --- a/src/Umbraco.Core/Cache/NoCacheRepositoryCachePolicy.cs +++ b/src/Umbraco.Core/Cache/NoCacheRepositoryCachePolicy.cs @@ -13,7 +13,7 @@ namespace Umbraco.Core.Cache public static NoCacheRepositoryCachePolicy Instance { get; } = new NoCacheRepositoryCachePolicy(); - public IRepositoryCachePolicy Scoped(IAppPolicedCache runtimeCache, IScope scope) + public IRepositoryCachePolicy Scoped(IAppPolicyCache runtimeCache, IScope scope) { throw new NotImplementedException(); } diff --git a/src/Umbraco.Core/Cache/ObjectCacheAppCache.cs b/src/Umbraco.Core/Cache/ObjectCacheAppCache.cs index 954622fc4b..449eb5d643 100644 --- a/src/Umbraco.Core/Cache/ObjectCacheAppCache.cs +++ b/src/Umbraco.Core/Cache/ObjectCacheAppCache.cs @@ -11,9 +11,9 @@ using CacheItemPriority = System.Web.Caching.CacheItemPriority; namespace Umbraco.Core.Cache { /// - /// Implements on top of a . + /// Implements on top of a . /// - public class ObjectCacheAppCache : IAppPolicedCache + public class ObjectCacheAppCache : IAppPolicyCache { private readonly ReaderWriterLockSlim _locker = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion); diff --git a/src/Umbraco.Core/Cache/RepositoryCachePolicyBase.cs b/src/Umbraco.Core/Cache/RepositoryCachePolicyBase.cs index f8bba4b033..27fe4e3035 100644 --- a/src/Umbraco.Core/Cache/RepositoryCachePolicyBase.cs +++ b/src/Umbraco.Core/Cache/RepositoryCachePolicyBase.cs @@ -13,16 +13,16 @@ namespace Umbraco.Core.Cache internal abstract class RepositoryCachePolicyBase : IRepositoryCachePolicy where TEntity : class, IEntity { - private readonly IAppPolicedCache _globalCache; + private readonly IAppPolicyCache _globalCache; private readonly IScopeAccessor _scopeAccessor; - protected RepositoryCachePolicyBase(IAppPolicedCache globalCache, IScopeAccessor scopeAccessor) + protected RepositoryCachePolicyBase(IAppPolicyCache globalCache, IScopeAccessor scopeAccessor) { _globalCache = globalCache ?? throw new ArgumentNullException(nameof(globalCache)); _scopeAccessor = scopeAccessor ?? throw new ArgumentNullException(nameof(scopeAccessor)); } - protected IAppPolicedCache Cache + protected IAppPolicyCache Cache { get { diff --git a/src/Umbraco.Core/Cache/SingleItemsOnlyRepositoryCachePolicy.cs b/src/Umbraco.Core/Cache/SingleItemsOnlyRepositoryCachePolicy.cs index 714798a47c..9de7519edb 100644 --- a/src/Umbraco.Core/Cache/SingleItemsOnlyRepositoryCachePolicy.cs +++ b/src/Umbraco.Core/Cache/SingleItemsOnlyRepositoryCachePolicy.cs @@ -16,7 +16,7 @@ namespace Umbraco.Core.Cache internal class SingleItemsOnlyRepositoryCachePolicy : DefaultRepositoryCachePolicy where TEntity : class, IEntity { - public SingleItemsOnlyRepositoryCachePolicy(IAppPolicedCache cache, IScopeAccessor scopeAccessor, RepositoryCachePolicyOptions options) + public SingleItemsOnlyRepositoryCachePolicy(IAppPolicyCache cache, IScopeAccessor scopeAccessor, RepositoryCachePolicyOptions options) : base(cache, scopeAccessor, options) { } diff --git a/src/Umbraco.Core/Cache/WebCachingAppCache.cs b/src/Umbraco.Core/Cache/WebCachingAppCache.cs index b762fcda07..7fbdebf9ab 100644 --- a/src/Umbraco.Core/Cache/WebCachingAppCache.cs +++ b/src/Umbraco.Core/Cache/WebCachingAppCache.cs @@ -8,11 +8,11 @@ using System.Web.Caching; namespace Umbraco.Core.Cache { /// - /// Implements on top of a . + /// Implements on top of a . /// A CacheProvider that wraps the logic of the HttpRuntime.Cache /// /// The underlying cache is expected to be HttpRuntime.Cache. - internal class WebCachingAppCache : FastDictionaryAppCacheBase, IAppPolicedCache + internal class WebCachingAppCache : FastDictionaryAppCacheBase, IAppPolicyCache { // locker object that supports upgradeable read locking // does not need to support recursion if we implement the cache correctly and ensure diff --git a/src/Umbraco.Core/Composing/TypeLoader.cs b/src/Umbraco.Core/Composing/TypeLoader.cs index fe277676d7..3950cf86e9 100644 --- a/src/Umbraco.Core/Composing/TypeLoader.cs +++ b/src/Umbraco.Core/Composing/TypeLoader.cs @@ -29,7 +29,7 @@ namespace Umbraco.Core.Composing { private const string CacheKey = "umbraco-types.list"; - private readonly IAppPolicedCache _runtimeCache; + private readonly IAppPolicyCache _runtimeCache; private readonly IProfilingLogger _logger; private readonly Dictionary _types = new Dictionary(); @@ -51,7 +51,7 @@ namespace Umbraco.Core.Composing /// The application runtime cache. /// Files storage mode. /// A profiling logger. - public TypeLoader(IAppPolicedCache runtimeCache, LocalTempStorage localTempStorage, IProfilingLogger logger) + public TypeLoader(IAppPolicyCache runtimeCache, LocalTempStorage localTempStorage, IProfilingLogger logger) : this(runtimeCache, localTempStorage, logger, true) { } @@ -62,7 +62,7 @@ namespace Umbraco.Core.Composing /// Files storage mode. /// A profiling logger. /// Whether to detect changes using hashes. - internal TypeLoader(IAppPolicedCache runtimeCache, LocalTempStorage localTempStorage, IProfilingLogger logger, bool detectChanges) + internal TypeLoader(IAppPolicyCache runtimeCache, LocalTempStorage localTempStorage, IProfilingLogger logger, bool detectChanges) { _runtimeCache = runtimeCache ?? throw new ArgumentNullException(nameof(runtimeCache)); _localTempStorage = localTempStorage == LocalTempStorage.Unknown ? LocalTempStorage.Default : localTempStorage; diff --git a/src/Umbraco.Core/Manifest/ManifestParser.cs b/src/Umbraco.Core/Manifest/ManifestParser.cs index 40e99bb079..a80cd98466 100644 --- a/src/Umbraco.Core/Manifest/ManifestParser.cs +++ b/src/Umbraco.Core/Manifest/ManifestParser.cs @@ -20,7 +20,7 @@ namespace Umbraco.Core.Manifest { private static readonly string Utf8Preamble = Encoding.UTF8.GetString(Encoding.UTF8.GetPreamble()); - private readonly IAppPolicedCache _cache; + private readonly IAppPolicyCache _cache; private readonly ILogger _logger; private readonly ManifestValueValidatorCollection _validators; diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs index 6862173786..c8329d1f32 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs @@ -30,7 +30,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement protected AppCaches AppCaches { get; } - protected IAppPolicedCache GlobalIsolatedCache => AppCaches.IsolatedCaches.GetOrCreate(); + protected IAppPolicyCache GlobalIsolatedCache => AppCaches.IsolatedCaches.GetOrCreate(); protected IScopeAccessor ScopeAccessor { get; } @@ -60,7 +60,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement /// Gets the isolated cache. /// /// Depends on the ambient scope cache mode. - protected IAppPolicedCache IsolatedCache + protected IAppPolicyCache IsolatedCache { get { @@ -157,7 +157,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement /// /// Adds or Updates an entity of type TEntity /// - /// This method is backed by an cache + /// This method is backed by an cache /// public void Save(TEntity entity) { diff --git a/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs b/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs index 8c2d277348..430c2b3d3c 100644 --- a/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs +++ b/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs @@ -17,7 +17,7 @@ namespace Umbraco.Core.Services.Implement public class LocalizedTextServiceFileSources { private readonly ILogger _logger; - private readonly IAppPolicedCache _cache; + private readonly IAppPolicyCache _cache; private readonly IEnumerable _supplementFileSources; private readonly DirectoryInfo _fileSourceFolder; diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index d72c0e5014..b94c718242 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -131,7 +131,7 @@ - + diff --git a/src/Umbraco.Tests/Cache/DeepCloneRuntimeCacheProviderTests.cs b/src/Umbraco.Tests/Cache/DeepCloneRuntimeCacheProviderTests.cs index 5158989a8b..7483df1c44 100644 --- a/src/Umbraco.Tests/Cache/DeepCloneRuntimeCacheProviderTests.cs +++ b/src/Umbraco.Tests/Cache/DeepCloneRuntimeCacheProviderTests.cs @@ -34,7 +34,7 @@ namespace Umbraco.Tests.Cache get { return _provider; } } - internal override IAppPolicedCache RuntimeProvider + internal override IAppPolicyCache RuntimeProvider { get { return _provider; } } diff --git a/src/Umbraco.Tests/Cache/DefaultCachePolicyTests.cs b/src/Umbraco.Tests/Cache/DefaultCachePolicyTests.cs index 0f649328fe..4161f576c9 100644 --- a/src/Umbraco.Tests/Cache/DefaultCachePolicyTests.cs +++ b/src/Umbraco.Tests/Cache/DefaultCachePolicyTests.cs @@ -28,7 +28,7 @@ namespace Umbraco.Tests.Cache public void Caches_Single() { var isCached = false; - var cache = new Mock(); + var cache = new Mock(); cache.Setup(x => x.Insert(It.IsAny(), It.IsAny>(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) .Callback(() => @@ -45,7 +45,7 @@ namespace Umbraco.Tests.Cache [Test] public void Get_Single_From_Cache() { - var cache = new Mock(); + var cache = new Mock(); cache.Setup(x => x.Get(It.IsAny())).Returns(new AuditItem(1, AuditType.Copy, 123, "test", "blah")); var defaultPolicy = new DefaultRepositoryCachePolicy(cache.Object, DefaultAccessor, new RepositoryCachePolicyOptions()); @@ -58,7 +58,7 @@ namespace Umbraco.Tests.Cache public void Caches_Per_Id_For_Get_All() { var cached = new List(); - var cache = new Mock(); + var cache = new Mock(); cache.Setup(x => x.Insert(It.IsAny(), It.IsAny>(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) .Callback((string cacheKey, Func o, TimeSpan? t, bool b, CacheItemPriority cip, CacheItemRemovedCallback circ, string[] s) => @@ -81,7 +81,7 @@ namespace Umbraco.Tests.Cache [Test] public void Get_All_Without_Ids_From_Cache() { - var cache = new Mock(); + var cache = new Mock(); cache.Setup(x => x.SearchByKey(It.IsAny())).Returns(new[] { new AuditItem(1, AuditType.Copy, 123, "test", "blah"), @@ -98,7 +98,7 @@ namespace Umbraco.Tests.Cache public void If_CreateOrUpdate_Throws_Cache_Is_Removed() { var cacheCleared = false; - var cache = new Mock(); + var cache = new Mock(); cache.Setup(x => x.Clear(It.IsAny())) .Callback(() => { @@ -124,7 +124,7 @@ namespace Umbraco.Tests.Cache public void If_Removes_Throws_Cache_Is_Removed() { var cacheCleared = false; - var cache = new Mock(); + var cache = new Mock(); cache.Setup(x => x.Clear(It.IsAny())) .Callback(() => { diff --git a/src/Umbraco.Tests/Cache/FullDataSetCachePolicyTests.cs b/src/Umbraco.Tests/Cache/FullDataSetCachePolicyTests.cs index 7c5a1524d2..a4fbdf2224 100644 --- a/src/Umbraco.Tests/Cache/FullDataSetCachePolicyTests.cs +++ b/src/Umbraco.Tests/Cache/FullDataSetCachePolicyTests.cs @@ -37,7 +37,7 @@ namespace Umbraco.Tests.Cache }; var isCached = false; - var cache = new Mock(); + var cache = new Mock(); cache.Setup(x => x.Insert(It.IsAny(), It.IsAny>(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) .Callback(() => @@ -60,7 +60,7 @@ namespace Umbraco.Tests.Cache new AuditItem(2, AuditType.Copy, 123, "test", "blah2") }; - var cache = new Mock(); + var cache = new Mock(); cache.Setup(x => x.Get(It.IsAny())).Returns(new AuditItem(1, AuditType.Copy, 123, "test", "blah")); var defaultPolicy = new FullDataSetRepositoryCachePolicy(cache.Object, DefaultAccessor, item => item.Id, false); @@ -78,7 +78,7 @@ namespace Umbraco.Tests.Cache IList list = null; - var cache = new Mock(); + var cache = new Mock(); cache.Setup(x => x.Insert(It.IsAny(), It.IsAny>(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) .Callback((string cacheKey, Func o, TimeSpan? t, bool b, CacheItemPriority cip, CacheItemRemovedCallback circ, string[] s) => @@ -121,7 +121,7 @@ namespace Umbraco.Tests.Cache var cached = new List(); IList list = null; - var cache = new Mock(); + var cache = new Mock(); cache.Setup(x => x.Insert(It.IsAny(), It.IsAny>(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) .Callback((string cacheKey, Func o, TimeSpan? t, bool b, CacheItemPriority cip, CacheItemRemovedCallback circ, string[] s) => @@ -145,7 +145,7 @@ namespace Umbraco.Tests.Cache { var getAll = new[] { (AuditItem)null }; - var cache = new Mock(); + var cache = new Mock(); cache.Setup(x => x.Get(It.IsAny())).Returns(() => new DeepCloneableList(ListCloneBehavior.CloneOnce) { @@ -169,7 +169,7 @@ namespace Umbraco.Tests.Cache }; var cacheCleared = false; - var cache = new Mock(); + var cache = new Mock(); cache.Setup(x => x.Clear(It.IsAny())) .Callback(() => { @@ -201,7 +201,7 @@ namespace Umbraco.Tests.Cache }; var cacheCleared = false; - var cache = new Mock(); + var cache = new Mock(); cache.Setup(x => x.Clear(It.IsAny())) .Callback(() => { diff --git a/src/Umbraco.Tests/Cache/HttpRuntimeCacheProviderTests.cs b/src/Umbraco.Tests/Cache/HttpRuntimeCacheProviderTests.cs index 56f3303e9c..6297539a1b 100644 --- a/src/Umbraco.Tests/Cache/HttpRuntimeCacheProviderTests.cs +++ b/src/Umbraco.Tests/Cache/HttpRuntimeCacheProviderTests.cs @@ -27,7 +27,7 @@ namespace Umbraco.Tests.Cache get { return _provider; } } - internal override IAppPolicedCache RuntimeProvider + internal override IAppPolicyCache RuntimeProvider { get { return _provider; } } diff --git a/src/Umbraco.Tests/Cache/ObjectCacheProviderTests.cs b/src/Umbraco.Tests/Cache/ObjectCacheProviderTests.cs index 6ed7f590e0..4d34e81eff 100644 --- a/src/Umbraco.Tests/Cache/ObjectCacheProviderTests.cs +++ b/src/Umbraco.Tests/Cache/ObjectCacheProviderTests.cs @@ -28,7 +28,7 @@ namespace Umbraco.Tests.Cache get { return _provider; } } - internal override IAppPolicedCache RuntimeProvider + internal override IAppPolicyCache RuntimeProvider { get { return _provider; } } diff --git a/src/Umbraco.Tests/Cache/RuntimeCacheProviderTests.cs b/src/Umbraco.Tests/Cache/RuntimeCacheProviderTests.cs index 08eb5e9a60..6391e4ec7a 100644 --- a/src/Umbraco.Tests/Cache/RuntimeCacheProviderTests.cs +++ b/src/Umbraco.Tests/Cache/RuntimeCacheProviderTests.cs @@ -8,7 +8,7 @@ namespace Umbraco.Tests.Cache public abstract class RuntimeCacheProviderTests : CacheProviderTests { - internal abstract IAppPolicedCache RuntimeProvider { get; } + internal abstract IAppPolicyCache RuntimeProvider { get; } [Test] diff --git a/src/Umbraco.Tests/Cache/SingleItemsOnlyCachePolicyTests.cs b/src/Umbraco.Tests/Cache/SingleItemsOnlyCachePolicyTests.cs index 2b37d85801..2525eab45b 100644 --- a/src/Umbraco.Tests/Cache/SingleItemsOnlyCachePolicyTests.cs +++ b/src/Umbraco.Tests/Cache/SingleItemsOnlyCachePolicyTests.cs @@ -28,7 +28,7 @@ namespace Umbraco.Tests.Cache public void Get_All_Doesnt_Cache() { var cached = new List(); - var cache = new Mock(); + var cache = new Mock(); cache.Setup(x => x.Insert(It.IsAny(), It.IsAny>(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) .Callback((string cacheKey, Func o, TimeSpan? t, bool b, CacheItemPriority cip, CacheItemRemovedCallback circ, string[] s) => @@ -52,7 +52,7 @@ namespace Umbraco.Tests.Cache public void Caches_Single() { var isCached = false; - var cache = new Mock(); + var cache = new Mock(); cache.Setup(x => x.Insert(It.IsAny(), It.IsAny>(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) .Callback(() => diff --git a/src/Umbraco.Tests/PublishedContent/PublishedContentSnapshotTestBase.cs b/src/Umbraco.Tests/PublishedContent/PublishedContentSnapshotTestBase.cs index 5b1dcde728..e293653c37 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedContentSnapshotTestBase.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedContentSnapshotTestBase.cs @@ -40,7 +40,7 @@ namespace Umbraco.Tests.PublishedContent Composition.RegisterUnique(f => new PublishedModelFactory(f.GetInstance().GetTypes())); } - protected override TypeLoader CreateTypeLoader(IAppPolicedCache runtimeCache, IGlobalSettings globalSettings, IProfilingLogger logger) + protected override TypeLoader CreateTypeLoader(IAppPolicyCache runtimeCache, IGlobalSettings globalSettings, IProfilingLogger logger) { var pluginManager = base.CreateTypeLoader(runtimeCache, globalSettings, logger); diff --git a/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs b/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs index e798be82c4..705b2fd826 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs @@ -74,7 +74,7 @@ namespace Umbraco.Tests.PublishedContent ContentTypesCache.GetPublishedContentTypeByAlias = alias => alias.InvariantEquals("home") ? homeType : anythingType; } - protected override TypeLoader CreateTypeLoader(IAppPolicedCache runtimeCache, IGlobalSettings globalSettings, IProfilingLogger logger) + protected override TypeLoader CreateTypeLoader(IAppPolicyCache runtimeCache, IGlobalSettings globalSettings, IProfilingLogger logger) { var pluginManager = base.CreateTypeLoader(runtimeCache, globalSettings, logger); diff --git a/src/Umbraco.Tests/Testing/UmbracoTestBase.cs b/src/Umbraco.Tests/Testing/UmbracoTestBase.cs index fd617b5a21..1b3f7f50bf 100644 --- a/src/Umbraco.Tests/Testing/UmbracoTestBase.cs +++ b/src/Umbraco.Tests/Testing/UmbracoTestBase.cs @@ -244,7 +244,7 @@ namespace Umbraco.Tests.Testing .ComposeWebMappingProfiles(); } - protected virtual TypeLoader GetTypeLoader(IAppPolicedCache runtimeCache, IGlobalSettings globalSettings, IProfilingLogger logger, UmbracoTestOptions.TypeLoader option) + protected virtual TypeLoader GetTypeLoader(IAppPolicyCache runtimeCache, IGlobalSettings globalSettings, IProfilingLogger logger, UmbracoTestOptions.TypeLoader option) { switch (option) { @@ -259,13 +259,13 @@ namespace Umbraco.Tests.Testing } } - protected virtual TypeLoader CreateTypeLoader(IAppPolicedCache runtimeCache, IGlobalSettings globalSettings, IProfilingLogger logger) + protected virtual TypeLoader CreateTypeLoader(IAppPolicyCache runtimeCache, IGlobalSettings globalSettings, IProfilingLogger logger) { return CreateCommonTypeLoader(runtimeCache, globalSettings, logger); } // common to all tests = cannot be overriden - private static TypeLoader CreateCommonTypeLoader(IAppPolicedCache runtimeCache, IGlobalSettings globalSettings, IProfilingLogger logger) + private static TypeLoader CreateCommonTypeLoader(IAppPolicyCache runtimeCache, IGlobalSettings globalSettings, IProfilingLogger logger) { return new TypeLoader(runtimeCache, globalSettings.LocalTempStorageLocation, logger, false) { diff --git a/src/Umbraco.Web/Editors/ExamineManagementController.cs b/src/Umbraco.Web/Editors/ExamineManagementController.cs index 8d930b8ed7..06334f86e7 100644 --- a/src/Umbraco.Web/Editors/ExamineManagementController.cs +++ b/src/Umbraco.Web/Editors/ExamineManagementController.cs @@ -22,7 +22,7 @@ namespace Umbraco.Web.Editors { private readonly IExamineManager _examineManager; private readonly ILogger _logger; - private readonly IAppPolicedCache _runtimeCache; + private readonly IAppPolicyCache _runtimeCache; private readonly IndexRebuilder _indexRebuilder; From f952fe7aeb2acbf6ada02cf4454777e7def3b5df Mon Sep 17 00:00:00 2001 From: Stephan Date: Fri, 18 Jan 2019 08:14:08 +0100 Subject: [PATCH 145/437] More renaming of caches --- ...derExtensions.cs => AppCacheExtensions.cs} | 2 +- src/Umbraco.Core/Cache/ObjectCacheAppCache.cs | 2 +- src/Umbraco.Core/Cache/WebCachingAppCache.cs | 1 - src/Umbraco.Core/Composing/Current.cs | 2 +- .../Implement/MemberGroupRepository.cs | 2 +- src/Umbraco.Core/Umbraco.Core.csproj | 2 +- ...CacheProviderTests.cs => AppCacheTests.cs} | 98 +++++++++---------- ...iderTests.cs => DeepCloneAppCacheTests.cs} | 7 +- ...erTests.cs => HttpRequestAppCacheTests.cs} | 8 +- .../Cache/HttpRuntimeCacheProviderTests.cs | 59 ----------- ...roviderTests.cs => ObjectAppCacheTests.cs} | 6 +- .../PublishedContentCacheTests.cs | 8 +- ...oviderTests.cs => RuntimeAppCacheTests.cs} | 16 ++- .../Cache/WebCachingAppCacheTests.cs | 50 ++++++++++ .../Scoping/ScopedRepositoryTests.cs | 6 +- src/Umbraco.Tests/Umbraco.Tests.csproj | 12 +-- .../Cache/ContentCacheRefresher.cs | 2 +- src/Umbraco.Web/Cache/MediaCacheRefresher.cs | 2 +- src/Umbraco.Web/Composing/Current.cs | 2 +- .../Dictionary/UmbracoCultureDictionary.cs | 20 ++-- .../Editors/CurrentUserController.cs | 2 +- src/Umbraco.Web/HtmlHelperRenderExtensions.cs | 2 +- src/Umbraco.Web/Macros/MacroRenderer.cs | 4 +- .../DictionaryPublishedContent.cs | 6 +- .../PublishedContentCache.cs | 16 +-- .../XmlPublishedCache/PublishedMediaCache.cs | 22 ++--- .../XmlPublishedCache/XmlPublishedContent.cs | 12 +-- 27 files changed, 178 insertions(+), 193 deletions(-) rename src/Umbraco.Core/Cache/{CacheProviderExtensions.cs => AppCacheExtensions.cs} (98%) rename src/Umbraco.Tests/Cache/{CacheProviderTests.cs => AppCacheTests.cs} (69%) rename src/Umbraco.Tests/Cache/{DeepCloneRuntimeCacheProviderTests.cs => DeepCloneAppCacheTests.cs} (94%) rename src/Umbraco.Tests/Cache/{HttpRequestCacheProviderTests.cs => HttpRequestAppCacheTests.cs} (82%) delete mode 100644 src/Umbraco.Tests/Cache/HttpRuntimeCacheProviderTests.cs rename src/Umbraco.Tests/Cache/{ObjectCacheProviderTests.cs => ObjectAppCacheTests.cs} (78%) rename src/Umbraco.Tests/Cache/{RuntimeCacheProviderTests.cs => RuntimeAppCacheTests.cs} (51%) create mode 100644 src/Umbraco.Tests/Cache/WebCachingAppCacheTests.cs diff --git a/src/Umbraco.Core/Cache/CacheProviderExtensions.cs b/src/Umbraco.Core/Cache/AppCacheExtensions.cs similarity index 98% rename from src/Umbraco.Core/Cache/CacheProviderExtensions.cs rename to src/Umbraco.Core/Cache/AppCacheExtensions.cs index d943d19edb..ddba8be1b2 100644 --- a/src/Umbraco.Core/Cache/CacheProviderExtensions.cs +++ b/src/Umbraco.Core/Cache/AppCacheExtensions.cs @@ -8,7 +8,7 @@ namespace Umbraco.Core.Cache /// /// Extensions for strongly typed access /// - public static class CacheProviderExtensions + public static class AppCacheExtensions { public static T GetCacheItem(this IAppPolicyCache provider, string cacheKey, diff --git a/src/Umbraco.Core/Cache/ObjectCacheAppCache.cs b/src/Umbraco.Core/Cache/ObjectCacheAppCache.cs index 449eb5d643..5c4f76f51d 100644 --- a/src/Umbraco.Core/Cache/ObjectCacheAppCache.cs +++ b/src/Umbraco.Core/Cache/ObjectCacheAppCache.cs @@ -105,7 +105,7 @@ namespace Umbraco.Core.Cache /// public object Get(string key, Func factory, TimeSpan? timeout, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null) { - // see notes in HttpRuntimeCacheProvider + // see notes in HttpRuntimeAppCache Lazy result; diff --git a/src/Umbraco.Core/Cache/WebCachingAppCache.cs b/src/Umbraco.Core/Cache/WebCachingAppCache.cs index 7fbdebf9ab..c6e104221a 100644 --- a/src/Umbraco.Core/Cache/WebCachingAppCache.cs +++ b/src/Umbraco.Core/Cache/WebCachingAppCache.cs @@ -9,7 +9,6 @@ namespace Umbraco.Core.Cache { /// /// Implements on top of a . - /// A CacheProvider that wraps the logic of the HttpRuntime.Cache /// /// The underlying cache is expected to be HttpRuntime.Cache. internal class WebCachingAppCache : FastDictionaryAppCacheBase, IAppPolicyCache diff --git a/src/Umbraco.Core/Composing/Current.cs b/src/Umbraco.Core/Composing/Current.cs index bfc5cfd51c..429fee3317 100644 --- a/src/Umbraco.Core/Composing/Current.cs +++ b/src/Umbraco.Core/Composing/Current.cs @@ -180,7 +180,7 @@ namespace Umbraco.Core.Composing public static ICultureDictionaryFactory CultureDictionaryFactory => Factory.GetInstance(); - public static AppCaches ApplicationCache + public static AppCaches AppCaches => Factory.GetInstance(); public static ServiceContext Services diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberGroupRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberGroupRepository.cs index 11166ce777..e6ee79470c 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberGroupRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberGroupRepository.cs @@ -124,7 +124,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var result = Get(qry); return result.FirstOrDefault(); }, - //cache for 5 mins since that is the default in the RuntimeCacheProvider + //cache for 5 mins since that is the default in the Runtime app cache TimeSpan.FromMinutes(5), //sliding is true true); diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index b94c718242..5b2692359a 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -114,7 +114,7 @@ - + diff --git a/src/Umbraco.Tests/Cache/CacheProviderTests.cs b/src/Umbraco.Tests/Cache/AppCacheTests.cs similarity index 69% rename from src/Umbraco.Tests/Cache/CacheProviderTests.cs rename to src/Umbraco.Tests/Cache/AppCacheTests.cs index f2288cbaf2..f18e08d680 100644 --- a/src/Umbraco.Tests/Cache/CacheProviderTests.cs +++ b/src/Umbraco.Tests/Cache/AppCacheTests.cs @@ -7,9 +7,9 @@ using umbraco; namespace Umbraco.Tests.Cache { - public abstract class CacheProviderTests + public abstract class AppCacheTests { - internal abstract IAppCache Provider { get; } + internal abstract IAppCache AppCache { get; } protected abstract int GetTotalItemCount { get; } [SetUp] @@ -21,22 +21,22 @@ namespace Umbraco.Tests.Cache [TearDown] public virtual void TearDown() { - Provider.Clear(); + AppCache.Clear(); } [Test] public void Throws_On_Reentry() { // don't run for StaticCacheProvider - not making sense - if (GetType() == typeof (StaticCacheProviderTests)) + if (GetType() == typeof (StaticAppCacheTests)) Assert.Ignore("Do not run for StaticCacheProvider."); Exception exception = null; - var result = Provider.Get("blah", () => + var result = AppCache.Get("blah", () => { try { - var result2 = Provider.Get("blah"); + var result2 = AppCache.Get("blah"); } catch (Exception e) { @@ -56,7 +56,7 @@ namespace Umbraco.Tests.Cache object result; try { - result = Provider.Get("Blah", () => + result = AppCache.Get("Blah", () => { counter++; throw new Exception("Do not cache this"); @@ -66,7 +66,7 @@ namespace Umbraco.Tests.Cache try { - result = Provider.Get("Blah", () => + result = AppCache.Get("Blah", () => { counter++; throw new Exception("Do not cache this"); @@ -85,13 +85,13 @@ namespace Umbraco.Tests.Cache object result; - result = Provider.Get("Blah", () => + result = AppCache.Get("Blah", () => { counter++; return ""; }); - result = Provider.Get("Blah", () => + result = AppCache.Get("Blah", () => { counter++; return ""; @@ -108,14 +108,14 @@ namespace Umbraco.Tests.Cache var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2"); var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3"); var cacheContent4 = new LiteralControl(); - Provider.Get("Test1", () => cacheContent1); - Provider.Get("Tester2", () => cacheContent2); - Provider.Get("Tes3", () => cacheContent3); - Provider.Get("different4", () => cacheContent4); + AppCache.Get("Test1", () => cacheContent1); + AppCache.Get("Tester2", () => cacheContent2); + AppCache.Get("Tes3", () => cacheContent3); + AppCache.Get("different4", () => cacheContent4); Assert.AreEqual(4, GetTotalItemCount); - var result = Provider.SearchByKey("Tes"); + var result = AppCache.SearchByKey("Tes"); Assert.AreEqual(3, result.Count()); } @@ -127,14 +127,14 @@ namespace Umbraco.Tests.Cache var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2"); var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3"); var cacheContent4 = new LiteralControl(); - Provider.Get("TTes1t", () => cacheContent1); - Provider.Get("Tester2", () => cacheContent2); - Provider.Get("Tes3", () => cacheContent3); - Provider.Get("different4", () => cacheContent4); + AppCache.Get("TTes1t", () => cacheContent1); + AppCache.Get("Tester2", () => cacheContent2); + AppCache.Get("Tes3", () => cacheContent3); + AppCache.Get("different4", () => cacheContent4); Assert.AreEqual(4, GetTotalItemCount); - Provider.ClearByRegex("^\\w+es\\d.*"); + AppCache.ClearByRegex("^\\w+es\\d.*"); Assert.AreEqual(2, GetTotalItemCount); } @@ -146,14 +146,14 @@ namespace Umbraco.Tests.Cache var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2"); var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3"); var cacheContent4 = new LiteralControl(); - Provider.Get("Test1", () => cacheContent1); - Provider.Get("Tester2", () => cacheContent2); - Provider.Get("Tes3", () => cacheContent3); - Provider.Get("different4", () => cacheContent4); + AppCache.Get("Test1", () => cacheContent1); + AppCache.Get("Tester2", () => cacheContent2); + AppCache.Get("Tes3", () => cacheContent3); + AppCache.Get("different4", () => cacheContent4); Assert.AreEqual(4, GetTotalItemCount); - Provider.ClearByKey("Test"); + AppCache.ClearByKey("Test"); Assert.AreEqual(2, GetTotalItemCount); } @@ -165,15 +165,15 @@ namespace Umbraco.Tests.Cache var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2"); var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3"); var cacheContent4 = new LiteralControl(); - Provider.Get("Test1", () => cacheContent1); - Provider.Get("Test2", () => cacheContent2); - Provider.Get("Test3", () => cacheContent3); - Provider.Get("Test4", () => cacheContent4); + AppCache.Get("Test1", () => cacheContent1); + AppCache.Get("Test2", () => cacheContent2); + AppCache.Get("Test3", () => cacheContent3); + AppCache.Get("Test4", () => cacheContent4); Assert.AreEqual(4, GetTotalItemCount); - Provider.Clear("Test1"); - Provider.Clear("Test2"); + AppCache.Clear("Test1"); + AppCache.Clear("Test2"); Assert.AreEqual(2, GetTotalItemCount); } @@ -185,14 +185,14 @@ namespace Umbraco.Tests.Cache var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2"); var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3"); var cacheContent4 = new LiteralControl(); - Provider.Get("Test1", () => cacheContent1); - Provider.Get("Test2", () => cacheContent2); - Provider.Get("Test3", () => cacheContent3); - Provider.Get("Test4", () => cacheContent4); + AppCache.Get("Test1", () => cacheContent1); + AppCache.Get("Test2", () => cacheContent2); + AppCache.Get("Test3", () => cacheContent3); + AppCache.Get("Test4", () => cacheContent4); Assert.AreEqual(4, GetTotalItemCount); - Provider.Clear(); + AppCache.Clear(); Assert.AreEqual(0, GetTotalItemCount); } @@ -201,7 +201,7 @@ namespace Umbraco.Tests.Cache public void Can_Add_When_Not_Available() { var cacheContent1 = new MacroCacheContent(new LiteralControl(), "Test1"); - Provider.Get("Test1", () => cacheContent1); + AppCache.Get("Test1", () => cacheContent1); Assert.AreEqual(1, GetTotalItemCount); } @@ -209,8 +209,8 @@ namespace Umbraco.Tests.Cache public void Can_Get_When_Available() { var cacheContent1 = new MacroCacheContent(new LiteralControl(), "Test1"); - var result = Provider.Get("Test1", () => cacheContent1); - var result2 = Provider.Get("Test1", () => cacheContent1); + var result = AppCache.Get("Test1", () => cacheContent1); + var result2 = AppCache.Get("Test1", () => cacheContent1); Assert.AreEqual(1, GetTotalItemCount); Assert.AreEqual(result, result2); } @@ -222,15 +222,15 @@ namespace Umbraco.Tests.Cache var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2"); var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3"); var cacheContent4 = new LiteralControl(); - Provider.Get("Test1", () => cacheContent1); - Provider.Get("Test2", () => cacheContent2); - Provider.Get("Test3", () => cacheContent3); - Provider.Get("Test4", () => cacheContent4); + AppCache.Get("Test1", () => cacheContent1); + AppCache.Get("Test2", () => cacheContent2); + AppCache.Get("Test3", () => cacheContent3); + AppCache.Get("Test4", () => cacheContent4); Assert.AreEqual(4, GetTotalItemCount); //Provider.ClearCacheObjectTypes("umbraco.MacroCacheContent"); - Provider.ClearOfType(typeof(MacroCacheContent).ToString()); + AppCache.ClearOfType(typeof(MacroCacheContent).ToString()); Assert.AreEqual(1, GetTotalItemCount); } @@ -242,14 +242,14 @@ namespace Umbraco.Tests.Cache var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2"); var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3"); var cacheContent4 = new LiteralControl(); - Provider.Get("Test1", () => cacheContent1); - Provider.Get("Test2", () => cacheContent2); - Provider.Get("Test3", () => cacheContent3); - Provider.Get("Test4", () => cacheContent4); + AppCache.Get("Test1", () => cacheContent1); + AppCache.Get("Test2", () => cacheContent2); + AppCache.Get("Test3", () => cacheContent3); + AppCache.Get("Test4", () => cacheContent4); Assert.AreEqual(4, GetTotalItemCount); - Provider.ClearOfType(); + AppCache.ClearOfType(); Assert.AreEqual(1, GetTotalItemCount); } diff --git a/src/Umbraco.Tests/Cache/DeepCloneRuntimeCacheProviderTests.cs b/src/Umbraco.Tests/Cache/DeepCloneAppCacheTests.cs similarity index 94% rename from src/Umbraco.Tests/Cache/DeepCloneRuntimeCacheProviderTests.cs rename to src/Umbraco.Tests/Cache/DeepCloneAppCacheTests.cs index 7483df1c44..11e2c56873 100644 --- a/src/Umbraco.Tests/Cache/DeepCloneRuntimeCacheProviderTests.cs +++ b/src/Umbraco.Tests/Cache/DeepCloneAppCacheTests.cs @@ -8,13 +8,12 @@ using Umbraco.Core.Cache; using Umbraco.Core.Collections; using Umbraco.Core.Models; using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Repositories; using Umbraco.Tests.Collections; namespace Umbraco.Tests.Cache { [TestFixture] - public class DeepCloneRuntimeCacheProviderTests : RuntimeCacheProviderTests + public class DeepCloneAppCacheTests : RuntimeAppCacheTests { private DeepCloneAppCache _provider; @@ -29,12 +28,12 @@ namespace Umbraco.Tests.Cache _provider = new DeepCloneAppCache(new WebCachingAppCache(HttpRuntime.Cache)); } - internal override IAppCache Provider + internal override IAppCache AppCache { get { return _provider; } } - internal override IAppPolicyCache RuntimeProvider + internal override IAppPolicyCache AppPolicyCache { get { return _provider; } } diff --git a/src/Umbraco.Tests/Cache/HttpRequestCacheProviderTests.cs b/src/Umbraco.Tests/Cache/HttpRequestAppCacheTests.cs similarity index 82% rename from src/Umbraco.Tests/Cache/HttpRequestCacheProviderTests.cs rename to src/Umbraco.Tests/Cache/HttpRequestAppCacheTests.cs index f442319d7f..635155f68e 100644 --- a/src/Umbraco.Tests/Cache/HttpRequestCacheProviderTests.cs +++ b/src/Umbraco.Tests/Cache/HttpRequestAppCacheTests.cs @@ -5,7 +5,7 @@ using Umbraco.Tests.TestHelpers; namespace Umbraco.Tests.Cache { [TestFixture] - public class HttpRequestCacheProviderTests : CacheProviderTests + public class HttpRequestAppCacheTests : AppCacheTests { private HttpRequestAppCache _provider; private FakeHttpContextFactory _ctx; @@ -17,7 +17,7 @@ namespace Umbraco.Tests.Cache _provider = new HttpRequestAppCache(_ctx.HttpContext); } - internal override IAppCache Provider + internal override IAppCache AppCache { get { return _provider; } } @@ -29,7 +29,7 @@ namespace Umbraco.Tests.Cache } [TestFixture] - public class StaticCacheProviderTests : CacheProviderTests + public class StaticAppCacheTests : AppCacheTests { private DictionaryCacheProvider _provider; @@ -39,7 +39,7 @@ namespace Umbraco.Tests.Cache _provider = new DictionaryCacheProvider(); } - internal override IAppCache Provider + internal override IAppCache AppCache { get { return _provider; } } diff --git a/src/Umbraco.Tests/Cache/HttpRuntimeCacheProviderTests.cs b/src/Umbraco.Tests/Cache/HttpRuntimeCacheProviderTests.cs deleted file mode 100644 index 6297539a1b..0000000000 --- a/src/Umbraco.Tests/Cache/HttpRuntimeCacheProviderTests.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.Diagnostics; -using System.Web; -using NUnit.Framework; -using Umbraco.Core.Cache; - -namespace Umbraco.Tests.Cache -{ - [TestFixture] - public class HttpRuntimeCacheProviderTests : RuntimeCacheProviderTests - { - private WebCachingAppCache _provider; - - protected override int GetTotalItemCount - { - get { return HttpRuntime.Cache.Count; } - } - - public override void Setup() - { - base.Setup(); - _provider = new WebCachingAppCache(HttpRuntime.Cache); - } - - internal override IAppCache Provider - { - get { return _provider; } - } - - internal override IAppPolicyCache RuntimeProvider - { - get { return _provider; } - } - - [Test] - public void DoesNotCacheExceptions() - { - string value; - Assert.Throws(() => { value = (string)_provider.Get("key", () => GetValue(1)); }); - Assert.Throws(() => { value = (string)_provider.Get("key", () => GetValue(2)); }); - - // does not throw - value = (string)_provider.Get("key", () => GetValue(3)); - Assert.AreEqual("succ3", value); - - // cache - value = (string)_provider.Get("key", () => GetValue(4)); - Assert.AreEqual("succ3", value); - } - - private static string GetValue(int i) - { - Debug.Print("get" + i); - if (i < 3) - throw new Exception("fail"); - return "succ" + i; - } - } -} diff --git a/src/Umbraco.Tests/Cache/ObjectCacheProviderTests.cs b/src/Umbraco.Tests/Cache/ObjectAppCacheTests.cs similarity index 78% rename from src/Umbraco.Tests/Cache/ObjectCacheProviderTests.cs rename to src/Umbraco.Tests/Cache/ObjectAppCacheTests.cs index 4d34e81eff..b9c729f891 100644 --- a/src/Umbraco.Tests/Cache/ObjectCacheProviderTests.cs +++ b/src/Umbraco.Tests/Cache/ObjectAppCacheTests.cs @@ -8,7 +8,7 @@ using Umbraco.Core.Cache; namespace Umbraco.Tests.Cache { [TestFixture] - public class ObjectCacheProviderTests : RuntimeCacheProviderTests + public class ObjectAppCacheTests : RuntimeAppCacheTests { private ObjectCacheAppCache _provider; @@ -23,12 +23,12 @@ namespace Umbraco.Tests.Cache _provider = new ObjectCacheAppCache(); } - internal override IAppCache Provider + internal override IAppCache AppCache { get { return _provider; } } - internal override IAppPolicyCache RuntimeProvider + internal override IAppPolicyCache AppPolicyCache { get { return _provider; } } diff --git a/src/Umbraco.Tests/Cache/PublishedCache/PublishedContentCacheTests.cs b/src/Umbraco.Tests/Cache/PublishedCache/PublishedContentCacheTests.cs index 79d0dfb9da..f740637602 100644 --- a/src/Umbraco.Tests/Cache/PublishedCache/PublishedContentCacheTests.cs +++ b/src/Umbraco.Tests/Cache/PublishedCache/PublishedContentCacheTests.cs @@ -63,12 +63,12 @@ namespace Umbraco.Tests.Cache.PublishedCache _xml = new XmlDocument(); _xml.LoadXml(GetXml()); var xmlStore = new XmlStore(() => _xml, null, null, null); - var cacheProvider = new DictionaryCacheProvider(); + var appCache = new DictionaryCacheProvider(); var domainCache = new DomainCache(ServiceContext.DomainService, DefaultCultureAccessor); var publishedShapshot = new Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedSnapshot( - new PublishedContentCache(xmlStore, domainCache, cacheProvider, globalSettings, new SiteDomainHelper(), ContentTypesCache, null, null), - new PublishedMediaCache(xmlStore, ServiceContext.MediaService, ServiceContext.UserService, cacheProvider, ContentTypesCache, Factory.GetInstance()), - new PublishedMemberCache(null, cacheProvider, Current.Services.MemberService, ContentTypesCache), + new PublishedContentCache(xmlStore, domainCache, appCache, globalSettings, new SiteDomainHelper(), ContentTypesCache, null, null), + new PublishedMediaCache(xmlStore, ServiceContext.MediaService, ServiceContext.UserService, appCache, ContentTypesCache, Factory.GetInstance()), + new PublishedMemberCache(null, appCache, Current.Services.MemberService, ContentTypesCache), domainCache); var publishedSnapshotService = new Mock(); publishedSnapshotService.Setup(x => x.CreatePublishedSnapshot(It.IsAny())).Returns(publishedShapshot); diff --git a/src/Umbraco.Tests/Cache/RuntimeCacheProviderTests.cs b/src/Umbraco.Tests/Cache/RuntimeAppCacheTests.cs similarity index 51% rename from src/Umbraco.Tests/Cache/RuntimeCacheProviderTests.cs rename to src/Umbraco.Tests/Cache/RuntimeAppCacheTests.cs index 6391e4ec7a..1beeae74db 100644 --- a/src/Umbraco.Tests/Cache/RuntimeCacheProviderTests.cs +++ b/src/Umbraco.Tests/Cache/RuntimeAppCacheTests.cs @@ -5,25 +5,23 @@ using Umbraco.Core.Cache; namespace Umbraco.Tests.Cache { - public abstract class RuntimeCacheProviderTests : CacheProviderTests + public abstract class RuntimeAppCacheTests : AppCacheTests { - - internal abstract IAppPolicyCache RuntimeProvider { get; } - + internal abstract IAppPolicyCache AppPolicyCache { get; } [Test] [Explicit("Testing for timeouts cannot work on VSTS.")] public void Can_Add_And_Expire_Struct_Strongly_Typed_With_Null() { var now = DateTime.Now; - RuntimeProvider.Insert("DateTimeTest", () => now, new TimeSpan(0, 0, 0, 0, 200)); - Assert.AreEqual(now, Provider.GetCacheItem("DateTimeTest")); - Assert.AreEqual(now, Provider.GetCacheItem("DateTimeTest")); + AppPolicyCache.Insert("DateTimeTest", () => now, new TimeSpan(0, 0, 0, 0, 200)); + Assert.AreEqual(now, AppCache.GetCacheItem("DateTimeTest")); + Assert.AreEqual(now, AppCache.GetCacheItem("DateTimeTest")); Thread.Sleep(300); //sleep longer than the cache expiration - Assert.AreEqual(default(DateTime), Provider.GetCacheItem("DateTimeTest")); - Assert.AreEqual(null, Provider.GetCacheItem("DateTimeTest")); + Assert.AreEqual(default(DateTime), AppCache.GetCacheItem("DateTimeTest")); + Assert.AreEqual(null, AppCache.GetCacheItem("DateTimeTest")); } } } diff --git a/src/Umbraco.Tests/Cache/WebCachingAppCacheTests.cs b/src/Umbraco.Tests/Cache/WebCachingAppCacheTests.cs new file mode 100644 index 0000000000..e732ae5766 --- /dev/null +++ b/src/Umbraco.Tests/Cache/WebCachingAppCacheTests.cs @@ -0,0 +1,50 @@ +using System; +using System.Diagnostics; +using System.Web; +using NUnit.Framework; +using Umbraco.Core.Cache; + +namespace Umbraco.Tests.Cache +{ + [TestFixture] + public class WebCachingAppCacheTests : RuntimeAppCacheTests + { + private WebCachingAppCache _appCache; + + protected override int GetTotalItemCount => HttpRuntime.Cache.Count; + + public override void Setup() + { + base.Setup(); + _appCache = new WebCachingAppCache(HttpRuntime.Cache); + } + + internal override IAppCache AppCache => _appCache; + + internal override IAppPolicyCache AppPolicyCache => _appCache; + + [Test] + public void DoesNotCacheExceptions() + { + string value; + Assert.Throws(() => { value = (string)_appCache.Get("key", () => GetValue(1)); }); + Assert.Throws(() => { value = (string)_appCache.Get("key", () => GetValue(2)); }); + + // does not throw + value = (string)_appCache.Get("key", () => GetValue(3)); + Assert.AreEqual("succ3", value); + + // cache + value = (string)_appCache.Get("key", () => GetValue(4)); + Assert.AreEqual("succ3", value); + } + + private static string GetValue(int i) + { + Debug.Print("get" + i); + if (i < 3) + throw new Exception("fail"); + return "succ" + i; + } + } +} diff --git a/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs b/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs index 12cd02d2e9..c56ec57db0 100644 --- a/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs +++ b/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs @@ -60,7 +60,7 @@ namespace Umbraco.Tests.Scoping { var scopeProvider = ScopeProvider; var service = Current.Services.UserService; - var globalCache = Current.ApplicationCache.IsolatedCaches.GetOrCreate(typeof(IUser)); + var globalCache = Current.AppCaches.IsolatedCaches.GetOrCreate(typeof(IUser)); var user = (IUser)new User("name", "email", "username", "rawPassword"); service.Save(user); @@ -137,7 +137,7 @@ namespace Umbraco.Tests.Scoping { var scopeProvider = ScopeProvider; var service = Current.Services.LocalizationService; - var globalCache = Current.ApplicationCache.IsolatedCaches.GetOrCreate(typeof (ILanguage)); + var globalCache = Current.AppCaches.IsolatedCaches.GetOrCreate(typeof (ILanguage)); var lang = (ILanguage) new Language("fr-FR"); service.Save(lang); @@ -229,7 +229,7 @@ namespace Umbraco.Tests.Scoping { var scopeProvider = ScopeProvider; var service = Current.Services.LocalizationService; - var globalCache = Current.ApplicationCache.IsolatedCaches.GetOrCreate(typeof (IDictionaryItem)); + var globalCache = Current.AppCaches.IsolatedCaches.GetOrCreate(typeof (IDictionaryItem)); var lang = (ILanguage)new Language("fr-FR"); service.Save(lang); diff --git a/src/Umbraco.Tests/Umbraco.Tests.csproj b/src/Umbraco.Tests/Umbraco.Tests.csproj index e49ba250fa..a2d33a1f31 100644 --- a/src/Umbraco.Tests/Umbraco.Tests.csproj +++ b/src/Umbraco.Tests/Umbraco.Tests.csproj @@ -225,7 +225,7 @@ - + @@ -286,11 +286,11 @@ - - - - - + + + + + diff --git a/src/Umbraco.Web/Cache/ContentCacheRefresher.cs b/src/Umbraco.Web/Cache/ContentCacheRefresher.cs index 36397540b6..3f2ef1620c 100644 --- a/src/Umbraco.Web/Cache/ContentCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/ContentCacheRefresher.cs @@ -102,7 +102,7 @@ namespace Umbraco.Web.Cache if (payloads.Any(x => x.ChangeTypes.HasType(TreeChangeTypes.RefreshAll)) || publishedChanged) { // when a public version changes - Current.ApplicationCache.ClearPartialViewCache(); + Current.AppCaches.ClearPartialViewCache(); MacroCacheRefresher.ClearMacroContentCache(AppCaches); // just the content } diff --git a/src/Umbraco.Web/Cache/MediaCacheRefresher.cs b/src/Umbraco.Web/Cache/MediaCacheRefresher.cs index cdaf43dac3..fc62d38e62 100644 --- a/src/Umbraco.Web/Cache/MediaCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/MediaCacheRefresher.cs @@ -47,7 +47,7 @@ namespace Umbraco.Web.Cache if (anythingChanged) { - Current.ApplicationCache.ClearPartialViewCache(); + Current.AppCaches.ClearPartialViewCache(); var mediaCache = AppCaches.IsolatedCaches.Get(); diff --git a/src/Umbraco.Web/Composing/Current.cs b/src/Umbraco.Web/Composing/Current.cs index ed1853c351..8759193964 100644 --- a/src/Umbraco.Web/Composing/Current.cs +++ b/src/Umbraco.Web/Composing/Current.cs @@ -203,7 +203,7 @@ namespace Umbraco.Web.Composing public static IProfilingLogger ProfilingLogger => CoreCurrent.ProfilingLogger; - public static AppCaches ApplicationCache => CoreCurrent.ApplicationCache; + public static AppCaches AppCaches => CoreCurrent.AppCaches; public static ServiceContext Services => CoreCurrent.Services; diff --git a/src/Umbraco.Web/Dictionary/UmbracoCultureDictionary.cs b/src/Umbraco.Web/Dictionary/UmbracoCultureDictionary.cs index 5234bf9fa7..6e1c35352a 100644 --- a/src/Umbraco.Web/Dictionary/UmbracoCultureDictionary.cs +++ b/src/Umbraco.Web/Dictionary/UmbracoCultureDictionary.cs @@ -21,31 +21,29 @@ namespace Umbraco.Web.Dictionary public class DefaultCultureDictionary : Core.Dictionary.ICultureDictionary { private readonly ILocalizationService _localizationService; - private readonly IAppCache _requestCacheProvider; + private readonly IAppCache _requestCache; private readonly CultureInfo _specificCulture; public DefaultCultureDictionary() - : this(Current.Services.LocalizationService, Current.ApplicationCache.RequestCache) - { + : this(Current.Services.LocalizationService, Current.AppCaches.RequestCache) + { } - } - - public DefaultCultureDictionary(ILocalizationService localizationService, IAppCache requestCacheProvider) + public DefaultCultureDictionary(ILocalizationService localizationService, IAppCache requestCache) { _localizationService = localizationService ?? throw new ArgumentNullException(nameof(localizationService)); - _requestCacheProvider = requestCacheProvider ?? throw new ArgumentNullException(nameof(requestCacheProvider)); + _requestCache = requestCache ?? throw new ArgumentNullException(nameof(requestCache)); } public DefaultCultureDictionary(CultureInfo specificCulture) - : this(Current.Services.LocalizationService, Current.ApplicationCache.RequestCache) + : this(Current.Services.LocalizationService, Current.AppCaches.RequestCache) { _specificCulture = specificCulture ?? throw new ArgumentNullException(nameof(specificCulture)); } - public DefaultCultureDictionary(CultureInfo specificCulture, ILocalizationService localizationService, IAppCache requestCacheProvider) + public DefaultCultureDictionary(CultureInfo specificCulture, ILocalizationService localizationService, IAppCache requestCache) { _localizationService = localizationService ?? throw new ArgumentNullException(nameof(localizationService)); - _requestCacheProvider = requestCacheProvider ?? throw new ArgumentNullException(nameof(requestCacheProvider)); + _requestCache = requestCache ?? throw new ArgumentNullException(nameof(requestCache)); _specificCulture = specificCulture ?? throw new ArgumentNullException(nameof(specificCulture)); } @@ -123,7 +121,7 @@ namespace Umbraco.Web.Dictionary { //ensure it's stored/retrieved from request cache //NOTE: This is no longer necessary since these are cached at the runtime level, but we can leave it here for now. - return _requestCacheProvider.GetCacheItem(typeof (DefaultCultureDictionary).Name + "Culture" + Culture.Name, + return _requestCache.GetCacheItem(typeof (DefaultCultureDictionary).Name + "Culture" + Culture.Name, () => _localizationService.GetLanguageByIsoCode(Culture.Name)); } } diff --git a/src/Umbraco.Web/Editors/CurrentUserController.cs b/src/Umbraco.Web/Editors/CurrentUserController.cs index b0f4af0f57..02470e8ea1 100644 --- a/src/Umbraco.Web/Editors/CurrentUserController.cs +++ b/src/Umbraco.Web/Editors/CurrentUserController.cs @@ -157,7 +157,7 @@ namespace Umbraco.Web.Editors public async Task PostSetAvatar() { //borrow the logic from the user controller - return await UsersController.PostSetAvatarInternal(Request, Services.UserService, Current.ApplicationCache.StaticCache, Security.GetUserId().ResultOr(0)); + return await UsersController.PostSetAvatarInternal(Request, Services.UserService, Current.AppCaches.StaticCache, Security.GetUserId().ResultOr(0)); } /// diff --git a/src/Umbraco.Web/HtmlHelperRenderExtensions.cs b/src/Umbraco.Web/HtmlHelperRenderExtensions.cs index 9c30f74ea7..626a19a369 100644 --- a/src/Umbraco.Web/HtmlHelperRenderExtensions.cs +++ b/src/Umbraco.Web/HtmlHelperRenderExtensions.cs @@ -105,7 +105,7 @@ namespace Umbraco.Web var contextualKey = contextualKeyBuilder(model, viewData); cacheKey.AppendFormat("c{0}-", contextualKey); } - return Current.ApplicationCache.CachedPartialView(htmlHelper, partialViewName, model, cachedSeconds, cacheKey.ToString(), viewData); + return Current.AppCaches.CachedPartialView(htmlHelper, partialViewName, model, cachedSeconds, cacheKey.ToString(), viewData); } public static MvcHtmlString EditorFor(this HtmlHelper htmlHelper, string templateName = "", string htmlFieldName = "", object additionalViewData = null) diff --git a/src/Umbraco.Web/Macros/MacroRenderer.cs b/src/Umbraco.Web/Macros/MacroRenderer.cs index 0bcdb3225b..b7187da743 100755 --- a/src/Umbraco.Web/Macros/MacroRenderer.cs +++ b/src/Umbraco.Web/Macros/MacroRenderer.cs @@ -94,7 +94,7 @@ namespace Umbraco.Web.Macros // only if cache is enabled if (UmbracoContext.Current.InPreviewMode || model.CacheDuration <= 0) return null; - var cache = Current.ApplicationCache.RuntimeCache; + var cache = Current.AppCaches.RuntimeCache; var macroContent = cache.GetCacheItem(CacheKeys.MacroContentCacheKey + model.CacheIdentifier); if (macroContent == null) return null; @@ -151,7 +151,7 @@ namespace Umbraco.Web.Macros // remember when we cache the content macroContent.Date = DateTime.Now; - var cache = Current.ApplicationCache.RuntimeCache; + var cache = Current.AppCaches.RuntimeCache; cache.Insert( CacheKeys.MacroContentCacheKey + model.CacheIdentifier, () => macroContent, diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DictionaryPublishedContent.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DictionaryPublishedContent.cs index e040e7e926..83bd84dab6 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DictionaryPublishedContent.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DictionaryPublishedContent.cs @@ -35,7 +35,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache Func getParent, Func> getChildren, Func getProperty, - IAppCache cacheProvider, + IAppCache appCache, PublishedContentTypeCache contentTypeCache, XPathNavigator nav, bool fromExamine) @@ -47,7 +47,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache _getParent = new Lazy(() => getParent(ParentId)); _getChildren = new Lazy>(() => getChildren(Id, nav)); _getProperty = getProperty; - _cacheProvider = cacheProvider; + _appCache = appCache; LoadedFromExamine = fromExamine; @@ -133,7 +133,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache //private readonly Func> _getChildren; private readonly Lazy> _getChildren; private readonly Func _getProperty; - private readonly IAppCache _cacheProvider; + private readonly IAppCache _appCache; /// /// Returns 'Media' as the item type diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs index 67813ce9f6..d8c7c41ea1 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs @@ -15,7 +15,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache { internal class PublishedContentCache : PublishedCacheBase, IPublishedContentCache { - private readonly IAppCache _cacheProvider; + private readonly IAppCache _appCache; private readonly IGlobalSettings _globalSettings; private readonly RoutesCache _routesCache; private readonly IDomainCache _domainCache; @@ -24,13 +24,13 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache // initialize a PublishedContentCache instance with // an XmlStore containing the master xml - // an ICacheProvider that should be at request-level + // an IAppCache that should be at request-level // a RoutesCache - need to cleanup that one // a preview token string (or null if not previewing) public PublishedContentCache( XmlStore xmlStore, // an XmlStore containing the master xml IDomainCache domainCache, // an IDomainCache implementation - IAppCache cacheProvider, // an ICacheProvider that should be at request-level + IAppCache appCache, // an IAppCache that should be at request-level IGlobalSettings globalSettings, ISiteDomainHelper siteDomainHelper, PublishedContentTypeCache contentTypeCache, // a PublishedContentType cache @@ -38,7 +38,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache string previewToken) // a preview token string (or null if not previewing) : base(previewToken.IsNullOrWhiteSpace() == false) { - _cacheProvider = cacheProvider; + _appCache = appCache; _globalSettings = globalSettings; _routesCache = routesCache; // may be null for unit-testing _contentTypeCache = contentTypeCache; @@ -315,13 +315,13 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache private IPublishedContent ConvertToDocument(XmlNode xmlNode, bool isPreviewing) { - return xmlNode == null ? null : XmlPublishedContent.Get(xmlNode, isPreviewing, _cacheProvider, _contentTypeCache); + return xmlNode == null ? null : XmlPublishedContent.Get(xmlNode, isPreviewing, _appCache, _contentTypeCache); } private IEnumerable ConvertToDocuments(XmlNodeList xmlNodes, bool isPreviewing) { return xmlNodes.Cast() - .Select(xmlNode => XmlPublishedContent.Get(xmlNode, isPreviewing, _cacheProvider, _contentTypeCache)); + .Select(xmlNode => XmlPublishedContent.Get(xmlNode, isPreviewing, _appCache, _contentTypeCache)); } #endregion @@ -517,8 +517,8 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache // clear recursive properties cached by XmlPublishedContent.GetProperty // assume that nothing else is going to cache IPublishedProperty items (else would need to do ByKeySearch) // NOTE also clears all the media cache properties, which is OK (see media cache) - _cacheProvider.ClearOfType(); - //_cacheProvider.ClearCacheByKeySearch("XmlPublishedCache.PublishedContentCache:RecursiveProperty-"); + _appCache.ClearOfType(); + //_appCache.ClearCacheByKeySearch("XmlPublishedCache.PublishedContentCache:RecursiveProperty-"); } #endregion diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs index 3ead5a5166..dadf40a33b 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs @@ -43,15 +43,15 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache private readonly IEntityXmlSerializer _entitySerializer; // must be specified by the ctor - private readonly IAppCache _cacheProvider; + private readonly IAppCache _appCache; - public PublishedMediaCache(XmlStore xmlStore, IMediaService mediaService, IUserService userService, IAppCache cacheProvider, PublishedContentTypeCache contentTypeCache, IEntityXmlSerializer entitySerializer) + public PublishedMediaCache(XmlStore xmlStore, IMediaService mediaService, IUserService userService, IAppCache appCache, PublishedContentTypeCache contentTypeCache, IEntityXmlSerializer entitySerializer) : base(false) { _mediaService = mediaService ?? throw new ArgumentNullException(nameof(mediaService)); _userService = userService ?? throw new ArgumentNullException(nameof(userService)); - _cacheProvider = cacheProvider; + _appCache = appCache; _xmlStore = xmlStore; _contentTypeCache = contentTypeCache; _entitySerializer = entitySerializer; @@ -63,16 +63,16 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache /// /// /// - /// + /// /// /// - internal PublishedMediaCache(IMediaService mediaService, IUserService userService, ISearcher searchProvider, IAppCache cacheProvider, PublishedContentTypeCache contentTypeCache, IEntityXmlSerializer entitySerializer) + internal PublishedMediaCache(IMediaService mediaService, IUserService userService, ISearcher searchProvider, IAppCache appCache, PublishedContentTypeCache contentTypeCache, IEntityXmlSerializer entitySerializer) : base(false) { _mediaService = mediaService ?? throw new ArgumentNullException(nameof(mediaService)); _userService = userService ?? throw new ArgumentNullException(nameof(userService)); _searchProvider = searchProvider ?? throw new ArgumentNullException(nameof(searchProvider)); - _cacheProvider = cacheProvider; + _appCache = appCache; _contentTypeCache = contentTypeCache; _entitySerializer = entitySerializer; } @@ -598,8 +598,8 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache // clear recursive properties cached by XmlPublishedContent.GetProperty // assume that nothing else is going to cache IPublishedProperty items (else would need to do ByKeySearch) // NOTE all properties cleared when clearing the content cache (see content cache) - //_cacheProvider.ClearCacheObjectTypes(); - //_cacheProvider.ClearCacheByKeySearch("XmlPublishedCache.PublishedMediaCache:RecursiveProperty-"); + //_appCache.ClearCacheObjectTypes(); + //_appCache.ClearCacheByKeySearch("XmlPublishedCache.PublishedMediaCache:RecursiveProperty-"); } #region Content types @@ -663,7 +663,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache parentId => parentId < 0 ? null : GetUmbracoMedia(parentId), GetChildrenMedia, GetProperty, - _cacheProvider, + _appCache, _contentTypeCache, cacheValues.XPath, // though, outside of tests, that should be null cacheValues.FromExamine @@ -676,14 +676,14 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache if (_publishedMediaCacheEnabled == false) return func(id); - var cache = Current.ApplicationCache.RuntimeCache; + var cache = Current.AppCaches.RuntimeCache; var key = PublishedMediaCacheKey + id; return (CacheValues)cache.Get(key, () => func(id), _publishedMediaCacheTimespan); } internal static void ClearCache(int id) { - var cache = Current.ApplicationCache.RuntimeCache; + var cache = Current.AppCaches.RuntimeCache; var sid = id.ToString(); var key = PublishedMediaCacheKey + sid; diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs index a313d6947d..eb54c85984 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs @@ -20,18 +20,18 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache [XmlType(Namespace = "http://umbraco.org/webservices/")] internal class XmlPublishedContent : PublishedContentBase { - private XmlPublishedContent(XmlNode xmlNode, bool isPreviewing, IAppCache cacheProvider, PublishedContentTypeCache contentTypeCache) + private XmlPublishedContent(XmlNode xmlNode, bool isPreviewing, IAppCache appCache, PublishedContentTypeCache contentTypeCache) { _xmlNode = xmlNode; _isPreviewing = isPreviewing; - _cacheProvider = cacheProvider; + _appCache = appCache; _contentTypeCache = contentTypeCache; } private readonly XmlNode _xmlNode; private readonly bool _isPreviewing; - private readonly IAppCache _cacheProvider; // at snapshot/request level (see PublishedContentCache) + private readonly IAppCache _appCache; // at snapshot/request level (see PublishedContentCache) private readonly PublishedContentTypeCache _contentTypeCache; private readonly object _initializeLock = new object(); @@ -252,7 +252,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache if (parent == null) return; if (parent.Attributes?.GetNamedItem("isDoc") != null) - _parent = Get(parent, _isPreviewing, _cacheProvider, _contentTypeCache); + _parent = Get(parent, _isPreviewing, _appCache, _contentTypeCache); _parentInitialized = true; } @@ -409,7 +409,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache var iterator = nav.Select(expr); _children = iterator.Cast() - .Select(n => Get(((IHasXmlNode) n).GetNode(), _isPreviewing, _cacheProvider, _contentTypeCache)) + .Select(n => Get(((IHasXmlNode) n).GetNode(), _isPreviewing, _appCache, _contentTypeCache)) .OrderBy(x => x.SortOrder) .ToList(); @@ -440,7 +440,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache public static void ClearRequest() { - Current.ApplicationCache.RequestCache.ClearByKey(CacheKeyPrefix); + Current.AppCaches.RequestCache.ClearByKey(CacheKeyPrefix); } private const string CacheKeyPrefix = "CONTENTCACHE_XMLPUBLISHEDCONTENT_"; From ec58532f7bf70b055703b18bc7ded1e2278bfe1c Mon Sep 17 00:00:00 2001 From: Stephan Date: Fri, 18 Jan 2019 08:29:16 +0100 Subject: [PATCH 146/437] More renaming of caches --- src/Umbraco.Core/Cache/AppCaches.cs | 6 +++--- ...CacheProvider.cs => DictionaryAppCache.cs} | 2 +- ...eProvider.cs => FastDictionaryAppCache.cs} | 2 +- src/Umbraco.Core/Runtime/CoreRuntime.cs | 2 +- src/Umbraco.Core/Umbraco.Core.csproj | 4 ++-- src/Umbraco.Tests/Cache/AppCacheTests.cs | 6 +++--- .../Cache/HttpRequestAppCacheTests.cs | 16 +++++++-------- .../PublishedContentCacheTests.cs | 2 +- .../PublishedMediaCacheTests.cs | 8 ++++---- src/Umbraco.Tests/Macros/MacroTests.cs | 2 +- .../Repositories/DocumentRepositoryTest.cs | 4 ++-- .../Repositories/MediaRepositoryTest.cs | 4 ++-- .../Published/PropertyCacheLevelTests.cs | 4 ++-- .../PublishedContent/PublishedMediaTests.cs | 20 +++++++++---------- .../Scoping/ScopedRepositoryTests.cs | 2 +- .../NuCache/PublishedSnapshotService.cs | 13 ++++++------ .../XmlPublishedCache/PublishedMemberCache.cs | 4 ++-- .../XmlPublishedCache/XmlPublishedContent.cs | 6 +++--- src/Umbraco.Web/Runtime/WebRuntime.cs | 2 +- 19 files changed, 55 insertions(+), 54 deletions(-) rename src/Umbraco.Core/Cache/{DictionaryCacheProvider.cs => DictionaryAppCache.cs} (98%) rename src/Umbraco.Core/Cache/{FastDictionaryCacheProvider.cs => FastDictionaryAppCache.cs} (99%) diff --git a/src/Umbraco.Core/Cache/AppCaches.cs b/src/Umbraco.Core/Cache/AppCaches.cs index 7e5fa43682..d81e79f7d8 100644 --- a/src/Umbraco.Core/Cache/AppCaches.cs +++ b/src/Umbraco.Core/Cache/AppCaches.cs @@ -21,7 +21,7 @@ namespace Umbraco.Core.Cache public AppCaches(System.Web.Caching.Cache cache) : this( new WebCachingAppCache(cache), - new DictionaryCacheProvider(), + new DictionaryAppCache(), new HttpRequestAppCache(), new IsolatedCaches(t => new ObjectCacheAppCache())) { } @@ -31,12 +31,12 @@ namespace Umbraco.Core.Cache /// public AppCaches( IAppPolicyCache runtimeCache, - IAppCache staticCacheProvider, + IAppCache staticCache, IAppCache requestCache, IsolatedCaches isolatedCaches) { RuntimeCache = runtimeCache ?? throw new ArgumentNullException(nameof(runtimeCache)); - StaticCache = staticCacheProvider ?? throw new ArgumentNullException(nameof(staticCacheProvider)); + StaticCache = staticCache ?? throw new ArgumentNullException(nameof(staticCache)); RequestCache = requestCache ?? throw new ArgumentNullException(nameof(requestCache)); IsolatedCaches = isolatedCaches ?? throw new ArgumentNullException(nameof(isolatedCaches)); } diff --git a/src/Umbraco.Core/Cache/DictionaryCacheProvider.cs b/src/Umbraco.Core/Cache/DictionaryAppCache.cs similarity index 98% rename from src/Umbraco.Core/Cache/DictionaryCacheProvider.cs rename to src/Umbraco.Core/Cache/DictionaryAppCache.cs index 2ff5f6ea83..4c08bd0524 100644 --- a/src/Umbraco.Core/Cache/DictionaryCacheProvider.cs +++ b/src/Umbraco.Core/Cache/DictionaryAppCache.cs @@ -8,7 +8,7 @@ namespace Umbraco.Core.Cache /// /// Implements on top of a concurrent dictionary. /// - public class DictionaryCacheProvider : IAppCache + public class DictionaryAppCache : IAppCache { /// /// Gets the internal items dictionary, for tests only! diff --git a/src/Umbraco.Core/Cache/FastDictionaryCacheProvider.cs b/src/Umbraco.Core/Cache/FastDictionaryAppCache.cs similarity index 99% rename from src/Umbraco.Core/Cache/FastDictionaryCacheProvider.cs rename to src/Umbraco.Core/Cache/FastDictionaryAppCache.cs index a3863dac52..bd545694f7 100644 --- a/src/Umbraco.Core/Cache/FastDictionaryCacheProvider.cs +++ b/src/Umbraco.Core/Cache/FastDictionaryAppCache.cs @@ -10,7 +10,7 @@ namespace Umbraco.Core.Cache /// /// Implements a fast on top of a concurrent dictionary. /// - internal class FastDictionaryCacheProvider : IAppCache + internal class FastDictionaryAppCache : IAppCache { /// /// Gets the internal items dictionary, for tests only! diff --git a/src/Umbraco.Core/Runtime/CoreRuntime.cs b/src/Umbraco.Core/Runtime/CoreRuntime.cs index 6bfe9cdb55..8f1fa54a0c 100644 --- a/src/Umbraco.Core/Runtime/CoreRuntime.cs +++ b/src/Umbraco.Core/Runtime/CoreRuntime.cs @@ -332,7 +332,7 @@ namespace Umbraco.Core.Runtime return new AppCaches( new DeepCloneAppCache(new ObjectCacheAppCache()), - new DictionaryCacheProvider(), + new DictionaryAppCache(), NoAppCache.Instance, new IsolatedCaches(type => new DeepCloneAppCache(new ObjectCacheAppCache()))); } diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 5b2692359a..49a1cf8d8f 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -121,7 +121,7 @@ - + @@ -141,7 +141,7 @@ - + diff --git a/src/Umbraco.Tests/Cache/AppCacheTests.cs b/src/Umbraco.Tests/Cache/AppCacheTests.cs index f18e08d680..29d61cc14a 100644 --- a/src/Umbraco.Tests/Cache/AppCacheTests.cs +++ b/src/Umbraco.Tests/Cache/AppCacheTests.cs @@ -27,9 +27,9 @@ namespace Umbraco.Tests.Cache [Test] public void Throws_On_Reentry() { - // don't run for StaticCacheProvider - not making sense - if (GetType() == typeof (StaticAppCacheTests)) - Assert.Ignore("Do not run for StaticCacheProvider."); + // don't run for DictionaryAppCache - not making sense + if (GetType() == typeof (DictionaryAppCacheTests)) + Assert.Ignore("Do not run for DictionaryAppCache."); Exception exception = null; var result = AppCache.Get("blah", () => diff --git a/src/Umbraco.Tests/Cache/HttpRequestAppCacheTests.cs b/src/Umbraco.Tests/Cache/HttpRequestAppCacheTests.cs index 635155f68e..0be38d2c55 100644 --- a/src/Umbraco.Tests/Cache/HttpRequestAppCacheTests.cs +++ b/src/Umbraco.Tests/Cache/HttpRequestAppCacheTests.cs @@ -7,19 +7,19 @@ namespace Umbraco.Tests.Cache [TestFixture] public class HttpRequestAppCacheTests : AppCacheTests { - private HttpRequestAppCache _provider; + private HttpRequestAppCache _appCache; private FakeHttpContextFactory _ctx; public override void Setup() { base.Setup(); _ctx = new FakeHttpContextFactory("http://localhost/test"); - _provider = new HttpRequestAppCache(_ctx.HttpContext); + _appCache = new HttpRequestAppCache(_ctx.HttpContext); } internal override IAppCache AppCache { - get { return _provider; } + get { return _appCache; } } protected override int GetTotalItemCount @@ -29,24 +29,24 @@ namespace Umbraco.Tests.Cache } [TestFixture] - public class StaticAppCacheTests : AppCacheTests + public class DictionaryAppCacheTests : AppCacheTests { - private DictionaryCacheProvider _provider; + private DictionaryAppCache _appCache; public override void Setup() { base.Setup(); - _provider = new DictionaryCacheProvider(); + _appCache = new DictionaryAppCache(); } internal override IAppCache AppCache { - get { return _provider; } + get { return _appCache; } } protected override int GetTotalItemCount { - get { return _provider.Items.Count; } + get { return _appCache.Items.Count; } } } } diff --git a/src/Umbraco.Tests/Cache/PublishedCache/PublishedContentCacheTests.cs b/src/Umbraco.Tests/Cache/PublishedCache/PublishedContentCacheTests.cs index f740637602..147a159d5f 100644 --- a/src/Umbraco.Tests/Cache/PublishedCache/PublishedContentCacheTests.cs +++ b/src/Umbraco.Tests/Cache/PublishedCache/PublishedContentCacheTests.cs @@ -63,7 +63,7 @@ namespace Umbraco.Tests.Cache.PublishedCache _xml = new XmlDocument(); _xml.LoadXml(GetXml()); var xmlStore = new XmlStore(() => _xml, null, null, null); - var appCache = new DictionaryCacheProvider(); + var appCache = new DictionaryAppCache(); var domainCache = new DomainCache(ServiceContext.DomainService, DefaultCultureAccessor); var publishedShapshot = new Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedSnapshot( new PublishedContentCache(xmlStore, domainCache, appCache, globalSettings, new SiteDomainHelper(), ContentTypesCache, null, null), diff --git a/src/Umbraco.Tests/Cache/PublishedCache/PublishedMediaCacheTests.cs b/src/Umbraco.Tests/Cache/PublishedCache/PublishedMediaCacheTests.cs index ee16a1dede..cfc45b8f53 100644 --- a/src/Umbraco.Tests/Cache/PublishedCache/PublishedMediaCacheTests.cs +++ b/src/Umbraco.Tests/Cache/PublishedCache/PublishedMediaCacheTests.cs @@ -75,7 +75,7 @@ namespace Umbraco.Tests.Cache.PublishedCache var mChild2 = MakeNewMedia("Child2", mType, user, mRoot2.Id); var ctx = GetUmbracoContext("/test"); - var cache = new PublishedMediaCache(new XmlStore((XmlDocument) null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryCacheProvider(), ContentTypesCache, Factory.GetInstance()); + var cache = new PublishedMediaCache(new XmlStore((XmlDocument) null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance()); var roots = cache.GetAtRoot(); Assert.AreEqual(2, roots.Count()); Assert.IsTrue(roots.Select(x => x.Id).ContainsAll(new[] {mRoot1.Id, mRoot2.Id})); @@ -93,7 +93,7 @@ namespace Umbraco.Tests.Cache.PublishedCache //var publishedMedia = PublishedMediaTests.GetNode(mRoot.Id, GetUmbracoContext("/test", 1234)); var umbracoContext = GetUmbracoContext("/test"); - var cache = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), Current.Services.MediaService, Current.Services.UserService, new DictionaryCacheProvider(), ContentTypesCache, Factory.GetInstance()); + var cache = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), Current.Services.MediaService, Current.Services.UserService, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance()); var publishedMedia = cache.GetById(mRoot.Id); Assert.IsNotNull(publishedMedia); @@ -204,7 +204,7 @@ namespace Umbraco.Tests.Cache.PublishedCache var result = new SearchResult("1234", 1, () => fields.ToDictionary(x => x.Key, x => new List { x.Value })); - var store = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryCacheProvider(), ContentTypesCache, Factory.GetInstance()); + var store = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance()); var doc = store.CreateFromCacheValues(store.ConvertFromSearchResult(result)); DoAssert(doc, 1234, key, templateIdVal: null, 0, "/media/test.jpg", "Image", 23, "Shannon", "Shannon", 0, 0, "-1,1234", DateTime.Parse("2012-07-17T10:34:09"), DateTime.Parse("2012-07-16T10:34:09"), 2); @@ -220,7 +220,7 @@ namespace Umbraco.Tests.Cache.PublishedCache var xmlDoc = GetMediaXml(); ((XmlElement)xmlDoc.DocumentElement.FirstChild).SetAttribute("key", key.ToString()); var navigator = xmlDoc.SelectSingleNode("/root/Image").CreateNavigator(); - var cache = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryCacheProvider(), ContentTypesCache, Factory.GetInstance()); + var cache = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance()); var doc = cache.CreateFromCacheValues(cache.ConvertFromXPathNavigator(navigator, true)); DoAssert(doc, 2000, key, templateIdVal: null, 2, "image1", "Image", 23, "Shannon", "Shannon", 33, 33, "-1,2000", DateTime.Parse("2012-06-12T14:13:17"), DateTime.Parse("2012-07-20T18:50:43"), 1); diff --git a/src/Umbraco.Tests/Macros/MacroTests.cs b/src/Umbraco.Tests/Macros/MacroTests.cs index 225bd17618..15549d5d46 100644 --- a/src/Umbraco.Tests/Macros/MacroTests.cs +++ b/src/Umbraco.Tests/Macros/MacroTests.cs @@ -23,7 +23,7 @@ namespace Umbraco.Tests.Macros //we DO want cache enabled for these tests var cacheHelper = new AppCaches( new ObjectCacheAppCache(), - new DictionaryCacheProvider(), + new DictionaryAppCache(), NoAppCache.Instance, new IsolatedCaches(type => new ObjectCacheAppCache())); //Current.ApplicationContext = new ApplicationContext(cacheHelper, new ProfilingLogger(Mock.Of(), Mock.Of())); diff --git a/src/Umbraco.Tests/Persistence/Repositories/DocumentRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/DocumentRepositoryTest.cs index 1641631f43..9b1c4defa2 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/DocumentRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/DocumentRepositoryTest.cs @@ -77,8 +77,8 @@ namespace Umbraco.Tests.Persistence.Repositories { var realCache = new AppCaches( new ObjectCacheAppCache(), - new DictionaryCacheProvider(), - new DictionaryCacheProvider(), + new DictionaryAppCache(), + new DictionaryAppCache(), new IsolatedCaches(t => new ObjectCacheAppCache())); var provider = TestObjects.GetScopeProvider(Logger); diff --git a/src/Umbraco.Tests/Persistence/Repositories/MediaRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/MediaRepositoryTest.cs index 33c8524bb4..5635def412 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/MediaRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/MediaRepositoryTest.cs @@ -48,8 +48,8 @@ namespace Umbraco.Tests.Persistence.Repositories var realCache = new AppCaches( new ObjectCacheAppCache(), - new DictionaryCacheProvider(), - new DictionaryCacheProvider(), + new DictionaryAppCache(), + new DictionaryAppCache(), new IsolatedCaches(t => new ObjectCacheAppCache())); var provider = TestObjects.GetScopeProvider(Logger); diff --git a/src/Umbraco.Tests/Published/PropertyCacheLevelTests.cs b/src/Umbraco.Tests/Published/PropertyCacheLevelTests.cs index 04444855fb..76fdd81ec2 100644 --- a/src/Umbraco.Tests/Published/PropertyCacheLevelTests.cs +++ b/src/Umbraco.Tests/Published/PropertyCacheLevelTests.cs @@ -118,8 +118,8 @@ namespace Umbraco.Tests.Published publishedContentTypeFactory.CreatePropertyType("prop1", 1), }); - var elementsCache = new FastDictionaryCacheProvider(); - var snapshotCache = new FastDictionaryCacheProvider(); + var elementsCache = new FastDictionaryAppCache(); + var snapshotCache = new FastDictionaryAppCache(); var publishedSnapshot = new Mock(); publishedSnapshot.Setup(x => x.SnapshotCache).Returns(snapshotCache); diff --git a/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs b/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs index 4257e3dabb..dfb51e83fb 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs @@ -68,7 +68,7 @@ namespace Umbraco.Tests.PublishedContent internal IPublishedContent GetNode(int id, UmbracoContext umbracoContext) { var cache = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), - ServiceContext.MediaService, ServiceContext.UserService, new DictionaryCacheProvider(), ContentTypesCache, + ServiceContext.MediaService, ServiceContext.UserService, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance()); var doc = cache.GetById(id); Assert.IsNotNull(doc); @@ -126,7 +126,7 @@ namespace Umbraco.Tests.PublishedContent var searcher = indexer.GetSearcher(); var ctx = GetUmbracoContext("/test"); - var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new DictionaryCacheProvider(), ContentTypesCache, Factory.GetInstance()); + var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance()); //we are using the media.xml media to test the examine results implementation, see the media.xml file in the ExamineHelpers namespace var publishedMedia = cache.GetById(1111); @@ -156,7 +156,7 @@ namespace Umbraco.Tests.PublishedContent var searcher = indexer.GetSearcher(); var ctx = GetUmbracoContext("/test"); - var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new DictionaryCacheProvider(), ContentTypesCache, Factory.GetInstance()); + var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance()); //ensure it is found var publishedMedia = cache.GetById(3113); @@ -203,7 +203,7 @@ namespace Umbraco.Tests.PublishedContent var searcher = indexer.GetSearcher(); var ctx = GetUmbracoContext("/test"); - var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new DictionaryCacheProvider(), ContentTypesCache, Factory.GetInstance()); + var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance()); //we are using the media.xml media to test the examine results implementation, see the media.xml file in the ExamineHelpers namespace var publishedMedia = cache.GetById(1111); @@ -231,7 +231,7 @@ namespace Umbraco.Tests.PublishedContent var searcher = indexer.GetSearcher(); var ctx = GetUmbracoContext("/test"); - var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new DictionaryCacheProvider(), ContentTypesCache, Factory.GetInstance()); + var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance()); //we are using the media.xml media to test the examine results implementation, see the media.xml file in the ExamineHelpers namespace var publishedMedia = cache.GetById(1111); @@ -259,7 +259,7 @@ namespace Umbraco.Tests.PublishedContent var searcher = indexer.GetSearcher(); var ctx = GetUmbracoContext("/test"); - var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new DictionaryCacheProvider(), ContentTypesCache, Factory.GetInstance()); + var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance()); //we are using the media.xml media to test the examine results implementation, see the media.xml file in the ExamineHelpers namespace var publishedMedia = cache.GetById(1111); @@ -288,7 +288,7 @@ namespace Umbraco.Tests.PublishedContent var ctx = GetUmbracoContext("/test"); var searcher = indexer.GetSearcher(); - var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new DictionaryCacheProvider(), ContentTypesCache, Factory.GetInstance()); + var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance()); //we are using the media.xml media to test the examine results implementation, see the media.xml file in the ExamineHelpers namespace var publishedMedia = cache.GetById(3113); @@ -314,7 +314,7 @@ namespace Umbraco.Tests.PublishedContent var ctx = GetUmbracoContext("/test"); var searcher = indexer.GetSearcher(); - var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new DictionaryCacheProvider(), ContentTypesCache, Factory.GetInstance()); + var cache = new PublishedMediaCache(ServiceContext.MediaService, ServiceContext.UserService, searcher, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance()); //we are using the media.xml media to test the examine results implementation, see the media.xml file in the ExamineHelpers namespace var publishedMedia = cache.GetById(3113); @@ -482,7 +482,7 @@ namespace Umbraco.Tests.PublishedContent "); var node = xml.DescendantsAndSelf("Image").Single(x => (int)x.Attribute("id") == nodeId); - var publishedMedia = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryCacheProvider(), ContentTypesCache, Factory.GetInstance()); + var publishedMedia = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance()); var nav = node.CreateNavigator(); @@ -502,7 +502,7 @@ namespace Umbraco.Tests.PublishedContent var errorXml = new XElement("error", string.Format("No media is maching '{0}'", 1234)); var nav = errorXml.CreateNavigator(); - var publishedMedia = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryCacheProvider(), ContentTypesCache, Factory.GetInstance()); + var publishedMedia = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance()); var converted = publishedMedia.ConvertFromXPathNodeIterator(nav.Select("/"), 1234); Assert.IsNull(converted); diff --git a/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs b/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs index c56ec57db0..99d2fbd222 100644 --- a/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs +++ b/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs @@ -42,7 +42,7 @@ namespace Umbraco.Tests.Scoping // this is what's created core web runtime return new AppCaches( new DeepCloneAppCache(new ObjectCacheAppCache()), - new DictionaryCacheProvider(), + new DictionaryAppCache(), NoAppCache.Instance, new IsolatedCaches(type => new DeepCloneAppCache(new ObjectCacheAppCache()))); } diff --git a/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs b/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs index bcb1c6ede3..3cca34fe77 100755 --- a/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs @@ -949,14 +949,15 @@ namespace Umbraco.Web.PublishedCache.NuCache // even though the underlying elements may not change (store snapshots) public PublishedSnapshot.PublishedSnapshotElements GetElements(bool previewDefault) { - // note: using ObjectCacheRuntimeCacheProvider for elements and snapshot caches + // note: using ObjectCacheAppCache for elements and snapshot caches // is not recommended because it creates an inner MemoryCache which is a heavy - // thing - better use a StaticCacheProvider which "just" creates a concurrent + // thing - better use a dictionary-based cache which "just" creates a concurrent // dictionary - // for snapshot cache, StaticCacheProvider MAY be OK but it is not thread-safe, + // for snapshot cache, DictionaryAppCache MAY be OK but it is not thread-safe, // nothing like that... - // for elements cache, StaticCacheProvider is a No-No, use something better. + // for elements cache, DictionaryAppCache is a No-No, use something better. + // ie FastDictionaryAppCache (thread safe and all) ContentStore.Snapshot contentSnap, mediaSnap; SnapDictionary.Snapshot domainSnap; @@ -998,11 +999,11 @@ namespace Umbraco.Web.PublishedCache.NuCache _contentGen = contentSnap.Gen; _mediaGen = mediaSnap.Gen; _domainGen = domainSnap.Gen; - elementsCache = _elementsCache = new FastDictionaryCacheProvider(); + elementsCache = _elementsCache = new FastDictionaryAppCache(); } } - var snapshotCache = new DictionaryCacheProvider(); + var snapshotCache = new DictionaryAppCache(); var memberTypeCache = new PublishedContentTypeCache(null, null, _serviceContext.MemberTypeService, _publishedContentTypeFactory, _logger); diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMemberCache.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMemberCache.cs index a622a4934c..816eb3c545 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMemberCache.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMemberCache.cs @@ -17,9 +17,9 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache private readonly XmlStore _xmlStore; private readonly PublishedContentTypeCache _contentTypeCache; - public PublishedMemberCache(XmlStore xmlStore, IAppCache requestCacheProvider, IMemberService memberService, PublishedContentTypeCache contentTypeCache) + public PublishedMemberCache(XmlStore xmlStore, IAppCache requestCache, IMemberService memberService, PublishedContentTypeCache contentTypeCache) { - _requestCache = requestCacheProvider; + _requestCache = requestCache; _memberService = memberService; _xmlStore = xmlStore; _contentTypeCache = contentTypeCache; diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs index eb54c85984..2e19fc423b 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs @@ -421,13 +421,13 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache /// /// The Xml node. /// A value indicating whether we are previewing or not. - /// A cache provider. + /// A cache. /// A content type cache. /// The IPublishedContent corresponding to the Xml cache node. /// Maintains a per-request cache of IPublishedContent items in order to make /// sure that we create only one instance of each for the duration of a request. The /// returned IPublishedContent is a model, if models are enabled. - public static IPublishedContent Get(XmlNode node, bool isPreviewing, IAppCache cacheProvider, PublishedContentTypeCache contentTypeCache) + public static IPublishedContent Get(XmlNode node, bool isPreviewing, IAppCache appCache, PublishedContentTypeCache contentTypeCache) { // only 1 per request @@ -435,7 +435,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache var id = attrs?.GetNamedItem("id").Value; if (id.IsNullOrWhiteSpace()) throw new InvalidOperationException("Node has no ID attribute."); var key = CacheKeyPrefix + id; // dont bother with preview, wont change during request in Xml cache - return (IPublishedContent) cacheProvider.Get(key, () => (new XmlPublishedContent(node, isPreviewing, cacheProvider, contentTypeCache)).CreateModel()); + return (IPublishedContent) appCache.Get(key, () => (new XmlPublishedContent(node, isPreviewing, appCache, contentTypeCache)).CreateModel()); } public static void ClearRequest() diff --git a/src/Umbraco.Web/Runtime/WebRuntime.cs b/src/Umbraco.Web/Runtime/WebRuntime.cs index e9d27a2a1c..90da402849 100644 --- a/src/Umbraco.Web/Runtime/WebRuntime.cs +++ b/src/Umbraco.Web/Runtime/WebRuntime.cs @@ -63,7 +63,7 @@ namespace Umbraco.Web.Runtime // we need to have the dep clone runtime cache provider to ensure // all entities are cached properly (cloned in and cloned out) new DeepCloneAppCache(new WebCachingAppCache(HttpRuntime.Cache)), - new DictionaryCacheProvider(), + new DictionaryAppCache(), // we need request based cache when running in web-based context new HttpRequestAppCache(), new IsolatedCaches(type => From a83ac4a24dd6ced3c6f993cd6c4e9c048191df67 Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Fri, 18 Jan 2019 09:31:38 +0100 Subject: [PATCH 147/437] #3417 retreive data for edit screen --- .../src/common/resources/macro.resource.js | 6 + .../macros/infiniteeditors/parameter.html | 2 +- .../views/macros/macros.edit.controller.js | 48 ++++---- .../src/views/macros/views/settings.html | 3 +- src/Umbraco.Web/Editors/MacrosController.cs | 116 ++++++++++++++---- .../Models/ContentEditing/MacroDisplay.cs | 67 ++++++++++ .../ContentEditing/MacroParameterDisplay.cs | 29 +++++ src/Umbraco.Web/Umbraco.Web.csproj | 2 + 8 files changed, 220 insertions(+), 53 deletions(-) create mode 100644 src/Umbraco.Web/Models/ContentEditing/MacroDisplay.cs create mode 100644 src/Umbraco.Web/Models/ContentEditing/MacroParameterDisplay.cs diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js index 5313eadcaa..1471abd8d3 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js @@ -101,6 +101,12 @@ function macroResource($q, $http, umbRequestHelper) { $http.get(umbRequestHelper.getApiUrl("macroApiBaseUrl", "GetParameterEditors"), "Failed to get parameter editors") ); + }, + + getById: function(id) { + return umbRequestHelper.resourcePromise( + $http.get(umbRequestHelper.getApiUrl("macroApiBaseUrl", "GetById", { "id" : id}), "Failed to get macro") + ); } }; } diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/infiniteeditors/parameter.html b/src/Umbraco.Web.UI.Client/src/views/macros/infiniteeditors/parameter.html index bf9dbf86a3..402c3c4984 100644 --- a/src/Umbraco.Web.UI.Client/src/views/macros/infiniteeditors/parameter.html +++ b/src/Umbraco.Web.UI.Client/src/views/macros/infiniteeditors/parameter.html @@ -26,7 +26,7 @@ - + diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/macros.edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/macros/macros.edit.controller.js index f8cde110e6..91af9b0f09 100644 --- a/src/Umbraco.Web.UI.Client/src/views/macros/macros.edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/macros/macros.edit.controller.js @@ -83,11 +83,24 @@ function MacrosEditController($scope, $q, $routeParams, macroResource, editorSta return deferred.promise; } + function getMacro() { + var deferred = $q.defer(); + + macroResource.getById($routeParams.id).then(function (data) { + deferred.resolve(data); + }, function () { + deferred.reject(); + }); + + return deferred.promise; + } + function init() { vm.page.loading = true; vm.promises['partialViews'] = getPartialViews(); vm.promises['parameterEditors'] = getParameterEditors(); + vm.promises['macro'] = getMacro(); $q.all(vm.promises).then(function (values) { var keys = Object.keys(values); @@ -102,12 +115,20 @@ function MacrosEditController($scope, $q, $routeParams, macroResource, editorSta if (keys[i] === 'parameterEditors') { vm.parameterEditors = values[key]; } + + if (keys[i] === 'macro') { + vm.macro = values[key]; + editorState.set(vm.macro); + + navigationService.syncTree({ tree: "macros", path: vm.macro.path, forceReload: true }).then(function (syncArgs) { + vm.page.menu.currentNode = syncArgs.node; + }); + } } vm.page.loading = false; }); - vm.page.navigation = [ { "name": "Settings", @@ -123,31 +144,6 @@ function MacrosEditController($scope, $q, $routeParams, macroResource, editorSta "view": "views/macros/views/parameters.html" } ]; - - vm.macro = { - "name": "Test macro", - "alias": "testMacro", - "id": 1, - "key": "unique key goes here", - "useInEditor": true, - "renderInEditor": false, - "cachePeriod": 2400, - "cacheByPage": true, - "cacheByUser": false, - "view": "Second", - "parameters": [ - { - "key": "title", - "label": "Label", - "editor": "editor" - }, - { - "key": "link", - "label": "Link", - "editor": "Link picker" - } - ] - } } init(); 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 51e83a9134..ba5b324837 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 @@ -2,7 +2,8 @@ - + diff --git a/src/Umbraco.Web/Editors/MacrosController.cs b/src/Umbraco.Web/Editors/MacrosController.cs index 6e2d032ad4..d604137e19 100644 --- a/src/Umbraco.Web/Editors/MacrosController.cs +++ b/src/Umbraco.Web/Editors/MacrosController.cs @@ -1,25 +1,24 @@ -using System; -using System.Net; -using System.Net.Http; -using System.Web.Http; - -using Umbraco.Core; -using Umbraco.Core.Logging; -using Umbraco.Core.Models; -using Umbraco.Web.Mvc; -using Umbraco.Web.WebApi; -using Umbraco.Web.WebApi.Filters; - -using Constants = Umbraco.Core.Constants; - -namespace Umbraco.Web.Editors +namespace Umbraco.Web.Editors { + using System; using System.Collections.Generic; using System.IO; using System.Linq; + using System.Net; + using System.Net.Http; + using System.Web.Http; + using Umbraco.Core; using Umbraco.Core.IO; + using Umbraco.Core.Logging; + using Umbraco.Core.Models; using Umbraco.Web.Composing; + using Umbraco.Web.Models.ContentEditing; + using Umbraco.Web.Mvc; + using Umbraco.Web.WebApi; + using Umbraco.Web.WebApi.Filters; + + using Constants = Umbraco.Core.Constants; /// /// The API controller used for editing dictionary items @@ -41,33 +40,75 @@ namespace Umbraco.Web.Editors public HttpResponseMessage Create(string name) { if (string.IsNullOrWhiteSpace(name)) - return Request - .CreateNotificationValidationErrorResponse("Name can not be empty;"); + { + return this.ReturnErrorResponse("Name can not be empty"); + } var alias = name.ToSafeAlias(); - var existingMacro = this.Services.MacroService.GetByAlias(alias); - - if (existingMacro != null) + if (this.Services.MacroService.GetByAlias(alias) != null) { - return Request.CreateNotificationValidationErrorResponse("Macro with this name already exists"); + return this.ReturnErrorResponse("Macro with this name already exists"); } try { - var macro = new Macro { Alias = alias, Name = name, MacroSource = string.Empty }; + var macro = new Macro + { + Alias = alias, + Name = name, + MacroSource = string.Empty, + MacroType = MacroTypes.PartialView + }; this.Services.MacroService.Save(macro, this.Security.CurrentUser.Id); - return Request.CreateResponse(HttpStatusCode.OK, macro.Id); + return this.Request.CreateResponse(HttpStatusCode.OK, macro.Id); } catch (Exception exception) { - this.Logger.Error(exception, "Error creating macro"); - return Request.CreateNotificationValidationErrorResponse("Error creating dictionary item"); + return this.ReturnErrorResponse("Error creating macro", true, exception); } } + [HttpGet] + public HttpResponseMessage GetById(int id) + { + var macro = this.Services.MacroService.GetById(id); + + if (macro == null) + { + return this.ReturnErrorResponse($"Macro with id {id} does not exist"); + } + + var macroDisplay = new MacroDisplay + { + Alias = macro.Alias, Id = macro.Id, Key = macro.Key, Name = macro.Name, + CacheByPage = macro.CacheByPage, CacheByUser = macro.CacheByMember, + CachePeriod = macro.CacheDuration, + View = macro.MacroSource, + RenderInEditor = !macro.DontRender, + UseInEditor = macro.UseInEditor, + Path = $"-1,{macro.Id}" + }; + + var parameters = new List(); + + foreach (var param in macro.Properties.Values.OrderBy(x => x.SortOrder)) + { + parameters.Add(new MacroParameterDisplay + { + Editor = param.EditorAlias, + Key = param.Alias, + Label = param.Name + }); + } + + macroDisplay.Parameters = parameters; + + return this.Request.CreateResponse(HttpStatusCode.OK, macroDisplay); + } + /// /// Gets a list of available macro partials /// @@ -94,6 +135,31 @@ namespace Umbraco.Web.Editors return this.Request.CreateResponse(HttpStatusCode.OK, Current.ParameterEditors); } + /// + /// Returns a error response and optionally logs it + /// + /// + /// The error message. + /// + /// + /// Value to indicate if the error needs to be logged + /// + /// + /// The exception to log + /// + /// + /// The . + /// + private HttpResponseMessage ReturnErrorResponse(string message, bool logError = false, Exception exception = null) + { + if (logError && exception != null) + { + this.Logger.Error(exception, message); + } + + return this.Request.CreateNotificationValidationErrorResponse(message); + } + /// /// Finds all the macro partials /// diff --git a/src/Umbraco.Web/Models/ContentEditing/MacroDisplay.cs b/src/Umbraco.Web/Models/ContentEditing/MacroDisplay.cs new file mode 100644 index 0000000000..e84887b88b --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/MacroDisplay.cs @@ -0,0 +1,67 @@ +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Umbraco.Web.Models.ContentEditing +{ + /// + /// The macro display model + /// + [DataContract(Name = "dictionary", Namespace = "")] + public class MacroDisplay : EntityBasic, INotificationModel + { + /// + /// Initializes a new instance of the class. + /// + public MacroDisplay() + { + this.Notifications = new List(); + this.Parameters = new List(); + } + + /// + [DataMember(Name = "notifications")] + public List Notifications { get; } + + /// + /// Gets or sets a value indicating whether the macro can be used in a rich text editor. + /// + [DataMember(Name = "useInEditor")] + public bool UseInEditor { get; set; } + + /// + /// Gets or sets a value indicating whether the macro should be rendered a rich text editor. + /// + [DataMember(Name = "renderInEditor")] + public bool RenderInEditor { get; set; } + + /// + /// Gets or sets the cache period. + /// + [DataMember(Name = "cachePeriod")] + public int CachePeriod { get; set; } + + /// + /// Gets or sets a value indicating whether the macro should be cached by page + /// + [DataMember(Name = "cacheByPage")] + public bool CacheByPage { get; set; } + + /// + /// Gets or sets a value indicating whether the macro should be cached by user + /// + [DataMember(Name = "cacheByUser")] + public bool CacheByUser { get; set; } + + /// + /// Gets or sets the view. + /// + [DataMember(Name = "view")] + public string View { get; set; } + + /// + /// Gets or sets the parameters. + /// + [DataMember(Name = "parameters")] + public IEnumerable Parameters { get; set; } + } +} diff --git a/src/Umbraco.Web/Models/ContentEditing/MacroParameterDisplay.cs b/src/Umbraco.Web/Models/ContentEditing/MacroParameterDisplay.cs new file mode 100644 index 0000000000..56d3d1b76e --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/MacroParameterDisplay.cs @@ -0,0 +1,29 @@ +namespace Umbraco.Web.Models.ContentEditing +{ + using System.Runtime.Serialization; + + /// + /// The macro parameter display. + /// + [DataContract(Name = "parameter", Namespace = "")] + public class MacroParameterDisplay + { + /// + /// Gets or sets the key. + /// + [DataMember(Name = "key")] + public string Key { get; set; } + + /// + /// Gets or sets the label. + /// + [DataMember(Name = "label")] + public string Label { get; set; } + + /// + /// Gets or sets the editor. + /// + [DataMember(Name = "editor")] + public string Editor { get; set; } + } +} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 7186835ba8..dbf422531d 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -158,6 +158,8 @@ + + From 6dd4d7f475b72ced50578f9a16e2e99d5c4ce7f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Fri, 18 Jan 2019 10:12:24 +0100 Subject: [PATCH 148/437] V8 FE Gulp Fastdev script --- .editorconfig | 6 +- .../gulp/tasks/fastdev.js | 13 ++ .../gulp/util/processJs.js | 24 ++- .../gulp/util/processLess.js | 21 ++- src/Umbraco.Web.UI.Client/gulpfile.js | 2 + src/Umbraco.Web.UI.Client/package-lock.json | 154 +++++++++++++++--- src/Umbraco.Web.UI.Client/package.json | 5 +- 7 files changed, 185 insertions(+), 40 deletions(-) create mode 100644 src/Umbraco.Web.UI.Client/gulp/tasks/fastdev.js diff --git a/.editorconfig b/.editorconfig index c63ef39430..2305dd4b32 100644 --- a/.editorconfig +++ b/.editorconfig @@ -34,4 +34,8 @@ dotnet_naming_style.prefix_underscore.required_prefix = _ csharp_style_var_for_built_in_types = true:suggestion csharp_style_var_when_type_is_apparent = true:suggestion csharp_style_var_elsewhere = true:suggestion -csharp_prefer_braces = false : none +csharp_prefer_braces = false : none + +[*.{js,less}] +trim_trailing_whitespace = false +insert_final_newline = false diff --git a/src/Umbraco.Web.UI.Client/gulp/tasks/fastdev.js b/src/Umbraco.Web.UI.Client/gulp/tasks/fastdev.js new file mode 100644 index 0000000000..888ed38fec --- /dev/null +++ b/src/Umbraco.Web.UI.Client/gulp/tasks/fastdev.js @@ -0,0 +1,13 @@ +'use strict'; + +var config = require('../config'); +var gulp = require('gulp'); +var runSequence = require('run-sequence'); + +// Dev - build the files ready for development and start watchers +gulp.task('fastdev', function(cb) { + + global.isProd = false; + + runSequence(["dependencies", "js", "less", "views"], "watch", cb); +}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/gulp/util/processJs.js b/src/Umbraco.Web.UI.Client/gulp/util/processJs.js index c110fa9cae..45927dc0e6 100644 --- a/src/Umbraco.Web.UI.Client/gulp/util/processJs.js +++ b/src/Umbraco.Web.UI.Client/gulp/util/processJs.js @@ -9,18 +9,24 @@ var concat = require('gulp-concat'); var wrap = require("gulp-wrap-js"); module.exports = function(files, out) { - - return gulp.src(files) + + var task = gulp.src(files); + + if (global.isProd === true) { // check for js errors - .pipe(eslint()) + task = task.pipe(eslint()); // outputs the lint results to the console - .pipe(eslint.format()) - // sort files in stream by path or any custom sort comparator - .pipe(babel()) + task = task.pipe(eslint.format()); + } + + // sort files in stream by path or any custom sort comparator + task = task.pipe(babel()) .pipe(sort()) .pipe(concat(out)) .pipe(wrap('(function(){\n%= body %\n})();')) .pipe(gulp.dest(config.root + config.targets.js)); - - console.log(out + " compiled"); -}; + + + return task; + +}; \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/gulp/util/processLess.js b/src/Umbraco.Web.UI.Client/gulp/util/processLess.js index e2bb758499..26f69865d9 100644 --- a/src/Umbraco.Web.UI.Client/gulp/util/processLess.js +++ b/src/Umbraco.Web.UI.Client/gulp/util/processLess.js @@ -10,17 +10,24 @@ var cleanCss = require("gulp-clean-css"); var rename = require('gulp-rename'); module.exports = function(files, out) { + var processors = [ autoprefixer, cssnano({zindex: false}) ]; - return gulp.src(files) - .pipe(less()) - .pipe(cleanCss()) - .pipe(postcss(processors)) + var task = gulp.src(files) + .pipe(less()); + + + if (global.isProd === true) { + task = task.pipe(cleanCss()); + } + + task = task.pipe(postcss(processors)) .pipe(rename(out)) .pipe(gulp.dest(config.root + config.targets.css)); - - console.log(out + " compiled"); -} + + return task; + +}; \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/gulpfile.js b/src/Umbraco.Web.UI.Client/gulpfile.js index f01d992013..79a9d04156 100755 --- a/src/Umbraco.Web.UI.Client/gulpfile.js +++ b/src/Umbraco.Web.UI.Client/gulpfile.js @@ -11,4 +11,6 @@ * To add a new task, simply add a new task file to gulp/tasks. */ +global.isProd = true; + require('./gulp'); diff --git a/src/Umbraco.Web.UI.Client/package-lock.json b/src/Umbraco.Web.UI.Client/package-lock.json index 02ad091f75..fe657ae470 100644 --- a/src/Umbraco.Web.UI.Client/package-lock.json +++ b/src/Umbraco.Web.UI.Client/package-lock.json @@ -5115,6 +5115,12 @@ "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", "dev": true }, + "fs": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.2.tgz", + "integrity": "sha1-4fJE7zkzwbKmS9R5kTYGDQ9ZFPg=", + "dev": true + }, "fs-constants": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", @@ -5204,14 +5210,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -5226,20 +5230,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -5356,8 +5357,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -5369,7 +5369,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -5384,7 +5383,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -5392,14 +5390,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -5418,7 +5414,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -5499,8 +5494,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -5512,7 +5506,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -5634,7 +5627,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -6133,6 +6125,12 @@ "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", "dev": true }, + "growly": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", + "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", + "dev": true + }, "gulp": { "version": "3.9.1", "resolved": "http://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz", @@ -6930,6 +6928,102 @@ } } }, + "gulp-notify": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/gulp-notify/-/gulp-notify-3.2.0.tgz", + "integrity": "sha512-qEocs1UVoDKKUjfsxJNMNwkRla0PbsyJwsqNNXpzYWsLQ29LhxRMY3wnTGZcc4hMHtalnvah/Dwlwb4NijH/0A==", + "dev": true, + "requires": { + "ansi-colors": "^1.0.1", + "fancy-log": "^1.3.2", + "lodash.template": "^4.4.0", + "node-notifier": "^5.2.1", + "node.extend": "^2.0.0", + "plugin-error": "^0.1.2", + "through2": "^2.0.3" + }, + "dependencies": { + "arr-diff": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz", + "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1", + "array-slice": "^0.2.3" + } + }, + "arr-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz", + "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=", + "dev": true + }, + "array-slice": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", + "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=", + "dev": true + }, + "extend-shallow": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", + "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", + "dev": true, + "requires": { + "kind-of": "^1.1.0" + } + }, + "kind-of": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", + "dev": true + }, + "lodash.template": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.4.0.tgz", + "integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=", + "dev": true, + "requires": { + "lodash._reinterpolate": "~3.0.0", + "lodash.templatesettings": "^4.0.0" + } + }, + "lodash.templatesettings": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz", + "integrity": "sha1-K01OlbpEDZFf8IvImeRVNmZxMxY=", + "dev": true, + "requires": { + "lodash._reinterpolate": "~3.0.0" + } + }, + "node.extend": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node.extend/-/node.extend-2.0.2.tgz", + "integrity": "sha512-pDT4Dchl94/+kkgdwyS2PauDFjZG0Hk0IcHIB+LkW27HLDtdoeMxHTxZh39DYbPP8UflWXWj9JcdDozF+YDOpQ==", + "dev": true, + "requires": { + "has": "^1.0.3", + "is": "^3.2.1" + } + }, + "plugin-error": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz", + "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", + "dev": true, + "requires": { + "ansi-cyan": "^0.1.1", + "ansi-red": "^0.1.1", + "arr-diff": "^1.0.1", + "arr-union": "^2.0.1", + "extend-shallow": "^1.1.2" + } + } + } + }, "gulp-open": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/gulp-open/-/gulp-open-3.0.1.tgz", @@ -9382,6 +9476,18 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, + "node-notifier": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.3.0.tgz", + "integrity": "sha512-AhENzCSGZnZJgBARsUjnQ7DnZbzyP+HxlVXuD0xqAnvL8q+OqtSX7lGg9e8nHzwXkMMXNdVeqq4E2M3EUAqX6Q==", + "dev": true, + "requires": { + "growly": "^1.3.0", + "semver": "^5.5.0", + "shellwords": "^0.1.1", + "which": "^1.3.0" + } + }, "node-releases": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.0.5.tgz", @@ -14138,6 +14244,12 @@ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true }, + "shellwords": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", + "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", + "dev": true + }, "sigmund": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", diff --git a/src/Umbraco.Web.UI.Client/package.json b/src/Umbraco.Web.UI.Client/package.json index 6e8159a940..61bdb88f17 100644 --- a/src/Umbraco.Web.UI.Client/package.json +++ b/src/Umbraco.Web.UI.Client/package.json @@ -3,8 +3,9 @@ "scripts": { "test": "karma start test/config/karma.conf.js --singlerun", "build": "gulp build", - "dev": "gulp dev", - "docs": "gulp docs" + "dev": "gulp dev", + "fastdev": "gulp fastdev", + "docs": "gulp docs" }, "dependencies": { "ace-builds": "1.4.2", From cee1171d39a93de59f862a2a7107edae3a93602f Mon Sep 17 00:00:00 2001 From: Callum Whyte Date: Fri, 18 Jan 2019 20:53:38 +1100 Subject: [PATCH 149/437] Removing masterpages support from V8 (#3971) --- .../Composers/ConfigurationComposer.cs | 1 - .../UmbracoSettings/ITemplatesSection.cs | 9 - .../IUmbracoSettingsSection.cs | 4 - .../UmbracoSettings/TemplatesElement.cs | 20 - .../UmbracoSettings/UmbracoSettingsSection.cs | 18 +- src/Umbraco.Core/IO/FileSystems.cs | 14 - src/Umbraco.Core/IO/IFileSystems.cs | 5 - src/Umbraco.Core/IO/MasterPageHelper.cs | 445 ------------------ src/Umbraco.Core/IO/SystemDirectories.cs | 4 - src/Umbraco.Core/Models/ITemplate.cs | 6 +- .../Packaging/PackageDataInstallation.cs | 17 +- .../Repositories/ITemplateRepository.cs | 19 +- .../Implement/TemplateRepository.cs | 136 +----- src/Umbraco.Core/Services/IFileService.cs | 15 - .../Services/Implement/FileService.cs | 24 +- src/Umbraco.Core/Umbraco.Core.csproj | 3 - .../TemplateElementDefaultTests.cs | 13 - .../UmbracoSettings/TemplateElementTests.cs | 16 - .../UmbracoSettings/umbracoSettings.config | 4 - .../umbracoSettings.minimal.config | 5 - src/Umbraco.Tests/IO/IoHelperTests.cs | 1 - .../Repositories/ContentTypeRepositoryTest.cs | 9 +- .../Repositories/DocumentRepositoryTest.cs | 2 +- .../Repositories/DomainRepositoryTest.cs | 4 +- .../PublicAccessRepositoryTest.cs | 4 +- .../Repositories/TagRepositoryTest.cs | 2 +- .../Repositories/TemplateRepositoryTest.cs | 135 +----- .../Repositories/UserRepositoryTest.cs | 2 +- .../Services/ContentServicePerformanceTest.cs | 8 +- .../Services/ContentServiceTests.cs | 2 +- .../Templates/MasterPageHelperTests.cs | 21 - .../Templates/TemplateRepositoryTests.cs | 121 ----- .../TestHelpers/SettingsForTests.cs | 3 - src/Umbraco.Tests/TestHelpers/TestHelper.cs | 5 +- .../TestHelpers/TestObjects-Mocks.cs | 3 +- src/Umbraco.Tests/Testing/UmbracoTestBase.cs | 1 - src/Umbraco.Tests/Umbraco.Tests.csproj | 4 - .../config/umbracoSettings.Release.config | 5 - .../config/umbracoSettings.config | 5 - .../FolderAndFilePermissionsCheck.cs | 1 - .../Install/FilePermissionHelper.cs | 3 +- src/Umbraco.Web/Routing/PublishedRouter.cs | 4 - .../Trees/TemplatesTreeController.cs | 13 +- .../umbraco.presentation/default.aspx.cs | 16 - 44 files changed, 38 insertions(+), 1114 deletions(-) delete mode 100644 src/Umbraco.Core/Configuration/UmbracoSettings/ITemplatesSection.cs delete mode 100644 src/Umbraco.Core/Configuration/UmbracoSettings/TemplatesElement.cs delete mode 100644 src/Umbraco.Core/IO/MasterPageHelper.cs delete mode 100644 src/Umbraco.Tests/Configurations/UmbracoSettings/TemplateElementDefaultTests.cs delete mode 100644 src/Umbraco.Tests/Configurations/UmbracoSettings/TemplateElementTests.cs delete mode 100644 src/Umbraco.Tests/Templates/MasterPageHelperTests.cs delete mode 100644 src/Umbraco.Tests/Templates/TemplateRepositoryTests.cs diff --git a/src/Umbraco.Core/Composing/Composers/ConfigurationComposer.cs b/src/Umbraco.Core/Composing/Composers/ConfigurationComposer.cs index ca86f623cc..7fba47a2cd 100644 --- a/src/Umbraco.Core/Composing/Composers/ConfigurationComposer.cs +++ b/src/Umbraco.Core/Composing/Composers/ConfigurationComposer.cs @@ -15,7 +15,6 @@ namespace Umbraco.Core.Composing.Composers // register others composition.RegisterUnique(factory => factory.GetInstance().Content); - composition.RegisterUnique(factory => factory.GetInstance().Templates); composition.RegisterUnique(factory => factory.GetInstance().RequestHandler); composition.RegisterUnique(factory => factory.GetInstance().Security); diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ITemplatesSection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ITemplatesSection.cs deleted file mode 100644 index 67fd58030b..0000000000 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ITemplatesSection.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -namespace Umbraco.Core.Configuration.UmbracoSettings -{ - public interface ITemplatesSection : IUmbracoConfigurationSection - { - RenderingEngine DefaultRenderingEngine { get; } - } -} diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IUmbracoSettingsSection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IUmbracoSettingsSection.cs index 28da03ff2d..33416d38cc 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/IUmbracoSettingsSection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IUmbracoSettingsSection.cs @@ -1,5 +1,4 @@ using System; -using System.ComponentModel; namespace Umbraco.Core.Configuration.UmbracoSettings { @@ -12,8 +11,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings ISecuritySection Security { get; } IRequestHandlerSection RequestHandler { get; } - - ITemplatesSection Templates { get; } ILoggingSection Logging { get; } @@ -22,6 +19,5 @@ namespace Umbraco.Core.Configuration.UmbracoSettings IProvidersSection Providers { get; } IWebRoutingSection WebRouting { get; } - } } diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/TemplatesElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/TemplatesElement.cs deleted file mode 100644 index 8c929b02d8..0000000000 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/TemplatesElement.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Configuration; - -namespace Umbraco.Core.Configuration.UmbracoSettings -{ - internal class TemplatesElement : UmbracoConfigurationElement, ITemplatesSection - { - [ConfigurationProperty("defaultRenderingEngine", IsRequired = true)] - internal InnerTextConfigurationElement DefaultRenderingEngine - { - get { return GetOptionalTextElement("defaultRenderingEngine", RenderingEngine.Mvc); } - } - - RenderingEngine ITemplatesSection.DefaultRenderingEngine - { - get { return DefaultRenderingEngine; } - } - - } -} diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/UmbracoSettingsSection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/UmbracoSettingsSection.cs index d36410f317..9ed635f6a9 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/UmbracoSettingsSection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/UmbracoSettingsSection.cs @@ -1,11 +1,7 @@ -using System; -using System.ComponentModel; -using System.Configuration; -using System.Linq; +using System.Configuration; namespace Umbraco.Core.Configuration.UmbracoSettings { - public class UmbracoSettingsSection : ConfigurationSection, IUmbracoSettingsSection { [ConfigurationProperty("backOffice")] @@ -32,12 +28,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings get { return (RequestHandlerElement)this["requestHandler"]; } } - [ConfigurationProperty("templates")] - internal TemplatesElement Templates - { - get { return (TemplatesElement)this["templates"]; } - } - [ConfigurationProperty("logging")] internal LoggingElement Logging { @@ -77,11 +67,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings get { return RequestHandler; } } - ITemplatesSection IUmbracoSettingsSection.Templates - { - get { return Templates; } - } - IBackOfficeSection IUmbracoSettingsSection.BackOffice { get { return BackOffice; } @@ -106,6 +91,5 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { get { return WebRouting; } } - } } diff --git a/src/Umbraco.Core/IO/FileSystems.cs b/src/Umbraco.Core/IO/FileSystems.cs index 7fc846319b..63a1259acb 100644 --- a/src/Umbraco.Core/IO/FileSystems.cs +++ b/src/Umbraco.Core/IO/FileSystems.cs @@ -19,7 +19,6 @@ namespace Umbraco.Core.IO private ShadowWrapper _partialViewsFileSystem; private ShadowWrapper _stylesheetsFileSystem; private ShadowWrapper _scriptsFileSystem; - private ShadowWrapper _masterPagesFileSystem; private ShadowWrapper _mvcViewsFileSystem; // well-known file systems lazy initialization @@ -102,16 +101,6 @@ namespace Umbraco.Core.IO } } - /// - public IFileSystem MasterPagesFileSystem - { - get - { - if (Volatile.Read(ref _wkfsInitialized) == false) EnsureWellKnownFileSystems(); - return _masterPagesFileSystem; - } - } - /// public IFileSystem MvcViewsFileSystem { @@ -135,14 +124,12 @@ namespace Umbraco.Core.IO var partialViewsFileSystem = new PhysicalFileSystem(SystemDirectories.PartialViews); var stylesheetsFileSystem = new PhysicalFileSystem(SystemDirectories.Css); var scriptsFileSystem = new PhysicalFileSystem(SystemDirectories.Scripts); - var masterPagesFileSystem = new PhysicalFileSystem(SystemDirectories.Masterpages); var mvcViewsFileSystem = new PhysicalFileSystem(SystemDirectories.MvcViews); _macroPartialFileSystem = new ShadowWrapper(macroPartialFileSystem, "Views/MacroPartials", IsScoped); _partialViewsFileSystem = new ShadowWrapper(partialViewsFileSystem, "Views/Partials", IsScoped); _stylesheetsFileSystem = new ShadowWrapper(stylesheetsFileSystem, "css", IsScoped); _scriptsFileSystem = new ShadowWrapper(scriptsFileSystem, "scripts", IsScoped); - _masterPagesFileSystem = new ShadowWrapper(masterPagesFileSystem, "masterpages", IsScoped); _mvcViewsFileSystem = new ShadowWrapper(mvcViewsFileSystem, "Views", IsScoped); // fixme locking? @@ -150,7 +137,6 @@ namespace Umbraco.Core.IO _shadowWrappers.Add(_partialViewsFileSystem); _shadowWrappers.Add(_stylesheetsFileSystem); _shadowWrappers.Add(_scriptsFileSystem); - _shadowWrappers.Add(_masterPagesFileSystem); _shadowWrappers.Add(_mvcViewsFileSystem); return null; diff --git a/src/Umbraco.Core/IO/IFileSystems.cs b/src/Umbraco.Core/IO/IFileSystems.cs index d74ad48145..f7d35058e3 100644 --- a/src/Umbraco.Core/IO/IFileSystems.cs +++ b/src/Umbraco.Core/IO/IFileSystems.cs @@ -25,11 +25,6 @@ /// IFileSystem ScriptsFileSystem { get; } - /// - /// Gets the masterpages filesystem. - /// - IFileSystem MasterPagesFileSystem { get; } - /// /// Gets the MVC views filesystem. /// diff --git a/src/Umbraco.Core/IO/MasterPageHelper.cs b/src/Umbraco.Core/IO/MasterPageHelper.cs deleted file mode 100644 index 049db04b9a..0000000000 --- a/src/Umbraco.Core/IO/MasterPageHelper.cs +++ /dev/null @@ -1,445 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Text.RegularExpressions; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Services; -using Umbraco.Core.Xml; - -namespace Umbraco.Core.IO -{ - internal class MasterPageHelper - { - private readonly IFileSystem _masterPageFileSystem; - internal static readonly string DefaultMasterTemplate = SystemDirectories.Umbraco + "/masterpages/default.master"; - //private static readonly char[] NewLineChars = Environment.NewLine.ToCharArray(); - - public MasterPageHelper(IFileSystem masterPageFileSystem) - { - if (masterPageFileSystem == null) throw new ArgumentNullException("masterPageFileSystem"); - _masterPageFileSystem = masterPageFileSystem; - } - - public bool MasterPageExists(ITemplate t) - { - return _masterPageFileSystem.FileExists(GetFilePath(t)); - } - - private string GetFilePath(ITemplate t) - { - return GetFilePath(t.Alias); - } - - private string GetFilePath(string alias) - { - return alias + ".master"; - } - - public string CreateMasterPage(ITemplate t, ITemplateRepository templateRepo, bool overWrite = false) - { - string masterpageContent = ""; - - var filePath = GetFilePath(t); - if (_masterPageFileSystem.FileExists(filePath) == false || overWrite) - { - masterpageContent = t.Content.IsNullOrWhiteSpace() ? CreateDefaultMasterPageContent(t, templateRepo) : t.Content; - - var data = Encoding.UTF8.GetBytes(masterpageContent); - var withBom = Encoding.UTF8.GetPreamble().Concat(data).ToArray(); - - using (var ms = new MemoryStream(withBom)) - { - _masterPageFileSystem.AddFile(filePath, ms, true); - } - } - else - { - using (var s = _masterPageFileSystem.OpenFile(filePath)) - using (var tr = new StreamReader(s, Encoding.UTF8)) - { - masterpageContent = tr.ReadToEnd(); - tr.Close(); - } - } - - return masterpageContent; - } - - //internal string GetFileContents(ITemplate t) - //{ - // var masterpageContent = ""; - // if (_masterPageFileSystem.FileExists(GetFilePath(t))) - // { - // using (var s = _masterPageFileSystem.OpenFile(GetFilePath(t))) - // using (var tr = new StreamReader(s)) - // { - // masterpageContent = tr.ReadToEnd(); - // tr.Close(); - // } - // } - - // return masterpageContent; - //} - - public string UpdateMasterPageFile(ITemplate t, string currentAlias, ITemplateRepository templateRepo) - { - var template = UpdateMasterPageContent(t, currentAlias); - UpdateChildTemplates(t, currentAlias, templateRepo); - var filePath = GetFilePath(t); - - var data = Encoding.UTF8.GetBytes(template); - var withBom = Encoding.UTF8.GetPreamble().Concat(data).ToArray(); - - using (var ms = new MemoryStream(withBom)) - { - _masterPageFileSystem.AddFile(filePath, ms, true); - } - return template; - } - - private string CreateDefaultMasterPageContent(ITemplate template, ITemplateRepository templateRepo) - { - var design = new StringBuilder(); - design.Append(GetMasterPageHeader(template) + Environment.NewLine); - - if (template.MasterTemplateAlias.IsNullOrWhiteSpace() == false) - { - var master = templateRepo.Get(template.MasterTemplateAlias); - if (master != null) - { - foreach (var cpId in GetContentPlaceholderIds(master)) - { - design.Append("" + - Environment.NewLine + - Environment.NewLine + - "" + - Environment.NewLine + - Environment.NewLine); - } - - return design.ToString(); - } - } - - design.Append(GetMasterContentElement(template) + Environment.NewLine); - design.Append(template.Content + Environment.NewLine); - design.Append("" + Environment.NewLine); - - return design.ToString(); - } - - public static IEnumerable GetContentPlaceholderIds(ITemplate template) - { - var retVal = new List(); - - var mp = template.Content; - var path = ""; - var r = new Regex(path, RegexOptions.IgnoreCase); - var m = r.Match(mp); - - while (m.Success) - { - var cc = m.Groups[3].Captures; - retVal.AddRange(cc.Cast().Where(c => c.Value != "server").Select(c => c.Value)); - - m = m.NextMatch(); - } - - return retVal; - } - - private static string UpdateMasterPageContent(ITemplate template, string currentAlias) - { - var masterPageContent = template.Content; - - if (string.IsNullOrEmpty(currentAlias) == false && currentAlias != template.Alias) - { - var masterHeader = - masterPageContent.Substring(0, masterPageContent.IndexOf("%>", StringComparison.Ordinal) + 2).Trim( - Environment.NewLine.ToCharArray()); - - // find the masterpagefile attribute - var m = Regex.Matches(masterHeader, "(?\\S*)=\"(?[^\"]*)\"", - RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace); - - foreach (Match attributeSet in m) - { - if (attributeSet.Groups["attributeName"].Value.ToLower() == "masterpagefile") - { - // validate the masterpagefile - var currentMasterPageFile = attributeSet.Groups["attributeValue"].Value; - var currentMasterTemplateFile = ParentTemplatePath(template); - - if (currentMasterPageFile != currentMasterTemplateFile) - { - masterPageContent = - masterPageContent.Replace( - attributeSet.Groups["attributeName"].Value + "=\"" + currentMasterPageFile + "\"", - attributeSet.Groups["attributeName"].Value + "=\"" + currentMasterTemplateFile + - "\""); - } - } - } - } - - return masterPageContent; - } - - private void UpdateChildTemplates(ITemplate template, string currentAlias, ITemplateRepository templateRepo) - { - //if we have a Old Alias if the alias and therefor the masterpage file name has changed... - //so before we save the new masterfile, we'll clear the old one, so we don't up with - //Unused masterpage files - if (string.IsNullOrEmpty(currentAlias) == false && currentAlias != template.Alias) - { - //Ensure that child templates have the right master masterpage file name - if (template.IsMasterTemplate) - { - var children = templateRepo.GetChildren(template.Id); - foreach (var t in children) - UpdateMasterPageFile(t, null, templateRepo); - } - } - } - - - //private void SaveDesignToFile(ITemplate t, string currentAlias, string design) - //{ - // //kill the old file.. - // if (string.IsNullOrEmpty(currentAlias) == false && currentAlias != t.Alias) - // { - // var oldFile = - // IOHelper.MapPath(SystemDirectories.Masterpages + "/" + currentAlias.Replace(" ", "") + ".master"); - // if (System.IO.File.Exists(oldFile)) - // System.IO.File.Delete(oldFile); - // } - - // // save the file in UTF-8 - // System.IO.File.WriteAllText(GetFilePath(t), design, Encoding.UTF8); - //} - - //internal static void RemoveMasterPageFile(string alias) - //{ - // if (string.IsNullOrWhiteSpace(alias) == false) - // { - // string file = IOHelper.MapPath(SystemDirectories.Masterpages + "/" + alias.Replace(" ", "") + ".master"); - // if (System.IO.File.Exists(file)) - // System.IO.File.Delete(file); - // } - //} - - //internal string SaveTemplateToFile(ITemplate template, string currentAlias, ITemplateRepository templateRepo) - //{ - // var masterPageContent = template.Content; - // if (IsMasterPageSyntax(masterPageContent) == false) - // masterPageContent = ConvertToMasterPageSyntax(template); - - // // Add header to master page if it doesn't exist - // if (masterPageContent.TrimStart().StartsWith("<%@") == false) - // { - // masterPageContent = GetMasterPageHeader(template) + Environment.NewLine + masterPageContent; - // } - // else - // { - // // verify that the masterpage attribute is the same as the masterpage - // var masterHeader = - // masterPageContent.Substring(0, masterPageContent.IndexOf("%>", StringComparison.Ordinal) + 2).Trim(NewLineChars); - - // // find the masterpagefile attribute - // var m = Regex.Matches(masterHeader, "(?\\S*)=\"(?[^\"]*)\"", - // RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace); - - // foreach (Match attributeSet in m) - // { - // if (attributeSet.Groups["attributeName"].Value.ToLower() == "masterpagefile") - // { - // // validate the masterpagefile - // var currentMasterPageFile = attributeSet.Groups["attributeValue"].Value; - // var currentMasterTemplateFile = ParentTemplatePath(template); - - // if (currentMasterPageFile != currentMasterTemplateFile) - // { - // masterPageContent = - // masterPageContent.Replace( - // attributeSet.Groups["attributeName"].Value + "=\"" + currentMasterPageFile + "\"", - // attributeSet.Groups["attributeName"].Value + "=\"" + currentMasterTemplateFile + - // "\""); - - // } - // } - // } - - // } - - // //we have a Old Alias if the alias and therefor the masterpage file name has changed... - // //so before we save the new masterfile, we'll clear the old one, so we don't up with - // //Unused masterpage files - // if (string.IsNullOrEmpty(currentAlias) == false && currentAlias != template.Alias) - // { - - // //Ensure that child templates have the right master masterpage file name - // if (template.IsMasterTemplate) - // { - // var children = templateRepo.GetChildren(template.Id); - - // foreach (var t in children) - // UpdateMasterPageFile(t, null, templateRepo); - // } - - // //then kill the old file.. - // var oldFile = GetFilePath(currentAlias); - // if (_masterPageFileSystem.FileExists(oldFile)) - // _masterPageFileSystem.DeleteFile(oldFile); - // } - - // // save the file in UTF-8 - // System.IO.File.WriteAllText(GetFilePath(template), masterPageContent, Encoding.UTF8); - - // return masterPageContent; - //} - - //internal static string ConvertToMasterPageSyntax(ITemplate template) - //{ - // string masterPageContent = GetMasterContentElement(template) + Environment.NewLine; - - // masterPageContent += template.Content; - - // // Parse the design for getitems - // masterPageContent = EnsureMasterPageSyntax(template.Alias, masterPageContent); - - // // append ending asp:content element - // masterPageContent += Environment.NewLine + "" + Environment.NewLine; - - // return masterPageContent; - //} - - public static bool IsMasterPageSyntax(string code) - { - return Regex.IsMatch(code, @"<%@\s*Master", RegexOptions.IgnoreCase) || - code.InvariantContains("", ParentTemplatePath(template)) + Environment.NewLine; - } - - private static string ParentTemplatePath(ITemplate template) - { - var masterTemplate = DefaultMasterTemplate; - if (template.MasterTemplateAlias.IsNullOrWhiteSpace() == false) - masterTemplate = SystemDirectories.Masterpages + "/" + template.MasterTemplateAlias + ".master"; - - return masterTemplate; - } - - internal static string GetMasterContentElement(ITemplate template) - { - if (template.MasterTemplateAlias.IsNullOrWhiteSpace() == false) - { - string masterAlias = template.MasterTemplateAlias; - return - String.Format("", masterAlias); - } - else - return - String.Format(""); - - } - - internal static string EnsureMasterPageSyntax(string templateAlias, string masterPageContent) - { - ReplaceElement(ref masterPageContent, "?UMBRACO_GETITEM", "umbraco:Item", true); - ReplaceElement(ref masterPageContent, "?UMBRACO_GETITEM", "umbraco:Item", false); - - // Parse the design for macros - ReplaceElement(ref masterPageContent, "?UMBRACO_MACRO", "umbraco:Macro", true); - ReplaceElement(ref masterPageContent, "?UMBRACO_MACRO", "umbraco:Macro", false); - - // Parse the design for load childs - masterPageContent = masterPageContent.Replace("", CreateDefaultPlaceHolder(templateAlias)) - .Replace("", CreateDefaultPlaceHolder(templateAlias)); - // Parse the design for aspnet forms - GetAspNetMasterPageForm(ref masterPageContent, templateAlias); - masterPageContent = masterPageContent.Replace("", ""); - // Parse the design for aspnet heads - masterPageContent = masterPageContent.Replace("", String.Format("", templateAlias.Replace(" ", ""))); - masterPageContent = masterPageContent.Replace("", ""); - return masterPageContent; - } - - - private static void GetAspNetMasterPageForm(ref string design, string templateAlias) - { - var formElement = Regex.Match(design, GetElementRegExp("?ASPNET_FORM", false), RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace); - - if (string.IsNullOrEmpty(formElement.Value) == false) - { - string formReplace = String.Format("
", templateAlias.Replace(" ", "")); - if (formElement.Groups.Count == 0) - { - formReplace += ""; - } - design = design.Replace(formElement.Value, formReplace); - } - } - - private static string CreateDefaultPlaceHolder(string templateAlias) - { - return String.Format("", templateAlias.Replace(" ", "")); - } - - private static void ReplaceElement(ref string design, string elementName, string newElementName, bool checkForQuotes) - { - var m = - Regex.Matches(design, GetElementRegExp(elementName, checkForQuotes), - RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace); - - foreach (Match match in m) - { - GroupCollection groups = match.Groups; - - // generate new element (compensate for a closing trail on single elements ("/")) - string elementAttributes = groups[1].Value; - // test for macro alias - if (elementName == "?UMBRACO_MACRO") - { - var tags = XmlHelper.GetAttributesFromElement(match.Value); - if (tags["macroAlias"] != null) - elementAttributes = String.Format(" Alias=\"{0}\"", tags["macroAlias"]) + elementAttributes; - else if (tags["macroalias"] != null) - elementAttributes = String.Format(" Alias=\"{0}\"", tags["macroalias"]) + elementAttributes; - } - string newElement = "<" + newElementName + " runat=\"server\" " + elementAttributes.Trim() + ">"; - if (elementAttributes.EndsWith("/")) - { - elementAttributes = elementAttributes.Substring(0, elementAttributes.Length - 1); - } - else if (groups[0].Value.StartsWith(""; - - if (checkForQuotes) - { - // if it's inside quotes, we'll change element attribute quotes to single quotes - newElement = newElement.Replace("\"", "'"); - newElement = String.Format("\"{0}\"", newElement); - } - design = design.Replace(match.Value, newElement); - } - } - - private static string GetElementRegExp(string elementName, bool checkForQuotes) - { - if (checkForQuotes) - return String.Format("\"<[^>\\s]*\\b{0}(\\b[^>]*)>\"", elementName); - else - return String.Format("<[^>\\s]*\\b{0}(\\b[^>]*)>", elementName); - - } - - } -} diff --git a/src/Umbraco.Core/IO/SystemDirectories.cs b/src/Umbraco.Core/IO/SystemDirectories.cs index 4ea3ed64d5..8bea82ea4a 100644 --- a/src/Umbraco.Core/IO/SystemDirectories.cs +++ b/src/Umbraco.Core/IO/SystemDirectories.cs @@ -18,10 +18,6 @@ namespace Umbraco.Core.IO public static string Install => "~/install"; - //fixme: remove this - [Obsolete("Master pages are obsolete and code should be removed")] - public static string Masterpages => "~/masterpages"; - public static string AppCode => "~/App_Code"; public static string AppPlugins => "~/App_Plugins"; diff --git a/src/Umbraco.Core/Models/ITemplate.cs b/src/Umbraco.Core/Models/ITemplate.cs index 97b9324415..6548a49626 100644 --- a/src/Umbraco.Core/Models/ITemplate.cs +++ b/src/Umbraco.Core/Models/ITemplate.cs @@ -1,11 +1,9 @@ -using System; -using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; +using Umbraco.Core.Models.Entities; namespace Umbraco.Core.Models { /// - /// Defines a Template File (Masterpage or Mvc View) + /// Defines a Template File (Mvc View) /// public interface ITemplate : IFile, IRememberBeingDirty, ICanBeDirty { diff --git a/src/Umbraco.Core/Packaging/PackageDataInstallation.cs b/src/Umbraco.Core/Packaging/PackageDataInstallation.cs index 2e9fee9595..9bea527b91 100644 --- a/src/Umbraco.Core/Packaging/PackageDataInstallation.cs +++ b/src/Umbraco.Core/Packaging/PackageDataInstallation.cs @@ -1234,10 +1234,7 @@ namespace Umbraco.Core.Packaging var alias = templateElement.Element("Alias").Value; var design = templateElement.Element("Design").Value; var masterElement = templateElement.Element("Master"); - - var isMasterPage = IsMasterPageSyntax(design); - var path = isMasterPage ? MasterpagePath(alias) : ViewPath(alias); - + var existingTemplate = _fileService.GetTemplate(alias) as Template; var template = existingTemplate ?? new Template(templateName, alias); template.Content = design; @@ -1257,23 +1254,11 @@ namespace Umbraco.Core.Packaging return templates; } - - private bool IsMasterPageSyntax(string code) - { - return Regex.IsMatch(code, @"<%@\s*Master", RegexOptions.IgnoreCase) || - code.InvariantContains(" GetDescendants(int masterTemplateId); IEnumerable GetDescendants(string alias); - /// - /// This checks what the default rendering engine is set in config but then also ensures that there isn't already - /// a template that exists in the opposite rendering engine's template folder, then returns the appropriate - /// rendering engine to use. - /// - /// - /// - /// The reason this is required is because for example, if you have a master page file already existing under ~/masterpages/Blah.aspx - /// and then you go to create a template in the tree called Blah and the default rendering engine is MVC, it will create a Blah.cshtml - /// empty template in ~/Views. This means every page that is using Blah will go to MVC and render an empty page. - /// This is mostly related to installing packages since packages install file templates to the file system and then create the - /// templates in business logic. Without this, it could cause the wrong rendering engine to be used for a package. - /// - RenderingEngine DetermineTemplateRenderingEngine(ITemplate template); - /// /// Validates a /// diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/TemplateRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/TemplateRepository.cs index 19ef303ebe..ac0f4f0bed 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/TemplateRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/TemplateRepository.cs @@ -5,7 +5,6 @@ using System.Linq; using System.Text; using NPoco; using Umbraco.Core.Cache; -using Umbraco.Core.Configuration.UmbracoSettings; using Umbraco.Core.IO; using Umbraco.Core.Logging; using Umbraco.Core.Models; @@ -23,20 +22,14 @@ namespace Umbraco.Core.Persistence.Repositories.Implement ///
internal class TemplateRepository : NPocoRepositoryBase, ITemplateRepository { - private readonly IFileSystem _masterpagesFileSystem; private readonly IFileSystem _viewsFileSystem; - private readonly ITemplatesSection _templateConfig; private readonly ViewHelper _viewHelper; - private readonly MasterPageHelper _masterPageHelper; - public TemplateRepository(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger, ITemplatesSection templateConfig, IFileSystems fileSystems) + public TemplateRepository(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger, IFileSystems fileSystems) : base(scopeAccessor, cache, logger) { - _masterpagesFileSystem = fileSystems.MasterPagesFileSystem; _viewsFileSystem = fileSystems.MvcViewsFileSystem; - _templateConfig = templateConfig; _viewHelper = new ViewHelper(_viewsFileSystem); - _masterPageHelper = new MasterPageHelper(_masterpagesFileSystem); } protected override IRepositoryCachePolicy CreateCachePolicy() @@ -255,18 +248,9 @@ namespace Umbraco.Core.Persistence.Repositories.Implement else { // else, create or write template.Content to disk - if (DetermineTemplateRenderingEngine(template) == RenderingEngine.Mvc) - { - content = originalAlias == null - ? _viewHelper.CreateView(template, true) - : _viewHelper.UpdateViewFile(template, originalAlias); - } - else - { - content = originalAlias == null - ? _masterPageHelper.CreateMasterPage(template, this, true) - : _masterPageHelper.UpdateMasterPageFile(template, originalAlias, this); - } + content = originalAlias == null + ? _viewHelper.CreateView(template, true) + : _viewHelper.UpdateViewFile(template, originalAlias); } // once content has been set, "template on disk" are not "on disk" anymore @@ -298,16 +282,8 @@ namespace Umbraco.Core.Persistence.Repositories.Implement Database.Execute(delete, new { id = GetEntityId(entity) }); } - if (DetermineTemplateRenderingEngine(entity) == RenderingEngine.Mvc) - { - var viewName = string.Concat(entity.Alias, ".cshtml"); - _viewsFileSystem.DeleteFile(viewName); - } - else - { - var masterpageName = string.Concat(entity.Alias, ".master"); - _masterpagesFileSystem.DeleteFile(masterpageName); - } + var viewName = string.Concat(entity.Alias, ".cshtml"); + _viewsFileSystem.DeleteFile(viewName); entity.DeleteDate = DateTime.Now; } @@ -388,27 +364,11 @@ namespace Umbraco.Core.Persistence.Repositories.Implement template.VirtualPath = _viewsFileSystem.GetUrl(path); return; } - path = string.Concat(template.Alias, ".master"); - if (_masterpagesFileSystem.FileExists(path)) - { - template.VirtualPath = _masterpagesFileSystem.GetUrl(path); - return; - } } else { // we know the path already - var ext = Path.GetExtension(path); - switch (ext) - { - case ".cshtml": - case ".vbhtml": - template.VirtualPath = _viewsFileSystem.GetUrl(path); - return; - case ".master": - template.VirtualPath = _masterpagesFileSystem.GetUrl(path); - return; - } + template.VirtualPath = _viewsFileSystem.GetUrl(path); } template.VirtualPath = string.Empty; // file not found... @@ -426,25 +386,15 @@ namespace Umbraco.Core.Persistence.Repositories.Implement path = string.Concat(template.Alias, ".vbhtml"); if (_viewsFileSystem.FileExists(path)) return GetFileContent(template, _viewsFileSystem, path, init); - path = string.Concat(template.Alias, ".master"); - if (_masterpagesFileSystem.FileExists(path)) - return GetFileContent(template, _masterpagesFileSystem, path, init); } else { // we know the path already - var ext = Path.GetExtension(path); - switch (ext) - { - case ".cshtml": - case ".vbhtml": - return GetFileContent(template, _viewsFileSystem, path, init); - case ".master": - return GetFileContent(template, _masterpagesFileSystem, path, init); - } + return GetFileContent(template, _viewsFileSystem, path, init); } template.VirtualPath = string.Empty; // file not found... + return string.Empty; } @@ -514,9 +464,6 @@ namespace Umbraco.Core.Persistence.Repositories.Implement case ".vbhtml": fs = _viewsFileSystem; break; - case ".master": - fs = _masterpagesFileSystem; - break; default: throw new Exception("Unsupported extension " + ext + "."); } @@ -625,56 +572,6 @@ namespace Umbraco.Core.Persistence.Repositories.Implement } } - /// - /// This checks what the default rendering engine is set in config but then also ensures that there isn't already - /// a template that exists in the opposite rendering engine's template folder, then returns the appropriate - /// rendering engine to use. - /// - /// - /// - /// The reason this is required is because for example, if you have a master page file already existing under ~/masterpages/Blah.aspx - /// and then you go to create a template in the tree called Blah and the default rendering engine is MVC, it will create a Blah.cshtml - /// empty template in ~/Views. This means every page that is using Blah will go to MVC and render an empty page. - /// This is mostly related to installing packages since packages install file templates to the file system and then create the - /// templates in business logic. Without this, it could cause the wrong rendering engine to be used for a package. - /// - public RenderingEngine DetermineTemplateRenderingEngine(ITemplate template) - { - var engine = _templateConfig.DefaultRenderingEngine; - var viewHelper = new ViewHelper(_viewsFileSystem); - if (viewHelper.ViewExists(template) == false) - { - if (template.Content.IsNullOrWhiteSpace() == false && MasterPageHelper.IsMasterPageSyntax(template.Content)) - { - //there is a design but its definitely a webforms design and we haven't got a MVC view already for it - return RenderingEngine.WebForms; - } - } - - var masterPageHelper = new MasterPageHelper(_masterpagesFileSystem); - - switch (engine) - { - case RenderingEngine.Mvc: - //check if there's a view in ~/masterpages - if (masterPageHelper.MasterPageExists(template) && viewHelper.ViewExists(template) == false) - { - //change this to webforms since there's already a file there for this template alias - engine = RenderingEngine.WebForms; - } - break; - case RenderingEngine.WebForms: - //check if there's a view in ~/views - if (viewHelper.ViewExists(template) && masterPageHelper.MasterPageExists(template) == false) - { - //change this to mvc since there's already a file there for this template alias - engine = RenderingEngine.Mvc; - } - break; - } - return engine; - } - /// /// Validates a /// @@ -689,21 +586,12 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var path = template.VirtualPath; // get valid paths - var validDirs = _templateConfig.DefaultRenderingEngine == RenderingEngine.Mvc - ? new[] { SystemDirectories.Masterpages, SystemDirectories.MvcViews } - : new[] { SystemDirectories.Masterpages }; + var validDirs = new[] { SystemDirectories.MvcViews }; // get valid extensions var validExts = new List(); - if (_templateConfig.DefaultRenderingEngine == RenderingEngine.Mvc) - { - validExts.Add("cshtml"); - validExts.Add("vbhtml"); - } - else - { - validExts.Add("master"); - } + validExts.Add("cshtml"); + validExts.Add("vbhtml"); // validate path and extension var validFile = IOHelper.VerifyEditPath(path, validDirs); diff --git a/src/Umbraco.Core/Services/IFileService.cs b/src/Umbraco.Core/Services/IFileService.cs index 76e850beb2..daf5d9b80c 100644 --- a/src/Umbraco.Core/Services/IFileService.cs +++ b/src/Umbraco.Core/Services/IFileService.cs @@ -210,21 +210,6 @@ namespace Umbraco.Core.Services /// Optional id of the user void SaveTemplate(IEnumerable templates, int userId = 0); - /// - /// This checks what the default rendering engine is set in config but then also ensures that there isn't already - /// a template that exists in the opposite rendering engine's template folder, then returns the appropriate - /// rendering engine to use. - /// - /// - /// - /// The reason this is required is because for example, if you have a master page file already existing under ~/masterpages/Blah.aspx - /// and then you go to create a template in the tree called Blah and the default rendering engine is MVC, it will create a Blah.cshtml - /// empty template in ~/Views. This means every page that is using Blah will go to MVC and render an empty page. - /// This is mostly related to installing packages since packages install file templates to the file system and then create the - /// templates in business logic. Without this, it could cause the wrong rendering engine to be used for a package. - /// - RenderingEngine DetermineTemplateRenderingEngine(ITemplate template); - /// /// Gets the content of a template as a stream. /// diff --git a/src/Umbraco.Core/Services/Implement/FileService.cs b/src/Umbraco.Core/Services/Implement/FileService.cs index f15f0d7d47..0c08404ab3 100644 --- a/src/Umbraco.Core/Services/Implement/FileService.cs +++ b/src/Umbraco.Core/Services/Implement/FileService.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.ComponentModel; using System.IO; using System.Linq; using System.Text.RegularExpressions; @@ -556,27 +555,6 @@ namespace Umbraco.Core.Services.Implement } } - /// - /// This checks what the default rendering engine is set in config but then also ensures that there isn't already - /// a template that exists in the opposite rendering engine's template folder, then returns the appropriate - /// rendering engine to use. - /// - /// - /// - /// The reason this is required is because for example, if you have a master page file already existing under ~/masterpages/Blah.aspx - /// and then you go to create a template in the tree called Blah and the default rendering engine is MVC, it will create a Blah.cshtml - /// empty template in ~/Views. This means every page that is using Blah will go to MVC and render an empty page. - /// This is mostly related to installing packages since packages install file templates to the file system and then create the - /// templates in business logic. Without this, it could cause the wrong rendering engine to be used for a package. - /// - public RenderingEngine DetermineTemplateRenderingEngine(ITemplate template) - { - using (var scope = ScopeProvider.CreateScope(autoComplete: true)) - { - return _templateRepository.DetermineTemplateRenderingEngine(template); - } - } - /// /// Deletes a template by its alias /// @@ -1043,7 +1021,7 @@ namespace Umbraco.Core.Services.Implement _auditRepository.Save(new AuditItem(objectId, type, userId, entityType)); } - //TODO Method to change name and/or alias of view/masterpage template + //TODO Method to change name and/or alias of view template #region Event Handlers diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 13f1ff2025..81c5af104f 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -291,7 +291,6 @@ - @@ -304,7 +303,6 @@ - @@ -631,7 +629,6 @@ - diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/TemplateElementDefaultTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/TemplateElementDefaultTests.cs deleted file mode 100644 index 4f7e8c1800..0000000000 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/TemplateElementDefaultTests.cs +++ /dev/null @@ -1,13 +0,0 @@ -using NUnit.Framework; - -namespace Umbraco.Tests.Configurations.UmbracoSettings -{ - [TestFixture] - public class TemplateElementDefaultTests : TemplateElementTests - { - protected override bool TestingDefaults - { - get { return true; } - } - } -} diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/TemplateElementTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/TemplateElementTests.cs deleted file mode 100644 index a2edf94ab5..0000000000 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/TemplateElementTests.cs +++ /dev/null @@ -1,16 +0,0 @@ -using NUnit.Framework; -using Umbraco.Core; - -namespace Umbraco.Tests.Configurations.UmbracoSettings -{ - [TestFixture] - public class TemplateElementTests : UmbracoSettingsTests - { - [Test] - public void DefaultRenderingEngine() - { - Assert.IsTrue(SettingsSection.Templates.DefaultRenderingEngine == RenderingEngine.Mvc); - } - - } -} diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config index 4c64485503..dd44e23328 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config @@ -145,10 +145,6 @@ - - Mvc - - false true diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.minimal.config b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.minimal.config index 21dfa1f19e..bee7133051 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.minimal.config +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.minimal.config @@ -37,11 +37,6 @@ - - - Mvc - - diff --git a/src/Umbraco.Tests/IO/IoHelperTests.cs b/src/Umbraco.Tests/IO/IoHelperTests.cs index b2ef5e4d31..b0e59cbb55 100644 --- a/src/Umbraco.Tests/IO/IoHelperTests.cs +++ b/src/Umbraco.Tests/IO/IoHelperTests.cs @@ -37,7 +37,6 @@ namespace Umbraco.Tests.IO Assert.AreEqual(IOHelper.MapPath(SystemDirectories.Css, true), IOHelper.MapPath(SystemDirectories.Css, false)); Assert.AreEqual(IOHelper.MapPath(SystemDirectories.Data, true), IOHelper.MapPath(SystemDirectories.Data, false)); Assert.AreEqual(IOHelper.MapPath(SystemDirectories.Install, true), IOHelper.MapPath(SystemDirectories.Install, false)); - Assert.AreEqual(IOHelper.MapPath(SystemDirectories.Masterpages, true), IOHelper.MapPath(SystemDirectories.Masterpages, false)); Assert.AreEqual(IOHelper.MapPath(SystemDirectories.Media, true), IOHelper.MapPath(SystemDirectories.Media, false)); Assert.AreEqual(IOHelper.MapPath(SystemDirectories.Packages, true), IOHelper.MapPath(SystemDirectories.Packages, false)); Assert.AreEqual(IOHelper.MapPath(SystemDirectories.Preview, true), IOHelper.MapPath(SystemDirectories.Preview, false)); diff --git a/src/Umbraco.Tests/Persistence/Repositories/ContentTypeRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/ContentTypeRepositoryTest.cs index aeaf76967f..f3af1cf73f 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/ContentTypeRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/ContentTypeRepositoryTest.cs @@ -7,12 +7,9 @@ using NUnit.Framework; using Umbraco.Core; using Umbraco.Core.Cache; using Umbraco.Core.Configuration.UmbracoSettings; -using Umbraco.Core.IO; using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; using Umbraco.Core.Persistence; using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Repositories; using Umbraco.Core.Persistence.Repositories.Implement; using Umbraco.Core.Scoping; using Umbraco.Tests.TestHelpers; @@ -36,7 +33,7 @@ namespace Umbraco.Tests.Persistence.Repositories private DocumentRepository CreateRepository(IScopeAccessor scopeAccessor, out ContentTypeRepository contentTypeRepository) { var cacheHelper = CacheHelper.Disabled; - var templateRepository = new TemplateRepository(scopeAccessor, cacheHelper, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); + var templateRepository = new TemplateRepository(scopeAccessor, cacheHelper, Logger, TestObjects.GetFileSystemsMock()); var tagRepository = new TagRepository(scopeAccessor, cacheHelper, Logger); contentTypeRepository = new ContentTypeRepository(scopeAccessor, cacheHelper, Logger, templateRepository); var languageRepository = new LanguageRepository(scopeAccessor, cacheHelper, Logger); @@ -46,7 +43,7 @@ namespace Umbraco.Tests.Persistence.Repositories private ContentTypeRepository CreateRepository(IScopeAccessor scopeAccessor) { - var templateRepository = new TemplateRepository(scopeAccessor, CacheHelper.Disabled, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); + var templateRepository = new TemplateRepository(scopeAccessor, CacheHelper.Disabled, Logger, TestObjects.GetFileSystemsMock()); var contentTypeRepository = new ContentTypeRepository(scopeAccessor, CacheHelper.Disabled, Logger, templateRepository); return contentTypeRepository; } @@ -71,7 +68,7 @@ namespace Umbraco.Tests.Persistence.Repositories var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var templateRepo = new TemplateRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); + var templateRepo = new TemplateRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, TestObjects.GetFileSystemsMock()); var repository = CreateRepository((IScopeAccessor) provider); var templates = new[] { diff --git a/src/Umbraco.Tests/Persistence/Repositories/DocumentRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/DocumentRepositoryTest.cs index c1fa5381ff..2619827705 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/DocumentRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/DocumentRepositoryTest.cs @@ -64,7 +64,7 @@ namespace Umbraco.Tests.Persistence.Repositories { cacheHelper = cacheHelper ?? CacheHelper; - templateRepository = new TemplateRepository(scopeAccessor, cacheHelper, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); + templateRepository = new TemplateRepository(scopeAccessor, cacheHelper, Logger, TestObjects.GetFileSystemsMock()); var tagRepository = new TagRepository(scopeAccessor, cacheHelper, Logger); contentTypeRepository = new ContentTypeRepository(scopeAccessor, cacheHelper, Logger, templateRepository); var languageRepository = new LanguageRepository(scopeAccessor, cacheHelper, Logger); diff --git a/src/Umbraco.Tests/Persistence/Repositories/DomainRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/DomainRepositoryTest.cs index a5402f964e..5511114d3e 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/DomainRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/DomainRepositoryTest.cs @@ -4,9 +4,7 @@ using System.Linq; using Moq; using NUnit.Framework; using Umbraco.Core.Configuration.UmbracoSettings; -using Umbraco.Core.IO; using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; using Umbraco.Core.Persistence.Repositories.Implement; using Umbraco.Core.Scoping; using Umbraco.Tests.TestHelpers; @@ -22,7 +20,7 @@ namespace Umbraco.Tests.Persistence.Repositories private DomainRepository CreateRepository(IScopeProvider provider, out ContentTypeRepository contentTypeRepository, out DocumentRepository documentRepository, out LanguageRepository languageRepository) { var accessor = (IScopeAccessor) provider; - var templateRepository = new TemplateRepository(accessor, Core.Cache.CacheHelper.Disabled, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); + var templateRepository = new TemplateRepository(accessor, Core.Cache.CacheHelper.Disabled, Logger, TestObjects.GetFileSystemsMock()); var tagRepository = new TagRepository(accessor, Core.Cache.CacheHelper.Disabled, Logger); contentTypeRepository = new ContentTypeRepository(accessor, Core.Cache.CacheHelper.Disabled, Logger, templateRepository); languageRepository = new LanguageRepository(accessor, Core.Cache.CacheHelper.Disabled, Logger); diff --git a/src/Umbraco.Tests/Persistence/Repositories/PublicAccessRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/PublicAccessRepositoryTest.cs index e76d794e69..23d95163d0 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/PublicAccessRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/PublicAccessRepositoryTest.cs @@ -4,10 +4,8 @@ using System.Linq; using Moq; using NUnit.Framework; using Umbraco.Core.Configuration.UmbracoSettings; -using Umbraco.Core.IO; using Umbraco.Core.Models; using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Repositories; using Umbraco.Core.Persistence.Repositories.Implement; using Umbraco.Core.Scoping; using Umbraco.Tests.TestHelpers; @@ -307,7 +305,7 @@ namespace Umbraco.Tests.Persistence.Repositories private DocumentRepository CreateRepository(IScopeProvider provider, out ContentTypeRepository contentTypeRepository) { var accessor = (IScopeAccessor) provider; - var templateRepository = new TemplateRepository(accessor, CacheHelper, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); + var templateRepository = new TemplateRepository(accessor, CacheHelper, Logger, TestObjects.GetFileSystemsMock()); var tagRepository = new TagRepository(accessor, CacheHelper, Logger); contentTypeRepository = new ContentTypeRepository(accessor, CacheHelper, Logger, templateRepository); var languageRepository = new LanguageRepository(accessor, CacheHelper, Logger); diff --git a/src/Umbraco.Tests/Persistence/Repositories/TagRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/TagRepositoryTest.cs index 78eb736007..03295ea599 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/TagRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/TagRepositoryTest.cs @@ -953,7 +953,7 @@ namespace Umbraco.Tests.Persistence.Repositories private DocumentRepository CreateContentRepository(IScopeProvider provider, out ContentTypeRepository contentTypeRepository) { var accessor = (IScopeAccessor) provider; - var templateRepository = new TemplateRepository(accessor, CacheHelper.Disabled, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); + var templateRepository = new TemplateRepository(accessor, CacheHelper.Disabled, Logger, TestObjects.GetFileSystemsMock()); var tagRepository = new TagRepository(accessor, CacheHelper.Disabled, Logger); contentTypeRepository = new ContentTypeRepository(accessor, CacheHelper.Disabled, Logger, templateRepository); var languageRepository = new LanguageRepository(accessor, CacheHelper.Disabled, Logger); diff --git a/src/Umbraco.Tests/Persistence/Repositories/TemplateRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/TemplateRepositoryTest.cs index f4bed68315..7d4b413a11 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/TemplateRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/TemplateRepositoryTest.cs @@ -25,11 +25,9 @@ namespace Umbraco.Tests.Persistence.Repositories { private IFileSystems _fileSystems; - private ITemplateRepository CreateRepository(IScopeProvider provider, ITemplatesSection templatesSection = null) + private ITemplateRepository CreateRepository(IScopeProvider provider) { - return new TemplateRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, - templatesSection ?? Mock.Of(t => t.DefaultRenderingEngine == RenderingEngine.Mvc), - _fileSystems); + return new TemplateRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, _fileSystems); } public override void SetUp() @@ -37,8 +35,6 @@ namespace Umbraco.Tests.Persistence.Repositories base.SetUp(); _fileSystems = Mock.Of(); - var masterPageFileSystem = new PhysicalFileSystem(SystemDirectories.Masterpages); - Mock.Get(_fileSystems).Setup(x => x.MasterPagesFileSystem).Returns(masterPageFileSystem); var viewsFileSystem = new PhysicalFileSystem(SystemDirectories.MvcViews); Mock.Get(_fileSystems).Setup(x => x.MvcViewsFileSystem).Returns(viewsFileSystem); } @@ -56,77 +52,6 @@ namespace Umbraco.Tests.Persistence.Repositories } } - [Test] - public void Can_Perform_Add_MasterPage_Detect_Content() - { - // Arrange - using (ScopeProvider.CreateScope()) - { - var repository = CreateRepository(ScopeProvider); - - // Act - var template = new Template("test", "test") - { - Content = @"<%@ Master Language=""C#"" %>" - }; - repository.Save(template); - - //Assert - Assert.That(repository.Get("test"), Is.Not.Null); - Assert.That(_fileSystems.MasterPagesFileSystem.FileExists("test.master"), Is.True); - } - } - - [Test] - public void Can_Perform_Add_MasterPage_With_Default_Content() - { - // Arrange - using (ScopeProvider.CreateScope()) - { - var repository = CreateRepository(ScopeProvider, Mock.Of(x => x.DefaultRenderingEngine == RenderingEngine.WebForms)); - - // Act - var template = new Template("test", "test"); - repository.Save(template); - - //Assert - Assert.That(repository.Get("test"), Is.Not.Null); - Assert.That(_fileSystems.MasterPagesFileSystem.FileExists("test.master"), Is.True); - Assert.AreEqual(@"<%@ Master Language=""C#"" MasterPageFile=""~/umbraco/masterpages/default.master"" AutoEventWireup=""true"" %> - - - - -".StripWhitespace(), template.Content.StripWhitespace()); - } - } - - [Test] - public void Can_Perform_Add_MasterPage_With_Default_Content_With_Parent() - { - // Arrange - using (ScopeProvider.CreateScope()) - { - var repository = CreateRepository(ScopeProvider, Mock.Of(x => x.DefaultRenderingEngine == RenderingEngine.WebForms)); - - //NOTE: This has to be persisted first - var template = new Template("test", "test"); - repository.Save(template); - - // Act - var template2 = new Template("test2", "test2"); - template2.SetMasterTemplate(template); - repository.Save(template2); - - //Assert - Assert.That(repository.Get("test2"), Is.Not.Null); - Assert.That(_fileSystems.MasterPagesFileSystem.FileExists("test2.master"), Is.True); - Assert.AreEqual(@"<%@ Master Language=""C#"" MasterPageFile=""~/masterpages/test.master"" AutoEventWireup=""true"" %> - -".StripWhitespace(), template2.Content.StripWhitespace()); - } - } - [Test] public void Can_Perform_Add_View() { @@ -253,32 +178,6 @@ namespace Umbraco.Tests.Persistence.Repositories } } - [Test] - public void Can_Perform_Update_MasterPage() - { - // Arrange - using (ScopeProvider.CreateScope()) - { - var repository = CreateRepository(ScopeProvider); - - // Act - var template = new Template("test", "test") - { - Content = @"<%@ Master Language=""C#"" %>" - }; - repository.Save(template); - - template.Content = @"<%@ Master Language=""VB"" %>"; - repository.Save(template); - - var updated = repository.Get("test"); - - // Assert - Assert.That(_fileSystems.MasterPagesFileSystem.FileExists("test.master"), Is.True); - Assert.That(updated.Content, Is.EqualTo(@"<%@ Master Language=""VB"" %>")); - } - } - [Test] public void Can_Perform_Update_View() { @@ -305,31 +204,6 @@ namespace Umbraco.Tests.Persistence.Repositories } } - [Test] - public void Can_Perform_Delete_MasterPage() - { - // Arrange - using (ScopeProvider.CreateScope()) - { - var repository = CreateRepository(ScopeProvider); - - var template = new Template("test", "test") - { - Content = @"<%@ Master Language=""C#"" %>" - }; - repository.Save(template); - - // Act - var templates = repository.Get("test"); - Assert.That(_fileSystems.MasterPagesFileSystem.FileExists("test.master"), Is.True); - repository.Delete(templates); - - // Assert - Assert.IsNull(repository.Get("test")); - Assert.That(_fileSystems.MasterPagesFileSystem.FileExists("test.master"), Is.False); - } - } - [Test] public void Can_Perform_Delete_View() { @@ -651,11 +525,6 @@ namespace Umbraco.Tests.Persistence.Repositories _fileSystems = null; //Delete all files - var fsMaster = new PhysicalFileSystem(SystemDirectories.Masterpages); - var masterPages = fsMaster.GetFiles("", "*.master"); - foreach (var file in masterPages) - fsMaster.DeleteFile(file); - var fsViews = new PhysicalFileSystem(SystemDirectories.MvcViews); var views = fsViews.GetFiles("", "*.cshtml"); foreach (var file in views) diff --git a/src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs index 847972cc50..ba2a7de859 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs @@ -41,7 +41,7 @@ namespace Umbraco.Tests.Persistence.Repositories private DocumentRepository CreateContentRepository(IScopeProvider provider, out IContentTypeRepository contentTypeRepository, out ITemplateRepository templateRepository) { var accessor = (IScopeAccessor) provider; - templateRepository = new TemplateRepository(accessor, CacheHelper, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); + templateRepository = new TemplateRepository(accessor, CacheHelper, Logger, TestObjects.GetFileSystemsMock()); var tagRepository = new TagRepository(accessor, CacheHelper, Logger); contentTypeRepository = new ContentTypeRepository(accessor, CacheHelper, Logger, templateRepository); var languageRepository = new LanguageRepository(accessor, CacheHelper, Logger); diff --git a/src/Umbraco.Tests/Services/ContentServicePerformanceTest.cs b/src/Umbraco.Tests/Services/ContentServicePerformanceTest.cs index 3aefa88a50..fff88d7531 100644 --- a/src/Umbraco.Tests/Services/ContentServicePerformanceTest.cs +++ b/src/Umbraco.Tests/Services/ContentServicePerformanceTest.cs @@ -163,7 +163,7 @@ namespace Umbraco.Tests.Services var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var tRepository = new TemplateRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); + var tRepository = new TemplateRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, TestObjects.GetFileSystemsMock()); var tagRepo = new TagRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger); var ctRepository = new ContentTypeRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, tRepository); var languageRepository = new LanguageRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger); @@ -196,7 +196,7 @@ namespace Umbraco.Tests.Services var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var tRepository = new TemplateRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); + var tRepository = new TemplateRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, TestObjects.GetFileSystemsMock()); var tagRepo = new TagRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger); var ctRepository = new ContentTypeRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, tRepository); var languageRepository = new LanguageRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger); @@ -227,7 +227,7 @@ namespace Umbraco.Tests.Services var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var tRepository = new TemplateRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); + var tRepository = new TemplateRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, TestObjects.GetFileSystemsMock()); var tagRepo = new TagRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger); var ctRepository = new ContentTypeRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, tRepository); var languageRepository = new LanguageRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger); @@ -261,7 +261,7 @@ namespace Umbraco.Tests.Services var provider = TestObjects.GetScopeProvider(Logger); using (var scope = provider.CreateScope()) { - var tRepository = new TemplateRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); + var tRepository = new TemplateRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, TestObjects.GetFileSystemsMock()); var tagRepo = new TagRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger); var ctRepository = new ContentTypeRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger, tRepository); var languageRepository = new LanguageRepository((IScopeAccessor) provider, CacheHelper.Disabled, Logger); diff --git a/src/Umbraco.Tests/Services/ContentServiceTests.cs b/src/Umbraco.Tests/Services/ContentServiceTests.cs index 0f48a9c99a..a9e48988f4 100644 --- a/src/Umbraco.Tests/Services/ContentServiceTests.cs +++ b/src/Umbraco.Tests/Services/ContentServiceTests.cs @@ -3037,7 +3037,7 @@ namespace Umbraco.Tests.Services private DocumentRepository CreateRepository(IScopeProvider provider, out ContentTypeRepository contentTypeRepository) { var accessor = (IScopeAccessor) provider; - var templateRepository = new TemplateRepository(accessor, CacheHelper.Disabled, Logger, Mock.Of(), TestObjects.GetFileSystemsMock()); + var templateRepository = new TemplateRepository(accessor, CacheHelper.Disabled, Logger, TestObjects.GetFileSystemsMock()); var tagRepository = new TagRepository(accessor, CacheHelper.Disabled, Logger); contentTypeRepository = new ContentTypeRepository(accessor, CacheHelper.Disabled, Logger, templateRepository); var languageRepository = new LanguageRepository(accessor, CacheHelper.Disabled, Logger); diff --git a/src/Umbraco.Tests/Templates/MasterPageHelperTests.cs b/src/Umbraco.Tests/Templates/MasterPageHelperTests.cs deleted file mode 100644 index a8344893c0..0000000000 --- a/src/Umbraco.Tests/Templates/MasterPageHelperTests.cs +++ /dev/null @@ -1,21 +0,0 @@ -using NUnit.Framework; -using Umbraco.Core.IO; - -namespace Umbraco.Tests.Templates -{ - [TestFixture] - public class MasterPageHelperTests - { - - [TestCase(@"<%@ master language=""C#"" masterpagefile=""~/masterpages/umbMaster.master"" autoeventwireup=""true"" %>")] - [TestCase(@"<%@ Master language=""C#"" masterpagefile=""~/masterpages/umbMaster.master"" autoeventwireup=""true"" %>")] - [TestCase(@"<%@Master language=""C#"" masterpagefile=""~/masterpages/umbMaster.master"" autoeventwireup=""true"" %>")] - [TestCase(@"<%@ Master language=""C#"" masterpagefile=""~/masterpages/umbMaster.master"" autoeventwireup=""true"" %>")] - [TestCase(@"<%@master language=""C#"" masterpagefile=""~/masterpages/umbMaster.master"" autoeventwireup=""true"" %>")] - public void IsMasterPageSyntax(string design) - { - Assert.IsTrue(MasterPageHelper.IsMasterPageSyntax(design)); - } - - } -} diff --git a/src/Umbraco.Tests/Templates/TemplateRepositoryTests.cs b/src/Umbraco.Tests/Templates/TemplateRepositoryTests.cs deleted file mode 100644 index 795d79ced1..0000000000 --- a/src/Umbraco.Tests/Templates/TemplateRepositoryTests.cs +++ /dev/null @@ -1,121 +0,0 @@ -using Moq; -using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Configuration.UmbracoSettings; -using Umbraco.Core.IO; -using Umbraco.Core.Logging; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; -using Umbraco.Tests.TestHelpers; - -namespace Umbraco.Tests.Templates -{ - [TestFixture] - public class TemplateRepositoryTests - { - private readonly Mock _cacheMock = new Mock(); - private readonly Mock _templateConfigMock = new Mock(); - private readonly IFileSystems _fileSystems = Mock.Of(); - private TemplateRepository _templateRepository; - - private readonly TestObjects _testObjects = new TestObjects(null); - - [SetUp] - public void Setup() - { - var logger = Mock.Of(); - - var accessorMock = new Mock(); - var scopeMock = new Mock(); - var database = _testObjects.GetUmbracoSqlCeDatabase(logger); - scopeMock.Setup(x => x.Database).Returns(database); - accessorMock.Setup(x => x.AmbientScope).Returns(scopeMock.Object); - - var mvcFs = Mock.Of(); - var masterFs = Mock.Of(); - Mock.Get(_fileSystems).Setup(x => x.MvcViewsFileSystem).Returns(mvcFs); - Mock.Get(_fileSystems).Setup(x => x.MasterPagesFileSystem).Returns(masterFs); - - _templateRepository = new TemplateRepository(accessorMock.Object, _cacheMock.Object, logger, _templateConfigMock.Object, _fileSystems); - } - - [Test] - public void DetermineTemplateRenderingEngine_Returns_MVC_When_ViewFile_Exists_And_Content_Has_Webform_Markup() - { - // Project in MVC mode - _templateConfigMock.Setup(x => x.DefaultRenderingEngine).Returns(RenderingEngine.Mvc); - - // Template has masterpage content - var templateMock = new Mock(); - templateMock.Setup(x => x.Alias).Returns("Something"); - templateMock.Setup(x => x.Content).Returns(""); - - // but MVC View already exists - Mock.Get(_fileSystems.MvcViewsFileSystem) - .Setup(x => x.FileExists(It.IsAny())).Returns(true); - - var res = _templateRepository.DetermineTemplateRenderingEngine(templateMock.Object); - Assert.AreEqual(RenderingEngine.Mvc, res); - } - - [Test] - public void DetermineTemplateRenderingEngine_Returns_WebForms_When_ViewFile_Doesnt_Exist_And_Content_Has_Webform_Markup() - { - // Project in MVC mode - _templateConfigMock.Setup(x => x.DefaultRenderingEngine).Returns(RenderingEngine.Mvc); - - // Template has masterpage content - var templateMock = new Mock(); - templateMock.Setup(x => x.Alias).Returns("Something"); - templateMock.Setup(x => x.Content).Returns(""); - - // MVC View doesn't exist - Mock.Get(_fileSystems.MvcViewsFileSystem) - .Setup(x => x.FileExists(It.IsAny())).Returns(false); - - var res = _templateRepository.DetermineTemplateRenderingEngine(templateMock.Object); - Assert.AreEqual(RenderingEngine.WebForms, res); - } - - [Test] - public void DetermineTemplateRenderingEngine_Returns_WebForms_When_MasterPage_Exists_And_In_Mvc_Mode() - { - // Project in MVC mode - _templateConfigMock.Setup(x => x.DefaultRenderingEngine).Returns(RenderingEngine.Mvc); - - var templateMock = new Mock(); - templateMock.Setup(x => x.Alias).Returns("Something"); - - // but masterpage already exists - Mock.Get(_fileSystems.MvcViewsFileSystem) - .Setup(x => x.FileExists(It.IsAny())).Returns(false); - Mock.Get(_fileSystems.MasterPagesFileSystem) - .Setup(x => x.FileExists(It.IsAny())).Returns(true); - - var res = _templateRepository.DetermineTemplateRenderingEngine(templateMock.Object); - Assert.AreEqual(RenderingEngine.WebForms, res); - } - - [Test] - public void DetermineTemplateRenderingEngine_Returns_Mvc_When_ViewPage_Exists_And_In_Webforms_Mode() - { - // Project in WebForms mode - _templateConfigMock.Setup(x => x.DefaultRenderingEngine).Returns(RenderingEngine.WebForms); - - var templateMock = new Mock(); - templateMock.Setup(x => x.Alias).Returns("Something"); - - // but MVC View already exists - Mock.Get(_fileSystems.MvcViewsFileSystem) - .Setup(x => x.FileExists(It.IsAny())).Returns(true); - Mock.Get(_fileSystems.MasterPagesFileSystem) - .Setup(x => x.FileExists(It.IsAny())).Returns(false); - - var res = _templateRepository.DetermineTemplateRenderingEngine(templateMock.Object); - Assert.AreEqual(RenderingEngine.Mvc, res); - } - - } -} diff --git a/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs b/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs index ea40ed9c84..cfd935cd82 100644 --- a/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs +++ b/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs @@ -38,7 +38,6 @@ namespace Umbraco.Tests.TestHelpers var content = new Mock(); var security = new Mock(); var requestHandler = new Mock(); - var templates = new Mock(); var logging = new Mock(); var tasks = new Mock(); var providers = new Mock(); @@ -47,7 +46,6 @@ namespace Umbraco.Tests.TestHelpers settings.Setup(x => x.Content).Returns(content.Object); settings.Setup(x => x.Security).Returns(security.Object); settings.Setup(x => x.RequestHandler).Returns(requestHandler.Object); - settings.Setup(x => x.Templates).Returns(templates.Object); settings.Setup(x => x.Logging).Returns(logging.Object); settings.Setup(x => x.ScheduledTasks).Returns(tasks.Object); settings.Setup(x => x.Providers).Returns(providers.Object); @@ -61,7 +59,6 @@ namespace Umbraco.Tests.TestHelpers settings.Setup(x => x.RequestHandler.UseDomainPrefixes).Returns(false); settings.Setup(x => x.RequestHandler.CharCollection).Returns(RequestHandlerElement.GetDefaultCharReplacements()); settings.Setup(x => x.WebRouting.UrlProviderMode).Returns("AutoLegacy"); - settings.Setup(x => x.Templates.DefaultRenderingEngine).Returns(RenderingEngine.Mvc); settings.Setup(x => x.Providers.DefaultBackOfficeUserProvider).Returns("UsersMembershipProvider"); return settings.Object; diff --git a/src/Umbraco.Tests/TestHelpers/TestHelper.cs b/src/Umbraco.Tests/TestHelpers/TestHelper.cs index 1fe814e4c6..b6f597bf46 100644 --- a/src/Umbraco.Tests/TestHelpers/TestHelper.cs +++ b/src/Umbraco.Tests/TestHelpers/TestHelper.cs @@ -55,12 +55,12 @@ namespace Umbraco.Tests.TestHelpers public static void InitializeContentDirectories() { - CreateDirectories(new[] { SystemDirectories.Masterpages, SystemDirectories.MvcViews, SystemDirectories.Media, SystemDirectories.AppPlugins }); + CreateDirectories(new[] { SystemDirectories.MvcViews, SystemDirectories.Media, SystemDirectories.AppPlugins }); } public static void CleanContentDirectories() { - CleanDirectories(new[] { SystemDirectories.Masterpages, SystemDirectories.MvcViews, SystemDirectories.Media }); + CleanDirectories(new[] { SystemDirectories.MvcViews, SystemDirectories.Media }); } public static void CreateDirectories(string[] directories) @@ -77,7 +77,6 @@ namespace Umbraco.Tests.TestHelpers { var preserves = new Dictionary { - { SystemDirectories.Masterpages, new[] {"dummy.txt"} }, { SystemDirectories.MvcViews, new[] {"dummy.txt"} } }; foreach (var directory in directories) diff --git a/src/Umbraco.Tests/TestHelpers/TestObjects-Mocks.cs b/src/Umbraco.Tests/TestHelpers/TestObjects-Mocks.cs index 8c230f98d0..563d81da05 100644 --- a/src/Umbraco.Tests/TestHelpers/TestObjects-Mocks.cs +++ b/src/Umbraco.Tests/TestHelpers/TestObjects-Mocks.cs @@ -145,8 +145,7 @@ namespace Umbraco.Tests.TestHelpers public IFileSystems GetFileSystemsMock() { var fileSystems = Mock.Of(); - - MockFs(fileSystems, x => x.MasterPagesFileSystem); + MockFs(fileSystems, x => x.MacroPartialsFileSystem); MockFs(fileSystems, x => x.MvcViewsFileSystem); MockFs(fileSystems, x => x.PartialViewsFileSystem); diff --git a/src/Umbraco.Tests/Testing/UmbracoTestBase.cs b/src/Umbraco.Tests/Testing/UmbracoTestBase.cs index a79531af74..304a13f20c 100644 --- a/src/Umbraco.Tests/Testing/UmbracoTestBase.cs +++ b/src/Umbraco.Tests/Testing/UmbracoTestBase.cs @@ -304,7 +304,6 @@ namespace Umbraco.Tests.Testing // register basic stuff that might need to be there for some container resolvers to work Composition.RegisterUnique(factory => factory.GetInstance().Content); - Composition.RegisterUnique(factory => factory.GetInstance().Templates); Composition.RegisterUnique(factory => factory.GetInstance().WebRouting); Composition.RegisterUnique(factory => ExamineManager.Instance); diff --git a/src/Umbraco.Tests/Umbraco.Tests.csproj b/src/Umbraco.Tests/Umbraco.Tests.csproj index e49ba250fa..c22b765169 100644 --- a/src/Umbraco.Tests/Umbraco.Tests.csproj +++ b/src/Umbraco.Tests/Umbraco.Tests.csproj @@ -305,8 +305,6 @@ - - @@ -354,7 +352,6 @@ - @@ -453,7 +450,6 @@ - diff --git a/src/Umbraco.Web.UI/config/umbracoSettings.Release.config b/src/Umbraco.Web.UI/config/umbracoSettings.Release.config index fb8ff63ab0..7299a397bc 100644 --- a/src/Umbraco.Web.UI/config/umbracoSettings.Release.config +++ b/src/Umbraco.Web.UI/config/umbracoSettings.Release.config @@ -85,11 +85,6 @@ - - - Mvc - - diff --git a/src/Umbraco.Web.UI/config/umbracoSettings.config b/src/Umbraco.Web.UI/config/umbracoSettings.config index c3e146d6ce..4de0a04735 100644 --- a/src/Umbraco.Web.UI/config/umbracoSettings.config +++ b/src/Umbraco.Web.UI/config/umbracoSettings.config @@ -162,11 +162,6 @@ - - - Mvc - - + + Add between {{model.config.minNumber}} and {{model.config.maxNumber}} items + + You can only have {{model.config.maxNumber}} items selected + + + + + + Add {{model.config.minNumber - renderModel.length}} item(s) + + You can only have {{model.config.maxNumber}} items selected + + + + + + Add up to {{model.config.maxNumber}} items + + You can only have {{model.config.maxNumber}} items selected + + + + + + Add at least {{model.config.minNumber}} item(s) + + + + + + + + +
+ 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/Cache/DataTypeCacheRefresher.cs b/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs index 65d366e2ad..fe85263f3b 100644 --- a/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs @@ -117,6 +117,7 @@ namespace Umbraco.Web.Cache LegacyMediaPickerPropertyConverter.ClearCaches(); SliderValueConverter.ClearCaches(); MediaPickerPropertyConverter.ClearCaches(); + MultiUrlPickerPropertyConverter.ClearCaches(); base.Refresh(jsonPayload); diff --git a/src/Umbraco.Web/Models/ContentEditing/LinkDisplay.cs b/src/Umbraco.Web/Models/ContentEditing/LinkDisplay.cs new file mode 100644 index 0000000000..857ae2c318 --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/LinkDisplay.cs @@ -0,0 +1,36 @@ +using System.Runtime.Serialization; +using Umbraco.Core; + +namespace Umbraco.Web.Models.ContentEditing +{ + [DataContract(Name = "link", Namespace = "")] + internal class LinkDisplay + { + [DataMember(Name = "icon")] + public string Icon { get; set; } + + [DataMember(Name = "isMedia")] + public bool IsMedia { get; set; } + + [DataMember(Name = "name")] + public string Name { get; set; } + + [DataMember(Name = "published")] + public bool Published { get; set; } + + [DataMember(Name = "queryString")] + public string QueryString { get; set; } + + [DataMember(Name = "target")] + public string Target { get; set; } + + [DataMember(Name = "trashed")] + public bool Trashed { get; set; } + + [DataMember(Name = "udi")] + public GuidUdi Udi { get; set; } + + [DataMember(Name = "url")] + public string Url { get; set; } + } +} diff --git a/src/Umbraco.Web/Models/Link.cs b/src/Umbraco.Web/Models/Link.cs new file mode 100644 index 0000000000..74ad4ad2af --- /dev/null +++ b/src/Umbraco.Web/Models/Link.cs @@ -0,0 +1,13 @@ +using Umbraco.Core; + +namespace Umbraco.Web.Models +{ + public class Link + { + public string Name { get; set; } + public string Target { get; set; } + public LinkType Type { get; set; } + public Udi Udi { get; set; } + public string Url { get; set; } + } +} diff --git a/src/Umbraco.Web/Models/LinkType.cs b/src/Umbraco.Web/Models/LinkType.cs new file mode 100644 index 0000000000..3db3165d7f --- /dev/null +++ b/src/Umbraco.Web/Models/LinkType.cs @@ -0,0 +1,9 @@ +namespace Umbraco.Web.Models +{ + public enum LinkType + { + Content, + Media, + External + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/PropertyEditors/MultiUrlPickerPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/MultiUrlPickerPropertyEditor.cs new file mode 100644 index 0000000000..84523f05c4 --- /dev/null +++ b/src/Umbraco.Web/PropertyEditors/MultiUrlPickerPropertyEditor.cs @@ -0,0 +1,249 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Umbraco.Core; +using Umbraco.Core.Logging; +using Umbraco.Core.Models; +using Umbraco.Core.Models.Editors; +using Umbraco.Core.Models.EntityBase; +using Umbraco.Core.PropertyEditors; +using Umbraco.Core.Services; +using Umbraco.Web.Models.ContentEditing; +using Umbraco.Web.Routing; + +namespace Umbraco.Web.PropertyEditors +{ + [PropertyEditor(Constants.PropertyEditors.MultiUrlPickerAlias, "Multi Url Picker", PropertyEditorValueTypes.Json, "multiurlpicker", Group = "pickers", Icon = "icon-link", IsParameterEditor = true)] + public class MultiUrlPickerPropertyEditor : PropertyEditor + { + protected override PreValueEditor CreatePreValueEditor() + { + return new MultiUrlPickerPreValueEditor(); + } + + protected override PropertyValueEditor CreateValueEditor() + { + return new MultiUrlPickerPropertyValueEditor(base.CreateValueEditor()); + } + + private class MultiUrlPickerPreValueEditor : PreValueEditor + { + public MultiUrlPickerPreValueEditor() + { + Fields.Add(new PreValueField + { + Key = "minNumber", + View = "number", + Name = "Minimum number of items" + }); + Fields.Add(new PreValueField + { + Key = "maxNumber", + View = "number", + Name = "Maximum number of items" + }); + } + } + + private class MultiUrlPickerPropertyValueEditor : PropertyValueEditorWrapper + { + public MultiUrlPickerPropertyValueEditor(PropertyValueEditor wrapped) : base(wrapped) + { + } + + public override object ConvertDbToEditor(Property property, PropertyType propertyType, IDataTypeService dataTypeService) + { + if (property.Value == null) + return Enumerable.Empty(); + + var value = property.Value.ToString(); + + if (string.IsNullOrEmpty(value)) + return Enumerable.Empty(); + + try + { + var umbHelper = new UmbracoHelper(UmbracoContext.Current); + var services = ApplicationContext.Current.Services; + var entityService = services.EntityService; + var contentTypeService = services.ContentTypeService; + string deletedLocalization = null; + string recycleBinLocalization = null; + + var dtos = JsonConvert.DeserializeObject>(value); + + var documentLinks = dtos.FindAll(link => + link.Udi != null && link.Udi.EntityType == Constants.UdiEntityType.Document + ); + + var mediaLinks = dtos.FindAll(link => + link.Udi != null && link.Udi.EntityType == Constants.UdiEntityType.Media + ); + + var entities = new List(); + if (documentLinks.Count > 0) + { + entities.AddRange( + entityService.GetAll(UmbracoObjectTypes.Document, + documentLinks.Select(link => link.Udi.Guid).ToArray()) + ); + } + + if (mediaLinks.Count > 0) + { + entities.AddRange( + entityService.GetAll(UmbracoObjectTypes.Media, + mediaLinks.Select(link => link.Udi.Guid).ToArray()) + ); + } + + var links = new List(); + foreach (var dto in dtos) + { + var link = new LinkDisplay + { + Icon = "icon-link", + IsMedia = false, + Name = dto.Name, + Published = true, + QueryString = dto.QueryString, + Target = dto.Target, + Trashed = false, + Udi = dto.Udi, + Url = dto.Url, + }; + + links.Add(link); + + if (dto.Udi == null) + continue; + + var entity = entities.Find(e => e.Key == dto.Udi.Guid); + if (entity == null) + { + if (deletedLocalization == null) + deletedLocalization = services.TextService.Localize("general/deleted"); + + link.Published = false; + link.Trashed = true; + link.Url = deletedLocalization; + } + else + { + var entityType = + Equals(entity.AdditionalData["NodeObjectTypeId"], Constants.ObjectTypes.MediaGuid) + ? Constants.UdiEntityType.Media + : Constants.UdiEntityType.Document; + + var udi = new GuidUdi(entityType, entity.Key); + + var contentTypeAlias = (string)entity.AdditionalData["ContentTypeAlias"]; + if (entity.Trashed) + { + if (recycleBinLocalization == null) + recycleBinLocalization = services.TextService.Localize("general/recycleBin"); + + link.Trashed = true; + link.Url = recycleBinLocalization; + } + + if (udi.EntityType == Constants.UdiEntityType.Document) + { + var contentType = contentTypeService.GetContentType(contentTypeAlias); + + if (contentType == null) + continue; + + link.Icon = contentType.Icon; + link.Published = Equals(entity.AdditionalData["IsPublished"], true); + + if (link.Trashed == false) + link.Url = umbHelper.Url(entity.Id, UrlProviderMode.Relative); + } + else + { + link.IsMedia = true; + + var mediaType = contentTypeService.GetMediaType(contentTypeAlias); + + if (mediaType == null) + continue; + + link.Icon = mediaType.Icon; + + if (link.Trashed) + continue; + + var media = umbHelper.TypedMedia(entity.Id); + if (media != null) + link.Url = media.Url; + } + } + } + return links; + } + catch (Exception ex) + { + ApplicationContext.Current.ProfilingLogger.Logger.Error($"Error getting links.\r\n{property.Value}", ex); + } + + return base.ConvertDbToEditor(property, propertyType, dataTypeService); + } + + public override object ConvertEditorToDb(ContentPropertyData editorValue, object currentValue) + { + if (editorValue.Value == null) + return null; + + var value = editorValue.Value.ToString(); + + if (string.IsNullOrEmpty(value)) + return null; + + try + { + return JsonConvert.SerializeObject( + from link in JsonConvert.DeserializeObject>(value) + select new LinkDto + { + Name = link.Name, + QueryString = link.QueryString, + 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 + }); + } + catch (Exception ex) + { + ApplicationContext.Current.ProfilingLogger.Logger.Error($"Error saving links.\r\n{editorValue.Value}", ex); + } + return base.ConvertEditorToDb(editorValue, currentValue); + } + } + + [DataContract] + internal class LinkDto + { + [DataMember(Name = "name")] + public string Name { get; set; } + + [DataMember(Name = "queryString")] + public string QueryString { get; set; } + + [DataMember(Name = "target")] + public string Target { get; set; } + + [DataMember(Name = "udi")] + public GuidUdi Udi { get; set; } + + [DataMember(Name = "url")] + public string Url { get; set; } + } + } +} diff --git a/src/Umbraco.Web/PropertyEditors/RelatedLinks2PropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/RelatedLinks2PropertyEditor.cs index 3aaf191fd2..541dccaa4e 100644 --- a/src/Umbraco.Web/PropertyEditors/RelatedLinks2PropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/RelatedLinks2PropertyEditor.cs @@ -1,10 +1,13 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using Umbraco.Core; using Umbraco.Core.PropertyEditors; namespace Umbraco.Web.PropertyEditors { - [PropertyEditor(Constants.PropertyEditors.RelatedLinks2Alias, "Related links", "relatedlinks", ValueType = PropertyEditorValueTypes.Json, Icon = "icon-thumbnail-list", Group = "pickers")] + // TODO: Remove in V8 + [Obsolete("This editor is obsolete, use MultiUrlPickerPropertyEditor instead")] + [PropertyEditor(Constants.PropertyEditors.RelatedLinks2Alias, "Related links", "relatedlinks", ValueType = PropertyEditorValueTypes.Json, Icon = "icon-thumbnail-list", Group = "pickers", IsDeprecated = true)] public class RelatedLinks2PropertyEditor : PropertyEditor { public RelatedLinks2PropertyEditor() @@ -33,4 +36,4 @@ namespace Umbraco.Web.PropertyEditors public int Maximum { get; set; } } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/MultiUrlPickerPropertyConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/MultiUrlPickerPropertyConverter.cs new file mode 100644 index 0000000000..397448983a --- /dev/null +++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/MultiUrlPickerPropertyConverter.cs @@ -0,0 +1,165 @@ +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Linq; +using Newtonsoft.Json.Linq; +using Umbraco.Core; +using Umbraco.Core.Logging; +using Umbraco.Core.Models.PublishedContent; +using Umbraco.Core.PropertyEditors; +using Umbraco.Core.PropertyEditors.ValueConverters; +using Umbraco.Core.Services; +using Umbraco.Web.Models; + +namespace Umbraco.Web.PropertyEditors.ValueConverters +{ + [DefaultPropertyValueConverter(typeof(JsonValueConverter))] + public class MultiUrlPickerPropertyConverter : PropertyValueConverterBase, IPropertyValueConverterMeta + { + private readonly IDataTypeService _dataTypeService; + + public MultiUrlPickerPropertyConverter(IDataTypeService dataTypeService) + { + if (dataTypeService == null) throw new ArgumentNullException("dataTypeService"); + _dataTypeService = dataTypeService; + } + + //TODO: Remove this ctor in v8 since the other one will use IoC + public MultiUrlPickerPropertyConverter() : this(ApplicationContext.Current.Services.DataTypeService) + { + } + + public override bool IsConverter(PublishedPropertyType propertyType) + { + return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MultiUrlPickerAlias); + } + + public override object ConvertDataToSource(PublishedPropertyType propertyType, object source, bool preview) + { + if (source == null) + return null; + + if (source.ToString().Trim().StartsWith("[") == false) + return null; + + try + { + return JArray.Parse(source.ToString()); + } + catch (Exception ex) + { + LogHelper.Error("Error parsing JSON", ex); + } + return null; + } + + public override object ConvertSourceToObject(PublishedPropertyType propertyType, object source, bool preview) + { + var isMultiple = IsMultipleDataType(propertyType.DataTypeId, out var maxNumber); + if (source == null) + return isMultiple + ? Enumerable.Empty() + : null; + + //TODO: Inject an UmbracoHelper and create a GetUmbracoHelper method based on either injected or singleton + if (UmbracoContext.Current == null) + return source; + + var umbHelper = new UmbracoHelper(UmbracoContext.Current); + + var links = new List(); + var dtos = ((JArray) source).ToObject>(); + + foreach (var dto in dtos) + { + var type = LinkType.External; + var url = dto.Url; + if (dto.Udi != null) + { + type = dto.Udi.EntityType == Constants.UdiEntityType.Media + ? LinkType.Media + : LinkType.Content; + + if (type == LinkType.Media) + { + var media = umbHelper.TypedMedia(dto.Udi); + if (media == null) + continue; + url = media.Url; + } + else + { + var content = umbHelper.TypedContent(dto.Udi); + if (content == null) + continue; + url = content.Url; + } + } + + var link = new Link + { + Name = dto.Name, + Target = dto.Target, + Type = type, + Udi = dto.Udi, + Url = url + dto.QueryString, + }; + + links.Add(link); + } + + if (isMultiple == false) + return links.FirstOrDefault(); + if (maxNumber > 0) + return links.Take(maxNumber); + + return links; + } + + public Type GetPropertyValueType(PublishedPropertyType propertyType) + { + return IsMultipleDataType(propertyType.DataTypeId, out var maxNumber) + ? typeof(IEnumerable) + : typeof(Link); + } + + public PropertyCacheLevel GetPropertyCacheLevel(PublishedPropertyType propertyType, PropertyCacheValue cacheValue) + { + switch (cacheValue) + { + case PropertyCacheValue.Source: + return PropertyCacheLevel.Content; + case PropertyCacheValue.Object: + case PropertyCacheValue.XPath: + return PropertyCacheLevel.ContentCache; + } + + return PropertyCacheLevel.None; + } + + private bool IsMultipleDataType(int dataTypeId, out int maxNumber) + { + // GetPreValuesCollectionByDataTypeId is cached at repository level; + // still, the collection is deep-cloned so this is kinda expensive, + // better to cache here + trigger refresh in DataTypeCacheRefresher + + maxNumber = Storages.GetOrAdd(dataTypeId, id => + { + var preValues = _dataTypeService.GetPreValuesCollectionByDataTypeId(id).PreValuesAsDictionary; + + return preValues.TryGetValue("maxNumber", out var maxNumberPreValue) + ? maxNumberPreValue.Value.TryConvertTo().Result + : 0; + }); + + return maxNumber != 1; + } + + private static readonly ConcurrentDictionary Storages = new ConcurrentDictionary(); + + internal static void ClearCaches() + { + Storages.Clear(); + } + } +} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index e021de0011..1b668b06c8 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -419,6 +419,7 @@ + @@ -444,6 +445,8 @@ + + @@ -485,6 +488,7 @@ + @@ -499,6 +503,7 @@ + From d6855d18f967092dec5583169c535dece072bab4 Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Sun, 20 Jan 2019 21:19:06 +0100 Subject: [PATCH 170/437] v8: Nicer delete language confirm (#4108) --- .../src/less/components/html/umb-alert.less | 12 +++- .../src/less/utilities/_spacing.less | 13 ++-- .../src/views/languages/overlays/delete.html | 9 +++ .../views/languages/overview.controller.js | 53 ++++++++++------ .../src/views/languages/overview.html | 61 +++++++++---------- .../listview/overlays/delete.html | 4 +- .../listview/overlays/listviewpublish.html | 5 +- .../listview/overlays/listviewunpublish.html | 5 +- src/Umbraco.Web.UI/Umbraco/config/lang/da.xml | 14 +++++ src/Umbraco.Web.UI/Umbraco/config/lang/en.xml | 4 +- .../Umbraco/config/lang/en_us.xml | 1 + 11 files changed, 116 insertions(+), 65 deletions(-) create mode 100644 src/Umbraco.Web.UI.Client/src/views/languages/overlays/delete.html diff --git a/src/Umbraco.Web.UI.Client/src/less/components/html/umb-alert.less b/src/Umbraco.Web.UI.Client/src/less/components/html/umb-alert.less index ef8834f767..c9aff190ce 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/html/umb-alert.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/html/umb-alert.less @@ -8,4 +8,14 @@ .umb-alert--info { background-color: @turquoise-washed; border: 1px solid @turquoise; -} \ No newline at end of file +} + +.umb-alert--warning { + background-color: @yellow-washed; + border: 1px solid @yellow; +} + +.umb-alert--danger { + background-color: @red-washed; + border: 1px solid @red; +} diff --git a/src/Umbraco.Web.UI.Client/src/less/utilities/_spacing.less b/src/Umbraco.Web.UI.Client/src/less/utilities/_spacing.less index 64d86d7b6f..69bbeef0af 100644 --- a/src/Umbraco.Web.UI.Client/src/less/utilities/_spacing.less +++ b/src/Umbraco.Web.UI.Client/src/less/utilities/_spacing.less @@ -1,7 +1,5 @@ /* - Spacing - */ @spacing-none: 0; @@ -37,13 +35,11 @@ 7 = 7th step in spacing scale */ - .m-center { margin-left: auto; margin-right: auto; } - .mt0 { margin-top: @spacing-none; } .mt1 { margin-top: @spacing-extra-small; } .mt2 { margin-top: @spacing-small; } @@ -52,3 +48,12 @@ .mt5 { margin-top: @spacing-extra-large; } .mt6 { margin-top: @spacing-extra-extra-large; } .mt7 { margin-top: @spacing-extra-extra-extra-large; } + +.mb0 { margin-bottom: @spacing-none; } +.mb1 { margin-bottom: @spacing-extra-small; } +.mb2 { margin-bottom: @spacing-small; } +.mb3 { margin-bottom: @spacing-medium; } +.mb4 { margin-bottom: @spacing-large; } +.mb5 { margin-bottom: @spacing-extra-large; } +.mb6 { margin-bottom: @spacing-extra-extra-large; } +.mb7 { margin-bottom: @spacing-extra-extra-extra-large; } diff --git a/src/Umbraco.Web.UI.Client/src/views/languages/overlays/delete.html b/src/Umbraco.Web.UI.Client/src/views/languages/overlays/delete.html new file mode 100644 index 0000000000..59221fcea8 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/languages/overlays/delete.html @@ -0,0 +1,9 @@ +
+ +
+ This will delete the language {{model.language.name}} [{{model.language.culture}}]. +
+ + ? + +
diff --git a/src/Umbraco.Web.UI.Client/src/views/languages/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/languages/overview.controller.js index a5c446dfb5..c1972ec067 100644 --- a/src/Umbraco.Web.UI.Client/src/views/languages/overview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/languages/overview.controller.js @@ -1,7 +1,7 @@ (function () { "use strict"; - function LanguagesOverviewController($location, $timeout, navigationService, notificationsService, localizationService, languageResource, eventsService) { + function LanguagesOverviewController($location, $timeout, navigationService, localizationService, languageResource, eventsService, overlayService) { var vm = this; @@ -65,30 +65,47 @@ } function deleteLanguage(language, event) { - var confirmed = confirm("Are you sure you want to delete " + language.name + "?"); - if(confirmed) { - language.deleteButtonState = "busy"; - languageResource.deleteById(language.id).then(function () { + const dialog = { + view: "views/languages/overlays/delete.html", + language: language, + submitButtonLabelKey: "contentTypeEditor_yesDelete", + submit: function (model) { + performDelete(model.language); + overlayService.close(); + }, + close: function () { + overlayService.close(); + } + }; - // emit event - var args = { language: language }; - eventsService.emit("editors.languages.languageDeleted", args); + localizationService.localize("general_delete").then(value => { + dialog.title = value; + overlayService.open(dialog); + }); - // remove from list - var index = vm.languages.indexOf(language); - vm.languages.splice(index, 1); - - }, function (err) { - language.deleteButtonState = "error"; - - }); - - } event.preventDefault() event.stopPropagation(); } + function performDelete(language) { + language.deleteButtonState = "busy"; + + languageResource.deleteById(language.id).then(function () { + + // emit event + var args = { language: language }; + eventsService.emit("editors.languages.languageDeleted", args); + + // remove from list + var index = vm.languages.indexOf(language); + vm.languages.splice(index, 1); + + }, function (err) { + language.deleteButtonState = "error"; + }); + } + init(); } diff --git a/src/Umbraco.Web.UI.Client/src/views/languages/overview.html b/src/Umbraco.Web.UI.Client/src/views/languages/overview.html index c55ce83417..15a9c84367 100644 --- a/src/Umbraco.Web.UI.Client/src/views/languages/overview.html +++ b/src/Umbraco.Web.UI.Client/src/views/languages/overview.html @@ -2,43 +2,41 @@ - + - + - + - +
- All Logs + All Logs
- + + + +
- + - - + + - + diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/overlays/delete.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/overlays/delete.html index 6ae3eba521..9b10b1d8b4 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/overlays/delete.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/overlays/delete.html @@ -1,6 +1,6 @@
-
+
This will delete the node and all its languages. If you only want to delete one language go and unpublish it instead. @@ -8,4 +8,4 @@ ? -
\ No newline at end of file +
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/overlays/listviewpublish.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/overlays/listviewpublish.html index 0e2ced411c..8354b323fa 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/overlays/listviewpublish.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/overlays/listviewpublish.html @@ -6,7 +6,7 @@
-
+

@@ -16,7 +16,7 @@
-
+
- \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/overlays/listviewunpublish.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/overlays/listviewunpublish.html index 03f91b1ad6..5cc46c5ce5 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/overlays/listviewunpublish.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/overlays/listviewunpublish.html @@ -8,13 +8,13 @@
-
+

-
+
- \ No newline at end of file diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml index b10f3d0be0..a257fb41d5 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml @@ -354,6 +354,7 @@ Indsæt link Indsæt makro Indsæt tabel + Dette vil slette sproget Sidst redigeret Link Internt link: @@ -407,6 +408,7 @@ konto Vælg editor Vælg snippet + Dette vil slette noden og alle dets sprog. Hvis du kun vil slette et sprog, så afpublicér det i stedet. Vis på medlemsprofil fane har ingen sorteringsrækkefølge + + Tilføj sprog + Påkrævet sprog + Egenskaber på dette sprog skal være udfyldt før noden kan blive udgivet. + Standard sprog + Et Umbraco site kan kun have et standard sprog. + Ved at skifte standardsprog kan resultere i standard indhold mangler. + Fallsback til + Ingen fallback sprog + For at tillade flersproget indhold til at falde tilbage på et andet sprog, hvis det ikke er tilgængelig i det anmodet sprog, vælg det her. + Fallback sprog + Alternativt felt Alternativ tekst diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml index 99a35a5e3b..42a2c4c844 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml @@ -371,6 +371,7 @@ Insert link Click to add a Macro Insert table + This will delete the language Last Edited Link Internal link: @@ -429,6 +430,7 @@ account Select editor Select snippet + This will delete the node and all its languages. If you only want to delete one language go and unpublish it instead. Hide History Icon - Id + Id Import Info Inner margin 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 47f293c2a9..be33ee853a 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml @@ -399,6 +399,7 @@ Insert link Click to add a Macro Insert table + This will delete the language Last Edited Link Internal link: From a502be606ba331f6e32761eae9d14a981ed1c75b Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Sun, 20 Jan 2019 21:27:32 +0100 Subject: [PATCH 171/437] v8: Fix package localization (#4159) --- .../src/views/packages/edit.controller.js | 16 ++- .../src/views/packages/edit.html | 2 - .../src/views/packages/options.html | 2 +- .../src/views/packages/overview.controller.js | 119 +++++++++++------- .../src/views/packages/views/created.html | 8 +- .../views/packages/views/install-local.html | 3 - .../src/views/users/overview.controller.js | 3 +- src/Umbraco.Web.UI/Umbraco/config/lang/da.xml | 9 +- src/Umbraco.Web.UI/Umbraco/config/lang/en.xml | 13 +- .../Umbraco/config/lang/en_us.xml | 16 ++- 10 files changed, 120 insertions(+), 71 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js index 0a44192041..282fd0472c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js @@ -1,7 +1,7 @@ (function () { "use strict"; - function EditController($scope, $location, $routeParams, umbRequestHelper, entityResource, packageResource, editorService, formHelper) { + function EditController($scope, $location, $routeParams, umbRequestHelper, entityResource, packageResource, editorService, formHelper, localizationService) { const vm = this; @@ -23,18 +23,23 @@ vm.removePackageView = removePackageView; vm.downloadFile = downloadFile; + vm.buttonLabel = ""; + const packageId = $routeParams.id; const create = $routeParams.create; function onInit() { - if(create) { + if (create) { //pre populate package with some values packageResource.getEmpty().then(scaffold => { vm.package = scaffold; vm.loading = false; }); - vm.buttonLabel = "Create"; + + localizationService.localize("general_create").then(function(value) { + vm.buttonLabel = value; + }); } else { // load package packageResource.getCreatedById(packageId).then(createdPackage => { @@ -49,7 +54,10 @@ } }); - vm.buttonLabel = "Save"; + + localizationService.localize("buttons_save").then(function (value) { + vm.buttonLabel = value; + }); } // get all doc types diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/edit.html b/src/Umbraco.Web.UI.Client/src/views/packages/edit.html index 5ad5ac2522..4c32e7e10c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/edit.html +++ b/src/Umbraco.Web.UI.Client/src/views/packages/edit.html @@ -323,8 +323,6 @@ disabled="vm.loading"> - - diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/options.html b/src/Umbraco.Web.UI.Client/src/views/packages/options.html index d75604d094..f34ac77ac2 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/options.html +++ b/src/Umbraco.Web.UI.Client/src/views/packages/options.html @@ -19,7 +19,7 @@

- This package has no configuration view + This package has no configuration view

+ label="Create package" + label-key="packager_createPackage"> @@ -24,7 +25,7 @@
{{ createdPackage.name }}
- {{ createdPackage.version }} | {{ createdPackage.url }}| {{ createdPackage.author }} + {{ createdPackage.version }} | {{ createdPackage.url }} | {{ createdPackage.author }}
@@ -34,7 +35,6 @@ button-style="danger" size="xxs" label-key="general_delete" - add-ellipsis="true" action="vm.deleteCreatedPackage($event, $index, createdPackage)"> @@ -45,7 +45,7 @@ - No packages have been created yet + No packages have been created yet
\ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/views/install-local.html b/src/Umbraco.Web.UI.Client/src/views/packages/views/install-local.html index b657c42877..6d95bcafa7 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/views/install-local.html +++ b/src/Umbraco.Web.UI.Client/src/views/packages/views/install-local.html @@ -41,7 +41,6 @@
-

Upload package

Install a local package by selecting it from your machine. Only install packages from sources you know and trust. @@ -167,8 +166,6 @@

{{vm.installState.status}}

- -
diff --git a/src/Umbraco.Web.UI.Client/src/views/users/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/users/overview.controller.js index 49e8007d8c..80e2322f6b 100644 --- a/src/Umbraco.Web.UI.Client/src/views/users/overview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/users/overview.controller.js @@ -1,7 +1,7 @@ (function () { "use strict"; - function UsersOverviewController($scope, $location, $timeout, navigationService, localizationService) { + function UsersOverviewController($scope, $location, localizationService) { var vm = this; var usersUri = $location.search().subview; @@ -24,7 +24,6 @@ loadNavigation(); setPageName(); - } function loadNavigation() { diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml index a257fb41d5..0742541484 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml @@ -804,6 +804,8 @@ Mange hilsner fra Umbraco robotten Notificeringer + Oprettet + Opret pakke Vælg pakken fra din computer. Umbraco pakker er oftest en ".zip" fil Slip her for at uploade eller klik her for at vælge pakkefil @@ -815,8 +817,12 @@ Mange hilsner fra Umbraco robotten Jeg accepterer betingelser for anvendelse Installér pakke - Afslut + Installeret Installeret pakker + Installér lokal + Afslut + Denne pakke har ingen konfigurationsvisning + Der er ikke blevet oprettet nogle pakker endnu Du har ingen pakker installeret 'Pakker' øverst til højre på din skærm]]> Søg efter pakker @@ -953,6 +959,7 @@ Mange hilsner fra Umbraco robotten Umbraco konfigurationsguide Mediearkiv Medlemmer + Pakker Nyhedsbreve Indstillinger Statistik diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml index 42a2c4c844..a057bb060f 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml @@ -1049,6 +1049,8 @@ To manage your website, simply open the Umbraco back office and start adding con Notifications + Created + Create package button and locating the package. Umbraco packages usually have a ".umb" or ".zip" extension. @@ -1063,8 +1065,12 @@ To manage your website, simply open the Umbraco back office and start adding con I accept terms of use Install package - Finish + Installed Installed packages + Install local + Finish + This package has no configuration view + No packages have been created yet You don’t have any packages installed 'Packages' icon in the top right of your screen]]> Search for packages @@ -1212,16 +1218,17 @@ To manage your website, simply open the Umbraco back office and start adding con Content Courier Developer + Forms + Help Umbraco Configuration Wizard Media Members Newsletters + Packages Settings Statistics Translation Users - Help - Forms The best Umbraco video tutorials 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 be33ee853a..8ce9282d71 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml @@ -606,7 +606,7 @@ Hide History Icon - Id + Id Import Info Inner margin @@ -657,7 +657,7 @@ Permissions Scheduled Publishing Search - Sorry, we can not find what you are looking for. + Sorry, we can not find what you are looking for. No items have been added Server Settings @@ -1075,6 +1075,8 @@ To manage your website, simply open the Umbraco back office and start adding con Notifications + Created + Create package button and locating the package. Umbraco packages usually have a ".umb" or ".zip" extension. @@ -1089,8 +1091,12 @@ To manage your website, simply open the Umbraco back office and start adding con I accept terms of use Install package - Finish + Installed Installed packages + Install local + Finish + This package has no configuration view + No packages have been created yet You don’t have any packages installed 'Packages' icon in the top right of your screen]]> Search for packages @@ -1239,13 +1245,13 @@ To manage your website, simply open the Umbraco back office and start adding con Content - Packages + Forms Media Members + Packages Settings Translation Users - Forms The best Umbraco video tutorials From 46f7c76c0b4826fb043eb16d20eb2e35724631bc Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 21 Jan 2019 07:54:35 +0100 Subject: [PATCH 172/437] Fixes for broken view.. - Create new UmbracoHelper (Missing parameter) - string.replace can't handle string and IHtmlString --- .../Views/Partials/Grid/Editors/TextString.cshtml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI/Views/Partials/Grid/Editors/TextString.cshtml b/src/Umbraco.Web.UI/Views/Partials/Grid/Editors/TextString.cshtml index 4cf2e73658..e0db232086 100644 --- a/src/Umbraco.Web.UI/Views/Partials/Grid/Editors/TextString.cshtml +++ b/src/Umbraco.Web.UI/Views/Partials/Grid/Editors/TextString.cshtml @@ -1,12 +1,13 @@ @model dynamic +@using Umbraco.Web.Composing @using Umbraco.Web.Templates @if (Model.editor.config.markup != null) { string markup = Model.editor.config.markup.ToString(); - var umbracoHelper = new UmbracoHelper(UmbracoContext.Current); - markup = markup.Replace("#value#", umbracoHelper.ReplaceLineBreaksForHtml(HttpUtility.HtmlEncode(Model.value.ToString()))); - + var umbracoHelper = new UmbracoHelper(UmbracoContext.Current, Current.Services); + markup = markup.Replace("#value#", umbracoHelper.ReplaceLineBreaksForHtml(HttpUtility.HtmlEncode(Model.value.ToString())).ToString()); + if (Model.editor.config.style != null) { markup = markup.Replace("#style#", Model.editor.config.style.ToString()); From 333c14300526ba7f9303777852942218fb13c10c Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 21 Jan 2019 07:59:05 +0100 Subject: [PATCH 173/437] GetPropertyValue change to Value --- .../Templates/ListChildPagesOrderedByProperty.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByProperty.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByProperty.cshtml index f9619e4e6f..1bffae04c4 100755 --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByProperty.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByProperty.cshtml @@ -17,7 +17,7 @@ @if (propertyAlias != null) { - var selection = Model.Content.Children.Where(x => x.IsVisible()).OrderBy(x => x.GetPropertyValue(propertyAlias.ToString())).ToArray(); + var selection = Model.Content.Children.Where(x => x.IsVisible()).OrderBy(x => x.Value(propertyAlias.ToString())).ToArray(); if (selection.Length > 0) { From ec57f353749425ecae03472b786b3fedab3338bd Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 21 Jan 2019 08:03:12 +0100 Subject: [PATCH 174/437] Named arguments cannot precede positional --- .../Cache/PublishedCache/PublishedMediaCacheTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Tests/Cache/PublishedCache/PublishedMediaCacheTests.cs b/src/Umbraco.Tests/Cache/PublishedCache/PublishedMediaCacheTests.cs index cfc45b8f53..bd4f1610cd 100644 --- a/src/Umbraco.Tests/Cache/PublishedCache/PublishedMediaCacheTests.cs +++ b/src/Umbraco.Tests/Cache/PublishedCache/PublishedMediaCacheTests.cs @@ -207,7 +207,7 @@ namespace Umbraco.Tests.Cache.PublishedCache var store = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance()); var doc = store.CreateFromCacheValues(store.ConvertFromSearchResult(result)); - DoAssert(doc, 1234, key, templateIdVal: null, 0, "/media/test.jpg", "Image", 23, "Shannon", "Shannon", 0, 0, "-1,1234", DateTime.Parse("2012-07-17T10:34:09"), DateTime.Parse("2012-07-16T10:34:09"), 2); + DoAssert(doc, 1234, key, null, 0, "/media/test.jpg", "Image", 23, "Shannon", "Shannon", 0, 0, "-1,1234", DateTime.Parse("2012-07-17T10:34:09"), DateTime.Parse("2012-07-16T10:34:09"), 2); Assert.AreEqual(null, doc.Parent); } @@ -223,7 +223,7 @@ namespace Umbraco.Tests.Cache.PublishedCache var cache = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance()); var doc = cache.CreateFromCacheValues(cache.ConvertFromXPathNavigator(navigator, true)); - DoAssert(doc, 2000, key, templateIdVal: null, 2, "image1", "Image", 23, "Shannon", "Shannon", 33, 33, "-1,2000", DateTime.Parse("2012-06-12T14:13:17"), DateTime.Parse("2012-07-20T18:50:43"), 1); + DoAssert(doc, 2000, key, null, 2, "image1", "Image", 23, "Shannon", "Shannon", 33, 33, "-1,2000", DateTime.Parse("2012-06-12T14:13:17"), DateTime.Parse("2012-07-20T18:50:43"), 1); Assert.AreEqual(null, doc.Parent); Assert.AreEqual(2, doc.Children.Count()); Assert.AreEqual(2001, doc.Children.ElementAt(0).Id); From d5c6e0c6e7fa9a85af51f1e99b99c9ccd114a2d5 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 21 Jan 2019 09:10:08 +0100 Subject: [PATCH 175/437] - Saving paramters --- src/Umbraco.Core/Collections/ObservableDictionary.cs | 12 ++++++++++++ src/Umbraco.Web/Editors/MacrosController.cs | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Collections/ObservableDictionary.cs b/src/Umbraco.Core/Collections/ObservableDictionary.cs index 6518533476..40269aa4eb 100644 --- a/src/Umbraco.Core/Collections/ObservableDictionary.cs +++ b/src/Umbraco.Core/Collections/ObservableDictionary.cs @@ -125,6 +125,18 @@ namespace Umbraco.Core.Collections } + public void ReplaceAll(IEnumerable values) + { + if (values == null) throw new ArgumentNullException(nameof(values)); + + Clear(); + + foreach (var value in values) + { + Add(value); + } + } + public bool Remove(TKey key) { if (!Indecies.ContainsKey(key)) return false; diff --git a/src/Umbraco.Web/Editors/MacrosController.cs b/src/Umbraco.Web/Editors/MacrosController.cs index 933de89635..5ff2f7bf34 100644 --- a/src/Umbraco.Web/Editors/MacrosController.cs +++ b/src/Umbraco.Web/Editors/MacrosController.cs @@ -149,6 +149,7 @@ macro.UseInEditor = macroDisplay.UseInEditor; macro.MacroSource = macroDisplay.View; macro.MacroType = MacroTypes.PartialView; + macro.Properties.ReplaceAll(macroDisplay.Parameters.Select((x,i) => new MacroProperty(x.Key, x.Label, i, x.Editor))); try { @@ -218,7 +219,7 @@ } /// - /// Finds all the macro partials + /// Finds all the macro partials /// /// /// The . From 3fd8c6354275115405528f9a1261be7376b92c88 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 21 Jan 2019 09:10:39 +0100 Subject: [PATCH 176/437] - Show Ids - Hide "Render in rich text editor and the grid" if "Use in rich text editor and the grid" is false --- .../src/views/macros/views/settings.html | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 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 ba5b324837..59ccf2bc7e 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,8 +1,17 @@  + + + + {{model.macro.id}}
+ {{model.macro.key}} +
+
+
+ - @@ -13,9 +22,9 @@ - - - + + + From 60d86354f391067606dfe3080edf7a1cd2f22c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Mon, 21 Jan 2019 09:46:00 +0100 Subject: [PATCH 177/437] Media Picker adjustments --- src/Umbraco.Web.UI.Client/src/less/main.less | 3 +- .../src/less/property-editors.less | 41 +++++++++++++++---- .../src/less/variables.less | 3 +- .../mediapicker/mediapicker.html | 2 +- 4 files changed, 38 insertions(+), 11 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/main.less b/src/Umbraco.Web.UI.Client/src/less/main.less index 12a13e11ed..43bc87ed0f 100644 --- a/src/Umbraco.Web.UI.Client/src/less/main.less +++ b/src/Umbraco.Web.UI.Client/src/less/main.less @@ -120,7 +120,7 @@ h5.-black { margin: 20px; } .umb-control-group { - border-bottom: 1px solid @gray-10; + border-bottom: 1px solid @gray-11; padding-bottom: 20px; margin-bottom: 15px !important; } @@ -671,4 +671,3 @@ input[type=checkbox]:checked + .input-label--small { width: 1px !important; overflow: hidden; } - diff --git a/src/Umbraco.Web.UI.Client/src/less/property-editors.less b/src/Umbraco.Web.UI.Client/src/less/property-editors.less index e6d3ab90e4..210178e0a6 100644 --- a/src/Umbraco.Web.UI.Client/src/less/property-editors.less +++ b/src/Umbraco.Web.UI.Client/src/less/property-editors.less @@ -4,9 +4,12 @@ // Container styles // -------------------------------------------------- .umb-property-editor { - - width: 100%; - max-width: 800px; + @media (max-width: 800px) { + width: 100%; + } + @media (min-width: 800px) { + min-width:66.6%; + } &-pull { float:left; @@ -227,6 +230,18 @@ // // Media picker // -------------------------------------------------- + +.umb-mediapicker > div { + border: 1px solid @inputBorder; +} +.umb-mediapicker-single > div { + width:144px; +} +.umb-mediapicker-multi > div { + width:100%; +} + + .umb-mediapicker .add-link { display: flex; justify-content:center; @@ -327,19 +342,28 @@ justify-content: center; align-items: center; flex-wrap: wrap; - padding: 2px; + padding: 5px; margin: 5px; background: @white; - border: 1px solid @gray-10; + //border: 1px solid @gray-10; max-width: 100%; } +.umb-mediapicker { + + .umb-sortable-thumbnails li { + border:none; + } + +} + .umb-mediapicker .umb-sortable-thumbnails li { flex-direction: column; - margin: 0 0 5px 5px; - padding: 5px; } +/*.umb-mediapicker .umb-sortable-thumbnails li.add-wrapper { + padding: 0px; +}*/ .umb-sortable-thumbnails li:hover a { display: flex; @@ -442,6 +466,9 @@ align-items: center; margin-left: 5px; text-decoration: none; + + //border-color: @inputBorder; + .box-shadow(0 1px 2px rgba(0,0,0,0.25)); } .umb-sortable-thumbnails .umb-sortable-thumbnails__action.-red { diff --git a/src/Umbraco.Web.UI.Client/src/less/variables.less b/src/Umbraco.Web.UI.Client/src/less/variables.less index 97d33096e6..c9cd0f701c 100644 --- a/src/Umbraco.Web.UI.Client/src/less/variables.less +++ b/src/Umbraco.Web.UI.Client/src/less/variables.less @@ -88,6 +88,7 @@ @gray-8: #D8D7D9; @gray-9: #E9E9EB; @gray-10: #F3F3F5; +@gray-11: #F6F6F7; // Additional Icon Colours @@ -518,4 +519,4 @@ // SORTABLE // -------------------------------------------------- @sortableHelperBg: @turquoise-l2; -@sortablePlaceholderBg : @turquoise; \ No newline at end of file +@sortablePlaceholderBg : @turquoise; 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 4e85668c05..d2b923b17c 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,4 +1,4 @@ -
+

From 2744afab001214c71eac37daa15a6273e05a02df Mon Sep 17 00:00:00 2001 From: Matthew-Wise Date: Mon, 21 Jan 2019 08:49:00 +0000 Subject: [PATCH 178/437] Disable LastPass on page heading (#4153) --- .../util/noPasswordManager.directive.js | 24 +++++++++++++++++++ .../components/editor/umb-editor-header.html | 4 +++- .../views/components/umb-locked-field.html | 1 + 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 src/Umbraco.Web.UI.Client/src/common/directives/util/noPasswordManager.directive.js diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/util/noPasswordManager.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/util/noPasswordManager.directive.js new file mode 100644 index 0000000000..190c504aa6 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/directives/util/noPasswordManager.directive.js @@ -0,0 +1,24 @@ +/** +* @ngdoc directive +* @name umbraco.directives.directive:no-password-manager +* @attribte +* @function +* @description +* Added attributes to block password manager elements should as LastPass + +* @example +* +* +* +* +* +**/ +angular.module("umbraco.directives") + .directive('noPasswordManager', function () { + return { + restrict: 'A', + link: function (scope, element, attrs) { + element.attr("data-lpignore", "true"); + } + } + }); diff --git a/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-header.html b/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-header.html index 3754b66c53..25925f42ed 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-header.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-header.html @@ -23,7 +23,8 @@
- {{ name }}
Date: Mon, 21 Jan 2019 10:44:11 +0100 Subject: [PATCH 179/437] Delete macros --- .../src/common/resources/macro.resource.js | 6 ++++ .../src/views/macros/delete.html | 10 ++++++ .../views/macros/macros.delete.controller.js | 32 +++++++++++++++++++ src/Umbraco.Web/Editors/MacrosController.cs | 16 ++++++++++ src/Umbraco.Web/Trees/MacrosTreeController.cs | 13 ++------ 5 files changed, 66 insertions(+), 11 deletions(-) create mode 100644 src/Umbraco.Web.UI.Client/src/views/macros/delete.html create mode 100644 src/Umbraco.Web.UI.Client/src/views/macros/macros.delete.controller.js diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js index a5d960a9ec..73a1651b5e 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js @@ -115,6 +115,12 @@ function macroResource($q, $http, umbRequestHelper) { return umbRequestHelper.resourcePromise( $http.post(umbRequestHelper.getApiUrl("macroApiBaseUrl", "Save"), macro) ); + }, + + deleteById: function(id) { + return umbRequestHelper.resourcePromise( + $http.post(umbRequestHelper.getApiUrl("macroApiBaseUrl", "deleteById", { "id": id })) + ); } }; } diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/delete.html b/src/Umbraco.Web.UI.Client/src/views/macros/delete.html new file mode 100644 index 0000000000..2d097e110b --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/macros/delete.html @@ -0,0 +1,10 @@ +
+
+ +

+ Are you sure you want to delete {{vm.name}} ? +

+ + +
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/macros.delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/macros/macros.delete.controller.js new file mode 100644 index 0000000000..1aadef9f31 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/macros/macros.delete.controller.js @@ -0,0 +1,32 @@ +/** + * @ngdoc controller + * @name Umbraco.Editors.Macros.DeleteController + * @function + * + * @description + * The controller for deleting macro items + */ +function MacrosDeleteController($scope, $location, macroResource, navigationService, treeService) { + var vm = this; + + vm.name = $scope.currentNode.name; + function performDelete() { + $scope.currentNode.loading = true; + macroResource.deleteById($scope.currentNode.id).then(function () { + $scope.currentNode.loading = false; + + treeService.removeNode($scope.currentNode); + + navigationService.hideMenu(); + }); + } + + function cancel() { + navigationService.hideDialog(); + } + + vm.performDelete = performDelete; + vm.cancel = cancel; +} + +angular.module("umbraco").controller("Umbraco.Editors.Macros.DeleteController", MacrosDeleteController); diff --git a/src/Umbraco.Web/Editors/MacrosController.cs b/src/Umbraco.Web/Editors/MacrosController.cs index 5ff2f7bf34..4c198ea6b3 100644 --- a/src/Umbraco.Web/Editors/MacrosController.cs +++ b/src/Umbraco.Web/Editors/MacrosController.cs @@ -115,6 +115,22 @@ return this.Request.CreateResponse(HttpStatusCode.OK, macroDisplay); } + + [HttpPost] + public HttpResponseMessage DeleteById(int id) + { + var macro = this.Services.MacroService.GetById(id); + + if (macro == null) + { + return this.ReturnErrorResponse($"Macro with id {id} does not exist"); + } + + this.Services.MacroService.Delete(macro); + + return Request.CreateResponse(HttpStatusCode.OK); + } + [HttpPost] public HttpResponseMessage Save(MacroDisplay macroDisplay) { diff --git a/src/Umbraco.Web/Trees/MacrosTreeController.cs b/src/Umbraco.Web/Trees/MacrosTreeController.cs index cdbe4bfcf7..0300dbd6c6 100644 --- a/src/Umbraco.Web/Trees/MacrosTreeController.cs +++ b/src/Umbraco.Web/Trees/MacrosTreeController.cs @@ -54,7 +54,7 @@ namespace Umbraco.Web.Trees { //Create the normal create action menu.Items.Add(Services.TextService); - + //refresh action menu.Items.Add(new RefreshNode(Services.TextService, true)); @@ -65,16 +65,7 @@ namespace Umbraco.Web.Trees if (macro == null) return new MenuItemCollection(); //add delete option for all macros - menu.Items.Add(Services.TextService, opensDialog: true) - //Since we haven't implemented anything for macros in angular, this needs to be converted to - //use the legacy format - .ConvertLegacyMenuItem(new EntitySlim - { - Id = macro.Id, - Level = 1, - ParentId = -1, - Name = macro.Name - }, "macros", queryStrings.GetValue("application")); + menu.Items.Add(Services.TextService, opensDialog: true); return menu; } From 57902892f9066d72621d38adcfc3978fc36f4b70 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 21 Jan 2019 10:55:48 +0100 Subject: [PATCH 180/437] Constructor injection --- .../Editors/MacroRenderingController.cs | 18 ++++++++----- src/Umbraco.Web/Editors/MacrosController.cs | 27 ++++++++++++------- 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/src/Umbraco.Web/Editors/MacroRenderingController.cs b/src/Umbraco.Web/Editors/MacroRenderingController.cs index 08ff4ca44b..0b4a78e603 100644 --- a/src/Umbraco.Web/Editors/MacroRenderingController.cs +++ b/src/Umbraco.Web/Editors/MacroRenderingController.cs @@ -15,6 +15,7 @@ using Umbraco.Web.Macros; using Umbraco.Core; using Umbraco.Core.Models; using Umbraco.Core.Models.PublishedContent; +using Umbraco.Core.Services; namespace Umbraco.Web.Editors { @@ -29,11 +30,14 @@ namespace Umbraco.Web.Editors [PluginController("UmbracoApi")] public class MacroRenderingController : UmbracoAuthorizedJsonController, IRequiresSessionState { + private readonly IMacroService _macroService; + private readonly IContentService _contentService; private readonly IVariationContextAccessor _variationContextAccessor; - - public MacroRenderingController(IVariationContextAccessor variationContextAccessor) + public MacroRenderingController(IVariationContextAccessor variationContextAccessor, IMacroService macroService, IContentService contentService) { _variationContextAccessor = variationContextAccessor; + _macroService = macroService; + _contentService = contentService; } /// @@ -41,12 +45,12 @@ namespace Umbraco.Web.Editors /// /// /// - /// Note that ALL logged in users have access to this method because editors will need to isnert macros into rte (content/media/members) and it's used for + /// Note that ALL logged in users have access to this method because editors will need to insert macros into rte (content/media/members) and it's used for /// inserting into templates/views/etc... it doesn't expose any sensitive data. /// public IEnumerable GetMacroParameters(int macroId) { - var macro = Services.MacroService.GetById(macroId); + var macro = _macroService.GetById(macroId); if (macro == null) { throw new HttpResponseException(HttpStatusCode.NotFound); @@ -97,13 +101,13 @@ namespace Umbraco.Web.Editors { // note - here we should be using the cache, provided that the preview content is in the cache... - var doc = Services.ContentService.GetById(pageId); + var doc = _contentService.GetById(pageId); if (doc == null) { throw new HttpResponseException(HttpStatusCode.NotFound); } - var m = Services.MacroService.GetByAlias(macroAlias); + var m = _macroService.GetByAlias(macroAlias); if (m == null) throw new HttpResponseException(HttpStatusCode.NotFound); var macro = new MacroModel(m); @@ -166,7 +170,7 @@ namespace Umbraco.Web.Editors MacroSource = model.VirtualPath.EnsureStartsWith("~") }; - Services.MacroService.Save(macro); // may throw + _macroService.Save(macro); // may throw return new HttpResponseMessage(HttpStatusCode.OK); } diff --git a/src/Umbraco.Web/Editors/MacrosController.cs b/src/Umbraco.Web/Editors/MacrosController.cs index 4c198ea6b3..84cd1911c3 100644 --- a/src/Umbraco.Web/Editors/MacrosController.cs +++ b/src/Umbraco.Web/Editors/MacrosController.cs @@ -1,4 +1,6 @@ -namespace Umbraco.Web.Editors +using Umbraco.Core.Services; + +namespace Umbraco.Web.Editors { using System; using System.Collections.Generic; @@ -28,6 +30,13 @@ [UmbracoTreeAuthorize(Constants.Trees.Macros)] public class MacrosController : BackOfficeNotificationsController { + private readonly IMacroService _macroService; + + public MacrosController(IMacroService macroService) + { + _macroService = macroService; + } + /// /// Creates a new macro /// @@ -47,7 +56,7 @@ var alias = name.ToSafeAlias(); - if (this.Services.MacroService.GetByAlias(alias) != null) + if (_macroService.GetByAlias(alias) != null) { return this.ReturnErrorResponse("Macro with this alias already exists"); } @@ -62,7 +71,7 @@ MacroType = MacroTypes.PartialView }; - this.Services.MacroService.Save(macro, this.Security.CurrentUser.Id); + _macroService.Save(macro, this.Security.CurrentUser.Id); return this.Request.CreateResponse(HttpStatusCode.OK, macro.Id); } @@ -75,7 +84,7 @@ [HttpGet] public HttpResponseMessage GetById(int id) { - var macro = this.Services.MacroService.GetById(id); + var macro = _macroService.GetById(id); if (macro == null) { @@ -119,14 +128,14 @@ [HttpPost] public HttpResponseMessage DeleteById(int id) { - var macro = this.Services.MacroService.GetById(id); + var macro = _macroService.GetById(id); if (macro == null) { return this.ReturnErrorResponse($"Macro with id {id} does not exist"); } - this.Services.MacroService.Delete(macro); + _macroService.Delete(macro); return Request.CreateResponse(HttpStatusCode.OK); } @@ -139,7 +148,7 @@ return this.ReturnErrorResponse($"No macro data found in request"); } - var macro = this.Services.MacroService.GetById(int.Parse(macroDisplay.Id.ToString())); + var macro = _macroService.GetById(int.Parse(macroDisplay.Id.ToString())); if (macro == null) { @@ -148,7 +157,7 @@ if (macroDisplay.Alias != macro.Alias) { - var macroByAlias = this.Services.MacroService.GetByAlias(macroDisplay.Alias); + var macroByAlias = _macroService.GetByAlias(macroDisplay.Alias); if (macroByAlias != null) { @@ -169,7 +178,7 @@ try { - this.Services.MacroService.Save(macro, this.Security.CurrentUser.Id); + _macroService.Save(macro, this.Security.CurrentUser.Id); macroDisplay.Notifications.Clear(); From ba4b84d7f454119ac90d191c2389c5ba8d0438fe Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Mon, 21 Jan 2019 11:09:13 +0100 Subject: [PATCH 181/437] Fixes #4166 - Outgoing connections sometimes fail because they require TLS 1.2 --- src/Umbraco.Web/WebBootManager.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Umbraco.Web/WebBootManager.cs b/src/Umbraco.Web/WebBootManager.cs index 7863033c4b..dbab3d2346 100644 --- a/src/Umbraco.Web/WebBootManager.cs +++ b/src/Umbraco.Web/WebBootManager.cs @@ -4,6 +4,7 @@ using System.Collections.Specialized; using System.Configuration; using System.IO; using System.Linq; +using System.Net; using System.Web; using System.Web.Configuration; using System.Web.Http; @@ -130,6 +131,10 @@ namespace Umbraco.Web InstallHelper insHelper = new InstallHelper(UmbracoContext.Current); insHelper.DeleteLegacyInstaller(); + // Tell .net 4.5 that we also want to try connecting over TLS 1.2, not just 1.1 + if (ServicePointManager.SecurityProtocol.HasFlag(SecurityProtocolType.Tls12) == false) + ServicePointManager.SecurityProtocol = ServicePointManager.SecurityProtocol | SecurityProtocolType.Tls12; + return this; } From 1d39c177ccefd5e9b2f6989bd66cddc73bf3f827 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Mon, 21 Jan 2019 11:48:55 +0000 Subject: [PATCH 182/437] Adds in private method EnsureFileExists as it was removed from IOHelper --- .../Logging/Viewer/LogViewerSourceBase.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs index 59994a64a6..5ac6353dfb 100644 --- a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs +++ b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs @@ -32,7 +32,7 @@ namespace Umbraco.Core.Logging.Viewer //Our default implementation //If file does not exist - lets create it with an empty array - IOHelper.EnsureFileExists(_searchesConfigPath, "[]"); + EnsureFileExists(_searchesConfigPath, "[]"); var rawJson = System.IO.File.ReadAllText(_searchesConfigPath); return JsonConvert.DeserializeObject>(rawJson); @@ -50,7 +50,7 @@ namespace Umbraco.Core.Logging.Viewer var rawJson = JsonConvert.SerializeObject(searches, Formatting.Indented); //If file does not exist - lets create it with an empty array - IOHelper.EnsureFileExists(_searchesConfigPath, "[]"); + EnsureFileExists(_searchesConfigPath, "[]"); //Write it back down to file System.IO.File.WriteAllText(_searchesConfigPath, rawJson); @@ -163,6 +163,15 @@ namespace Umbraco.Core.Logging.Viewer }; } - + private void EnsureFileExists(string path, string contents) + { + var absolutePath = IOHelper.MapPath(path); + if (System.IO.File.Exists(absolutePath)) return; + + using (var writer = System.IO.File.CreateText(absolutePath)) + { + writer.Write(contents); + } + } } } From dd29deec6a4e676c197c40d9bc35c6e5f6744211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Mon, 21 Jan 2019 13:30:49 +0100 Subject: [PATCH 183/437] =?UTF-8?q?V8=20Gulp=20=E2=80=94=20only=20run=20im?= =?UTF-8?q?agemin=20in=20production=20mode.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gulp/tasks/dependencies.js | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/gulp/tasks/dependencies.js b/src/Umbraco.Web.UI.Client/gulp/tasks/dependencies.js index 8032274ee7..e9ada635e5 100644 --- a/src/Umbraco.Web.UI.Client/gulp/tasks/dependencies.js +++ b/src/Umbraco.Web.UI.Client/gulp/tasks/dependencies.js @@ -251,21 +251,24 @@ gulp.task('dependencies', function () { //Copies all static assets into /root / assets folder //css, fonts and image files - stream.add( - gulp.src(config.sources.globs.assets) - .pipe(imagemin([ - imagemin.gifsicle({interlaced: true}), - imagemin.jpegtran({progressive: true}), - imagemin.optipng({optimizationLevel: 5}), - imagemin.svgo({ - plugins: [ - {removeViewBox: true}, - {cleanupIDs: false} - ] - }) - ])) - .pipe(gulp.dest(config.root + config.targets.assets)) - ); + + var assetsTask = gulp.src(config.sources.globs.assets); + if (global.isProd === true) { + assetsTask = assetsTask.pipe(imagemin([ + imagemin.gifsicle({interlaced: true}), + imagemin.jpegtran({progressive: true}), + imagemin.optipng({optimizationLevel: 5}), + imagemin.svgo({ + plugins: [ + {removeViewBox: true}, + {cleanupIDs: false} + ] + }) + ])); + } + assetsTask = assetsTask.pipe(gulp.dest(config.root + config.targets.assets)); + + stream.add(assetsTask); // Copies all the less files related to the preview into their folder //these are not pre-processed as preview has its own less combiler client side From 9407c85d71203e8989e99a74cee839abee9a8869 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Mon, 21 Jan 2019 12:40:19 +0000 Subject: [PATCH 184/437] Remove TreesAndSection tests (must have been a funky merge gone wrong) --- src/Umbraco.Tests/Umbraco.Tests.csproj | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Umbraco.Tests/Umbraco.Tests.csproj b/src/Umbraco.Tests/Umbraco.Tests.csproj index e235949982..11f5527a8c 100644 --- a/src/Umbraco.Tests/Umbraco.Tests.csproj +++ b/src/Umbraco.Tests/Umbraco.Tests.csproj @@ -515,8 +515,6 @@ Designer Always - - Always From 4a0b969777eb24f80269ff4d9197299b18d74538 Mon Sep 17 00:00:00 2001 From: Stephan Date: Mon, 21 Jan 2019 15:39:19 +0100 Subject: [PATCH 185/437] Deal with fixme in Umbraco.Core --- src/Umbraco.Core/Cache/AppCaches.cs | 2 +- src/Umbraco.Core/Cache/CacheKeys.cs | 4 +- src/Umbraco.Core/Cache/DictionaryAppCache.cs | 3 +- src/Umbraco.Core/Cache/HttpRequestAppCache.cs | 2 +- src/Umbraco.Core/Cache/IAppPolicyCache.cs | 2 - src/Umbraco.Core/Composing/Current.cs | 2 +- src/Umbraco.Core/Composing/Lifetime.cs | 2 +- src/Umbraco.Core/Composing/TypeHelper.cs | 3 - .../Configuration/GlobalSettings.cs | 5 +- .../Configuration/Grid/GridEditorsConfig.cs | 2 +- .../Configuration/IGlobalSettings.cs | 11 - .../Configuration/UmbracoVersion.cs | 2 +- src/Umbraco.Core/ContentExtensions.cs | 2 +- src/Umbraco.Core/Deploy/IPreValueConnector.cs | 2 +- src/Umbraco.Core/Events/DeleteEventArgs.cs | 4 +- .../Events/QueuingEventDispatcher.cs | 2 +- .../Events/QueuingEventDispatcherBase.cs | 6 +- .../Events/ScopeLifetimeMessagesFactory.cs | 60 ----- src/Umbraco.Core/IO/FileSystems.cs | 2 +- src/Umbraco.Core/IO/PhysicalFileSystem.cs | 2 +- src/Umbraco.Core/IO/SystemDirectories.cs | 1 - src/Umbraco.Core/IO/SystemFiles.cs | 3 - .../ExpressionBuilderBaseOfNext.cs | 2 - .../Migrations/IMigrationExpression.cs | 2 +- .../Install/DatabaseSchemaResult.cs | 2 +- .../Upgrade/V_8_0_0/AddVariationTables1A.cs | 2 - .../Upgrade/V_8_0_0/AddVariationTables2.cs | 2 - src/Umbraco.Core/Models/ContentBase.cs | 4 +- src/Umbraco.Core/Models/ContentTypeBase.cs | 2 +- .../Models/Entities/EntitySlim.cs | 2 - .../Models/Entities/TreeEntityBase.cs | 5 +- src/Umbraco.Core/Models/GridValue.cs | 4 +- src/Umbraco.Core/Models/IContent.cs | 2 +- src/Umbraco.Core/Models/IContentBase.cs | 2 - .../Models/IContentTypeComposition.cs | 2 +- .../Models/Identity/BackOfficeIdentityUser.cs | 4 +- src/Umbraco.Core/Models/MediaExtensions.cs | 2 +- src/Umbraco.Core/Models/Membership/User.cs | 2 +- .../Models/Packaging/CompiledPackage.cs | 16 +- src/Umbraco.Core/Models/Property.cs | 4 +- src/Umbraco.Core/Models/PropertyCollection.cs | 2 +- .../Models/PropertyGroupCollection.cs | 2 +- .../Models/PropertyTagsExtensions.cs | 2 +- src/Umbraco.Core/Models/PropertyType.cs | 6 +- .../Models/PropertyTypeCollection.cs | 4 +- .../PublishedContent/IPublishedContent.cs | 2 +- .../PublishedContentEnumerable.cs | 64 ------ .../PublishedContent/PublishedContentType.cs | 6 +- .../PublishedContent/PublishedPropertyType.cs | 2 +- .../Persistence/Constants-DatabaseSchema.cs | 10 +- .../Dtos/ContentVersionCultureVariationDto.cs | 4 +- .../Persistence/Dtos/ContentVersionDto.cs | 6 +- .../Persistence/Dtos/DataTypeDto.cs | 2 +- src/Umbraco.Core/Persistence/Dtos/NodeDto.cs | 4 +- .../Persistence/Dtos/User2UserGroupDto.cs | 18 -- .../Factories/ContentBaseFactory.cs | 12 +- src/Umbraco.Core/Persistence/LocalDb.cs | 4 +- .../Persistence/Mappers/UserTypeMapper.cs | 28 --- .../NPocoDatabaseExtensions-Bulk.cs | 4 +- .../Persistence/NPocoDatabaseExtensions.cs | 2 +- .../Persistence/NPocoSqlExtensions.cs | 2 +- .../Querying/ExpressionVisitorBase.cs | 3 +- .../Implement/ContentRepositoryBase.cs | 217 +----------------- .../Implement/ContentTypeRepository.cs | 1 - .../Implement/ContentTypeRepositoryBase.cs | 4 +- .../Implement/DataTypeRepository.cs | 2 +- .../Implement/DocumentRepository.cs | 25 +- .../Implement/EntityRepository.cs | 18 +- .../Repositories/Implement/MediaRepository.cs | 11 +- .../Implement/MemberRepository.cs | 16 +- .../Implement/NPocoRepositoryBase.cs | 2 +- .../Implement/RepositoryBaseOfTIdTEntity.cs | 2 +- .../Implement/ServerRegistrationRepository.cs | 2 +- .../Repositories/Implement/UserRepository.cs | 6 +- src/Umbraco.Core/Persistence/SqlTemplate.cs | 1 - .../Persistence/UmbracoDatabase.cs | 4 +- .../Persistence/UmbracoDatabaseFactory.cs | 7 +- src/Umbraco.Core/Properties/AssemblyInfo.cs | 2 - .../PropertyEditors/DataEditor.cs | 4 +- .../PropertyEditors/DataValueEditor.cs | 44 +--- .../PropertyEditors/IDataEditor.cs | 2 +- .../PropertyEditors/IDataValueEditor.cs | 6 +- .../ManifestValueValidatorCollection.cs | 2 +- .../PropertyValueConverterBase.cs | 1 - .../TagsPropertyEditorAttribute.cs | 2 +- .../ValueConverters/ImageCropperValue.cs | 3 +- .../ValueConverters/SliderValueConverter.cs | 2 +- .../Runtime/CoreRuntimeComposer.cs | 2 +- .../Scoping/RepositoryCacheMode.cs | 1 - src/Umbraco.Core/Scoping/Scope.cs | 21 +- src/Umbraco.Core/Scoping/ScopeContext.cs | 5 +- src/Umbraco.Core/Services/IContentService.cs | 2 +- src/Umbraco.Core/Services/IEntityService.cs | 2 +- .../Services/IEntityXmlSerializer.cs | 2 +- .../Services/Implement/ContentService.cs | 21 +- ...peServiceBaseOfTRepositoryTItemTService.cs | 2 +- .../Services/Implement/DataTypeService.cs | 8 +- .../Services/Implement/EntityService.cs | 2 +- .../Services/Implement/EntityXmlSerializer.cs | 2 +- .../Services/Implement/FileService.cs | 2 +- .../Services/Implement/MediaService.cs | 2 +- .../Services/Implement/MemberGroupService.cs | 13 -- .../Services/Implement/MemberService.cs | 5 +- .../Services/Implement/NotificationService.cs | 2 +- .../Services/Implement/RelationService.cs | 2 +- .../Implement/ScopeRepositoryService.cs | 2 +- .../Services/Implement/UserService.cs | 4 +- src/Umbraco.Core/Services/OperationResult.cs | 4 +- .../Services/OperationResultType.cs | 2 +- .../Services/PublishResultType.cs | 2 +- .../Strings/Utf8ToAsciiConverter.cs | 2 +- src/Umbraco.Core/Sync/ApplicationUrlHelper.cs | 2 +- .../Sync/DatabaseServerMessenger.cs | 2 +- src/Umbraco.Core/Umbraco.Core.csproj | 3 - 114 files changed, 186 insertions(+), 693 deletions(-) delete mode 100644 src/Umbraco.Core/Events/ScopeLifetimeMessagesFactory.cs delete mode 100644 src/Umbraco.Core/Models/PublishedContent/PublishedContentEnumerable.cs delete mode 100644 src/Umbraco.Core/Persistence/Mappers/UserTypeMapper.cs diff --git a/src/Umbraco.Core/Cache/AppCaches.cs b/src/Umbraco.Core/Cache/AppCaches.cs index e8bc49605a..fbfc4c8c82 100644 --- a/src/Umbraco.Core/Cache/AppCaches.cs +++ b/src/Umbraco.Core/Cache/AppCaches.cs @@ -61,7 +61,7 @@ namespace Umbraco.Core.Cache /// /// /// The per-request caches works on top of the current HttpContext items. - /// fixme - what about non-web applications? + /// Outside a web environment, the behavior of that cache is unspecified. /// public IAppCache RequestCache { get; } diff --git a/src/Umbraco.Core/Cache/CacheKeys.cs b/src/Umbraco.Core/Cache/CacheKeys.cs index f358c0f881..50bd4ca0ac 100644 --- a/src/Umbraco.Core/Cache/CacheKeys.cs +++ b/src/Umbraco.Core/Cache/CacheKeys.cs @@ -5,10 +5,10 @@ /// public static class CacheKeys { - public const string ApplicationTreeCacheKey = "ApplicationTreeCache"; // used by ApplicationTreeService public const string ApplicationsCacheKey = "ApplicationCache"; // used by SectionService - public const string TemplateFrontEndCacheKey = "template"; // fixme usage? + // TODO this one can probably be removed + public const string TemplateFrontEndCacheKey = "template"; public const string MacroContentCacheKey = "macroContent_"; // used in MacroRenderers } diff --git a/src/Umbraco.Core/Cache/DictionaryAppCache.cs b/src/Umbraco.Core/Cache/DictionaryAppCache.cs index 4c08bd0524..8889630ff0 100644 --- a/src/Umbraco.Core/Cache/DictionaryAppCache.cs +++ b/src/Umbraco.Core/Cache/DictionaryAppCache.cs @@ -18,8 +18,7 @@ namespace Umbraco.Core.Cache /// public virtual object Get(string key) { - // fixme throws if non-existing, shouldn't it return null? - return Items[key]; + return Items.TryGetValue(key, out var value) ? value : null; } /// diff --git a/src/Umbraco.Core/Cache/HttpRequestAppCache.cs b/src/Umbraco.Core/Cache/HttpRequestAppCache.cs index dcb2621d75..a255fea133 100644 --- a/src/Umbraco.Core/Cache/HttpRequestAppCache.cs +++ b/src/Umbraco.Core/Cache/HttpRequestAppCache.cs @@ -31,7 +31,7 @@ namespace Umbraco.Core.Cache /// /// /// Will use HttpContext.Current. - /// fixme - should use IHttpContextAccessor + /// fixme/task: use IHttpContextAccessor NOT HttpContext.Current /// public HttpRequestAppCache() { } diff --git a/src/Umbraco.Core/Cache/IAppPolicyCache.cs b/src/Umbraco.Core/Cache/IAppPolicyCache.cs index 90b0ccb9fd..dd162b990d 100644 --- a/src/Umbraco.Core/Cache/IAppPolicyCache.cs +++ b/src/Umbraco.Core/Cache/IAppPolicyCache.cs @@ -1,8 +1,6 @@ using System; using System.Web.Caching; -// fixme should this be/support non-web? - namespace Umbraco.Core.Cache { /// diff --git a/src/Umbraco.Core/Composing/Current.cs b/src/Umbraco.Core/Composing/Current.cs index 429fee3317..12672bcc9a 100644 --- a/src/Umbraco.Core/Composing/Current.cs +++ b/src/Umbraco.Core/Composing/Current.cs @@ -29,7 +29,7 @@ namespace Umbraco.Core.Composing { private static IFactory _factory; - // fixme - refactor + // TODO: get rid of these oddities // we don't want Umbraco tests to die because the container has not been properly initialized, // for some too-important things such as IShortStringHelper or loggers, so if it's not // registered we setup a default one. We should really refactor our tests so that it does diff --git a/src/Umbraco.Core/Composing/Lifetime.cs b/src/Umbraco.Core/Composing/Lifetime.cs index e1b9950c39..a35d4d9ecf 100644 --- a/src/Umbraco.Core/Composing/Lifetime.cs +++ b/src/Umbraco.Core/Composing/Lifetime.cs @@ -15,7 +15,7 @@ /// /// One unique instance per request. /// - // fixme - not what you think! + // TODO - review lifetimes for LightInject vs other containers // currently, corresponds to 'Request' in LightInject which is 'Transient + disposed by Scope' // but NOT (in LightInject) a per-web-request lifetime, more a TransientScoped // diff --git a/src/Umbraco.Core/Composing/TypeHelper.cs b/src/Umbraco.Core/Composing/TypeHelper.cs index 1ab48b71f8..999d8d15f4 100644 --- a/src/Umbraco.Core/Composing/TypeHelper.cs +++ b/src/Umbraco.Core/Composing/TypeHelper.cs @@ -25,9 +25,6 @@ namespace Umbraco.Core.Composing /// Based on a type we'll check if it is IEnumerable{T} (or similar) and if so we'll return a List{T}, this will also deal with array types and return List{T} for those too. /// If it cannot be done, null is returned. /// - /// - /// - // fixme wtf is this and do we need it in v8? internal static IList CreateGenericEnumerableFromObject(object obj) { var type = obj.GetType(); diff --git a/src/Umbraco.Core/Configuration/GlobalSettings.cs b/src/Umbraco.Core/Configuration/GlobalSettings.cs index c00ab795d2..4b449decff 100644 --- a/src/Umbraco.Core/Configuration/GlobalSettings.cs +++ b/src/Umbraco.Core/Configuration/GlobalSettings.cs @@ -16,7 +16,8 @@ using Umbraco.Core.Security; namespace Umbraco.Core.Configuration { - //TODO: Replace checking for if the app settings exist and returning an empty string, instead return the defaults! + // TODO: Replace checking for if the app settings exist and returning an empty string, instead return the defaults! + // TODO: need to massively cleanup these configuration classes /// /// The GlobalSettings Class contains general settings information for the entire Umbraco instance based on information from web.config appsettings @@ -54,7 +55,6 @@ namespace Umbraco.Core.Configuration ResetInternal(); } - //fixme should this go on the interface or some other helper? public static bool HasSmtpServerConfigured(string appPath) { if (HasSmtpServer.HasValue) return HasSmtpServer.Value; @@ -221,7 +221,6 @@ namespace Umbraco.Core.Configuration /// Gets a value indicating whether umbraco is running in [debug mode]. /// /// true if [debug mode]; otherwise, false. - //fixme surely thsi doesn't belong here and it's also a web request context thing public static bool DebugMode { get diff --git a/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs b/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs index e2f99a753b..2862a98a0e 100644 --- a/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs +++ b/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs @@ -31,7 +31,7 @@ namespace Umbraco.Core.Configuration.Grid { List GetResult() { - // fixme - should use the common one somehow! + ignoring _appPlugins here! + // TODO should use the common one somehow! + ignoring _appPlugins here! var parser = new ManifestParser(_appCaches, Current.ManifestValidators, _logger); var editors = new List(); diff --git a/src/Umbraco.Core/Configuration/IGlobalSettings.cs b/src/Umbraco.Core/Configuration/IGlobalSettings.cs index a043f608f4..157103be9e 100644 --- a/src/Umbraco.Core/Configuration/IGlobalSettings.cs +++ b/src/Umbraco.Core/Configuration/IGlobalSettings.cs @@ -19,17 +19,6 @@ namespace Umbraco.Core.Configuration /// The reserved paths. string ReservedPaths { get; } - /// - /// Gets the name of the content XML file. - /// - /// The content XML. - /// - /// Defaults to ~/App_Data/umbraco.config - /// - //fixme - remove - [Obsolete("This should not be used, need to remove the content xml cache")] - string ContentXmlFile { get; } - /// /// Gets the path to umbraco's root directory (/umbraco by default). /// diff --git a/src/Umbraco.Core/Configuration/UmbracoVersion.cs b/src/Umbraco.Core/Configuration/UmbracoVersion.cs index 73df566a0f..05cb64325c 100644 --- a/src/Umbraco.Core/Configuration/UmbracoVersion.cs +++ b/src/Umbraco.Core/Configuration/UmbracoVersion.cs @@ -81,7 +81,7 @@ namespace Umbraco.Core.Configuration { try { - // fixme - this should live in its own independent file! NOT web.config! + // fixme/task - stop having version in web.config appSettings var value = ConfigurationManager.AppSettings["umbracoConfigurationStatus"]; return value.IsNullOrWhiteSpace() ? null : SemVersion.TryParse(value, out var semver) ? semver : null; } diff --git a/src/Umbraco.Core/ContentExtensions.cs b/src/Umbraco.Core/ContentExtensions.cs index 8c27c23604..dce97ed0e3 100644 --- a/src/Umbraco.Core/ContentExtensions.cs +++ b/src/Umbraco.Core/ContentExtensions.cs @@ -183,7 +183,7 @@ namespace Umbraco.Core // get a safe & clean filename filename = IOHelper.SafeFileName(filename); if (string.IsNullOrWhiteSpace(filename)) return; - filename = filename.ToLower(); // fixme - er... why? + filename = filename.ToLower(); SetUploadFile(content, propertyTypeAlias, filename, filestream, culture, segment); } diff --git a/src/Umbraco.Core/Deploy/IPreValueConnector.cs b/src/Umbraco.Core/Deploy/IPreValueConnector.cs index 15f9a9e619..2a8f4e622d 100644 --- a/src/Umbraco.Core/Deploy/IPreValueConnector.cs +++ b/src/Umbraco.Core/Deploy/IPreValueConnector.cs @@ -7,7 +7,7 @@ namespace Umbraco.Core.Deploy /// /// PreValues may contain values such as content identifiers, that would be local /// to one environment, and need to be converted in order to be deployed. - public interface IPreValueConnector // fixme this needs to change really + public interface IPreValueConnector // fixme/task: rename to IDataTypeConfigurationConnector + kill all "preValues" name usage { /// /// Gets the property editor aliases that the value converter supports by default. diff --git a/src/Umbraco.Core/Events/DeleteEventArgs.cs b/src/Umbraco.Core/Events/DeleteEventArgs.cs index 03f5c40ef8..07bbe562db 100644 --- a/src/Umbraco.Core/Events/DeleteEventArgs.cs +++ b/src/Umbraco.Core/Events/DeleteEventArgs.cs @@ -99,8 +99,8 @@ namespace Umbraco.Core.Events /// public IEnumerable DeletedEntities { - get { return EventObject; } - internal set { EventObject = value; } // fixme ouch! + get => EventObject; + internal set => EventObject = value; } /// diff --git a/src/Umbraco.Core/Events/QueuingEventDispatcher.cs b/src/Umbraco.Core/Events/QueuingEventDispatcher.cs index b31b64e435..164b452f2c 100644 --- a/src/Umbraco.Core/Events/QueuingEventDispatcher.cs +++ b/src/Umbraco.Core/Events/QueuingEventDispatcher.cs @@ -34,7 +34,7 @@ namespace Umbraco.Core.Events private IMediaFileSystem _mediaFileSystem; - // fixme inject + // todo: inject private IMediaFileSystem MediaFileSystem => _mediaFileSystem ?? (_mediaFileSystem = Current.MediaFileSystem); } } diff --git a/src/Umbraco.Core/Events/QueuingEventDispatcherBase.cs b/src/Umbraco.Core/Events/QueuingEventDispatcherBase.cs index 4c38c0b2ec..8a4df686ee 100644 --- a/src/Umbraco.Core/Events/QueuingEventDispatcherBase.cs +++ b/src/Umbraco.Core/Events/QueuingEventDispatcherBase.cs @@ -109,7 +109,6 @@ namespace Umbraco.Core.Events public Type[] SupersedeTypes { get; set; } } - // fixme // this is way too convoluted, the superceede attribute is used only on DeleteEventargs to specify // that it superceeds save, publish, move and copy - BUT - publish event args is also used for // unpublishing and should NOT be superceeded - so really it should not be managed at event args @@ -305,7 +304,6 @@ namespace Umbraco.Core.Events if (superceeding.Length == 0) return false; - // fixme see notes above // delete event args does NOT superceedes 'unpublished' event if (argType.IsGenericType && argType.GetGenericTypeDefinition() == typeof(PublishEventArgs<>) && infos.EventDefinition.EventName == "Unpublished") return false; @@ -317,9 +315,9 @@ namespace Umbraco.Core.Events var supercededBy = superceeding.FirstOrDefault(x => x.Item2.SupersedeTypes.Any(y => // superceeding a generic type which has the same generic type definition - // fixme no matter the generic type parameters? could be different? + // (but ... no matter the generic type parameters? could be different?) y.IsGenericTypeDefinition && y == argType.GetGenericTypeDefinition() - // or superceeding a non-generic type which is ... fixme how is this ever possible? argType *is* generic? + // or superceeding a non-generic type which is ... (but... how is this ever possible? argType *is* generic?) || y.IsGenericTypeDefinition == false && y == argType)); return supercededBy != null; } diff --git a/src/Umbraco.Core/Events/ScopeLifetimeMessagesFactory.cs b/src/Umbraco.Core/Events/ScopeLifetimeMessagesFactory.cs deleted file mode 100644 index 476789a30e..0000000000 --- a/src/Umbraco.Core/Events/ScopeLifetimeMessagesFactory.cs +++ /dev/null @@ -1,60 +0,0 @@ -// fixme - remove this file -//using System; -//using Umbraco.Core.Scoping; - -//namespace Umbraco.Core.Events -//{ -// /// -// /// Stores the instance of EventMessages in the current scope. -// /// -// internal class ScopeLifetimeMessagesFactory : IEventMessagesFactory -// { -// public const string ContextKey = "Umbraco.Core.Events.ScopeLifetimeMessagesFactory"; - -// // fixme for v8 that one will need to be entirely and massively refactored - -// private readonly IHttpContextAccessor _contextAccessor; -// private readonly IScopeProviderInternal _scopeProvider; - -// public static ScopeLifetimeMessagesFactory Current { get; private set; } - -// public ScopeLifetimeMessagesFactory(IHttpContextAccessor contextAccesor, IScopeProvider scopeProvider) -// { -// if (scopeProvider == null) throw new ArgumentNullException(nameof(scopeProvider)); -// if (scopeProvider is IScopeProviderInternal == false) throw new ArgumentException("Not IScopeProviderInternal.", nameof(scopeProvider)); -// _contextAccessor = contextAccesor ?? throw new ArgumentNullException(nameof(contextAccesor)); -// _scopeProvider = (IScopeProviderInternal) scopeProvider; -// Current = this; -// } - -// public EventMessages Get() -// { -// var messages = GetFromHttpContext(); -// if (messages != null) return messages; - -// var scope = _scopeProvider.GetAmbientOrNoScope(); -// return scope.Messages; -// } - -// public EventMessages GetFromHttpContext() -// { -// if (_contextAccessor == null || _contextAccessor.Value == null) return null; -// return (EventMessages)_contextAccessor.Value.Items[ContextKey]; -// } - -// public EventMessages TryGet() -// { -// var messages = GetFromHttpContext(); -// if (messages != null) return messages; - -// var scope = _scopeProvider.AmbientScope; -// return scope?.MessagesOrNull; -// } - -// public void Set(EventMessages messages) -// { -// if (_contextAccessor.Value == null) return; -// _contextAccessor.Value.Items[ContextKey] = messages; -// } -// } -//} diff --git a/src/Umbraco.Core/IO/FileSystems.cs b/src/Umbraco.Core/IO/FileSystems.cs index 63a1259acb..38cb7df824 100644 --- a/src/Umbraco.Core/IO/FileSystems.cs +++ b/src/Umbraco.Core/IO/FileSystems.cs @@ -132,7 +132,7 @@ namespace Umbraco.Core.IO _scriptsFileSystem = new ShadowWrapper(scriptsFileSystem, "scripts", IsScoped); _mvcViewsFileSystem = new ShadowWrapper(mvcViewsFileSystem, "Views", IsScoped); - // fixme locking? + // todo - do we need a lock here? _shadowWrappers.Add(_macroPartialFileSystem); _shadowWrappers.Add(_partialViewsFileSystem); _shadowWrappers.Add(_stylesheetsFileSystem); diff --git a/src/Umbraco.Core/IO/PhysicalFileSystem.cs b/src/Umbraco.Core/IO/PhysicalFileSystem.cs index 217ecb51b4..80f4c57ee3 100644 --- a/src/Umbraco.Core/IO/PhysicalFileSystem.cs +++ b/src/Umbraco.Core/IO/PhysicalFileSystem.cs @@ -153,7 +153,7 @@ namespace Umbraco.Core.IO if (directory == null) throw new InvalidOperationException("Could not get directory."); Directory.CreateDirectory(directory); // ensure it exists - if (stream.CanSeek) // fixme - what else? + if (stream.CanSeek) // todo - what if we cannot? stream.Seek(0, 0); using (var destination = (Stream) File.Create(fullPath)) diff --git a/src/Umbraco.Core/IO/SystemDirectories.cs b/src/Umbraco.Core/IO/SystemDirectories.cs index 8bea82ea4a..5bbf325c8c 100644 --- a/src/Umbraco.Core/IO/SystemDirectories.cs +++ b/src/Umbraco.Core/IO/SystemDirectories.cs @@ -36,7 +36,6 @@ namespace Umbraco.Core.IO public static string Umbraco => IOHelper.ReturnPath("umbracoPath", "~/umbraco"); - //fixme: remove this [Obsolete("Usercontrols are obsolete and code should be removed")] public static string UserControls => "~/usercontrols"; diff --git a/src/Umbraco.Core/IO/SystemFiles.cs b/src/Umbraco.Core/IO/SystemFiles.cs index 9a8e679229..511c39c98b 100644 --- a/src/Umbraco.Core/IO/SystemFiles.cs +++ b/src/Umbraco.Core/IO/SystemFiles.cs @@ -11,13 +11,10 @@ namespace Umbraco.Core.IO public static string TinyMceConfig => SystemDirectories.Config + "/tinyMceConfig.config"; - public static string DashboardConfig => SystemDirectories.Config + "/dashboard.config"; - public static string NotFoundhandlersConfig => SystemDirectories.Config + "/404handlers.config"; public static string FeedProxyConfig => string.Concat(SystemDirectories.Config, "/feedProxy.config"); - // fixme - kill public static string GetContentCacheXml(IGlobalSettings globalSettings) { switch (globalSettings.LocalTempStorageLocation) diff --git a/src/Umbraco.Core/Migrations/Expressions/ExpressionBuilderBaseOfNext.cs b/src/Umbraco.Core/Migrations/Expressions/ExpressionBuilderBaseOfNext.cs index 91cf471b0a..b9b3458bb4 100644 --- a/src/Umbraco.Core/Migrations/Expressions/ExpressionBuilderBaseOfNext.cs +++ b/src/Umbraco.Core/Migrations/Expressions/ExpressionBuilderBaseOfNext.cs @@ -17,8 +17,6 @@ namespace Umbraco.Core.Migrations.Expressions : base(expression) { } - // FIXME WTF is this and what is TNext here?! - public abstract ColumnDefinition GetColumnForType(); private ColumnDefinition Column => GetColumnForType(); diff --git a/src/Umbraco.Core/Migrations/IMigrationExpression.cs b/src/Umbraco.Core/Migrations/IMigrationExpression.cs index 8f950ab301..81063bd2da 100644 --- a/src/Umbraco.Core/Migrations/IMigrationExpression.cs +++ b/src/Umbraco.Core/Migrations/IMigrationExpression.cs @@ -5,7 +5,7 @@ /// public interface IMigrationExpression { - string Process(IMigrationContext context); // fixme kill + string Process(IMigrationContext context); // todo: remove that one? void Execute(); } } diff --git a/src/Umbraco.Core/Migrations/Install/DatabaseSchemaResult.cs b/src/Umbraco.Core/Migrations/Install/DatabaseSchemaResult.cs index 4c68addebc..aa404ef90f 100644 --- a/src/Umbraco.Core/Migrations/Install/DatabaseSchemaResult.cs +++ b/src/Umbraco.Core/Migrations/Install/DatabaseSchemaResult.cs @@ -31,7 +31,7 @@ namespace Umbraco.Core.Migrations.Install public List TableDefinitions { get; } - // fixme TableDefinitions are those that should be there, IndexDefinitions are those that... are in DB? + // todo what are these exactly? TableDefinitions are those that should be there, IndexDefinitions are those that... are in DB? internal List IndexDefinitions { get; } public List ValidTables { get; } diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddVariationTables1A.cs b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddVariationTables1A.cs index 96e82d281d..34648d402a 100644 --- a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddVariationTables1A.cs +++ b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddVariationTables1A.cs @@ -40,8 +40,6 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 AlterColumn(Constants.DatabaseSchema.Tables.ContentVersionCultureVariation, "languageId"); Create.Table().Do(); - - // fixme - data migration? } } } diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddVariationTables2.cs b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddVariationTables2.cs index 5b6c913195..c6cad2eac1 100644 --- a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddVariationTables2.cs +++ b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddVariationTables2.cs @@ -13,8 +13,6 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 { Create.Table().Do(); Create.Table().Do(); - - // fixme - data migration? } } } diff --git a/src/Umbraco.Core/Models/ContentBase.cs b/src/Umbraco.Core/Models/ContentBase.cs index b0c786d4b0..2128dc9d78 100644 --- a/src/Umbraco.Core/Models/ContentBase.cs +++ b/src/Umbraco.Core/Models/ContentBase.cs @@ -128,14 +128,14 @@ namespace Umbraco.Core.Models /// /// Gets the enumeration of property groups for the entity. - /// fixme is a proxy, kill this + /// todo - remove this proxy method /// [IgnoreDataMember] public IEnumerable PropertyGroups => ContentTypeBase.CompositionPropertyGroups; /// /// Gets the numeration of property types for the entity. - /// fixme is a proxy, kill this + /// todo - remove this proxy method /// [IgnoreDataMember] public IEnumerable PropertyTypes => ContentTypeBase.CompositionPropertyTypes; diff --git a/src/Umbraco.Core/Models/ContentTypeBase.cs b/src/Umbraco.Core/Models/ContentTypeBase.cs index b6ea9f50a0..dadc3870b0 100644 --- a/src/Umbraco.Core/Models/ContentTypeBase.cs +++ b/src/Umbraco.Core/Models/ContentTypeBase.cs @@ -431,7 +431,7 @@ namespace Umbraco.Core.Models /// PropertyTypes that are not part of a PropertyGroup /// [IgnoreDataMember] - //fixme should we mark this as EditorBrowsable hidden since it really isn't ever used? + //todo should we mark this as EditorBrowsable hidden since it really isn't ever used? internal PropertyTypeCollection PropertyTypeCollection => _noGroupPropertyTypes; /// diff --git a/src/Umbraco.Core/Models/Entities/EntitySlim.cs b/src/Umbraco.Core/Models/Entities/EntitySlim.cs index 30f64e8da5..3b8f997602 100644 --- a/src/Umbraco.Core/Models/Entities/EntitySlim.cs +++ b/src/Umbraco.Core/Models/Entities/EntitySlim.cs @@ -6,8 +6,6 @@ using Umbraco.Core.Exceptions; namespace Umbraco.Core.Models.Entities { - // fixme - changing the name of some properties that were in additionalData => must update corresponding javascript? - /// /// Implementation of for internal use. /// diff --git a/src/Umbraco.Core/Models/Entities/TreeEntityBase.cs b/src/Umbraco.Core/Models/Entities/TreeEntityBase.cs index 18e53a8a04..60e06c4977 100644 --- a/src/Umbraco.Core/Models/Entities/TreeEntityBase.cs +++ b/src/Umbraco.Core/Models/Entities/TreeEntityBase.cs @@ -33,9 +33,6 @@ namespace Umbraco.Core.Models.Entities public readonly PropertyInfo Trashed = ExpressionHelper.GetPropertyInfo(x => x.Trashed); } - // fixme - // ParentId, Path, Level and Trashed all should be consistent, and all derive from parentId, really - /// [DataMember] public string Name @@ -121,4 +118,4 @@ namespace Umbraco.Core.Models.Entities set => SetPropertyValueAndDetectChanges(value, ref _trashed, Selectors.Trashed); } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/Models/GridValue.cs b/src/Umbraco.Core/Models/GridValue.cs index 237385f3f4..c4a8b85b00 100644 --- a/src/Umbraco.Core/Models/GridValue.cs +++ b/src/Umbraco.Core/Models/GridValue.cs @@ -21,7 +21,7 @@ namespace Umbraco.Core.Models public class GridSection { [JsonProperty("grid")] - public string Grid { get; set; } //fixme: what is this? + public string Grid { get; set; } //todo: what is this? [JsonProperty("rows")] public IEnumerable Rows { get; set; } @@ -48,7 +48,7 @@ namespace Umbraco.Core.Models public class GridArea { [JsonProperty("grid")] - public string Grid { get; set; } //fixme: what is this? + public string Grid { get; set; } //todo: what is this? [JsonProperty("controls")] public IEnumerable Controls { get; set; } diff --git a/src/Umbraco.Core/Models/IContent.cs b/src/Umbraco.Core/Models/IContent.cs index 056602f007..b3b4e03783 100644 --- a/src/Umbraco.Core/Models/IContent.cs +++ b/src/Umbraco.Core/Models/IContent.cs @@ -137,7 +137,7 @@ namespace Umbraco.Core.Models /// IEnumerable EditedCultures { get; } - // fixme - these two should move to some kind of service + // todo - these two should move to some kind of service /// /// Changes the for the current content object diff --git a/src/Umbraco.Core/Models/IContentBase.cs b/src/Umbraco.Core/Models/IContentBase.cs index fb3714cfc0..40a1c57097 100644 --- a/src/Umbraco.Core/Models/IContentBase.cs +++ b/src/Umbraco.Core/Models/IContentBase.cs @@ -137,8 +137,6 @@ namespace Umbraco.Core.Models /// void CopyFrom(IContent other, string culture = "*"); - // fixme validate published cultures? - /// /// Validates the content item's properties pass variant rules /// diff --git a/src/Umbraco.Core/Models/IContentTypeComposition.cs b/src/Umbraco.Core/Models/IContentTypeComposition.cs index 36ace19f0f..3113f795cd 100644 --- a/src/Umbraco.Core/Models/IContentTypeComposition.cs +++ b/src/Umbraco.Core/Models/IContentTypeComposition.cs @@ -10,7 +10,7 @@ namespace Umbraco.Core.Models /// /// Gets or sets the content types that compose this content type. /// - //fixme: we should be storing key references, not the object else we are caching way too much + //todo: we should be storing key references, not the object else we are caching way too much IEnumerable ContentTypeComposition { get; set; } /// diff --git a/src/Umbraco.Core/Models/Identity/BackOfficeIdentityUser.cs b/src/Umbraco.Core/Models/Identity/BackOfficeIdentityUser.cs index dcf86a0b42..13a13e9dff 100644 --- a/src/Umbraco.Core/Models/Identity/BackOfficeIdentityUser.cs +++ b/src/Umbraco.Core/Models/Identity/BackOfficeIdentityUser.cs @@ -67,7 +67,7 @@ namespace Umbraco.Core.Models.Identity _startContentIds = new int[] { }; _groups = new IReadOnlyUserGroup[] { }; _allowedSections = new string[] { }; - _culture = Current.Configs.Global().DefaultUILanguage; //fixme inject somehow? + _culture = Current.Configs.Global().DefaultUILanguage; //todo inject _groups = new IReadOnlyUserGroup[0]; _roles = new ObservableCollection>(); _roles.CollectionChanged += _roles_CollectionChanged; @@ -84,7 +84,7 @@ namespace Umbraco.Core.Models.Identity _startContentIds = new int[] { }; _groups = new IReadOnlyUserGroup[] { }; _allowedSections = new string[] { }; - _culture = Current.Configs.Global().DefaultUILanguage; //fixme inject somehow? + _culture = Current.Configs.Global().DefaultUILanguage; //todo inject _groups = groups.ToArray(); _roles = new ObservableCollection>(_groups.Select(x => new IdentityUserRole { diff --git a/src/Umbraco.Core/Models/MediaExtensions.cs b/src/Umbraco.Core/Models/MediaExtensions.cs index f510377c09..5cc4cc8fe5 100644 --- a/src/Umbraco.Core/Models/MediaExtensions.cs +++ b/src/Umbraco.Core/Models/MediaExtensions.cs @@ -21,7 +21,7 @@ namespace Umbraco.Core.Models var val = media.Properties[propertyType]; if (val == null) return string.Empty; - //fixme doesn't take into account variants + //todo would need to be adjusted to variations, when media become variants var jsonString = val.GetValue() as string; if (jsonString == null) return string.Empty; diff --git a/src/Umbraco.Core/Models/Membership/User.cs b/src/Umbraco.Core/Models/Membership/User.cs index 650aa6cb29..942c71f0c6 100644 --- a/src/Umbraco.Core/Models/Membership/User.cs +++ b/src/Umbraco.Core/Models/Membership/User.cs @@ -27,7 +27,7 @@ namespace Umbraco.Core.Models.Membership { SessionTimeout = 60; _userGroups = new HashSet(); - _language = Current.Configs.Global().DefaultUILanguage; //fixme inject somehow? + _language = Current.Configs.Global().DefaultUILanguage; //todo inject _isApproved = true; _isLockedOut = false; _startContentIds = new int[] { }; diff --git a/src/Umbraco.Core/Models/Packaging/CompiledPackage.cs b/src/Umbraco.Core/Models/Packaging/CompiledPackage.cs index f14fe47bfe..ac460ca34c 100644 --- a/src/Umbraco.Core/Models/Packaging/CompiledPackage.cs +++ b/src/Umbraco.Core/Models/Packaging/CompiledPackage.cs @@ -26,19 +26,19 @@ namespace Umbraco.Core.Models.Packaging public string PackageView { get; set; } public string IconUrl { get; set; } - public string Actions { get; set; } //fixme: Should we make this strongly typed to IEnumerable ? + public string Actions { get; set; } //todo: Should we make this strongly typed to IEnumerable ? public PreInstallWarnings Warnings { get; set; } = new PreInstallWarnings(); public List Files { get; set; } = new List(); - public IEnumerable Macros { get; set; } //fixme: make strongly typed - public IEnumerable Templates { get; set; } //fixme: make strongly typed - public IEnumerable Stylesheets { get; set; } //fixme: make strongly typed - public IEnumerable DataTypes { get; set; } //fixme: make strongly typed - public IEnumerable Languages { get; set; } //fixme: make strongly typed - public IEnumerable DictionaryItems { get; set; } //fixme: make strongly typed - public IEnumerable DocumentTypes { get; set; } //fixme: make strongly typed + public IEnumerable Macros { get; set; } //todo: make strongly typed + public IEnumerable Templates { get; set; } //todo: make strongly typed + public IEnumerable Stylesheets { get; set; } //todo: make strongly typed + public IEnumerable DataTypes { get; set; } //todo: make strongly typed + public IEnumerable Languages { get; set; } //todo: make strongly typed + public IEnumerable DictionaryItems { get; set; } //todo: make strongly typed + public IEnumerable DocumentTypes { get; set; } //todo: make strongly typed public IEnumerable Documents { get; set; } } } diff --git a/src/Umbraco.Core/Models/Property.cs b/src/Umbraco.Core/Models/Property.cs index 0c71544111..5e45475dd2 100644 --- a/src/Umbraco.Core/Models/Property.cs +++ b/src/Umbraco.Core/Models/Property.cs @@ -347,7 +347,7 @@ namespace Umbraco.Core.Models /// internal bool IsValid(string culture = "*", string segment = "*") { - //fixme - validating values shouldn't be done here, this calls in to IsValidValue + //todo - validating values shouldn't be done here, this calls in to IsValidValue culture = culture.NullOrWhiteSpaceAsNull(); segment = segment.NullOrWhiteSpaceAsNull(); @@ -388,7 +388,7 @@ namespace Umbraco.Core.Models /// True is property value is valid, otherwise false private bool IsValidValue(object value) { - //fixme this shouldn't exist here, the model itself shouldn't be responsible for it's own validation and this requires singleton access + //todo - this shouldn't exist here, the model itself shouldn't be responsible for it's own validation and this requires singleton access return PropertyType.IsPropertyValueValid(value); } diff --git a/src/Umbraco.Core/Models/PropertyCollection.cs b/src/Umbraco.Core/Models/PropertyCollection.cs index fe2c34f042..ef56ce4a4c 100644 --- a/src/Umbraco.Core/Models/PropertyCollection.cs +++ b/src/Umbraco.Core/Models/PropertyCollection.cs @@ -97,7 +97,7 @@ namespace Umbraco.Core.Models /// internal new void Add(Property property) { - lock (_addLocker) // fixme - why are we locking here and not everywhere else?! + lock (_addLocker) // todo - why are we locking here and not everywhere else?! { var key = GetKeyForItem(property); if (key != null) diff --git a/src/Umbraco.Core/Models/PropertyGroupCollection.cs b/src/Umbraco.Core/Models/PropertyGroupCollection.cs index c5768c66db..8b493e3118 100644 --- a/src/Umbraco.Core/Models/PropertyGroupCollection.cs +++ b/src/Umbraco.Core/Models/PropertyGroupCollection.cs @@ -19,7 +19,7 @@ namespace Umbraco.Core.Models { private readonly ReaderWriterLockSlim _addLocker = new ReaderWriterLockSlim(); - //fixme: this doesn't seem to be used anywhere + //todo: this doesn't seem to be used anywhere internal Action OnAdd; internal PropertyGroupCollection() diff --git a/src/Umbraco.Core/Models/PropertyTagsExtensions.cs b/src/Umbraco.Core/Models/PropertyTagsExtensions.cs index 39172fff34..c0dcddc6ae 100644 --- a/src/Umbraco.Core/Models/PropertyTagsExtensions.cs +++ b/src/Umbraco.Core/Models/PropertyTagsExtensions.cs @@ -14,7 +14,7 @@ namespace Umbraco.Core.Models /// public static class PropertyTagsExtensions { - // fixme inject? + // todo: inject private static PropertyEditorCollection PropertyEditors => Current.PropertyEditors; private static IDataTypeService DataTypeService => Current.Services.DataTypeService; diff --git a/src/Umbraco.Core/Models/PropertyType.cs b/src/Umbraco.Core/Models/PropertyType.cs index d44e7d464f..6373dbec9a 100644 --- a/src/Umbraco.Core/Models/PropertyType.cs +++ b/src/Umbraco.Core/Models/PropertyType.cs @@ -378,14 +378,14 @@ namespace Umbraco.Core.Models } - //fixme - this and other value validation methods should be a service level (not a model) thing. Changing this to internal for now + //todo - this and other value validation methods should be a service level (not a model) thing. Changing this to internal for now /// /// Determines whether a value is valid for this property type. /// internal bool IsPropertyValueValid(object value) { - var editor = Current.PropertyEditors[_propertyEditorAlias]; // fixme inject? - var configuration = Current.Services.DataTypeService.GetDataType(_dataTypeId).Configuration; // fixme inject? + var editor = Current.PropertyEditors[_propertyEditorAlias]; // todo inject + var configuration = Current.Services.DataTypeService.GetDataType(_dataTypeId).Configuration; // todo inject var valueEditor = editor.GetValueEditor(configuration); return !valueEditor.Validate(value, Mandatory, ValidationRegExp).Any(); } diff --git a/src/Umbraco.Core/Models/PropertyTypeCollection.cs b/src/Umbraco.Core/Models/PropertyTypeCollection.cs index 6053a6a5bf..6753ee7532 100644 --- a/src/Umbraco.Core/Models/PropertyTypeCollection.cs +++ b/src/Umbraco.Core/Models/PropertyTypeCollection.cs @@ -19,7 +19,7 @@ namespace Umbraco.Core.Models [IgnoreDataMember] private readonly ReaderWriterLockSlim _addLocker = new ReaderWriterLockSlim(); - //fixme: This doesn't seem to be used + //todo: This doesn't seem to be used [IgnoreDataMember] internal Action OnAdd; @@ -81,7 +81,7 @@ namespace Umbraco.Core.Models { item.IsPublishing = IsPublishing; - // fixme redo this entirely!!! + // todo this is not pretty and should be refactored try { _addLocker.EnterWriteLock(); diff --git a/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs b/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs index 4e1ce7ddd7..c5fa0330f2 100644 --- a/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs +++ b/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs @@ -153,7 +153,7 @@ namespace Umbraco.Core.Models.PublishedContent /// bool IsDraft(string culture = null); - // fixme - consider having an IsPublished flag too + // fixme/task - consider having an IsPublished flag too // so that when IsDraft is true, we can check whether there is a published version? #endregion diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedContentEnumerable.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedContentEnumerable.cs deleted file mode 100644 index dc17265bb9..0000000000 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedContentEnumerable.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; - -namespace Umbraco.Core.Models.PublishedContent -{ - // fixme imported from 7.6 needs better explaination of what it is - - /// - /// The published content enumerable, this model is to allow ToString to be overriden for value converters to support legacy requests for string values - /// - public class PublishedContentEnumerable : IEnumerable - { - /// - /// The items in the collection - /// - private readonly IEnumerable _items; - - /// - /// Initializes a new instance of the class. - /// - /// - /// The published content items - /// - public PublishedContentEnumerable(IEnumerable publishedContent) - { - _items = publishedContent ?? throw new ArgumentNullException(nameof(publishedContent)); - } - - /// - /// The ToString method to convert the objects back to CSV - /// - /// - /// The . - /// - public override string ToString() - { - return string.Join(",", _items.Select(x => x.Id)); - } - - /// - /// The get enumerator. - /// - /// - /// The . - /// - public IEnumerator GetEnumerator() - { - return _items.GetEnumerator(); - } - - /// - /// The get enumerator. - /// - /// - /// The . - /// - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - } -} diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs index f1937c1c0c..1d168aad1d 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs @@ -85,7 +85,7 @@ namespace Umbraco.Core.Models.PublishedContent } } - // fixme - this list somehow also exists in constants, see memberTypeRepository => remove duplicate! + // todo - this list somehow also exists in constants, see memberTypeRepository => remove duplicate! private static readonly Dictionary BuiltinMemberProperties = new Dictionary { { "Email", (Constants.DataTypes.Textbox, Constants.PropertyEditors.Aliases.TextBox) }, @@ -147,7 +147,7 @@ namespace Umbraco.Core.Models.PublishedContent return -1; } - // virtual for unit tests - fixme explain + // virtual for unit tests - todo explain why /// /// Gets a property type. /// @@ -157,7 +157,7 @@ namespace Umbraco.Core.Models.PublishedContent return GetPropertyType(index); } - // virtual for unit tests - fixme explain + // virtual for unit tests - todo explain why /// /// Gets a property type. /// diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs index e019f9a5d1..1a99076b2c 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs @@ -12,7 +12,7 @@ namespace Umbraco.Core.Models.PublishedContent /// if the property type changes, then a new class needs to be created. public class PublishedPropertyType { - //fixme - API design review, should this be an interface? + //todo - API design review, should this be an interface? private readonly IPublishedModelFactory _publishedModelFactory; private readonly PropertyValueConverterCollection _propertyValueConverters; diff --git a/src/Umbraco.Core/Persistence/Constants-DatabaseSchema.cs b/src/Umbraco.Core/Persistence/Constants-DatabaseSchema.cs index 9eb4c3f90f..bfbde592b5 100644 --- a/src/Umbraco.Core/Persistence/Constants-DatabaseSchema.cs +++ b/src/Umbraco.Core/Persistence/Constants-DatabaseSchema.cs @@ -14,13 +14,13 @@ namespace Umbraco.Core public const string Node = /*TableNamePrefix*/ "umbraco" + "Node"; public const string NodeData = /*TableNamePrefix*/ "cms" + "ContentNu"; - public const string NodeXml = /*TableNamePrefix*/ "cms" + "ContentXml"; - public const string NodePreviewXml = /*TableNamePrefix*/ "cms" + "PreviewXml"; // fixme dbfix kill merge with ContentXml + public const string NodeXml = /*TableNamePrefix*/ "cms" + "ContentXml"; // todo get rid of these with the xml cache + public const string NodePreviewXml = /*TableNamePrefix*/ "cms" + "PreviewXml"; // todo get rid of these with the xml cache - public const string ContentType = /*TableNamePrefix*/ "cms" + "ContentType"; // fixme dbfix rename and split uElementType, uDocumentType + public const string ContentType = /*TableNamePrefix*/ "cms" + "ContentType"; public const string ContentChildType = /*TableNamePrefix*/ "cms" + "ContentTypeAllowedContentType"; - public const string DocumentType = /*TableNamePrefix*/ "cms" + "DocumentType"; // fixme dbfix must rename corresponding DTO - public const string ElementTypeTree = /*TableNamePrefix*/ "cms" + "ContentType2ContentType"; // fixme dbfix why can't we just use uNode for this? + public const string DocumentType = /*TableNamePrefix*/ "cms" + "DocumentType"; + public const string ElementTypeTree = /*TableNamePrefix*/ "cms" + "ContentType2ContentType"; public const string DataType = TableNamePrefix + "DataType"; public const string Template = /*TableNamePrefix*/ "cms" + "Template"; diff --git a/src/Umbraco.Core/Persistence/Dtos/ContentVersionCultureVariationDto.cs b/src/Umbraco.Core/Persistence/Dtos/ContentVersionCultureVariationDto.cs index 1dca820a6c..ada26358dc 100644 --- a/src/Umbraco.Core/Persistence/Dtos/ContentVersionCultureVariationDto.cs +++ b/src/Umbraco.Core/Persistence/Dtos/ContentVersionCultureVariationDto.cs @@ -33,10 +33,10 @@ namespace Umbraco.Core.Persistence.Dtos [Column("name")] public string Name { get; set; } - [Column("date")] // fixme: db rename to 'updateDate' + [Column("date")] // todo: db rename to 'updateDate' public DateTime UpdateDate { get; set; } - [Column("availableUserId")] // fixme: db rename to 'updateDate' + [Column("availableUserId")] // todo: db rename to 'updateDate' [ForeignKey(typeof(UserDto))] [NullSetting(NullSetting = NullSettings.Null)] public int? UpdateUserId { get => _updateUserId == 0 ? null : _updateUserId; set => _updateUserId = value; } //return null if zero diff --git a/src/Umbraco.Core/Persistence/Dtos/ContentVersionDto.cs b/src/Umbraco.Core/Persistence/Dtos/ContentVersionDto.cs index a13bf921d9..287e812211 100644 --- a/src/Umbraco.Core/Persistence/Dtos/ContentVersionDto.cs +++ b/src/Umbraco.Core/Persistence/Dtos/ContentVersionDto.cs @@ -21,16 +21,16 @@ namespace Umbraco.Core.Persistence.Dtos [ForeignKey(typeof(ContentDto))] public int NodeId { get; set; } - [Column("versionDate")] // fixme: db rename to 'updateDate' + [Column("versionDate")] // todo: db rename to 'updateDate' [Constraint(Default = SystemMethods.CurrentDateTime)] public DateTime VersionDate { get; set; } - [Column("userId")] // fixme: db rename to 'updateUserId' + [Column("userId")] // todo: db rename to 'updateUserId' [ForeignKey(typeof(UserDto))] [NullSetting(NullSetting = NullSettings.Null)] public int? UserId { get => _userId == 0 ? null : _userId; set => _userId = value; } //return null if zero - //fixme - we need an index on this it is used almost always in querying and sorting + //todo - we need an index on this it is used almost always in querying and sorting [Column("current")] public bool Current { get; set; } diff --git a/src/Umbraco.Core/Persistence/Dtos/DataTypeDto.cs b/src/Umbraco.Core/Persistence/Dtos/DataTypeDto.cs index cc51ab19ee..a0e526b62e 100644 --- a/src/Umbraco.Core/Persistence/Dtos/DataTypeDto.cs +++ b/src/Umbraco.Core/Persistence/Dtos/DataTypeDto.cs @@ -14,7 +14,7 @@ namespace Umbraco.Core.Persistence.Dtos public int NodeId { get; set; } [Column("propertyEditorAlias")] - public string EditorAlias { get; set; } // fixme - length?! + public string EditorAlias { get; set; } // todo should this have a length [Column("dbType")] [Length(50)] diff --git a/src/Umbraco.Core/Persistence/Dtos/NodeDto.cs b/src/Umbraco.Core/Persistence/Dtos/NodeDto.cs index 56da821360..8f50891b34 100644 --- a/src/Umbraco.Core/Persistence/Dtos/NodeDto.cs +++ b/src/Umbraco.Core/Persistence/Dtos/NodeDto.cs @@ -45,7 +45,7 @@ namespace Umbraco.Core.Persistence.Dtos [Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_Trashed")] public bool Trashed { get; set; } - [Column("nodeUser")] // fixme: db rename to 'createUserId' + [Column("nodeUser")] // todo: db rename to 'createUserId' [ForeignKey(typeof(UserDto))] [NullSetting(NullSetting = NullSettings.Null)] public int? UserId { get => _userId == 0 ? null : _userId; set => _userId = value; } //return null if zero @@ -54,7 +54,7 @@ namespace Umbraco.Core.Persistence.Dtos [NullSetting(NullSetting = NullSettings.Null)] public string Text { get; set; } - [Column("nodeObjectType")] // fixme: db rename to 'objectType' + [Column("nodeObjectType")] // todo: db rename to 'objectType' [NullSetting(NullSetting = NullSettings.Null)] [Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_ObjectType")] public Guid? NodeObjectType { get; set; } diff --git a/src/Umbraco.Core/Persistence/Dtos/User2UserGroupDto.cs b/src/Umbraco.Core/Persistence/Dtos/User2UserGroupDto.cs index 6705153ffb..dabac9dabf 100644 --- a/src/Umbraco.Core/Persistence/Dtos/User2UserGroupDto.cs +++ b/src/Umbraco.Core/Persistence/Dtos/User2UserGroupDto.cs @@ -16,22 +16,4 @@ namespace Umbraco.Core.Persistence.Dtos [ForeignKey(typeof(UserGroupDto))] public int UserGroupId { get; set; } } - - [TableName(Constants.DatabaseSchema.Tables.User2UserGroup)] - [ExplicitColumns] - internal class User2UserGroupReadOnlyDto - { - [Column("userId")] - [PrimaryKeyColumn(AutoIncrement = false, Name = "PK_user2userGroup", OnColumns = "userId, userGroupId")] - [ForeignKey(typeof(UserDto))] - public int UserId { get; set; } - - [Column("userGroupId")] - [ForeignKey(typeof(UserGroupDto))] - public int UserGroupId { get; set; } - - [ResultColumn] - [Reference(ReferenceType.Foreign)] // fixme - public UserGroupDto UserGroupDto { get; set; } - } } diff --git a/src/Umbraco.Core/Persistence/Factories/ContentBaseFactory.cs b/src/Umbraco.Core/Persistence/Factories/ContentBaseFactory.cs index 7fe1d44921..7548574735 100644 --- a/src/Umbraco.Core/Persistence/Factories/ContentBaseFactory.cs +++ b/src/Umbraco.Core/Persistence/Factories/ContentBaseFactory.cs @@ -49,7 +49,7 @@ namespace Umbraco.Core.Persistence.Factories content.Published = dto.Published; content.Edited = dto.Edited; - // fixme - shall we get published infos or not? + // todo - shall we get published infos or not? //if (dto.Published) if (publishedVersionDto != null) { @@ -89,7 +89,7 @@ namespace Umbraco.Core.Persistence.Factories content.Key = nodeDto.UniqueId; content.VersionId = contentVersionDto.Id; - // fixme missing names? + // todo missing names? content.Path = nodeDto.Path; content.Level = nodeDto.Level; @@ -130,7 +130,7 @@ namespace Umbraco.Core.Persistence.Factories content.Key = nodeDto.UniqueId; content.VersionId = contentVersionDto.Id; - // fixme missing names? + // todo missing names? content.Path = nodeDto.Path; content.Level = nodeDto.Level; @@ -294,7 +294,7 @@ namespace Umbraco.Core.Persistence.Factories private static MediaVersionDto BuildMediaVersionDto(IMedia entity, ContentDto contentDto) { // try to get a path from the string being stored for media - // fixme - only considering umbracoFile ?! + // todo - only considering umbracoFile TryMatch(entity.GetValue("umbracoFile"), out var path); @@ -309,11 +309,11 @@ namespace Umbraco.Core.Persistence.Factories return dto; } - // fixme - this should NOT be here?! + // todo - this should NOT be here?! // more dark magic ;-( internal static bool TryMatch(string text, out string path) { - //fixme: In v8 we should allow exposing this via the property editor in a much nicer way so that the property editor + // In v8 we should allow exposing this via the property editor in a much nicer way so that the property editor // can tell us directly what any URL is for a given property if it contains an asset path = null; diff --git a/src/Umbraco.Core/Persistence/LocalDb.cs b/src/Umbraco.Core/Persistence/LocalDb.cs index 6eb9cbc443..11fa52fa48 100644 --- a/src/Umbraco.Core/Persistence/LocalDb.cs +++ b/src/Umbraco.Core/Persistence/LocalDb.cs @@ -317,8 +317,8 @@ namespace Umbraco.Core.Persistence if (dbname == "master" || dbname == "tempdb" || dbname == "model" || dbname == "msdb") continue; - // fixme - shall we deal with stale databases? - // fixme - is it always ok to assume file names? + // todo - shall we deal with stale databases? + // todo - is it always ok to assume file names? //var mdf = database.Value; //var ldf = mdf.Replace(".mdf", "_log.ldf"); //if (staleOnly && File.Exists(mdf) && File.Exists(ldf)) diff --git a/src/Umbraco.Core/Persistence/Mappers/UserTypeMapper.cs b/src/Umbraco.Core/Persistence/Mappers/UserTypeMapper.cs deleted file mode 100644 index 40fce123b7..0000000000 --- a/src/Umbraco.Core/Persistence/Mappers/UserTypeMapper.cs +++ /dev/null @@ -1,28 +0,0 @@ -//using System.Collections.Concurrent; -//using Umbraco.Core.Models.Membership; -//using Umbraco.Core.Models.Rdbms; - -//namespace Umbraco.Core.Persistence.Mappers -//{ -// /// -// /// Represents a to DTO mapper used to translate the properties of the public api -// /// implementation to that of the database's DTO as sql: [tableName].[columnName]. -// /// -// [MapperFor(typeof(IUserType))] -// [MapperFor(typeof(UserType))] -// public sealed class UserTypeMapper : BaseMapper -// { -// private static readonly ConcurrentDictionary PropertyInfoCacheInstance = new ConcurrentDictionary(); - -// internal override ConcurrentDictionary PropertyInfoCache => PropertyInfoCacheInstance; - -// protected override void BuildMap() -// { -// CacheMap(src => src.Id, dto => dto.Id); -// CacheMap(src => src.Alias, dto => dto.Alias); -// CacheMap(src => src.Name, dto => dto.Name); -// CacheMap(src => src.Permissions, dto => dto.DefaultPermissions); -// } -// } -//} -// fixme remoev this file diff --git a/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions-Bulk.cs b/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions-Bulk.cs index 77b412ef2b..b844aff72d 100644 --- a/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions-Bulk.cs +++ b/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions-Bulk.cs @@ -181,8 +181,8 @@ namespace Umbraco.Core.Persistence using (var command = database.CreateCommand(database.Connection, CommandType.TableDirect, string.Empty)) { command.CommandText = pocoData.TableInfo.TableName; - command.CommandType = CommandType.TableDirect; // fixme - why repeat? - // fixme - not supporting transactions? + command.CommandType = CommandType.TableDirect; // todo - why repeat? + // todo - not supporting transactions? //cmd.Transaction = GetTypedTransaction(db.Connection.); var count = 0; diff --git a/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions.cs b/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions.cs index b81e68e567..7f9f881d4b 100644 --- a/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions.cs +++ b/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions.cs @@ -105,7 +105,7 @@ namespace Umbraco.Core.Persistence if (poco == null) throw new ArgumentNullException(nameof(poco)); - // fixme - NPoco has a Save method that works with the primary key + // todo - NPoco has a Save method that works with the primary key // in any case, no point trying to update if there's no primary key! // try to update diff --git a/src/Umbraco.Core/Persistence/NPocoSqlExtensions.cs b/src/Umbraco.Core/Persistence/NPocoSqlExtensions.cs index 7aa8b707be..d85fafa768 100644 --- a/src/Umbraco.Core/Persistence/NPocoSqlExtensions.cs +++ b/src/Umbraco.Core/Persistence/NPocoSqlExtensions.cs @@ -496,7 +496,7 @@ namespace Umbraco.Core.Persistence public static Sql On(this Sql.SqlJoinClause sqlJoin, Expression> leftField, Expression> rightField) { - // fixme - ugly - should define on SqlContext! + // todo - ugly - should define on SqlContext! var xLeft = new Sql(sqlJoin.SqlContext).Columns(leftField); var xRight = new Sql(sqlJoin.SqlContext).Columns(rightField); diff --git a/src/Umbraco.Core/Persistence/Querying/ExpressionVisitorBase.cs b/src/Umbraco.Core/Persistence/Querying/ExpressionVisitorBase.cs index 16bfc9b164..64b3c91e50 100644 --- a/src/Umbraco.Core/Persistence/Querying/ExpressionVisitorBase.cs +++ b/src/Umbraco.Core/Persistence/Querying/ExpressionVisitorBase.cs @@ -10,7 +10,8 @@ using Umbraco.Core.Composing; namespace Umbraco.Core.Persistence.Querying { - // fixme.npoco - are we basically duplicating entire parts of NPoco just because of SqlSyntax ?! + // todo - are we basically duplicating entire parts of NPoco just because of SqlSyntax ?! + // try to use NPoco's version ! /// /// An expression tree parser to create SQL statements and SQL parameters based on a strongly typed expression. diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs index ba56c17087..3cf9f50e40 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs @@ -43,7 +43,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement protected ILanguageRepository LanguageRepository { get; } - protected PropertyEditorCollection PropertyEditors => Current.PropertyEditors; // fixme inject + protected PropertyEditorCollection PropertyEditors => Current.PropertyEditors; // todo inject #region Versions @@ -73,7 +73,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // deletes a specific version public virtual void DeleteVersion(int versionId) { - // fixme test object node type? + // todo test object node type? // get the version we want to delete var template = SqlContext.Templates.Get("Umbraco.Core.VersionableRepository.GetVersion", tsql => @@ -95,7 +95,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // deletes all versions of an entity, older than a date. public virtual void DeleteVersions(int nodeId, DateTime versionDate) { - // fixme test object node type? + // todo test object node type? // get the versions we want to delete, excluding the current one var template = SqlContext.Templates.Get("Umbraco.Core.VersionableRepository.GetVersions", tsql => @@ -240,7 +240,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement } } - // FIXME should we do it when un-publishing? or? + // todo should we do it when un-publishing? or? /// /// Clears tags for an item. /// @@ -277,7 +277,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var (dbfield, _) = SqlContext.VisitDto(x => x.NodeId); if (ordering.IsCustomField || !ordering.OrderBy.InvariantEquals("id")) { - psql.OrderBy(GetAliasedField(dbfield, sql)); // fixme why aliased? + psql.OrderBy(GetAliasedField(dbfield, sql)); } // create prepared sql @@ -374,7 +374,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement return GetAliasedField(SqlSyntax.GetFieldName(x => x.Text), sql); // "variantName" alias is defined in DocumentRepository.GetBaseQuery - // fixme - what if it is NOT a document but a ... media or whatever? + // todo - what if it is NOT a document but a ... media or whatever? // previously, we inserted the join+select *here* so we were sure to have it, // but now that's not the case anymore! return "variantName"; @@ -620,7 +620,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement #region UnitOfWork Events - //fixme: The reason these events are in the repository is for legacy, the events should exist at the service + // todo: The reason these events are in the repository is for legacy, the events should exist at the service // level now since we can fire these events within the transaction... so move the events to service level public class ScopedEntityEventArgs : EventArgs @@ -736,8 +736,6 @@ namespace Umbraco.Core.Persistence.Repositories.Implement public T Content { get; set; } } - // fixme copied from 7.6 - /// /// For Paging, repositories must support returning different query for the query type specified /// @@ -745,207 +743,6 @@ namespace Umbraco.Core.Persistence.Repositories.Implement /// protected abstract Sql GetBaseQuery(QueryType queryType); - /* - internal class DocumentDefinitionCollection : KeyedCollection - { - private readonly bool _includeAllVersions; - - /// - /// Constructor specifying if all versions should be allowed, in that case the key for the collection becomes the versionId (GUID) - /// - /// - public DocumentDefinitionCollection(bool includeAllVersions = false) - { - _includeAllVersions = includeAllVersions; - } - - protected override ValueType GetKeyForItem(DocumentDefinition item) - { - return _includeAllVersions ? (ValueType)item.Version : item.Id; - } - - /// - /// if this key already exists if it does then we need to check - /// if the existing item is 'older' than the new item and if that is the case we'll replace the older one - /// - /// - /// - public bool AddOrUpdate(DocumentDefinition item) - { - //if we are including all versions then just add, we aren't checking for latest - if (_includeAllVersions) - { - Add(item); - return true; - } - - if (Dictionary == null) - { - Add(item); - return true; - } - - var key = GetKeyForItem(item); - if (TryGetValue(key, out DocumentDefinition found)) - { - //it already exists and it's older so we need to replace it - if (item.VersionId <= found.VersionId) return false; - - var currIndex = Items.IndexOf(found); - if (currIndex == -1) - throw new IndexOutOfRangeException("Could not find the item in the list: " + found.Version); - - //replace the current one with the newer one - SetItem(currIndex, item); - return true; - } - - Add(item); - return true; - } - - public bool TryGetValue(ValueType key, out DocumentDefinition val) - { - if (Dictionary != null) - return Dictionary.TryGetValue(key, out val); - - val = null; - return false; - } - } - - /// - /// Implements a Guid comparer that respect the Sql engine ordering. - /// - /// - /// MySql sorts Guids as strings, but MSSQL sorts guids based on a weird byte sections order - /// This comparer compares Guids using the corresponding Sql syntax method, ie the method of the underlying Sql engine. - /// see http://stackoverflow.com/questions/7810602/sql-server-guid-sort-algorithm-why - /// see https://blogs.msdn.microsoft.com/sqlprogrammability/2006/11/06/how-are-guids-compared-in-sql-server-2005/ - /// - private class DocumentDefinitionComparer : IComparer - { - private readonly bool _mySql; - - public DocumentDefinitionComparer(ISqlSyntaxProvider sqlSyntax) - { - _mySql = sqlSyntax is MySqlSyntaxProvider; - } - - public int Compare(Guid x, Guid y) - { - // MySql sorts Guids as string (ie normal, same as .NET) whereas MSSQL - // sorts them on a weird byte sections order - return _mySql ? x.CompareTo(y) : new SqlGuid(x).CompareTo(new SqlGuid(y)); - } - } - - internal class DocumentDefinition - { - /// - /// Initializes a new instance of the class. - /// - public DocumentDefinition(DocumentDto dto, IContentTypeComposition composition) - { - DocumentDto = dto; - ContentVersionDto = dto.ContentVersionDto; - Composition = composition; - } - - public DocumentDefinition(ContentVersionDto dto, IContentTypeComposition composition) - { - ContentVersionDto = dto; - Composition = composition; - } - - public DocumentDto DocumentDto { get; } - public ContentVersionDto ContentVersionDto { get; } - - public int Id => ContentVersionDto.NodeId; - - public Guid Version => DocumentDto?.VersionId ?? ContentVersionDto.VersionId; - - // This is used to determien which version is the most recent - public int VersionId => ContentVersionDto.Id; - - public DateTime VersionDate => ContentVersionDto.VersionDate; - - public DateTime CreateDate => ContentVersionDto.ContentDto.NodeDto.CreateDate; - - public IContentTypeComposition Composition { get; set; } - } - - // Represents a query that may contain paging information. - internal class PagingSqlQuery - { - // the original query sql - public Sql QuerySql { get; } - - public PagingSqlQuery(Sql querySql) - { - QuerySql = querySql; - } - - protected PagingSqlQuery(Sql querySql, int pageSize) - : this(querySql) - { - HasPaging = pageSize > 0; - } - - // whether the paging query is actually paging - public bool HasPaging { get; } - - // the paging sql - public virtual Sql BuildPagedQuery(string columns) - { - throw new InvalidOperationException("This query has no paging information."); - } - } - - /// - /// Represents a query that may contain paging information. - /// - /// - internal class PagingSqlQuery : PagingSqlQuery // fixme what's here? - { - private readonly Database _db; - private readonly long _pageIndex; - private readonly int _pageSize; - - // fixme - don't capture a db instance here! - // instead, should have an extension method, so one can do - // sql = db.BuildPageQuery(pagingQuery, columns) - public PagingSqlQuery(Database db, Sql querySql, long pageIndex, int pageSize) - : base(querySql, pageSize) - { - _db = db; - _pageIndex = pageIndex; - _pageSize = pageSize; - } - - /// - /// Creates a paged query based on the original query and subtitutes the selectColumns specified - /// - /// - /// - // build a page query - public override Sql BuildPagedQuery(string columns) - { - if (HasPaging == false) - throw new InvalidOperationException("This query has no paging information."); - - // substitutes the original "SELECT ..." with "SELECT {columns}" ie only - // select the specified columns - fixme why? - var sql = $"SELECT {columns} {QuerySql.SQL.Substring(QuerySql.SQL.IndexOf("FROM", StringComparison.Ordinal))}"; - - // and then build the page query - var args = QuerySql.Arguments; - _db.BuildPageQueries(_pageIndex * _pageSize, _pageSize, sql, ref args, out string unused, out string sqlPage); - return new Sql(sqlPage, args); - } - } - */ - #endregion #region Utilities diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepository.cs index f608e2968d..773716b401 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepository.cs @@ -79,7 +79,6 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var translator = new SqlTranslator(sqlClause, query); var sql = translator.Translate(); - // fixme - insane! GetBaseQuery does not even return a proper??? oh well... var dtos = Database.Fetch(sql); return diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs index 6404880a2e..45532fc06a 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs @@ -103,7 +103,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement .On(left => left.DataTypeId, right => right.NodeId); var translator = new SqlTranslator(sqlClause, query); - // fixme v8 are we sorting only for 7.6 relators? + var sql = translator.Translate() .OrderBy(x => x.PropertyTypeGroupId); @@ -764,7 +764,6 @@ AND umbracoNode.id <> @id", { // note: important to use SqlNullableEquals for nullable types, cannot directly compare language identifiers - // fixme - should we batch then? var whereInArgsCount = propertyTypeIds.Count + (contentTypeIds?.Count ?? 0); if (whereInArgsCount > 2000) throw new NotSupportedException("Too many property/content types."); @@ -903,7 +902,6 @@ AND umbracoNode.id <> @id", { // note: important to use SqlNullableEquals for nullable types, cannot directly compare language identifiers // - // fixme - should we batch then? var whereInArgsCount = propertyTypeIds.Count + (contentTypeIds?.Count ?? 0); if (whereInArgsCount > 2000) throw new NotSupportedException("Too many property/content types."); diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs index 28d4262763..f4f0da8bee 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs @@ -26,7 +26,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { private readonly Lazy _editors; - // fixme temp fixing circular dependencies with LAZY but is this the right place? + // fixme/task - get rid of Lazy injection and fix circular dependencies public DataTypeRepository(IScopeAccessor scopeAccessor, AppCaches cache, Lazy editors, ILogger logger) : base(scopeAccessor, cache, logger) { diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs index 31c08f9124..0011a384ab 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs @@ -90,7 +90,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement private void AddGetByQueryOrderBy(Sql sql) { - sql // fixme why - this should be Path + sql .OrderBy(x => x.Level) .OrderBy(x => x.SortOrder); } @@ -148,7 +148,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement .On((left, right) => left.Id == right.Id && right.Published, "pcv", "pdv"), "pcv") .On((left, right) => left.NodeId == right.NodeId, aliasRight: "pcv") - //fixme - should we be joining this when the query type is not single/many? + // todo - should we be joining this when the query type is not single/many? // left join on optional culture variation //the magic "[[[ISOCODE]]]" parameter value will be replaced in ContentRepositoryBase.GetPage() by the actual ISO code .LeftJoin(nested => @@ -171,13 +171,11 @@ namespace Umbraco.Core.Persistence.Repositories.Implement return sql; } - // fixme - kill, eventually protected override Sql GetBaseQuery(bool isCount) { return GetBaseQuery(isCount ? QueryType.Count : QueryType.Single); } - // fixme - kill, eventually // ah maybe not, that what's used for eg Exists in base repo protected override string GetBaseWhereClause() { @@ -251,7 +249,6 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // raise event first else potential FK issues OnUowRemovingVersion(new ScopedVersionEventArgs(AmbientScope, id, versionId)); - // fixme - syntax + ... Database.Delete("WHERE versionId = @versionId", new { versionId }); Database.Delete("WHERE id = @versionId", new { versionId }); Database.Delete("WHERE id = @versionId", new { versionId }); @@ -263,7 +260,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement protected override void PersistNewItem(IContent entity) { - // fixme - stop doing this - sort out IContent vs Content + // fixme/task - sort out IContent vs Content // however, it's not just so we have access to AddingEntity // there are tons of things at the end of the methods, that can only work with a true Content // and basically, the repository requires a Content, not an IContent @@ -280,7 +277,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement SanitizeNames(content, publishing); // ensure that strings don't contain characters that are invalid in xml - // fixme - do we really want to keep doing this here? + // todo - do we really want to keep doing this here? entity.SanitizeEntityPropertiesForXmlStorage(); // create the dto @@ -439,7 +436,6 @@ namespace Umbraco.Core.Persistence.Repositories.Implement protected override void PersistUpdatedItem(IContent entity) { - // fixme - stop doing this - sort out IContent vs Content // however, it's not just so we have access to AddingEntity // there are tons of things at the end of the methods, that can only work with a true Content // and basically, the repository requires a Content, not an IContent @@ -451,7 +447,6 @@ namespace Umbraco.Core.Persistence.Repositories.Implement return; // no change to save, do nothing, don't even update dates // whatever we do, we must check that we are saving the current version - // fixme maybe we can just fetch Current (bool) var version = Database.Fetch(SqlContext.Sql().Select().From().Where(x => x.Id == content.VersionId)).FirstOrDefault(); if (version == null || !version.Current) throw new InvalidOperationException("Cannot save a non-current version."); @@ -471,7 +466,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement SanitizeNames(content, publishing); // ensure that strings don't contain characters that are invalid in xml - // fixme - do we really want to keep doing this here? + // todo - do we really want to keep doing this here? entity.SanitizeEntityPropertiesForXmlStorage(); // if parent has changed, get path, level and sort order @@ -550,7 +545,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement edited = true; (editedCultures ?? (editedCultures = new HashSet(StringComparer.OrdinalIgnoreCase))).Add(culture); - // fixme - change tracking + // todo - change tracking // at the moment, we don't do any dirty tracking on property values, so we don't know whether the // culture has just been edited or not, so we don't update its update date - that date only changes // when the name is set, and it all works because the controller does it - but, if someone uses a @@ -566,7 +561,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var deleteDocumentVariations = Sql().Delete().Where(x => x.NodeId == content.Id); Database.Execute(deleteDocumentVariations); - // fixme NPoco InsertBulk issue? + // todo NPoco InsertBulk issue? // we should use the native NPoco InsertBulk here but it causes problems (not sure exaclty all scenarios) // but by using SQL Server and updating a variants name will cause: Unable to cast object of type // 'Umbraco.Core.Persistence.FaultHandling.RetryDbConnection' to type 'System.Data.SqlClient.SqlConnection'. @@ -628,7 +623,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement } // note re. tags: explicitly unpublished entities have cleared tags, - // but masked or trashed entities *still* have tags in the db fixme so what? + // but masked or trashed entities *still* have tags in the db todo so what? entity.ResetDirtyProperties(); @@ -842,7 +837,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement } // reading repository purely for looking up by GUID - // fixme - ugly and to fix we need to decouple the IRepositoryQueryable -> IRepository -> IReadRepository which should all be separate things! + // todo - ugly and to fix we need to decouple the IRepositoryQueryable -> IRepository -> IReadRepository which should all be separate things! private class ContentByGuidReadRepository : NPocoRepositoryBase { private readonly DocumentRepository _outerRepo; @@ -1129,7 +1124,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // get properties - indexed by version id var versionId = dto.DocumentVersionDto.Id; - // fixme - shall we get published properties or not? + // todo - shall we get published properties or not? //var publishedVersionId = dto.Published ? dto.PublishedVersionDto.Id : 0; var publishedVersionId = dto.PublishedVersionDto != null ? dto.PublishedVersionDto.Id : 0; diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/EntityRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/EntityRepository.cs index 2be27deb0a..c531b991a9 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/EntityRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/EntityRepository.cs @@ -14,8 +14,6 @@ using Umbraco.Core.Services; namespace Umbraco.Core.Persistence.Repositories.Implement { - // fixme - use sql templates everywhere! - /// /// Represents the EntityRepository used to query entity objects. /// @@ -64,7 +62,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement ApplyOrdering(ref sql, ordering); } - //fixme - we should be able to do sql = sql.OrderBy(x => Alias(x.NodeId, "NodeId")); but we can't because the OrderBy extension don't support Alias currently + //todo - we should be able to do sql = sql.OrderBy(x => Alias(x.NodeId, "NodeId")); but we can't because the OrderBy extension don't support Alias currently //no matter what we always must have node id ordered at the end sql = ordering.Direction == Direction.Ascending ? sql.OrderBy("NodeId") : sql.OrderByDescending("NodeId"); @@ -75,7 +73,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement if (isContent) BuildVariants(entities.Cast()); - //fixme - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media + //todo - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media if (isMedia) BuildProperties(entities, dtos); @@ -168,7 +166,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var entities = dtos.Select(x => BuildEntity(false, isMedia, x)).ToArray(); - //fixme - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media + //todo- see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media if (isMedia && loadMediaProperties) BuildProperties(entities, dtos); @@ -229,7 +227,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement return GetEntities(sql, isContent, isMedia, true); } - //fixme - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media + //todo- see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media internal IEnumerable GetMediaByQueryWithoutPropertyData(IQuery query) { var isContent = false; @@ -268,7 +266,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement return Database.ExecuteScalar(sql) > 0; } - //fixme - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media + //todo - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media private void BuildProperties(EntitySlim entity, BaseDto dto) { var pdtos = Database.Fetch(GetPropertyData(dto.VersionId)); @@ -276,7 +274,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement BuildProperty(entity, pdto); } - //fixme - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media + //todo - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media private void BuildProperties(EntitySlim[] entities, List dtos) { var versionIds = dtos.Select(x => x.VersionId).Distinct().ToList(); @@ -292,7 +290,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement } } - //fixme - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media + //todo - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media private void BuildProperty(EntitySlim entity, PropertyDataDto pdto) { // explain ?! @@ -541,7 +539,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement if (sql == null) throw new ArgumentNullException(nameof(sql)); if (ordering == null) throw new ArgumentNullException(nameof(ordering)); - //fixme - although this works for name, it probably doesn't work for others without an alias of some sort + //todo - although this works for name, it probably doesn't work for others without an alias of some sort var orderBy = ordering.OrderBy; if (ordering.Direction == Direction.Ascending) diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs index f2c7e35395..94714d6ded 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs @@ -72,7 +72,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var translator = new SqlTranslator(sqlClause, query); var sql = translator.Translate(); - sql // fixme why? + sql .OrderBy(x => x.Level) .OrderBy(x => x.SortOrder); @@ -104,7 +104,6 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // ContentRepositoryBase expects a variantName field to order by name // for now, just return the plain invariant node name - // fixme media should support variants !! .AndSelect(x => Alias(x.Text, "variantName")); break; } @@ -125,13 +124,11 @@ namespace Umbraco.Core.Persistence.Repositories.Implement return sql; } - // fixme - kill, eventually protected override Sql GetBaseQuery(bool isCount) { return GetBaseQuery(isCount ? QueryType.Count : QueryType.Single); } - // fixme - kill, eventually // ah maybe not, that what's used for eg Exists in base repo protected override string GetBaseWhereClause() { @@ -228,7 +225,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement entity.Name = EnsureUniqueNodeName(entity.ParentId, entity.Name); // ensure that strings don't contain characters that are invalid in xml - // fixme - do we really want to keep doing this here? + // todo - do we really want to keep doing this here? entity.SanitizeEntityPropertiesForXmlStorage(); // create the dto @@ -307,7 +304,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement entity.Name = EnsureUniqueNodeName(entity.ParentId, entity.Name, entity.Id); // ensure that strings don't contain characters that are invalid in xml - // fixme - do we really want to keep doing this here? + // todo - do we really want to keep doing this here? entity.SanitizeEntityPropertiesForXmlStorage(); // if parent has changed, get path, level and sort order @@ -496,7 +493,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var cached = IsolatedCache.GetCacheItem(RepositoryCacheKeys.GetKey(dto.NodeId)); if (cached != null && cached.VersionId == dto.ContentVersionDto.Id) { - content[i] = (Models.Media) cached; // fixme should we just cache Media not IMedia? + content[i] = (Models.Media) cached; continue; } } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs index 2daa4abeca..3106a5f16e 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs @@ -66,7 +66,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { var baseQuery = GetBaseQuery(false); - // fixme why is this different from content/media?! + // todo why is this different from content/media?! // check if the query is based on properties or not var wheres = query.GetWhereClauses(); @@ -103,7 +103,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { var sql = SqlContext.Sql(); - switch (queryType) // FIXME pretend we still need these queries for now + switch (queryType) // todo pretend we still need these queries for now { case QueryType.Count: sql = sql.SelectCount(); @@ -143,18 +143,18 @@ namespace Umbraco.Core.Persistence.Repositories.Implement return sql; } - // fixme - move that one up to Versionable! or better: kill it! + // todo - move that one up to Versionable! or better: kill it! protected override Sql GetBaseQuery(bool isCount) { return GetBaseQuery(isCount ? QueryType.Count : QueryType.Single); } - protected override string GetBaseWhereClause() // fixme - can we kill / refactor this? + protected override string GetBaseWhereClause() // todo - can we kill / refactor this? { return "umbracoNode.id = @id"; } - // fixme wtf? + // todo document/understand that one protected Sql GetNodeIdQueryWithPropertyData() { return Sql() @@ -237,7 +237,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement member.AddingEntity(); // ensure that strings don't contain characters that are invalid in xml - // fixme - do we really want to keep doing this here? + // todo - do we really want to keep doing this here? entity.SanitizeEntityPropertiesForXmlStorage(); // create the dto @@ -329,7 +329,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement member.UpdatingEntity(); // ensure that strings don't contain characters that are invalid in xml - // fixme - do we really want to keep doing this here? + // todo - do we really want to keep doing this here? entity.SanitizeEntityPropertiesForXmlStorage(); // if parent has changed, get path, level and sort order @@ -560,7 +560,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var cached = IsolatedCache.GetCacheItem(RepositoryCacheKeys.GetKey(dto.NodeId)); if (cached != null && cached.VersionId == dto.ContentVersionDto.Id) { - content[i] = (Member) cached; // fixme should we just cache Content not IContent? + content[i] = (Member) cached; continue; } } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/NPocoRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/NPocoRepositoryBase.cs index 234693602f..a0ba2d5aa3 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/NPocoRepositoryBase.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/NPocoRepositoryBase.cs @@ -42,7 +42,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement #region Abstract Methods - protected abstract Sql GetBaseQuery(bool isCount); // fixme obsolete, use QueryType instead everywhere + protected abstract Sql GetBaseQuery(bool isCount); // todo obsolete, use QueryType instead everywhere protected abstract string GetBaseWhereClause(); protected abstract IEnumerable GetDeleteClauses(); protected abstract Guid NodeObjectTypeId { get; } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs index c8329d1f32..84e8ffc172 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs @@ -78,7 +78,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement } } - // fixme - but now that we have 1 unique repository? + // todo - but now that we have 1 unique repository? // this is a *bad* idea because PerformCount captures the current repository and its UOW // //private static RepositoryCachePolicyOptions _defaultOptions; diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ServerRegistrationRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ServerRegistrationRepository.cs index 298e503736..b4aa9c27f9 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ServerRegistrationRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ServerRegistrationRepository.cs @@ -20,7 +20,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement protected override IRepositoryCachePolicy CreateCachePolicy() { - // fixme - wtf are we doing with cache here? + // todo - wtf are we doing with cache here? // why are we using disabled cache helper up there? // // 7.6 says: diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs index 918cc66cb0..52846f9486 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs @@ -65,7 +65,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement if (_passwordConfigInitialized) return _passwordConfigJson; - // fixme - this is bad + // todo - this is bad // because the membership provider we're trying to get has a dependency on the user service // and we should not depend on services in repositories - need a way better way to do this @@ -238,7 +238,7 @@ ORDER BY colName"; public void ClearLoginSession(Guid sessionId) { - // fixme why is that one updating and not deleting? + // todo why is that one updating and not deleting? Database.Execute(Sql() .Update(u => u.Set(x => x.LoggedOutUtc, DateTime.UtcNow)) .Where(x => x.SessionId == sessionId)); @@ -313,7 +313,7 @@ ORDER BY colName"; var sql = SqlContext.Sql() .Select() .From() - .WhereIn(x => x.UserId, userIds); + .WhereIn(x => x.UserId, userIds); var users2groups = Database.Fetch(sql); var groupIds = users2groups.Select(x => x.UserGroupId).ToList(); diff --git a/src/Umbraco.Core/Persistence/SqlTemplate.cs b/src/Umbraco.Core/Persistence/SqlTemplate.cs index e81da20f41..6a7d1a8d6c 100644 --- a/src/Umbraco.Core/Persistence/SqlTemplate.cs +++ b/src/Umbraco.Core/Persistence/SqlTemplate.cs @@ -117,7 +117,6 @@ namespace Umbraco.Core.Persistence public static IEnumerable ArgIn(string name) { // don't return an empty enumerable, as it breaks NPoco - // fixme - should we cache these arrays? return new[] { default (T) }; } } diff --git a/src/Umbraco.Core/Persistence/UmbracoDatabase.cs b/src/Umbraco.Core/Persistence/UmbracoDatabase.cs index fdf8061c8e..672e5ac2e2 100644 --- a/src/Umbraco.Core/Persistence/UmbracoDatabase.cs +++ b/src/Umbraco.Core/Persistence/UmbracoDatabase.cs @@ -159,7 +159,7 @@ namespace Umbraco.Core.Persistence #region OnSomething - // fixme.poco - has new interceptors to replace OnSomething? + // todo - has new interceptors to replace OnSomething? protected override DbConnection OnConnectionOpened(DbConnection connection) { @@ -226,7 +226,7 @@ namespace Umbraco.Core.Persistence cmd.CommandTimeout = cmd.Connection.ConnectionTimeout; if (EnableSqlTrace) - _logger.Debug("SQL Trace:\r\n{Sql}", CommandToString(cmd).Replace("{", "{{").Replace("}", "}}")); // fixme 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 9ed52ca148..4a4ac04001 100644 --- a/src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs +++ b/src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs @@ -2,7 +2,6 @@ using System.Configuration; using System.Data.Common; using System.Threading; -using LightInject; using NPoco; using NPoco.FluentMappings; using Umbraco.Core.Exceptions; @@ -23,6 +22,8 @@ namespace Umbraco.Core.Persistence /// It wraps an NPoco UmbracoDatabaseFactory which is initializes with a proper IPocoDataFactory to ensure /// that NPoco's plumbing is cached appropriately for the whole application. /// + //todo these comments are not true anymore + //todo this class needs not be disposable! internal class UmbracoDatabaseFactory : DisposableObject, IUmbracoDatabaseFactory { private readonly Lazy _mappers; @@ -285,7 +286,7 @@ namespace Umbraco.Core.Persistence // thread, so we don't really know what we are disposing here... // besides, we don't really want to dispose the factory, which is a singleton... - // fixme - does not make any sense! + // todo - the class does not need be disposable //var db = _umbracoDatabaseAccessor.UmbracoDatabase; //_umbracoDatabaseAccessor.UmbracoDatabase = null; //db?.Dispose(); @@ -296,7 +297,7 @@ namespace Umbraco.Core.Persistence // this method provides a way to force-reset the variable internal void ResetForTests() { - // fixme - does not make any sense! + // todo remove all this eventually //var db = _umbracoDatabaseAccessor.UmbracoDatabase; //_umbracoDatabaseAccessor.UmbracoDatabase = null; //db?.Dispose(); diff --git a/src/Umbraco.Core/Properties/AssemblyInfo.cs b/src/Umbraco.Core/Properties/AssemblyInfo.cs index f2e8feaf29..9471285148 100644 --- a/src/Umbraco.Core/Properties/AssemblyInfo.cs +++ b/src/Umbraco.Core/Properties/AssemblyInfo.cs @@ -18,8 +18,6 @@ using System.Runtime.InteropServices; [assembly: InternalsVisibleTo("Umbraco.Tests")] [assembly: InternalsVisibleTo("Umbraco.Tests.Benchmarks")] -[assembly: InternalsVisibleTo("Umbraco.Extensions")] // fixme - what is this? - // Allow this to be mocked in our unit tests [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] diff --git a/src/Umbraco.Core/PropertyEditors/DataEditor.cs b/src/Umbraco.Core/PropertyEditors/DataEditor.cs index f3fc4f669b..0db6dcb0dd 100644 --- a/src/Umbraco.Core/PropertyEditors/DataEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/DataEditor.cs @@ -89,7 +89,7 @@ namespace Umbraco.Core.PropertyEditors /// Technically, it could be cached by datatype but let's keep things /// simple enough for now. /// - // fixme point of that one? shouldn't we always configure? + // todo point of that one? shouldn't we always configure? public IDataValueEditor GetValueEditor() => ExplicitValueEditor ?? CreateValueEditor(); /// @@ -113,7 +113,7 @@ namespace Umbraco.Core.PropertyEditors return ExplicitValueEditor; var editor = CreateValueEditor(); - ((DataValueEditor) editor).Configuration = configuration; // fixme casting is bad + ((DataValueEditor) editor).Configuration = configuration; // todo casting is bad return editor; } diff --git a/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs b/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs index 912bf1c367..154fbfae98 100644 --- a/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs @@ -59,46 +59,11 @@ namespace Umbraco.Core.PropertyEditors HideLabel = attribute.HideLabel; } - // fixme kabam! - // I don't understand the remarks in the code commented out below - // and then, - // IPropertyEditor come from a PropertyEditorCollection so they are singletons - // IValueEditor is the actual value editor used for editing the value, - // and it has its own configuration, depending on the datatype, so it - // should NOT be a singleton => do NOT cache it in PropertyEditor! - /// /// Gets or sets the value editor configuration. /// public virtual object Configuration { get; set; } - //private PreValueCollection _preVals; - //protected PreValueCollection PreValues - //{ - // get - // { - // if (_preVals == null) - // { - // throw new InvalidOperationException("Pre values cannot be accessed until the Configure method has been called"); - // } - // return _preVals; - // } - //} - - ///// - ///// This is called to configure the editor for display with it's prevalues, useful when properties need to change dynamically - ///// depending on what is in the pre-values. - ///// - ///// - ///// - ///// This cannot be used to change the value being sent to the editor, ConfigureEditor will be called *after* ConvertDbToEditor, pre-values - ///// should not be used to modify values. - ///// - //public virtual void ConfigureForDisplay(PreValueCollection preValues) - //{ - // _preVals = preValues ?? throw new ArgumentNullException(nameof(preValues)); - //} - /// /// Gets or sets the editor view. /// @@ -225,13 +190,6 @@ namespace Umbraco.Core.PropertyEditors return value.TryConvertTo(valueType); } - // fixme - not dealing with variants here! - // - // editors should declare whether they support variants, and then we should have a common - // way of dealing with it, ie of sending and receiving values, etc. - // eg - // [ { "value": "hello" }, { "lang": "fr-fr", "value": "bonjour" } ] - /// /// A method to deserialize the string value that has been saved in the content editor /// to an object to be stored in the database. @@ -325,7 +283,7 @@ namespace Umbraco.Core.PropertyEditors } } - // fixme - the methods below should be replaced by proper property value convert ToXPath usage! + // todo - the methods below should be replaced by proper property value convert ToXPath usage! /// /// Converts a property to Xml fragments. diff --git a/src/Umbraco.Core/PropertyEditors/IDataEditor.cs b/src/Umbraco.Core/PropertyEditors/IDataEditor.cs index f109620ad9..16aa4d6d5c 100644 --- a/src/Umbraco.Core/PropertyEditors/IDataEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/IDataEditor.cs @@ -46,7 +46,7 @@ namespace Umbraco.Core.PropertyEditors /// /// Gets a value editor. /// - IDataValueEditor GetValueEditor(); // fixme - should be configured?! + IDataValueEditor GetValueEditor(); // todo - should be configured?! /// /// Gets a configured value editor. diff --git a/src/Umbraco.Core/PropertyEditors/IDataValueEditor.cs b/src/Umbraco.Core/PropertyEditors/IDataValueEditor.cs index b5ed7c5917..c92b6fa0d3 100644 --- a/src/Umbraco.Core/PropertyEditors/IDataValueEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/IDataValueEditor.cs @@ -47,7 +47,7 @@ namespace Umbraco.Core.PropertyEditors /// /// /// Use this property to add validators, not to validate. Use instead. - /// fixme replace with AddValidator? WithValidator? + /// todo replace with AddValidator? WithValidator? /// List Validators { get; } @@ -56,14 +56,12 @@ namespace Umbraco.Core.PropertyEditors /// object FromEditor(ContentPropertyData editorValue, object currentValue); - // fixme - editing - services should be injected - /// /// Converts a property value to a value for the editor. /// object ToEditor(Property property, IDataTypeService dataTypeService, string culture = null, string segment = null); - // fixme - editing - document or remove these + // todo / deal with this when unplugging the xml cache // why property vs propertyType? services should be injected! etc... IEnumerable ConvertDbToXml(Property property, IDataTypeService dataTypeService, ILocalizationService localizationService, bool published); XNode ConvertDbToXml(PropertyType propertyType, object value, IDataTypeService dataTypeService); diff --git a/src/Umbraco.Core/PropertyEditors/ManifestValueValidatorCollection.cs b/src/Umbraco.Core/PropertyEditors/ManifestValueValidatorCollection.cs index d16ed4bd62..204dff6f19 100644 --- a/src/Umbraco.Core/PropertyEditors/ManifestValueValidatorCollection.cs +++ b/src/Umbraco.Core/PropertyEditors/ManifestValueValidatorCollection.cs @@ -17,7 +17,7 @@ namespace Umbraco.Core.PropertyEditors if (v == null) throw new InvalidOperationException($"Could not find a validator named \"{name}\"."); - // FIXME + // todo - what is this exactly? // we cannot return this instance, need to clone it? return (IManifestValueValidator) Activator.CreateInstance(v.GetType()); // ouch } diff --git a/src/Umbraco.Core/PropertyEditors/PropertyValueConverterBase.cs b/src/Umbraco.Core/PropertyEditors/PropertyValueConverterBase.cs index 4c20016318..48bfc49ed9 100644 --- a/src/Umbraco.Core/PropertyEditors/PropertyValueConverterBase.cs +++ b/src/Umbraco.Core/PropertyEditors/PropertyValueConverterBase.cs @@ -26,7 +26,6 @@ namespace Umbraco.Core.PropertyEditors { // the default implementation uses the old magic null & string comparisons, // other implementations may be more clever, and/or test the final converted object values - // fixme - cannot access the intermediate value here? var value = property.GetSourceValue(culture, segment); return value != null && (!(value is string) || string.IsNullOrWhiteSpace((string) value) == false); } diff --git a/src/Umbraco.Core/PropertyEditors/TagsPropertyEditorAttribute.cs b/src/Umbraco.Core/PropertyEditors/TagsPropertyEditorAttribute.cs index b3456dde84..e1f99083e8 100644 --- a/src/Umbraco.Core/PropertyEditors/TagsPropertyEditorAttribute.cs +++ b/src/Umbraco.Core/PropertyEditors/TagsPropertyEditorAttribute.cs @@ -43,7 +43,7 @@ namespace Umbraco.Core.PropertyEditors /// /// Gets or sets a value indicating whether to replace the tags entirely. /// - /// fixme usage? + // todo: what's the usage? public bool ReplaceTags { get; set; } /// diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/ImageCropperValue.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/ImageCropperValue.cs index a6ec9af01d..b211272b51 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/ImageCropperValue.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/ImageCropperValue.cs @@ -9,7 +9,7 @@ using System.Web; using Newtonsoft.Json; using Umbraco.Core.Serialization; -namespace Umbraco.Core.PropertyEditors.ValueConverters // fixme MOVE TO MODELS OR SOMETHING +namespace Umbraco.Core.PropertyEditors.ValueConverters { /// /// Represents a value of the image cropper value editor. @@ -59,7 +59,6 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters // fixme MOVE TO MODELS O : Crops.FirstOrDefault(x => x.Alias.InvariantEquals(alias)); } - // fixme was defined in web project, extension methods? why internal? internal void AppendCropBaseUrl(StringBuilder url, ImageCropperCrop crop, bool defaultCrop, bool preferFocalPoint) { if (preferFocalPoint && HasFocalPoint() diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/SliderValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/SliderValueConverter.cs index a43d391dbe..12594eb842 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/SliderValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/SliderValueConverter.cs @@ -67,7 +67,7 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters // GetPreValuesCollectionByDataTypeId is cached at repository level; // still, the collection is deep-cloned so this is kinda expensive, // better to cache here + trigger refresh in DataTypeCacheRefresher - // fixme wtf this should NOT be expensive! + // todo: this is cheap now, remove the caching return Storages.GetOrAdd(dataTypeId, id => { diff --git a/src/Umbraco.Core/Runtime/CoreRuntimeComposer.cs b/src/Umbraco.Core/Runtime/CoreRuntimeComposer.cs index 3d959f5263..5535d5c67b 100644 --- a/src/Umbraco.Core/Runtime/CoreRuntimeComposer.cs +++ b/src/Umbraco.Core/Runtime/CoreRuntimeComposer.cs @@ -82,7 +82,7 @@ namespace Umbraco.Core.Runtime // by default we'll use the database server messenger with default options (no callbacks), // this will be overridden by either the legacy thing or the db thing in the corresponding - // components in the web project - fixme - should obsolete the legacy thing + // components in the web project - todo - should obsolete the legacy thing composition.RegisterUnique(factory => new DatabaseServerMessenger( factory.GetInstance(), diff --git a/src/Umbraco.Core/Scoping/RepositoryCacheMode.cs b/src/Umbraco.Core/Scoping/RepositoryCacheMode.cs index 8b8fc0cf35..aa4329773a 100644 --- a/src/Umbraco.Core/Scoping/RepositoryCacheMode.cs +++ b/src/Umbraco.Core/Scoping/RepositoryCacheMode.cs @@ -30,7 +30,6 @@ /// /// Bypasses caches entirely. /// Upon scope completion, clears the global L2 cache. - /// fixme - what about a L1 cache? /// None = 3 } diff --git a/src/Umbraco.Core/Scoping/Scope.cs b/src/Umbraco.Core/Scoping/Scope.cs index aa08016d3c..6aeee33c41 100644 --- a/src/Umbraco.Core/Scoping/Scope.cs +++ b/src/Umbraco.Core/Scoping/Scope.cs @@ -2,7 +2,6 @@ using System.Data; using Umbraco.Core.Cache; using Umbraco.Core.Composing; -using Umbraco.Core.Configuration; using Umbraco.Core.Events; using Umbraco.Core.IO; using Umbraco.Core.Logging; @@ -16,18 +15,12 @@ namespace Umbraco.Core.Scoping /// Not thread-safe obviously. internal class Scope : IScope { - // fixme - // considering that a great amount of things here are only useful for the top-level - // scope would it make sense to have a ChildScope class that would have a smaller - // memory footprint? - private readonly ScopeProvider _scopeProvider; private readonly ILogger _logger; private readonly IsolationLevel _isolationLevel; private readonly RepositoryCacheMode _repositoryCacheMode; private readonly bool? _scopeFileSystem; - private readonly ScopeContext _scopeContext; private readonly bool _autoComplete; private bool _callContext; @@ -55,7 +48,7 @@ namespace Umbraco.Core.Scoping _scopeProvider = scopeProvider; _logger = logger; - _scopeContext = scopeContext; + Context = scopeContext; _isolationLevel = isolationLevel; _repositoryCacheMode = repositoryCacheMode; @@ -78,7 +71,7 @@ namespace Umbraco.Core.Scoping if (autoComplete) throw new ArgumentException("Cannot auto-complete a detachable scope.", nameof(autoComplete)); // detachable creates its own scope context - _scopeContext = new ScopeContext(); + Context = new ScopeContext(); // see note below if (scopeFileSystems == true) @@ -92,7 +85,7 @@ namespace Umbraco.Core.Scoping ParentScope = parent; // cannot specify a different mode! - // fixme - means that it's OK to go from L2 to None for reading purposes, but writing would be BAD! + // todo - means that it's OK to go from L2 to None for reading purposes, but writing would be BAD! // this is for XmlStore that wants to bypass caches when rebuilding XML (same for NuCache) if (repositoryCacheMode != RepositoryCacheMode.Unspecified && parent.RepositoryCacheMode > repositoryCacheMode) throw new ArgumentException($"Value '{repositoryCacheMode}' cannot be lower than parent value '{parent.RepositoryCacheMode}'.", nameof(repositoryCacheMode)); @@ -204,7 +197,7 @@ namespace Umbraco.Core.Scoping public ScopeContext OrigContext { get; set; } // the context (for attaching & detaching only) - public ScopeContext Context => _scopeContext; + public ScopeContext Context { get; } public IsolationLevel IsolationLevel { @@ -271,7 +264,7 @@ namespace Umbraco.Core.Scoping if (ParentScope != null) return ParentScope.Messages; return _messages ?? (_messages = new EventMessages()); - // fixme - event messages? + // todo - event messages? // this may be a problem: the messages collection will be cleared at the end of the scope // how shall we process it in controllers etc? if we don't want the global factory from v7? // it'd need to be captured by the controller @@ -330,7 +323,7 @@ namespace Umbraco.Core.Scoping if (_disposed) throw new ObjectDisposedException(GetType().FullName); - // fixme - safer? + // todo - safer? //if (Interlocked.CompareExchange(ref _disposed, 1, 0) != 0) // throw new ObjectDisposedException(GetType().FullName); } @@ -443,7 +436,7 @@ namespace Umbraco.Core.Scoping }, () => { // if *we* created it, then get rid of it - if (_scopeProvider.AmbientContext == _scopeContext) + if (_scopeProvider.AmbientContext == Context) { try { diff --git a/src/Umbraco.Core/Scoping/ScopeContext.cs b/src/Umbraco.Core/Scoping/ScopeContext.cs index 4ba1999474..3f70f1791e 100644 --- a/src/Umbraco.Core/Scoping/ScopeContext.cs +++ b/src/Umbraco.Core/Scoping/ScopeContext.cs @@ -13,8 +13,9 @@ namespace Umbraco.Core.Scoping if (_enlisted == null) return; - // fixme - can we create infinite loops? - // fixme - what about nested events? will they just be plainly ignored = really bad? + // todo + // - can we create infinite loops? + // - what about nested events? will they just be plainly ignored = really bad? List exceptions = null; List orderedEnlisted; diff --git a/src/Umbraco.Core/Services/IContentService.cs b/src/Umbraco.Core/Services/IContentService.cs index 7915bbe24b..d9a8191441 100644 --- a/src/Umbraco.Core/Services/IContentService.cs +++ b/src/Umbraco.Core/Services/IContentService.cs @@ -242,7 +242,7 @@ namespace Umbraco.Core.Services /// /// Saves documents. /// - // fixme why only 1 result not 1 per content?! + // todo why only 1 result not 1 per content?! OperationResult Save(IEnumerable contents, int userId = 0, bool raiseEvents = true); /// diff --git a/src/Umbraco.Core/Services/IEntityService.cs b/src/Umbraco.Core/Services/IEntityService.cs index 3937d5bf40..a9a3c0c59b 100644 --- a/src/Umbraco.Core/Services/IEntityService.cs +++ b/src/Umbraco.Core/Services/IEntityService.cs @@ -243,7 +243,7 @@ namespace Umbraco.Core.Services IQuery filter = null, Ordering ordering = null); /// - /// Gets descendants of root. fixme: Do we really need this? why not just pass in -1 + /// Gets descendants of root. todo: Do we really need this? why not just pass in -1 /// IEnumerable GetPagedDescendants(UmbracoObjectTypes objectType, long pageIndex, int pageSize, out long totalRecords, IQuery filter = null, Ordering ordering = null, bool includeTrashed = true); diff --git a/src/Umbraco.Core/Services/IEntityXmlSerializer.cs b/src/Umbraco.Core/Services/IEntityXmlSerializer.cs index 405fc47c3a..1c58fc56b8 100644 --- a/src/Umbraco.Core/Services/IEntityXmlSerializer.cs +++ b/src/Umbraco.Core/Services/IEntityXmlSerializer.cs @@ -14,7 +14,7 @@ namespace Umbraco.Core.Services /// XElement Serialize(IContent content, bool published, - bool withDescendants = false) //fixme take care of usage! only used for the packager + bool withDescendants = false) //todo take care of usage! only used for the packager ; /// diff --git a/src/Umbraco.Core/Services/Implement/ContentService.cs b/src/Umbraco.Core/Services/Implement/ContentService.cs index 9943893473..9223793269 100644 --- a/src/Umbraco.Core/Services/Implement/ContentService.cs +++ b/src/Umbraco.Core/Services/Implement/ContentService.cs @@ -164,7 +164,7 @@ namespace Umbraco.Core.Services.Implement /// public IContent Create(string name, Guid parentId, string contentTypeAlias, int userId = 0) { - //fixme - what about culture? + // todo - what about culture? var parent = GetById(parentId); return Create(name, parent, contentTypeAlias, userId); @@ -184,7 +184,7 @@ namespace Umbraco.Core.Services.Implement /// The content object. public IContent Create(string name, int parentId, string contentTypeAlias, int userId = 0) { - //fixme - what about culture? + // todo - what about culture? var contentType = GetContentType(contentTypeAlias); if (contentType == null) @@ -217,7 +217,7 @@ namespace Umbraco.Core.Services.Implement /// The content object. public IContent Create(string name, IContent parent, string contentTypeAlias, int userId = 0) { - //fixme - what about culture? + // todo - what about culture? if (parent == null) throw new ArgumentNullException(nameof(parent)); @@ -248,7 +248,7 @@ namespace Umbraco.Core.Services.Implement /// The content object. public IContent CreateAndSave(string name, int parentId, string contentTypeAlias, int userId = 0) { - //fixme - what about culture? + // todo - what about culture? using (var scope = ScopeProvider.CreateScope()) { @@ -282,7 +282,7 @@ namespace Umbraco.Core.Services.Implement /// The content object. public IContent CreateAndSave(string name, IContent parent, string contentTypeAlias, int userId = 0) { - //fixme - what about culture? + // todo - what about culture? if (parent == null) throw new ArgumentNullException(nameof(parent)); @@ -750,8 +750,6 @@ namespace Umbraco.Core.Services.Implement #region Save, Publish, Unpublish - // fixme - kill all those raiseEvents - /// public OperationResult Save(IContent content, int userId = 0, bool raiseEvents = true) { @@ -1018,7 +1016,6 @@ namespace Umbraco.Core.Services.Implement // keep going, though, as we want to save anyways } - //fixme - casting // reset published state from temp values (publishing, unpublishing) to original value // (published, unpublished) in order to save the document, unchanged ((Content)content).Published = content.Published; @@ -1042,7 +1039,6 @@ namespace Umbraco.Core.Services.Implement unpublishResult = StrategyUnpublish(scope, content, userId, evtMsgs); else { - //fixme - casting // reset published state from temp values (publishing, unpublishing) to original value // (published, unpublished) in order to save the document, unchanged ((Content)content).Published = content.Published; @@ -1414,8 +1410,6 @@ namespace Umbraco.Core.Services.Implement { scope.WriteLock(Constants.Locks.ContentTree); - // fixme events?! - if (!document.HasIdentity) throw new InvalidOperationException("Cannot not branch-publish a new document."); @@ -1624,7 +1618,6 @@ namespace Umbraco.Core.Services.Implement if (deletePriorVersions) { var content = GetVersion(versionId); - // fixme nesting uow? DeleteVersions(id, content.UpdateDate, userId); } @@ -1810,7 +1803,6 @@ namespace Umbraco.Core.Services.Implement private void PerformMoveContentLocked(IContent content, int userId, bool? trash) { - //fixme no casting if (trash.HasValue) ((ContentBase)content).Trashed = trash.Value; content.WriterId = userId; _documentRepository.Save(content); @@ -2391,7 +2383,6 @@ namespace Umbraco.Core.Services.Implement // ensure that the document has published values // either because it is 'publishing' or because it already has a published version - //fixme - casting if (((Content)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"); @@ -2461,7 +2452,6 @@ namespace Umbraco.Core.Services.Implement EventMessages evtMsgs) { // change state to publishing - // fixme - casting ((Content)content).PublishedState = PublishedState.Publishing; //if this is a variant then we need to log which cultures have been published/unpublished and return an appropriate result @@ -2541,7 +2531,6 @@ namespace Umbraco.Core.Services.Implement Logger.Info("Document {ContentName} (id={ContentId}) had its release date removed, because it was unpublished.", content.Name, content.Id); // change state to unpublishing - // fixme - casting ((Content)content).PublishedState = PublishedState.Unpublishing; Logger.Info("Document {ContentName} (id={ContentId}) has been unpublished.", content.Name, content.Id); diff --git a/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs b/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs index 8189c6524e..234fa0b1e0 100644 --- a/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs +++ b/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs @@ -353,7 +353,7 @@ namespace Umbraco.Core.Services.Implement public IEnumerable GetComposedOf(int id) { // GetAll is cheap, repository has a full dataset cache policy - // fixme - still, because it uses the cache, race conditions! + // todo - still, because it uses the cache, race conditions! var allContentTypes = GetAll(Array.Empty()); return GetComposedOf(id, allContentTypes); } diff --git a/src/Umbraco.Core/Services/Implement/DataTypeService.cs b/src/Umbraco.Core/Services/Implement/DataTypeService.cs index 84d44649da..16b0dfd953 100644 --- a/src/Umbraco.Core/Services/Implement/DataTypeService.cs +++ b/src/Umbraco.Core/Services/Implement/DataTypeService.cs @@ -204,7 +204,7 @@ namespace Umbraco.Core.Services.Implement _dataTypeContainerRepository.Save(container); scope.Complete(); - // fixme - triggering SavedContainer with a different name?! + // todo - triggering SavedContainer with a different name?! scope.Events.Dispatch(SavedContainer, this, new SaveEventArgs(container, evtMsgs), "RenamedContainer"); return OperationResult.Attempt.Succeed(OperationResultType.Success, evtMsgs, container); @@ -318,7 +318,7 @@ namespace Umbraco.Core.Services.Implement } catch (DataOperationException ex) { - scope.Complete(); // fixme what are we doing here exactly? + scope.Complete(); // todo what are we doing here exactly? return OperationResult.Attempt.Fail(ex.Operation, evtMsgs); } } @@ -426,8 +426,8 @@ namespace Umbraco.Core.Services.Implement // find ContentTypes using this IDataTypeDefinition on a PropertyType, and delete - // fixme - media and members?! - // fixme - non-group properties?! + // todo - media and members?! + // todo - non-group properties?! var query = Query().Where(x => x.DataTypeId == dataType.Id); var contentTypes = _contentTypeRepository.GetByQuery(query); foreach (var contentType in contentTypes) diff --git a/src/Umbraco.Core/Services/Implement/EntityService.cs b/src/Umbraco.Core/Services/Implement/EntityService.cs index 37b569b814..ee6bdeb46d 100644 --- a/src/Umbraco.Core/Services/Implement/EntityService.cs +++ b/src/Umbraco.Core/Services/Implement/EntityService.cs @@ -388,7 +388,7 @@ namespace Umbraco.Core.Services.Implement { var query = Query().Where(x => x.ParentId == parentId); - //fixme - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media + //todo - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media return ((EntityRepository)_entityRepository).GetMediaByQueryWithoutPropertyData(query); } } diff --git a/src/Umbraco.Core/Services/Implement/EntityXmlSerializer.cs b/src/Umbraco.Core/Services/Implement/EntityXmlSerializer.cs index fd1067b3e5..6b52dd4ac1 100644 --- a/src/Umbraco.Core/Services/Implement/EntityXmlSerializer.cs +++ b/src/Umbraco.Core/Services/Implement/EntityXmlSerializer.cs @@ -47,7 +47,7 @@ namespace Umbraco.Core.Services.Implement /// public XElement Serialize(IContent content, bool published, - bool withDescendants = false) //fixme take care of usage! only used for the packager + bool withDescendants = false) //todo take care of usage! only used for the packager { if (content == null) throw new ArgumentNullException(nameof(content)); diff --git a/src/Umbraco.Core/Services/Implement/FileService.cs b/src/Umbraco.Core/Services/Implement/FileService.cs index 0c08404ab3..bbf5a687a8 100644 --- a/src/Umbraco.Core/Services/Implement/FileService.cs +++ b/src/Umbraco.Core/Services/Implement/FileService.cs @@ -331,7 +331,7 @@ namespace Umbraco.Core.Services.Implement var evtMsgs = EventMessagesFactory.Get(); - //fixme: This isn't pretty because we we're required to maintain backwards compatibility so we could not change + //todo: This isn't pretty because we we're required to maintain backwards compatibility so we could not change // the event args here. The other option is to create a different event with different event // args specifically for this method... which also isn't pretty. So fix this in v8! var additionalData = new Dictionary diff --git a/src/Umbraco.Core/Services/Implement/MediaService.cs b/src/Umbraco.Core/Services/Implement/MediaService.cs index f8c6badb37..4c5fea0baa 100644 --- a/src/Umbraco.Core/Services/Implement/MediaService.cs +++ b/src/Umbraco.Core/Services/Implement/MediaService.cs @@ -882,7 +882,7 @@ namespace Umbraco.Core.Services.Implement { scope.WriteLock(Constants.Locks.MediaTree); - // fixme - missing 7.6 "ensure valid path" thing here? + // todo - missing 7.6 "ensure valid path" thing here? // but then should be in PerformMoveLocked on every moved item? var originalPath = media.Path; diff --git a/src/Umbraco.Core/Services/Implement/MemberGroupService.cs b/src/Umbraco.Core/Services/Implement/MemberGroupService.cs index 15b3101744..d9ae7e4261 100644 --- a/src/Umbraco.Core/Services/Implement/MemberGroupService.cs +++ b/src/Umbraco.Core/Services/Implement/MemberGroupService.cs @@ -27,19 +27,6 @@ namespace Umbraco.Core.Services.Implement void MemberGroupRepository_SavingMemberGroup(IMemberGroupRepository sender, SaveEventArgs e) { - // fixme - wtf? - // why is the repository triggering these events? - // and, the events are *dispatched* by the repository so it makes no sense dispatching them again! - - // v7.6 - //using (var scope = UowProvider.ScopeProvider.CreateScope()) - //{ - // scope.Complete(); // always - // if (scope.Events.DispatchCancelable(Saving, this, new SaveEventArgs(e.SavedEntities))) - // e.Cancel = true; - //} - - // v8 if (Saving.IsRaisedEventCancelled(new SaveEventArgs(e.SavedEntities), this)) e.Cancel = true; } diff --git a/src/Umbraco.Core/Services/Implement/MemberService.cs b/src/Umbraco.Core/Services/Implement/MemberService.cs index 2f8c2f9a79..5726c43fc7 100644 --- a/src/Umbraco.Core/Services/Implement/MemberService.cs +++ b/src/Umbraco.Core/Services/Implement/MemberService.cs @@ -391,8 +391,6 @@ namespace Umbraco.Core.Services.Implement } } - // fixme get rid of string filter? - public IEnumerable GetAll(long pageIndex, int pageSize, out long totalRecords, string orderBy, Direction orderDirection, string memberTypeAlias = null, string filter = "") { @@ -1306,7 +1304,7 @@ namespace Umbraco.Core.Services.Implement Id = property.Id, Alias = property.Alias, Name = property.PropertyType.Name, - Value = property.GetValue(), // fixme ignoring variants + Value = property.GetValue(), // todo ignoring variants CreateDate = property.CreateDate, UpdateDate = property.UpdateDate }; @@ -1379,7 +1377,6 @@ namespace Umbraco.Core.Services.Implement } } - // fixme - this should not be here, or??? public string GetDefaultMemberType() { return Current.Services.MemberTypeService.GetDefault(); diff --git a/src/Umbraco.Core/Services/Implement/NotificationService.cs b/src/Umbraco.Core/Services/Implement/NotificationService.cs index ef2bfafcf6..214882a8f2 100644 --- a/src/Umbraco.Core/Services/Implement/NotificationService.cs +++ b/src/Umbraco.Core/Services/Implement/NotificationService.cs @@ -307,7 +307,7 @@ namespace Umbraco.Core.Services.Implement summary.Append("
LanguageLanguage ISODefaultMandatoryDefaultMandatory Fallback
{{ language.name }} @@ -47,17 +45,15 @@ {{ language.culture }} - + - + @@ -65,14 +61,13 @@ (none) - +
"); foreach (var p in content.Properties) { - //fixme doesn't take into account variants + //todo doesn't take into account variants var newText = p.GetValue() != null ? p.GetValue().ToString() : ""; var oldText = newText; diff --git a/src/Umbraco.Core/Services/Implement/RelationService.cs b/src/Umbraco.Core/Services/Implement/RelationService.cs index a4c1b977a0..4d610da4f9 100644 --- a/src/Umbraco.Core/Services/Implement/RelationService.cs +++ b/src/Umbraco.Core/Services/Implement/RelationService.cs @@ -393,7 +393,7 @@ namespace Umbraco.Core.Services.Implement if (scope.Events.DispatchCancelable(SavingRelation, this, saveEventArgs)) { scope.Complete(); - return relation; // fixme - returning sth that does not exist here?! // fixme - returning sth that does not exist here?! + return relation; // todo - returning sth that does not exist here?! } _relationRepository.Save(relation); diff --git a/src/Umbraco.Core/Services/Implement/ScopeRepositoryService.cs b/src/Umbraco.Core/Services/Implement/ScopeRepositoryService.cs index 4905f8b32d..784d18da4e 100644 --- a/src/Umbraco.Core/Services/Implement/ScopeRepositoryService.cs +++ b/src/Umbraco.Core/Services/Implement/ScopeRepositoryService.cs @@ -4,7 +4,7 @@ using Umbraco.Core.Scoping; namespace Umbraco.Core.Services.Implement { - // fixme that one does not add anything = kill + // todo that one does not add anything = kill public abstract class ScopeRepositoryService : RepositoryService { protected ScopeRepositoryService(IScopeProvider provider, ILogger logger, IEventMessagesFactory eventMessagesFactory) diff --git a/src/Umbraco.Core/Services/Implement/UserService.cs b/src/Umbraco.Core/Services/Implement/UserService.cs index 188c6feb04..4d01b97ad8 100644 --- a/src/Umbraco.Core/Services/Implement/UserService.cs +++ b/src/Umbraco.Core/Services/Implement/UserService.cs @@ -200,7 +200,7 @@ namespace Umbraco.Core.Services.Implement } catch (DbException) { - // fixme - refactor users/upgrade + // todo - refactor users/upgrade // currently kinda accepting anything on upgrade, but that won't deal with all cases // so we need to do it differently, see the custom UmbracoPocoDataBuilder which should // be better BUT requires that the app restarts after the upgrade! @@ -705,7 +705,7 @@ namespace Umbraco.Core.Services.Implement } catch (DbException) { - // fixme - refactor users/upgrade + // todo - refactor users/upgrade // currently kinda accepting anything on upgrade, but that won't deal with all cases // so we need to do it differently, see the custom UmbracoPocoDataBuilder which should // be better BUT requires that the app restarts after the upgrade! diff --git a/src/Umbraco.Core/Services/OperationResult.cs b/src/Umbraco.Core/Services/OperationResult.cs index e901b58119..f6349a985d 100644 --- a/src/Umbraco.Core/Services/OperationResult.cs +++ b/src/Umbraco.Core/Services/OperationResult.cs @@ -3,7 +3,7 @@ using Umbraco.Core.Events; namespace Umbraco.Core.Services { - // FIXME + // todo // no need for Attempt - the operation result SHOULD KNOW if it's a success or a failure! // but then each WhateverResultType must @@ -119,7 +119,7 @@ namespace Umbraco.Core.Services return new OperationResult(OperationResultType.FailedCancelledByEvent, eventMessages); } - // fixme - this exists to support services that still return Attempt + // todo - this exists to support services that still return Attempt // these services should directly return an OperationResult, and then this static class should be deleted internal static class Attempt { diff --git a/src/Umbraco.Core/Services/OperationResultType.cs b/src/Umbraco.Core/Services/OperationResultType.cs index 9310741ca5..01d0434b87 100644 --- a/src/Umbraco.Core/Services/OperationResultType.cs +++ b/src/Umbraco.Core/Services/OperationResultType.cs @@ -38,7 +38,7 @@ /// /// No operation has been executed because it was not needed (eg deleting an item that doesn't exist). /// - NoOperation = Failed | 6, // fixme shouldn't it be a success? + NoOperation = Failed | 6, // todo shouldn't it be a success? //TODO: In the future, we might need to add more operations statuses, potentially like 'FailedByPermissions', etc... } diff --git a/src/Umbraco.Core/Services/PublishResultType.cs b/src/Umbraco.Core/Services/PublishResultType.cs index f79dab91d3..acf2b43951 100644 --- a/src/Umbraco.Core/Services/PublishResultType.cs +++ b/src/Umbraco.Core/Services/PublishResultType.cs @@ -115,7 +115,7 @@ /// /// The document could not be published because it has no publishing flags or values. /// - FailedPublishNothingToPublish = FailedPublish | 9, // in ContentService.StrategyCanPublish - fixme weird + FailedPublishNothingToPublish = FailedPublish | 9, // in ContentService.StrategyCanPublish - todo weird /// /// The document could not be published because some mandatory cultures are missing. diff --git a/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs b/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs index b1c617e9a7..40c9b758d1 100644 --- a/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs +++ b/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs @@ -3337,7 +3337,7 @@ namespace Umbraco.Core.Strings // time for a T4 template? // also we should support extensibility so ppl can register more cases in external code - // fixme + // todo // transliterates Анастасия as Anastasiya, and not Anastasia // Ольга --> Ol'ga, Татьяна --> Tat'yana -- that's bad (?) // Note: should ä (german umlaut) become a or ae ? diff --git a/src/Umbraco.Core/Sync/ApplicationUrlHelper.cs b/src/Umbraco.Core/Sync/ApplicationUrlHelper.cs index 0a8d60e209..d2b7903343 100644 --- a/src/Umbraco.Core/Sync/ApplicationUrlHelper.cs +++ b/src/Umbraco.Core/Sync/ApplicationUrlHelper.cs @@ -26,7 +26,7 @@ namespace Umbraco.Core.Sync /// in config files but is determined programmatically. /// Must be assigned before resolution is frozen. /// - // FIXME need another way to do it, eg an interface, injected! + // todo need another way to do it, eg an interface, injected! public static Func ApplicationUrlProvider { get; set; } internal static string GetApplicationUrl(ILogger logger, IGlobalSettings globalSettings, IUmbracoSettingsSection settings, IServerRegistrar serverRegistrar, HttpRequestBase request = null) diff --git a/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs b/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs index 6844e6e75c..fa59fe2e9c 100644 --- a/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs +++ b/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs @@ -302,7 +302,7 @@ namespace Umbraco.Core.Sync // (depending on what the cache refreshers are doing). I think it's best we do the one time check, process them and continue, if there are // pending requests after being processed, they'll just be processed on the next poll. // - // FIXME not true if we're running on a background thread, assuming we can? + // todo not true if we're running on a background thread, assuming we can? var sql = Sql().SelectAll() .From() diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index ec9b2d8eb0..f1a000f57c 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -598,7 +598,6 @@ - @@ -806,7 +805,6 @@ - @@ -1007,7 +1005,6 @@ - From 9522ee826f06752ae5f84b344a7fd07ac058635b Mon Sep 17 00:00:00 2001 From: Stephan Date: Mon, 21 Jan 2019 15:57:48 +0100 Subject: [PATCH 186/437] Deal with fixme in Umbraco.Web --- .../Cache/ContentCacheRefresher.cs | 4 ++-- .../Cache/DataTypeCacheRefresher.cs | 2 +- .../Cache/DistributedCacheBinder.cs | 2 +- .../Cache/DistributedCacheBinder_Handlers.cs | 10 ++++---- .../Cache/LanguageCacheRefresher.cs | 2 +- src/Umbraco.Web/Composing/Current.cs | 2 +- .../Controllers/UmbLoginController.cs | 7 ++---- .../Controllers/UmbLoginStatusController.cs | 10 ++++---- .../Controllers/UmbProfileController.cs | 10 ++++---- .../Controllers/UmbRegisterController.cs | 10 ++++---- .../Editors/BackOfficeServerVariables.cs | 4 ++-- src/Umbraco.Web/Editors/ContentController.cs | 11 +++------ .../Editors/ContentControllerBase.cs | 2 +- .../Editors/DataTypeValidateAttribute.cs | 2 +- src/Umbraco.Web/Editors/EditorValidator.cs | 2 +- src/Umbraco.Web/Editors/EntityController.cs | 4 +--- .../Filters/UserGroupValidateAttribute.cs | 2 +- .../Editors/KeepAliveController.cs | 2 +- src/Umbraco.Web/Editors/MemberController.cs | 2 +- .../Editors/NuCacheStatusController.cs | 1 - src/Umbraco.Web/Editors/PreviewController.cs | 7 ------ .../Editors/TemplateQueryController.cs | 3 +-- src/Umbraco.Web/Editors/UsersController.cs | 2 +- .../HealthCheck/HealthCheckResults.cs | 2 +- .../Install/InstallStepCollection.cs | 2 +- .../InstallSteps/StarterKitCleanupStep.cs | 2 +- .../Install/InstallSteps/UpgradeStep.cs | 4 ++-- .../Install/Models/InstallPackageModel.cs | 2 +- src/Umbraco.Web/Logging/WebProfiler.cs | 2 +- .../Mapping/ContentItemDisplayNameResolver.cs | 23 ------------------- .../ContentPropertyDisplayConverter.cs | 2 +- .../Mapping/ContentTypeProfileExtensions.cs | 4 ++-- .../Models/Mapping/DatabaseTypeResolver.cs | 2 +- .../Models/Mapping/EntityMapperProfile.cs | 2 +- .../Models/Mapping/MacroMapperProfile.cs | 2 +- .../MemberTabsAndPropertiesResolver.cs | 2 +- .../PublishedValueFallback.cs | 2 +- .../Models/PublishedContentBase.cs | 8 +++---- src/Umbraco.Web/Models/PublishedProperty.cs | 2 +- src/Umbraco.Web/Mvc/RenderMvcController.cs | 1 - src/Umbraco.Web/Mvc/RenderRouteHandler.cs | 2 +- src/Umbraco.Web/Mvc/SurfaceController.cs | 7 ++---- src/Umbraco.Web/Mvc/UmbracoController.cs | 8 ------- .../Mvc/UmbracoViewPageOfTModel.cs | 2 +- src/Umbraco.Web/Properties/AssemblyInfo.cs | 4 ---- .../PropertyEditors/GridConfiguration.cs | 4 ++-- .../ImageCropperPropertyEditor.cs | 2 +- .../ImageCropperPropertyValueEditor.cs | 2 +- .../PropertyEditors/ListViewConfiguration.cs | 6 ++--- .../MacroContainerPropertyEditor.cs | 2 +- .../MultipleTextStringConfigurationEditor.cs | 4 ++-- .../NestedContentPropertyEditor.cs | 2 -- .../PropertyEditors/RichTextConfiguration.cs | 2 +- .../PropertyEditors/TrueFalseConfiguration.cs | 2 +- .../PublishedCache/IPublishedCache.cs | 2 +- .../PublishedCache/NuCache/ContentCache.cs | 2 +- .../PublishedCache/NuCache/ContentNode.cs | 2 +- .../PublishedCache/NuCache/ContentStore.cs | 4 ++-- ....DictionaryOfCultureVariationSerializer.cs | 2 +- .../NuCache/DataSource/DatabaseDataSource.cs | 2 +- .../NuCache/DataSource/PropertyData.cs | 4 ++-- src/Umbraco.Web/Umbraco.Web.csproj | 1 - .../PackageActions/publishRootDocument.cs | 2 +- 63 files changed, 84 insertions(+), 153 deletions(-) delete mode 100644 src/Umbraco.Web/Models/Mapping/ContentItemDisplayNameResolver.cs diff --git a/src/Umbraco.Web/Cache/ContentCacheRefresher.cs b/src/Umbraco.Web/Cache/ContentCacheRefresher.cs index 3f2ef1620c..a1942ed141 100644 --- a/src/Umbraco.Web/Cache/ContentCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/ContentCacheRefresher.cs @@ -75,7 +75,7 @@ namespace Umbraco.Web.Cache if (assignedDomains.Count > 0) { - //fixme - this is duplicating the logic in DomainCacheRefresher BUT we cannot inject that into this because it it not registered explicitly in the container, + // todo - this is duplicating the logic in DomainCacheRefresher BUT we cannot inject that into this because it it not registered explicitly in the container, // and we cannot inject the CacheRefresherCollection since that would be a circular reference, so what is the best way to call directly in to the // DomainCacheRefresher? @@ -92,7 +92,7 @@ namespace Umbraco.Web.Cache // content and when the PublishedCachesService is notified of changes it does not see // the new content... - // fixme - what about this? + // todo - what about this? // should rename it, and then, this is only for Deploy, and then, ??? //if (Suspendable.PageCacheRefresher.CanUpdateDocumentCache) // ... diff --git a/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs b/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs index f3d1337403..6916b40f2d 100644 --- a/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs @@ -56,7 +56,7 @@ namespace Umbraco.Web.Cache _idkMap.ClearCache(payload.Id); } - // fixme - not sure I like these? + // todo - not sure I like these? TagsValueConverter.ClearCaches(); SliderValueConverter.ClearCaches(); diff --git a/src/Umbraco.Web/Cache/DistributedCacheBinder.cs b/src/Umbraco.Web/Cache/DistributedCacheBinder.cs index f7171a840a..ce8267dfc8 100644 --- a/src/Umbraco.Web/Cache/DistributedCacheBinder.cs +++ b/src/Umbraco.Web/Cache/DistributedCacheBinder.cs @@ -71,7 +71,7 @@ namespace Umbraco.Web.Cache var handler = FindHandler(e); if (handler == null) { - // fixme - should this be fatal (ie, an exception)? + // 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); continue; diff --git a/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs b/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs index 3a3eb1b8fb..f75d8ead87 100644 --- a/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs +++ b/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs @@ -71,7 +71,6 @@ namespace Umbraco.Web.Cache () => DataTypeService.Saved -= DataTypeService_Saved); // bind to stylesheet events - // fixme why not in v8? Bind(() => FileService.SavedStylesheet += FileService_SavedStylesheet, () => FileService.SavedStylesheet -= FileService_SavedStylesheet); Bind(() => FileService.DeletedStylesheet += FileService_DeletedStylesheet, @@ -197,7 +196,7 @@ namespace Umbraco.Web.Cache _distributedCache.RefreshContentCache(args.Changes.ToArray()); } - // fixme our weird events handling wants this for now + // todo our weird events handling wants this for now private void ContentService_Deleted(IContentService sender, DeleteEventArgs e) { } private void ContentService_Moved(IContentService sender, MoveEventArgs e) { } private void ContentService_Trashed(IContentService sender, MoveEventArgs e) { } @@ -308,7 +307,7 @@ namespace Umbraco.Web.Cache _distributedCache.RefreshContentTypeCache(args.Changes.ToArray()); } - // fixme our weird events handling wants this for now + // todo our weird events handling wants this for now private void ContentTypeService_Saved(IContentTypeService sender, SaveEventArgs args) { } private void MediaTypeService_Saved(IMediaTypeService sender, SaveEventArgs args) { } private void MemberTypeService_Saved(IMemberTypeService sender, SaveEventArgs args) { } @@ -320,7 +319,6 @@ namespace Umbraco.Web.Cache #region UserService - // fixme STATIC?? private void UserService_UserGroupPermissionsAssigned(IUserService sender, SaveEventArgs e) { //TODO: Not sure if we need this yet depends if we start caching permissions @@ -381,7 +379,7 @@ namespace Umbraco.Web.Cache _distributedCache.RefreshTemplateCache(entity.Id); } - // fixme our weird events handling wants this for now + // todo our weird events handling wants this for now private void FileService_DeletedStylesheet(IFileService sender, DeleteEventArgs e) { } private void FileService_SavedStylesheet(IFileService sender, SaveEventArgs e) { } @@ -410,7 +408,7 @@ namespace Umbraco.Web.Cache _distributedCache.RefreshMediaCache(args.Changes.ToArray()); } - // fixme our weird events handling wants this for now + // todo our weird events handling wants this for now private void MediaService_Saved(IMediaService sender, SaveEventArgs e) { } private void MediaService_Deleted(IMediaService sender, DeleteEventArgs e) { } private void MediaService_Moved(IMediaService sender, MoveEventArgs e) { } diff --git a/src/Umbraco.Web/Cache/LanguageCacheRefresher.cs b/src/Umbraco.Web/Cache/LanguageCacheRefresher.cs index f5fe5075eb..c5dfcfd1e7 100644 --- a/src/Umbraco.Web/Cache/LanguageCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/LanguageCacheRefresher.cs @@ -57,7 +57,7 @@ namespace Umbraco.Web.Cache if (assignedDomains.Count > 0) { - //fixme - this is duplicating the logic in DomainCacheRefresher BUT we cannot inject that into this because it it not registered explicitly in the container, + // todo - this is duplicating the logic in DomainCacheRefresher BUT we cannot inject that into this because it it not registered explicitly in the container, // and we cannot inject the CacheRefresherCollection since that would be a circular reference, so what is the best way to call directly in to the // DomainCacheRefresher? diff --git a/src/Umbraco.Web/Composing/Current.cs b/src/Umbraco.Web/Composing/Current.cs index 28404148b8..bd0e3d02dc 100644 --- a/src/Umbraco.Web/Composing/Current.cs +++ b/src/Umbraco.Web/Composing/Current.cs @@ -63,7 +63,7 @@ namespace Umbraco.Web.Composing #region Temp & Special - // fixme - have to keep this until tests are refactored + // todo - have to keep this until tests are refactored // but then, it should all be managed properly in the container public static IUmbracoContextAccessor UmbracoContextAccessor { diff --git a/src/Umbraco.Web/Controllers/UmbLoginController.cs b/src/Umbraco.Web/Controllers/UmbLoginController.cs index 3b6389f25a..97444dbc6a 100644 --- a/src/Umbraco.Web/Controllers/UmbLoginController.cs +++ b/src/Umbraco.Web/Controllers/UmbLoginController.cs @@ -11,15 +11,12 @@ namespace Umbraco.Web.Controllers { public class UmbLoginController : SurfaceController { - // fixme - delete? public UmbLoginController() - { - } + { } public UmbLoginController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger) : base(umbracoContext, databaseFactory, services, appCaches, logger, profilingLogger) - { - } + { } [HttpPost] [ValidateAntiForgeryToken] diff --git a/src/Umbraco.Web/Controllers/UmbLoginStatusController.cs b/src/Umbraco.Web/Controllers/UmbLoginStatusController.cs index 02d567c2bb..fddefbe4a9 100644 --- a/src/Umbraco.Web/Controllers/UmbLoginStatusController.cs +++ b/src/Umbraco.Web/Controllers/UmbLoginStatusController.cs @@ -13,14 +13,12 @@ namespace Umbraco.Web.Controllers [MemberAuthorize] public class UmbLoginStatusController : SurfaceController { - // fixme - delete? public UmbLoginStatusController() - { - } + { } - public UmbLoginStatusController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger) : base(umbracoContext, databaseFactory, services, appCaches, logger, profilingLogger) - { - } + public UmbLoginStatusController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger) + : base(umbracoContext, databaseFactory, services, appCaches, logger, profilingLogger) + { } [HttpPost] [ValidateAntiForgeryToken] diff --git a/src/Umbraco.Web/Controllers/UmbProfileController.cs b/src/Umbraco.Web/Controllers/UmbProfileController.cs index 6c639d4216..f22192a1cc 100644 --- a/src/Umbraco.Web/Controllers/UmbProfileController.cs +++ b/src/Umbraco.Web/Controllers/UmbProfileController.cs @@ -14,14 +14,12 @@ namespace Umbraco.Web.Controllers [MemberAuthorize] public class UmbProfileController : SurfaceController { - // fixme - delete? public UmbProfileController() - { - } + { } - public UmbProfileController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger) : base(umbracoContext, databaseFactory, services, appCaches, logger, profilingLogger) - { - } + public UmbProfileController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger) + : base(umbracoContext, databaseFactory, services, appCaches, logger, profilingLogger) + { } [HttpPost] [ValidateAntiForgeryToken] diff --git a/src/Umbraco.Web/Controllers/UmbRegisterController.cs b/src/Umbraco.Web/Controllers/UmbRegisterController.cs index 8de92a8a71..66c8a8143c 100644 --- a/src/Umbraco.Web/Controllers/UmbRegisterController.cs +++ b/src/Umbraco.Web/Controllers/UmbRegisterController.cs @@ -13,14 +13,12 @@ namespace Umbraco.Web.Controllers { public class UmbRegisterController : SurfaceController { - // fixme - delete? public UmbRegisterController() - { - } + { } - public UmbRegisterController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger) : base(umbracoContext, databaseFactory, services, appCaches, logger, profilingLogger) - { - } + public UmbRegisterController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger) + : base(umbracoContext, databaseFactory, services, appCaches, logger, profilingLogger) + { } [HttpPost] [ValidateAntiForgeryToken] diff --git a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs index e266ca01c3..40891efe9e 100644 --- a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs +++ b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs @@ -425,7 +425,7 @@ namespace Umbraco.Web.Editors /// it's resolving which is unecessary and annoying. /// private static readonly Lazy> TreeControllerTypes - = new Lazy>(() => Current.TypeLoader.GetAttributedTreeControllers().ToArray()); // fixme inject + = new Lazy>(() => Current.TypeLoader.GetAttributedTreeControllers().ToArray()); // todo inject /// /// Returns the server variables regarding the application state @@ -438,7 +438,7 @@ namespace Umbraco.Web.Editors // add versions - see UmbracoVersion for details & differences // the complete application version (eg "8.1.2-alpha.25") - { "version", _runtimeState.SemanticVersion.ToSemanticString() }, // fixme that's UmbracoVersion.Version! + { "version", UmbracoVersion.SemanticVersion.ToSemanticString() }, // the assembly version (eg "8.0.0") { "assemblyVersion", UmbracoVersion.AssemblyVersion.ToString() } diff --git a/src/Umbraco.Web/Editors/ContentController.cs b/src/Umbraco.Web/Editors/ContentController.cs index 3b361fcf1e..1e48f027d4 100644 --- a/src/Umbraco.Web/Editors/ContentController.cs +++ b/src/Umbraco.Web/Editors/ContentController.cs @@ -94,10 +94,8 @@ namespace Umbraco.Web.Editors [FilterAllowedOutgoingContent(typeof(IEnumerable))] public IEnumerable GetByIds([FromUri]int[] ids) { - //fixme what about cultures? - var foundContent = Services.ContentService.GetByIds(ids); - return foundContent.Select(x => MapToDisplay(x)); + return foundContent.Select(MapToDisplay); } /// @@ -248,7 +246,6 @@ namespace Umbraco.Web.Editors return display; } - //fixme what about cultures? public ContentItemDisplay GetBlueprintById(int id) { var foundContent = Services.ContentService.GetBlueprintById(id); @@ -274,7 +271,7 @@ namespace Umbraco.Web.Editors content.AllowedActions = new[] { "A" }; content.IsBlueprint = true; - //fixme - exclude the content apps here + //todo - exclude the content apps here //var excludeProps = new[] { "_umb_urls", "_umb_releasedate", "_umb_expiredate", "_umb_template" }; //var propsTab = content.Tabs.Last(); //propsTab.Properties = propsTab.Properties @@ -2021,7 +2018,7 @@ namespace Umbraco.Web.Editors case PublishResultType.FailedPublishMandatoryCultureMissing: display.AddWarningNotification( Services.TextService.Localize("publish"), - "publish/contentPublishedFailedByCulture"); // fixme properly localize, these keys are missing from lang files! + "publish/contentPublishedFailedByCulture"); break; default: throw new IndexOutOfRangeException($"PublishedResultType \"{status.Key}\" was not expected."); @@ -2080,8 +2077,6 @@ namespace Umbraco.Web.Editors var rollbackVersions = new List(); var writerIds = new HashSet(); - //Return a list of all versions of a specific content node - // fixme - cap at 50 versions for now? var versions = Services.ContentService.GetVersionsSlim(contentId, 0, 50); //Not all nodes are variants & thus culture can be null diff --git a/src/Umbraco.Web/Editors/ContentControllerBase.cs b/src/Umbraco.Web/Editors/ContentControllerBase.cs index 09d91a6436..1a8820c4a0 100644 --- a/src/Umbraco.Web/Editors/ContentControllerBase.cs +++ b/src/Umbraco.Web/Editors/ContentControllerBase.cs @@ -148,7 +148,7 @@ namespace Umbraco.Web.Editors string[] messageParams = null) { //if there's already a default event message, don't add our default one - //fixme inject + //todo inject var msgs = Current.EventMessages; if (msgs != null && msgs.GetAll().Any(x => x.IsDefaultEventMessage)) return; diff --git a/src/Umbraco.Web/Editors/DataTypeValidateAttribute.cs b/src/Umbraco.Web/Editors/DataTypeValidateAttribute.cs index bbb9e22082..738dd05c75 100644 --- a/src/Umbraco.Web/Editors/DataTypeValidateAttribute.cs +++ b/src/Umbraco.Web/Editors/DataTypeValidateAttribute.cs @@ -96,7 +96,7 @@ namespace Umbraco.Web.Editors var editorField = configurationEditor.Fields.SingleOrDefault(x => x.Key == field.Key); if (editorField == null) continue; - // run each IValueValidator (with null valueType and dataTypeConfiguration: not relevant here) - fixme - editing + // run each IValueValidator (with null valueType and dataTypeConfiguration: not relevant here) foreach (var validator in editorField.Validators) foreach (var result in validator.Validate(field.Value, null, null)) actionContext.ModelState.AddValidationError(result, "Properties", field.Key); diff --git a/src/Umbraco.Web/Editors/EditorValidator.cs b/src/Umbraco.Web/Editors/EditorValidator.cs index 2010fae943..537ae834d3 100644 --- a/src/Umbraco.Web/Editors/EditorValidator.cs +++ b/src/Umbraco.Web/Editors/EditorValidator.cs @@ -16,7 +16,7 @@ namespace Umbraco.Web.Editors { var modelType = model.GetType(); - var validationResults = Current.EditorValidators // fixme inject + var validationResults = Current.EditorValidators // todo inject .Where(x => x.ModelType == modelType) .SelectMany(x => x.Validate(model)) .Where(x => !string.IsNullOrWhiteSpace(x.ErrorMessage) && x.MemberNames.Any()); diff --git a/src/Umbraco.Web/Editors/EntityController.cs b/src/Umbraco.Web/Editors/EntityController.cs index 5ff0cac765..b25f3f5af1 100644 --- a/src/Umbraco.Web/Editors/EntityController.cs +++ b/src/Umbraco.Web/Editors/EntityController.cs @@ -863,8 +863,6 @@ namespace Umbraco.Web.Editors } } - // fixme - need to implement GetAll for backoffice controllers - dynamics? - public IEnumerable GetAll(UmbracoEntityTypes type, string postFilter, [FromUri]IDictionary postFilterParams) { return GetResultForAll(type, postFilter, postFilterParams); @@ -959,7 +957,7 @@ namespace Umbraco.Web.Editors // if a post filter is assigned then try to execute it if (postFilter.IsNullOrWhiteSpace() == false) { - // fixme - trouble is, we've killed the dynamic Where thing! + // fixme/task/critical - trouble is, we've killed the dynamic Where thing! throw new NotImplementedException("oops"); //return postFilterParams == null // ? entities.AsQueryable().Where(postFilter).ToArray() diff --git a/src/Umbraco.Web/Editors/Filters/UserGroupValidateAttribute.cs b/src/Umbraco.Web/Editors/Filters/UserGroupValidateAttribute.cs index f062be1aff..3481c754d3 100644 --- a/src/Umbraco.Web/Editors/Filters/UserGroupValidateAttribute.cs +++ b/src/Umbraco.Web/Editors/Filters/UserGroupValidateAttribute.cs @@ -27,7 +27,7 @@ namespace Umbraco.Web.Editors.Filters _userService = userService; } - private IUserService UserService => _userService ?? Current.Services.UserService; // fixme inject + private IUserService UserService => _userService ?? Current.Services.UserService; // todo inject public override void OnActionExecuting(HttpActionContext actionContext) { diff --git a/src/Umbraco.Web/Editors/KeepAliveController.cs b/src/Umbraco.Web/Editors/KeepAliveController.cs index b067a5b67e..fa33abea44 100644 --- a/src/Umbraco.Web/Editors/KeepAliveController.cs +++ b/src/Umbraco.Web/Editors/KeepAliveController.cs @@ -4,7 +4,7 @@ using Umbraco.Web.WebApi; namespace Umbraco.Web.Editors { - // fixme + // fixme/task - deal with this // this is not authenticated, and therefore public, and therefore reveals we // are running Umbraco - but, all requests should come from localhost really, // so there should be a way to 404 when the request comes from the outside. diff --git a/src/Umbraco.Web/Editors/MemberController.cs b/src/Umbraco.Web/Editors/MemberController.cs index 36027ee2a5..92ca648c3f 100644 --- a/src/Umbraco.Web/Editors/MemberController.cs +++ b/src/Umbraco.Web/Editors/MemberController.cs @@ -593,7 +593,7 @@ namespace Umbraco.Web.Editors { p.SetValue(valueMapped.GetValue()); - // fixme - ok, I give up, at that point tags are dead here, until we figure it out + // fixme/task - ok, I give up, at that point tags are dead here, until we figure it out //p.TagChanges.Behavior = valueMapped.TagChanges.Behavior; //p.TagChanges.Enable = valueMapped.TagChanges.Enable; //p.TagChanges.Tags = valueMapped.TagChanges.Tags; diff --git a/src/Umbraco.Web/Editors/NuCacheStatusController.cs b/src/Umbraco.Web/Editors/NuCacheStatusController.cs index b9cee665cb..fb4b54c2b2 100644 --- a/src/Umbraco.Web/Editors/NuCacheStatusController.cs +++ b/src/Umbraco.Web/Editors/NuCacheStatusController.cs @@ -32,7 +32,6 @@ namespace Umbraco.Web.Editors [HttpPost] public string RebuildDbCache() { - // fixme - should wrap in a service scope once we have them var service = PublishedSnapshotService; service.RebuildContentDbCache(); service.RebuildMediaDbCache(); diff --git a/src/Umbraco.Web/Editors/PreviewController.cs b/src/Umbraco.Web/Editors/PreviewController.cs index 6e119d68d9..bd14a6c6f4 100644 --- a/src/Umbraco.Web/Editors/PreviewController.cs +++ b/src/Umbraco.Web/Editors/PreviewController.cs @@ -82,13 +82,6 @@ namespace Umbraco.Web.Editors return null; } - ////fixme: not sure we need this anymore since there is no canvas editing - then we can remove that route too - //public ActionResult Editors(string editor) - //{ - // if (string.IsNullOrEmpty(editor)) throw new ArgumentNullException(nameof(editor)); - // return View(_globalSettings.Path.EnsureEndsWith('/') + "Views/Preview/" + editor.Replace(".html", string.Empty) + ".cshtml"); - //} - public ActionResult End(string redir = null) { var previewToken = Request.GetPreviewCookieValue(); diff --git a/src/Umbraco.Web/Editors/TemplateQueryController.cs b/src/Umbraco.Web/Editors/TemplateQueryController.cs index 00e124cb29..38b60f4294 100644 --- a/src/Umbraco.Web/Editors/TemplateQueryController.cs +++ b/src/Umbraco.Web/Editors/TemplateQueryController.cs @@ -67,7 +67,6 @@ namespace Umbraco.Web.Editors sb.Append("Model.Root()"); - //fixme: This timer thing is not correct, it's definitely not timing the resulting query, the timer really isn't important and might as well be removed var timer = new Stopwatch(); timer.Start(); @@ -160,7 +159,7 @@ namespace Umbraco.Web.Editors //trial-run the tokenized clause to time the execution //for review - this uses a tonized query rather then the normal linq query. - // fixme - that cannot work anymore now that we have killed dynamic support + // fixme/task/critical - that cannot work anymore now that we have killed dynamic support //contents = contents.AsQueryable().Where(clause, model.Filters.Select(this.GetConstraintValue).ToArray()); throw new NotImplementedException(); diff --git a/src/Umbraco.Web/Editors/UsersController.cs b/src/Umbraco.Web/Editors/UsersController.cs index 36a8bf1158..e7432c4828 100644 --- a/src/Umbraco.Web/Editors/UsersController.cs +++ b/src/Umbraco.Web/Editors/UsersController.cs @@ -208,7 +208,7 @@ namespace Umbraco.Web.Editors if (!Security.CurrentUser.IsSuper()) { - // only super can see super - but don't use IsSuper, cannot be mapped to SQL - fixme NOW + // only super can see super - but don't use IsSuper, cannot be mapped to SQL //filterQuery.Where(x => !x.IsSuper()); filterQuery.Where(x => x.Id != Constants.Security.SuperUserId); } diff --git a/src/Umbraco.Web/HealthCheck/HealthCheckResults.cs b/src/Umbraco.Web/HealthCheck/HealthCheckResults.cs index 5962f2cabc..f8c3708e2e 100644 --- a/src/Umbraco.Web/HealthCheck/HealthCheckResults.cs +++ b/src/Umbraco.Web/HealthCheck/HealthCheckResults.cs @@ -14,7 +14,7 @@ namespace Umbraco.Web.HealthCheck private readonly Dictionary> _results; public readonly bool AllChecksSuccessful; - private ILogger Logger => Current.Logger; // fixme inject + private ILogger Logger => Current.Logger; // todo inject public HealthCheckResults(IEnumerable checks) { diff --git a/src/Umbraco.Web/Install/InstallStepCollection.cs b/src/Umbraco.Web/Install/InstallStepCollection.cs index ffbd3f10cb..d5c32d0ce6 100644 --- a/src/Umbraco.Web/Install/InstallStepCollection.cs +++ b/src/Umbraco.Web/Install/InstallStepCollection.cs @@ -14,7 +14,7 @@ namespace Umbraco.Web.Install { _installHelper = installHelper; - // fixme this is ugly but I have a branch where it's nicely refactored - for now we just want to manage ordering + // todo this is ugly but I have a branch where it's nicely refactored - for now we just want to manage ordering var a = installerSteps.ToArray(); _orderedInstallerSteps = new InstallSetupStep[] { diff --git a/src/Umbraco.Web/Install/InstallSteps/StarterKitCleanupStep.cs b/src/Umbraco.Web/Install/InstallSteps/StarterKitCleanupStep.cs index 8c168f7230..80fda66661 100644 --- a/src/Umbraco.Web/Install/InstallSteps/StarterKitCleanupStep.cs +++ b/src/Umbraco.Web/Install/InstallSteps/StarterKitCleanupStep.cs @@ -26,7 +26,7 @@ namespace Umbraco.Web.Install.InstallSteps { packageFile = HttpUtility.UrlDecode(packageFile); - //fixme: When does the zip file get deleted? + //todo: When does the zip file get deleted? } public override bool RequiresExecution(object model) diff --git a/src/Umbraco.Web/Install/InstallSteps/UpgradeStep.cs b/src/Umbraco.Web/Install/InstallSteps/UpgradeStep.cs index 5f44555092..1477105797 100644 --- a/src/Umbraco.Web/Install/InstallSteps/UpgradeStep.cs +++ b/src/Umbraco.Web/Install/InstallSteps/UpgradeStep.cs @@ -20,7 +20,7 @@ namespace Umbraco.Web.Install.InstallSteps { get { - // fixme - if UmbracoVersion.Local is null? + // todo- if UmbracoVersion.Local is null? // it means that there is a database but the web.config version is cleared // that was a "normal" way to force the upgrader to execute, and we would detect the current // version via the DB like DatabaseSchemaResult.DetermineInstalledVersion - magic, do we really @@ -37,7 +37,7 @@ namespace Umbraco.Web.Install.InstallSteps return value; } - var state = Current.RuntimeState; // fixme inject + var state = Current.RuntimeState; // todo inject var currentState = FormatGuidState(state.CurrentMigrationState); var newState = FormatGuidState(state.FinalMigrationState); diff --git a/src/Umbraco.Web/Install/Models/InstallPackageModel.cs b/src/Umbraco.Web/Install/Models/InstallPackageModel.cs index 3ab74fa5e4..10335c48fc 100644 --- a/src/Umbraco.Web/Install/Models/InstallPackageModel.cs +++ b/src/Umbraco.Web/Install/Models/InstallPackageModel.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; namespace Umbraco.Web.Install.Models { - //fixme: do we need this? + //todo : do we need this? [Obsolete("This is only used for the obsolete controller InstallPackageController")] [DataContract(Name = "installPackage", Namespace = "")] public class InstallPackageModel diff --git a/src/Umbraco.Web/Logging/WebProfiler.cs b/src/Umbraco.Web/Logging/WebProfiler.cs index 77b57e768d..e31ef75209 100755 --- a/src/Umbraco.Web/Logging/WebProfiler.cs +++ b/src/Umbraco.Web/Logging/WebProfiler.cs @@ -47,7 +47,7 @@ namespace Umbraco.Web.Logging { // if this is the boot request, or if we should profile this request, stop // (the boot request is always profiled, no matter what) - var isBootRequest = ((HttpApplication) sender).Context.Items[BootRequestItemKey] != null; // fixme perfs + var isBootRequest = ((HttpApplication) sender).Context.Items[BootRequestItemKey] != null; if (isBootRequest) _provider.EndBootRequest(); if (isBootRequest || ShouldProfile(sender)) diff --git a/src/Umbraco.Web/Models/Mapping/ContentItemDisplayNameResolver.cs b/src/Umbraco.Web/Models/Mapping/ContentItemDisplayNameResolver.cs deleted file mode 100644 index 6cba6ff6ab..0000000000 --- a/src/Umbraco.Web/Models/Mapping/ContentItemDisplayNameResolver.cs +++ /dev/null @@ -1,23 +0,0 @@ -//using AutoMapper; -//using Umbraco.Core; -//using Umbraco.Core.Models; -//using Umbraco.Web.Models.ContentEditing; -//using ContentVariation = Umbraco.Core.Models.ContentVariation; - -// fixme remove this file? -//namespace Umbraco.Web.Models.Mapping -//{ -// /// -// /// Used to map the name from an depending on it's variation settings -// /// -// internal class ContentItemDisplayNameResolver : IValueResolver -// { -// public string Resolve(IContent source, ContentVariationDisplay destination, string destMember, ResolutionContext context) -// { -// var culture = context.GetCulture(); -// return source.ContentType.VariesByCulture() && culture != null -// ? source.GetCultureName(culture) -// : source.Name; -// } -// } -//} diff --git a/src/Umbraco.Web/Models/Mapping/ContentPropertyDisplayConverter.cs b/src/Umbraco.Web/Models/Mapping/ContentPropertyDisplayConverter.cs index 2f7590d6fd..3c2dd01c9c 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentPropertyDisplayConverter.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentPropertyDisplayConverter.cs @@ -29,7 +29,7 @@ namespace Umbraco.Web.Models.Mapping var config = DataTypeService.GetDataType(originalProp.PropertyType.DataTypeId).Configuration; - // fixme - IDataValueEditor configuration - general issue + // todo - IDataValueEditor configuration - general issue // GetValueEditor() returns a non-configured IDataValueEditor // - for richtext and nested, configuration determines HideLabel, so we need to configure the value editor // - could configuration also determines ValueType, everywhere? diff --git a/src/Umbraco.Web/Models/Mapping/ContentTypeProfileExtensions.cs b/src/Umbraco.Web/Models/Mapping/ContentTypeProfileExtensions.cs index 1348dbb8a9..ba8076b457 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentTypeProfileExtensions.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentTypeProfileExtensions.cs @@ -25,7 +25,7 @@ namespace Umbraco.Web.Models.Mapping where TPropertyTypeBasic : PropertyTypeBasic { return mapping - .ConstructUsing(x => new PropertyGroup(false)) // fixme - we have NO idea of isPublishing here = wtf? + .ConstructUsing(x => new PropertyGroup(false)) // todo - we have NO idea of isPublishing here = wtf? .IgnoreEntityCommonProperties() .ForMember(dest => dest.Id, map => map.Condition(src => src.Id > 0)) .ForMember(dest => dest.Key, map => map.Ignore()) @@ -160,7 +160,7 @@ namespace Umbraco.Web.Models.Mapping where TDestination : IContentTypeComposition where TSourcePropertyType : PropertyTypeBasic { - // fixme not so clean really + // todo not so clean really var isPublishing = typeof(IContentType).IsAssignableFrom(typeof(TDestination)); mapping = mapping diff --git a/src/Umbraco.Web/Models/Mapping/DatabaseTypeResolver.cs b/src/Umbraco.Web/Models/Mapping/DatabaseTypeResolver.cs index bdfc870a2f..c8fc9ea4b2 100644 --- a/src/Umbraco.Web/Models/Mapping/DatabaseTypeResolver.cs +++ b/src/Umbraco.Web/Models/Mapping/DatabaseTypeResolver.cs @@ -16,7 +16,7 @@ namespace Umbraco.Web.Models.Mapping if (!Current.PropertyEditors.TryGet(source.EditorAlias, out var editor)) throw new InvalidOperationException($"Could not find property editor \"{source.EditorAlias}\"."); - // fixme - what about source.PropertyEditor? can we get the configuration here? 'cos it may change the storage type?! + // todo - what about source.PropertyEditor? can we get the configuration here? 'cos it may change the storage type?! var valueType = editor.GetValueEditor().ValueType; return ValueTypes.ToStorageType(valueType); } diff --git a/src/Umbraco.Web/Models/Mapping/EntityMapperProfile.cs b/src/Umbraco.Web/Models/Mapping/EntityMapperProfile.cs index ff7fcfc0b0..8f99fe03dc 100644 --- a/src/Umbraco.Web/Models/Mapping/EntityMapperProfile.cs +++ b/src/Umbraco.Web/Models/Mapping/EntityMapperProfile.cs @@ -204,7 +204,7 @@ namespace Umbraco.Web.Models.Mapping // if there's no culture here, the issue is somewhere else (UI, whatever) - throw! if (culture == null) //throw new InvalidOperationException("Missing culture in mapping options."); - // fixme we should throw, but this is used in various places that won't set a culture yet + // todo we should throw, but this is used in various places that won't set a culture yet return source.Name; // if we don't have a name for a culture, it means the culture is not available, and diff --git a/src/Umbraco.Web/Models/Mapping/MacroMapperProfile.cs b/src/Umbraco.Web/Models/Mapping/MacroMapperProfile.cs index 7bede52021..a50a4f190e 100644 --- a/src/Umbraco.Web/Models/Mapping/MacroMapperProfile.cs +++ b/src/Umbraco.Web/Models/Mapping/MacroMapperProfile.cs @@ -36,7 +36,7 @@ namespace Umbraco.Web.Models.Mapping { //map the view and the config // we need to show the depracated ones for backwards compatibility - var paramEditor = Current.ParameterEditors[property.EditorAlias]; // fixme - include/filter deprecated?! + var paramEditor = Current.ParameterEditors[property.EditorAlias]; // todo - include/filter deprecated?! if (paramEditor == null) { //we'll just map this to a text box diff --git a/src/Umbraco.Web/Models/Mapping/MemberTabsAndPropertiesResolver.cs b/src/Umbraco.Web/Models/Mapping/MemberTabsAndPropertiesResolver.cs index f64121e09a..e32531e61a 100644 --- a/src/Umbraco.Web/Models/Mapping/MemberTabsAndPropertiesResolver.cs +++ b/src/Umbraco.Web/Models/Mapping/MemberTabsAndPropertiesResolver.cs @@ -139,7 +139,7 @@ namespace Umbraco.Web.Models.Mapping // only when creating a new member and we want to have a generated password pre-filled. Value = new Dictionary { - // fixme why ignoreCase, what are we doing here?! + // todo why ignoreCase, what are we doing here?! {"generatedPassword", member.GetAdditionalDataValueIgnoreCase("GeneratedPassword", null)}, {"newPassword", member.GetAdditionalDataValueIgnoreCase("NewPassword", null)}, }, diff --git a/src/Umbraco.Web/Models/PublishedContent/PublishedValueFallback.cs b/src/Umbraco.Web/Models/PublishedContent/PublishedValueFallback.cs index d0218b6639..3d285eb88a 100644 --- a/src/Umbraco.Web/Models/PublishedContent/PublishedValueFallback.cs +++ b/src/Umbraco.Web/Models/PublishedContent/PublishedValueFallback.cs @@ -261,7 +261,7 @@ namespace Umbraco.Web.Models.PublishedContent var visited = new HashSet(); - // fixme + // todo // _localizationService.GetXxx() is expensive, it deep clones objects // we want _localizationService.GetReadOnlyXxx() returning IReadOnlyLanguage which cannot be saved back = no need to clone diff --git a/src/Umbraco.Web/Models/PublishedContentBase.cs b/src/Umbraco.Web/Models/PublishedContentBase.cs index 2d00370f14..c772f6ca85 100644 --- a/src/Umbraco.Web/Models/PublishedContentBase.cs +++ b/src/Umbraco.Web/Models/PublishedContentBase.cs @@ -15,7 +15,7 @@ namespace Umbraco.Web.Models [DebuggerDisplay("Content Id: {Id}, Name: {Name}")] public abstract class PublishedContentBase : IPublishedContent { - private string _url; // fixme - cannot cache urls, they depends on the current request + private string _url; // fixme/task - cannot cache urls, they depends on the current request #region ContentType @@ -79,12 +79,12 @@ namespace Umbraco.Web.Models /// The url of documents are computed by the document url providers. The url of medias are, at the moment, /// computed here from the 'umbracoFile' property -- but we should move to media url providers at some point. /// - public virtual string GetUrl(string culture = null) // fixme - consider .GetCulture("fr-FR").Url + public virtual string GetUrl(string culture = null) // todo - consider .GetCulture("fr-FR").Url { switch (ItemType) { case PublishedItemType.Content: - // fixme - consider injecting an umbraco context accessor + // todo - consider injecting an umbraco context accessor if (UmbracoContext.Current == null) throw new InvalidOperationException("Cannot compute Url for a content item when UmbracoContext.Current is null."); if (UmbracoContext.Current.UrlProvider == null) @@ -103,7 +103,7 @@ namespace Umbraco.Web.Models var propType = ContentType.GetPropertyType(Constants.Conventions.Media.File); - // fixme - consider implementing media url providers + // todo - consider implementing media url providers // note: that one does not support variations //This is a hack - since we now have 2 properties that support a URL: upload and cropper, we need to detect this since we always // want to return the normal URL and the cropper stores data as json diff --git a/src/Umbraco.Web/Models/PublishedProperty.cs b/src/Umbraco.Web/Models/PublishedProperty.cs index b3bad63609..05d6b5cfe0 100644 --- a/src/Umbraco.Web/Models/PublishedProperty.cs +++ b/src/Umbraco.Web/Models/PublishedProperty.cs @@ -25,7 +25,7 @@ namespace Umbraco.Web.Models var propertyEditors = Current.PropertyEditors; var dataTypeService = Current.Services.DataTypeService; - // fixme not dealing with variants + // todo not dealing with variants // but the entire thing should die anyways return propertyTypes.Select(x => diff --git a/src/Umbraco.Web/Mvc/RenderMvcController.cs b/src/Umbraco.Web/Mvc/RenderMvcController.cs index 4d47e2b82a..e5ad2bb01e 100644 --- a/src/Umbraco.Web/Mvc/RenderMvcController.cs +++ b/src/Umbraco.Web/Mvc/RenderMvcController.cs @@ -18,7 +18,6 @@ namespace Umbraco.Web.Mvc { private PublishedRequest _publishedRequest; - // fixme - delete? public RenderMvcController() { ActionInvoker = new RenderActionInvoker(); diff --git a/src/Umbraco.Web/Mvc/RenderRouteHandler.cs b/src/Umbraco.Web/Mvc/RenderRouteHandler.cs index 29e861aec4..c9123175b1 100644 --- a/src/Umbraco.Web/Mvc/RenderRouteHandler.cs +++ b/src/Umbraco.Web/Mvc/RenderRouteHandler.cs @@ -44,7 +44,7 @@ namespace Umbraco.Web.Mvc private UmbracoContext UmbracoContext => _umbracoContext ?? _umbracoContextAccessor.UmbracoContext; - private UmbracoFeatures Features => Current.Factory.GetInstance(); // fixme inject + private UmbracoFeatures Features => Current.Factory.GetInstance(); // todo inject #region IRouteHandler Members diff --git a/src/Umbraco.Web/Mvc/SurfaceController.cs b/src/Umbraco.Web/Mvc/SurfaceController.cs index bf9946a6a0..2bf73b7dd1 100644 --- a/src/Umbraco.Web/Mvc/SurfaceController.cs +++ b/src/Umbraco.Web/Mvc/SurfaceController.cs @@ -16,15 +16,12 @@ namespace Umbraco.Web.Mvc [MergeParentContextViewData] public abstract class SurfaceController : PluginController { - // fixme - delete? protected SurfaceController() - { - } + { } protected SurfaceController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger) : base(umbracoContext, databaseFactory, services, appCaches, logger, profilingLogger) - { - } + { } /// /// Redirects to the Umbraco page with the given id diff --git a/src/Umbraco.Web/Mvc/UmbracoController.cs b/src/Umbraco.Web/Mvc/UmbracoController.cs index 5ba976efbf..4d70263cb8 100644 --- a/src/Umbraco.Web/Mvc/UmbracoController.cs +++ b/src/Umbraco.Web/Mvc/UmbracoController.cs @@ -22,14 +22,6 @@ namespace Umbraco.Web.Mvc // for debugging purposes internal Guid InstanceId { get; } = Guid.NewGuid(); - // note - // properties marked as [Inject] below will be property-injected (vs constructor-injected) in - // order to keep the constuctor as light as possible, so that ppl implementing eg a SurfaceController - // don't need to implement complex constructors + need to refactor them each time we change ours. - // this means that these properties have a setter. - // what can go wrong? - // fixme clear this comment - /// /// Gets or sets the Umbraco context. /// diff --git a/src/Umbraco.Web/Mvc/UmbracoViewPageOfTModel.cs b/src/Umbraco.Web/Mvc/UmbracoViewPageOfTModel.cs index bda8e4518e..806a4bd250 100644 --- a/src/Umbraco.Web/Mvc/UmbracoViewPageOfTModel.cs +++ b/src/Umbraco.Web/Mvc/UmbracoViewPageOfTModel.cs @@ -41,7 +41,7 @@ namespace Umbraco.Web.Mvc /// public AppCaches AppCaches { get; set; } - // fixme + // todo // previously, Services and ApplicationCache would derive from UmbracoContext.Application, which // was an ApplicationContext - so that everything derived from UmbracoContext. // UmbracoContext is fetched from the data tokens, thus allowing the view to be rendered with a diff --git a/src/Umbraco.Web/Properties/AssemblyInfo.cs b/src/Umbraco.Web/Properties/AssemblyInfo.cs index 1709204920..9a1b248284 100644 --- a/src/Umbraco.Web/Properties/AssemblyInfo.cs +++ b/src/Umbraco.Web/Properties/AssemblyInfo.cs @@ -16,10 +16,6 @@ using System.Runtime.InteropServices; [assembly: InternalsVisibleTo("Umbraco.Tests")] [assembly: InternalsVisibleTo("Umbraco.Tests.Benchmarks")] -[assembly: InternalsVisibleTo("Umbraco.VisualStudio")] // fixme - what is this? -[assembly: InternalsVisibleTo("Umbraco.ModelsBuilder")] // fixme - why? -[assembly: InternalsVisibleTo("Umbraco.ModelsBuilder.AspNet")] // fixme - why? - // Allow this to be mocked in our unit tests [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] diff --git a/src/Umbraco.Web/PropertyEditors/GridConfiguration.cs b/src/Umbraco.Web/PropertyEditors/GridConfiguration.cs index b471a42266..c238f93467 100644 --- a/src/Umbraco.Web/PropertyEditors/GridConfiguration.cs +++ b/src/Umbraco.Web/PropertyEditors/GridConfiguration.cs @@ -8,11 +8,11 @@ namespace Umbraco.Web.PropertyEditors /// public class GridConfiguration { - //fixme: Make these strongly typed, for now this works though + //todo: Make these strongly typed, for now this works though [ConfigurationField("items", "Grid", "views/propertyeditors/grid/grid.prevalues.html", Description = "Grid configuration")] public JObject Items { get; set; } - //fixme: Make these strongly typed, for now this works though + //todo: Make these strongly typed, for now this works though [ConfigurationField("rte", "Rich text editor", "views/propertyeditors/rte/rte.prevalues.html", Description = "Rich text editor configuration")] public JObject Rte { get; set; } } diff --git a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs index 70b705f397..2ca58b06e2 100644 --- a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs @@ -37,7 +37,7 @@ namespace Umbraco.Web.PropertyEditors _contentSettings = contentSettings ?? throw new ArgumentNullException(nameof(contentSettings)); _dataTypeService = dataTypeService; - //fixme: inject? + //todo: inject? _autoFillProperties = new UploadAutoFillProperties(_mediaFileSystem, logger, _contentSettings); } diff --git a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs index 88da8982c7..6ee0d23d95 100644 --- a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs @@ -16,7 +16,7 @@ namespace Umbraco.Web.PropertyEditors /// /// The value editor for the image cropper property editor. /// - internal class ImageCropperPropertyValueEditor : DataValueEditor // fixme core vs web? + internal class ImageCropperPropertyValueEditor : DataValueEditor // todo core vs web? { private readonly ILogger _logger; private readonly IMediaFileSystem _mediaFileSystem; diff --git a/src/Umbraco.Web/PropertyEditors/ListViewConfiguration.cs b/src/Umbraco.Web/PropertyEditors/ListViewConfiguration.cs index 507251043b..1b46a7a8a8 100644 --- a/src/Umbraco.Web/PropertyEditors/ListViewConfiguration.cs +++ b/src/Umbraco.Web/PropertyEditors/ListViewConfiguration.cs @@ -62,7 +62,7 @@ namespace Umbraco.Web.PropertyEditors [ConfigurationField("bulkActionPermissions", "Bulk Action Permissions", "views/propertyeditors/listview/bulkactionpermissions.prevalues.html", Description = "The bulk actions that are allowed from the list view")] - public BulkActionPermissionSettings BulkActionPermissions { get; set; } = new BulkActionPermissionSettings(); // fixme managing defaults? + public BulkActionPermissionSettings BulkActionPermissions { get; set; } = new BulkActionPermissionSettings(); // todomanaging defaults? [ConfigurationField("tabName", "Tab Name", "textstring", Description = "The name of the listview tab (default if empty: 'Child Items')")] public string TabName { get; set; } @@ -76,7 +76,7 @@ namespace Umbraco.Web.PropertyEditors public string Header { get; set; } [JsonProperty("isSystem")] - public int IsSystem { get; set; } // fixme bool + public int IsSystem { get; set; } // todo bool } public class Layout @@ -91,7 +91,7 @@ namespace Umbraco.Web.PropertyEditors public string Icon { get; set; } [JsonProperty("isSystem")] - public int IsSystem { get; set; } // fixme bool + public int IsSystem { get; set; } // todo bool [JsonProperty("selected")] public bool Selected { get; set; } diff --git a/src/Umbraco.Web/PropertyEditors/MacroContainerPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/MacroContainerPropertyEditor.cs index 1417e5ebb2..77c5c04985 100644 --- a/src/Umbraco.Web/PropertyEditors/MacroContainerPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/MacroContainerPropertyEditor.cs @@ -4,7 +4,7 @@ using Umbraco.Core.PropertyEditors; namespace Umbraco.Web.PropertyEditors { - // fixme - MacroContainerPropertyEditor is deprecated, but what's the alternative? + // todo - MacroContainerPropertyEditor is deprecated, but what's the alternative? [DataEditor(Constants.PropertyEditors.Aliases.MacroContainer, "(Obsolete) Macro Picker", "macrocontainer", ValueType = ValueTypes.Text, Group="rich content", Icon="icon-settings-alt", IsDeprecated = true)] public class MacroContainerPropertyEditor : DataEditor { diff --git a/src/Umbraco.Web/PropertyEditors/MultipleTextStringConfigurationEditor.cs b/src/Umbraco.Web/PropertyEditors/MultipleTextStringConfigurationEditor.cs index a76d844dd6..59a96a0e41 100644 --- a/src/Umbraco.Web/PropertyEditors/MultipleTextStringConfigurationEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/MultipleTextStringConfigurationEditor.cs @@ -34,7 +34,7 @@ namespace Umbraco.Web.PropertyEditors /// public override MultipleTextStringConfiguration FromConfigurationEditor(IDictionary editorValues, MultipleTextStringConfiguration configuration) { - // fixme this isn't pretty + // todo this isn't pretty //the values from the editor will be min/max fieds and we need to format to json in one field // is the editor sending strings or ints or?! var min = (editorValues.ContainsKey("min") ? editorValues["min"].ToString() : "0").TryConvertTo(); @@ -57,4 +57,4 @@ namespace Umbraco.Web.PropertyEditors }; } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs index 74c8744ead..7ff6439e08 100644 --- a/src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs @@ -42,8 +42,6 @@ namespace Umbraco.Web.PropertyEditors : Current.Services.ContentTypeService.Get(contentTypeAlias); } - //fixme: Need to add a custom IPropertyIndexValueFactory for this editor - #region Pre Value Editor protected override IConfigurationEditor CreateConfigurationEditor() => new NestedContentConfigurationEditor(); diff --git a/src/Umbraco.Web/PropertyEditors/RichTextConfiguration.cs b/src/Umbraco.Web/PropertyEditors/RichTextConfiguration.cs index 43053addd4..df29687838 100644 --- a/src/Umbraco.Web/PropertyEditors/RichTextConfiguration.cs +++ b/src/Umbraco.Web/PropertyEditors/RichTextConfiguration.cs @@ -8,7 +8,7 @@ namespace Umbraco.Web.PropertyEditors /// public class RichTextConfiguration { - //fixme: Make these strongly typed, for now this works though + //todo: Make these strongly typed, for now this works though [ConfigurationField("editor", "Editor", "views/propertyeditors/rte/rte.prevalues.html", HideLabel = true)] public JObject Editor { get; set; } diff --git a/src/Umbraco.Web/PropertyEditors/TrueFalseConfiguration.cs b/src/Umbraco.Web/PropertyEditors/TrueFalseConfiguration.cs index 6d962c42f1..1089f3d5aa 100644 --- a/src/Umbraco.Web/PropertyEditors/TrueFalseConfiguration.cs +++ b/src/Umbraco.Web/PropertyEditors/TrueFalseConfiguration.cs @@ -8,7 +8,7 @@ namespace Umbraco.Web.PropertyEditors public class TrueFalseConfiguration { [ConfigurationField("default", "Default Value", "boolean")] - public string Default { get; set; } // fixme - well, true or false?! + public string Default { get; set; } // todo - well, true or false?! [ConfigurationField("labelOn", "Write a label text", "textstring")] public string Label { get; set; } diff --git a/src/Umbraco.Web/PublishedCache/IPublishedCache.cs b/src/Umbraco.Web/PublishedCache/IPublishedCache.cs index de92654ffb..155e59133d 100644 --- a/src/Umbraco.Web/PublishedCache/IPublishedCache.cs +++ b/src/Umbraco.Web/PublishedCache/IPublishedCache.cs @@ -209,7 +209,7 @@ namespace Umbraco.Web.PublishedCache /// The alias is case-insensitive. PublishedContentType GetContentType(string alias); - // fixme - can we implement this, now? maybe only with NuCache else will throw NotImplemented... + // todo - can we implement this, now? maybe only with NuCache else will throw NotImplemented... IEnumerable GetByContentType(PublishedContentType contentType); } } diff --git a/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs b/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs index 566ab240c1..44d38c8f3a 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs @@ -29,7 +29,7 @@ namespace Umbraco.Web.PublishedCache.NuCache #region Constructor - // fixme ISSUE + // todo - figure this out // after the current snapshot has been resync-ed // it's too late for UmbracoContext which has captured previewDefault and stuff into these ctor vars // but, no, UmbracoContext returns snapshot.Content which comes from elements SO a resync should create a new cache diff --git a/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs b/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs index 2c2101b066..647adaad91 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs @@ -116,7 +116,7 @@ namespace Umbraco.Web.PublishedCache.NuCache Draft = originDraft == null ? null : new PublishedContent(this, originDraft._contentData, publishedSnapshotAccessor, variationContextAccessor).CreateModel(); Published = originPublished == null ? null : new PublishedContent(this, originPublished._contentData, publishedSnapshotAccessor, variationContextAccessor).CreateModel(); - ChildContentIds = origin.ChildContentIds; // can be the *same* list FIXME oh really? + ChildContentIds = origin.ChildContentIds; // can be the *same* list } // everything that is common to both draft and published versions diff --git a/src/Umbraco.Web/PublishedCache/NuCache/ContentStore.cs b/src/Umbraco.Web/PublishedCache/NuCache/ContentStore.cs index ca5a5db88c..0cf2c231b5 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/ContentStore.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/ContentStore.cs @@ -38,7 +38,7 @@ namespace Umbraco.Web.PublishedCache.NuCache private volatile int _wlocked; private List> _wchanges; - // fixme - collection trigger (ok for now) + // todo - collection trigger (ok for now) // see SnapDictionary notes private const long CollectMinGenDelta = 8; @@ -104,7 +104,7 @@ namespace Umbraco.Web.PublishedCache.NuCache } // gets a scope contextual representing a locked writer to the dictionary - // fixme GetScopedWriter? should the dict have a ref onto the scope provider? + // todo GetScopedWriter? should the dict have a ref onto the scope provider? public IDisposable GetWriter(IScopeProvider scopeProvider) { return ScopeContextualBase.Get(scopeProvider, _instanceId, scoped => new ContentStoreWriter(this, scoped)); diff --git a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/BTree.DictionaryOfCultureVariationSerializer.cs b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/BTree.DictionaryOfCultureVariationSerializer.cs index ccd0e18dd7..ddf9023d84 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/BTree.DictionaryOfCultureVariationSerializer.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/BTree.DictionaryOfCultureVariationSerializer.cs @@ -36,7 +36,7 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource // write each variation foreach (var (culture, variation) in variations) { - // fixme - it's weird we're dealing with cultures here, and languageId in properties + // todo - it's weird we're dealing with cultures here, and languageId in properties PrimitiveSerializer.String.WriteTo(culture, stream); // should never be null WriteObject(variation.Name, stream); // write an object in case it's null (though... should not happen) diff --git a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/DatabaseDataSource.cs b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/DatabaseDataSource.cs index 4531d37b2b..8e9e86b4fc 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/DatabaseDataSource.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/DatabaseDataSource.cs @@ -15,7 +15,7 @@ using static Umbraco.Core.Persistence.NPocoSqlExtensions.Statics; namespace Umbraco.Web.PublishedCache.NuCache.DataSource { - // fixme - use SqlTemplate for these queries else it's going to be horribly slow! + // todo - use SqlTemplate for these queries else it's going to be horribly slow! // provides efficient database access for NuCache internal class DatabaseDataSource : IDataSource diff --git a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/PropertyData.cs b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/PropertyData.cs index 4317a9b1ee..9e50f50c86 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/PropertyData.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/PropertyData.cs @@ -12,14 +12,14 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource public string Culture { get => _culture; - set => _culture = value ?? throw new ArgumentNullException(nameof(value)); // fixme or fallback to string.Empty? CANNOT be null + set => _culture = value ?? throw new ArgumentNullException(nameof(value)); // todo or fallback to string.Empty? CANNOT be null } [JsonProperty("seg")] public string Segment { get => _segment; - set => _segment = value ?? throw new ArgumentNullException(nameof(value)); // fixme or fallback to string.Empty? CANNOT be null + set => _segment = value ?? throw new ArgumentNullException(nameof(value)); // todo or fallback to string.Empty? CANNOT be null } [JsonProperty("val")] diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 1c1f7d034e..fc79971982 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -367,7 +367,6 @@ - diff --git a/src/Umbraco.Web/_Legacy/PackageActions/publishRootDocument.cs b/src/Umbraco.Web/_Legacy/PackageActions/publishRootDocument.cs index f4bd7dd4fc..94e1b6e923 100644 --- a/src/Umbraco.Web/_Legacy/PackageActions/publishRootDocument.cs +++ b/src/Umbraco.Web/_Legacy/PackageActions/publishRootDocument.cs @@ -35,7 +35,7 @@ namespace Umbraco.Web._Legacy.PackageActions { if (rootDoc.Name.Trim() == documentName.Trim() && rootDoc.ContentType != null) { - // fixme variants? + // todo variants? Current.Services.ContentService.SaveAndPublishBranch(rootDoc, true); break; } From ee0c868687c204f88e9bdc85026e03f3994bb3d0 Mon Sep 17 00:00:00 2001 From: Stephan Date: Mon, 21 Jan 2019 14:27:11 +0100 Subject: [PATCH 187/437] Misc fixes for PR and Fallback --- .../IPublishedValueFallback.cs | 9 ++- .../NoopPublishedValueFallback.cs | 6 +- .../PublishedValueFallback.cs | 75 ++++++++----------- src/Umbraco.Web/PublishedContentExtensions.cs | 70 ++++------------- 4 files changed, 56 insertions(+), 104 deletions(-) diff --git a/src/Umbraco.Core/Models/PublishedContent/IPublishedValueFallback.cs b/src/Umbraco.Core/Models/PublishedContent/IPublishedValueFallback.cs index f30a53c8b6..4b6e7cb10a 100644 --- a/src/Umbraco.Core/Models/PublishedContent/IPublishedValueFallback.cs +++ b/src/Umbraco.Core/Models/PublishedContent/IPublishedValueFallback.cs @@ -94,12 +94,17 @@ /// A fallback strategy. /// An optional default value. /// The fallback value. + /// The property that does not have a value. /// A value indicating whether a fallback value could be provided. /// /// This method is called whenever getting the property value for the specified alias, culture and /// segment, either returned no property at all, or a property with HasValue(culture, segment) being false. + /// In an , because walking up the tree is possible, the content itself may not even + /// have a property with the specified alias, but such a property may exist up in the tree. The + /// parameter is used to return a property with no value. That can then be used to invoke a converter and get the + /// converter's interpretation of "no value". /// - bool TryGetValue(IPublishedContent content, string alias, string culture, string segment, Fallback fallback, object defaultValue, out object value); + bool TryGetValue(IPublishedContent content, string alias, string culture, string segment, Fallback fallback, object defaultValue, out object value, out IPublishedProperty noValueProperty); /// /// Tries to get a fallback value for a published content property. @@ -117,6 +122,6 @@ /// This method is called whenever getting the property value for the specified alias, culture and /// segment, either returned no property at all, or a property with HasValue(culture, segment) being false. /// - bool TryGetValue(IPublishedContent content, string alias, string culture, string segment, Fallback fallback, T defaultValue, out T value); + bool TryGetValue(IPublishedContent content, string alias, string culture, string segment, Fallback fallback, T defaultValue, out T value, out IPublishedProperty noValueProperty); } } diff --git a/src/Umbraco.Core/Models/PublishedContent/NoopPublishedValueFallback.cs b/src/Umbraco.Core/Models/PublishedContent/NoopPublishedValueFallback.cs index cd7b063d44..245bbd1d39 100644 --- a/src/Umbraco.Core/Models/PublishedContent/NoopPublishedValueFallback.cs +++ b/src/Umbraco.Core/Models/PublishedContent/NoopPublishedValueFallback.cs @@ -37,16 +37,18 @@ } /// - public bool TryGetValue(IPublishedContent content, string alias, string culture, string segment, Fallback fallback, object defaultValue, out object value) + public bool TryGetValue(IPublishedContent content, string alias, string culture, string segment, Fallback fallback, object defaultValue, out object value, out IPublishedProperty noValueProperty) { value = default; + noValueProperty = default; return false; } /// - public bool TryGetValue(IPublishedContent content, string alias, string culture, string segment, Fallback fallback, T defaultValue, out T value) + public bool TryGetValue(IPublishedContent content, string alias, string culture, string segment, Fallback fallback, T defaultValue, out T value, out IPublishedProperty noValueProperty) { value = default; + noValueProperty = default; return false; } } diff --git a/src/Umbraco.Web/Models/PublishedContent/PublishedValueFallback.cs b/src/Umbraco.Web/Models/PublishedContent/PublishedValueFallback.cs index 691744d6df..2890591ef1 100644 --- a/src/Umbraco.Web/Models/PublishedContent/PublishedValueFallback.cs +++ b/src/Umbraco.Web/Models/PublishedContent/PublishedValueFallback.cs @@ -45,7 +45,7 @@ namespace Umbraco.Web.Models.PublishedContent value = defaultValue; return true; case Fallback.Language: - if (TryGetValueWithLanguageFallback(property, culture, segment, defaultValue, out value)) + if (TryGetValueWithLanguageFallback(property, culture, segment, out value)) return true; break; default: @@ -53,7 +53,7 @@ namespace Umbraco.Web.Models.PublishedContent } } - value = defaultValue; + value = default; return false; } @@ -72,6 +72,7 @@ namespace Umbraco.Web.Models.PublishedContent value = default; return false; } + _variationContextAccessor.ContextualizeVariation(propertyType.Variations, ref culture, ref segment); foreach (var f in fallback) @@ -84,7 +85,7 @@ namespace Umbraco.Web.Models.PublishedContent value = defaultValue; return true; case Fallback.Language: - if (TryGetValueWithLanguageFallback(content, alias, culture, segment, defaultValue, out value)) + if (TryGetValueWithLanguageFallback(content, alias, culture, segment, out value)) return true; break; default: @@ -92,33 +93,32 @@ namespace Umbraco.Web.Models.PublishedContent } } - value = defaultValue; + value = default; return false; } /// - public bool TryGetValue(IPublishedContent content, string alias, string culture, string segment, Fallback fallback, object defaultValue, out object value) + public bool TryGetValue(IPublishedContent content, string alias, string culture, string segment, Fallback fallback, object defaultValue, out object value, out IPublishedProperty noValueProperty) { - // is that ok? - return TryGetValue(content, alias, culture, segment, fallback, defaultValue, out value); + return TryGetValue(content, alias, culture, segment, fallback, defaultValue, out value, out noValueProperty); } /// - public virtual bool TryGetValue(IPublishedContent content, string alias, string culture, string segment, Fallback fallback, T defaultValue, out T value) + public virtual bool TryGetValue(IPublishedContent content, string alias, string culture, string segment, Fallback fallback, T defaultValue, out T value, out IPublishedProperty noValueProperty) { + noValueProperty = default; + var propertyType = content.ContentType.GetPropertyType(alias); - if (propertyType == null) + if (propertyType != null) { - value = default; - return false; + _variationContextAccessor.ContextualizeVariation(propertyType.Variations, ref culture, ref segment); + noValueProperty = content.GetProperty(alias); } - _variationContextAccessor.ContextualizeVariation(propertyType.Variations, ref culture, ref segment); // note: we don't support "recurse & language" which would walk up the tree, // looking at languages at each level - should someone need it... they'll have // to implement it. - foreach (var f in fallback) { switch (f) @@ -129,34 +129,21 @@ namespace Umbraco.Web.Models.PublishedContent value = defaultValue; return true; case Fallback.Language: - if (TryGetValueWithLanguageFallback(content, alias, culture, segment, defaultValue, out value)) + if (propertyType == null) + continue; + if (TryGetValueWithLanguageFallback(content, alias, culture, segment, out value)) return true; break; case Fallback.Ancestors: - IPublishedProperty noValueProperty; - if (TryGetValueWithRecursiveFallback(content, alias, culture, segment, defaultValue, out value, - out noValueProperty)) - { + if (TryGetValueWithAncestorsFallback(content, alias, culture, segment, out value, ref noValueProperty)) return true; - } - - // if we found a property, even though with no value, return that property value - // because the converter may want to handle the missing value. ie if defaultValue is default, - // either specified or by default, the converter may want to substitute something else. - if (noValueProperty != null) - { - value = noValueProperty.Value(culture, segment, fallback.Contains(Fallback.DefaultValue) ? Fallback.ToDefaultValue : Fallback.To(), defaultValue: defaultValue); - return true; - } break; default: throw NotSupportedFallbackMethod(f, "content"); } } - - - value = defaultValue; + value = default; return false; } @@ -166,10 +153,11 @@ namespace Umbraco.Web.Models.PublishedContent } // tries to get a value, recursing the tree - private bool TryGetValueWithRecursiveFallback(IPublishedContent content, string alias, string culture, string segment, T defaultValue, out T value, out IPublishedProperty noValueProperty) + // because we recurse, content may not even have the a property with the specified alias (but only some ancestor) + // in case no value was found, noValueProperty contains the first property that was found (which does not have a value) + private bool TryGetValueWithAncestorsFallback(IPublishedContent content, string alias, string culture, string segment, out T value, ref IPublishedProperty noValueProperty) { - IPublishedProperty property = null; // if we are here, content's property has no value - noValueProperty = null; + IPublishedProperty property; // if we are here, content's property has no value do { content = content.Parent; @@ -184,7 +172,7 @@ namespace Umbraco.Web.Models.PublishedContent } property = content?.GetProperty(alias); - if (property != null) + if (property != null && noValueProperty != null) { noValueProperty = property; } @@ -198,15 +186,14 @@ namespace Umbraco.Web.Models.PublishedContent return true; } - - value = defaultValue; + value = default; return false; } // tries to get a value, falling back onto other languages - private bool TryGetValueWithLanguageFallback(IPublishedProperty property, string culture, string segment, T defaultValue, out T value) + private bool TryGetValueWithLanguageFallback(IPublishedProperty property, string culture, string segment, out T value) { - value = defaultValue; + value = default; if (culture.IsNullOrWhiteSpace()) return false; @@ -238,9 +225,9 @@ namespace Umbraco.Web.Models.PublishedContent } // tries to get a value, falling back onto other languages - private bool TryGetValueWithLanguageFallback(IPublishedElement content, string alias, string culture, string segment, T defaultValue, out T value) + private bool TryGetValueWithLanguageFallback(IPublishedElement content, string alias, string culture, string segment, out T value) { - value = defaultValue; + value = default; if (culture.IsNullOrWhiteSpace()) return false; @@ -272,15 +259,15 @@ namespace Umbraco.Web.Models.PublishedContent } // tries to get a value, falling back onto other languages - private bool TryGetValueWithLanguageFallback(IPublishedContent content, string alias, string culture, string segment, T defaultValue, out T value) + private bool TryGetValueWithLanguageFallback(IPublishedContent content, string alias, string culture, string segment, out T value) { - value = defaultValue; + value = default; if (culture.IsNullOrWhiteSpace()) return false; var visited = new HashSet(); - // fixme + // TODO // _localizationService.GetXxx() is expensive, it deep clones objects // we want _localizationService.GetReadOnlyXxx() returning IReadOnlyLanguage which cannot be saved back = no need to clone diff --git a/src/Umbraco.Web/PublishedContentExtensions.cs b/src/Umbraco.Web/PublishedContentExtensions.cs index c7fbd51389..f38df4288f 100644 --- a/src/Umbraco.Web/PublishedContentExtensions.cs +++ b/src/Umbraco.Web/PublishedContentExtensions.cs @@ -4,9 +4,7 @@ using System.Data; using System.Linq; using System.Web; using Examine; -using Examine.Search; using Umbraco.Core; -using Umbraco.Core.Configuration; using Umbraco.Core.Models.PublishedContent; using Umbraco.Core.Models; using Umbraco.Core.Services; @@ -15,8 +13,6 @@ using Umbraco.Web.Composing; namespace Umbraco.Web { - using Examine = global::Examine; - /// /// Provides extension methods for IPublishedContent. /// @@ -88,24 +84,21 @@ namespace Umbraco.Web public static bool IsAllowedTemplate(this IPublishedContent content, int templateId) { - if (Current.Configs.Settings().WebRouting.DisableAlternativeTemplates == true) + if (Current.Configs.Settings().WebRouting.DisableAlternativeTemplates) return content.TemplateId == templateId; - if (content.TemplateId != templateId && Current.Configs.Settings().WebRouting.ValidateAlternativeTemplates == true) - { - // fixme - perfs? nothing cached here - var publishedContentContentType = Current.Services.ContentTypeService.Get(content.ContentType.Id); - if (publishedContentContentType == null) - throw new NullReferenceException("No content type returned for published content (contentType='" + content.ContentType.Id + "')"); + if (content.TemplateId == templateId || !Current.Configs.Settings().WebRouting.ValidateAlternativeTemplates) + return true; - return publishedContentContentType.IsAllowedTemplate(templateId); - } + var publishedContentContentType = Current.Services.ContentTypeService.Get(content.ContentType.Id); + if (publishedContentContentType == null) + throw new NullReferenceException("No content type returned for published content (contentType='" + content.ContentType.Id + "')"); + + return publishedContentContentType.IsAllowedTemplate(templateId); - return true; } public static bool IsAllowedTemplate(this IPublishedContent content, string templateAlias) { - // fixme - perfs? nothing cached here var template = Current.Services.FileService.GetTemplate(templateAlias); return template != null && content.IsAllowedTemplate(template.Id); } @@ -168,12 +161,7 @@ namespace Umbraco.Web return true; // else let fallback try to get a value - // fixme - really? - if (PublishedValueFallback.TryGetValue(content, alias, culture, segment, fallback, null, out _)) - return true; - - // else... no - return false; + return PublishedValueFallback.TryGetValue(content, alias, culture, segment, fallback, null, out _, out _); } /// @@ -195,15 +183,12 @@ namespace Umbraco.Web return property.GetValue(culture, segment); // else let fallback try to get a value - if (PublishedValueFallback.TryGetValue(content, alias, culture, segment, fallback, defaultValue, out var value)) + if (PublishedValueFallback.TryGetValue(content, alias, culture, segment, fallback, defaultValue, out var value, out property)) return value; - if (property == null) - return null; - // else... if we have a property, at least let the converter return its own // vision of 'no value' (could be an empty enumerable) - return property.GetValue(culture, segment); + return property?.GetValue(culture, segment); } /// @@ -226,7 +211,7 @@ namespace Umbraco.Web return property.Value(culture, segment); // else let fallback try to get a value - if (PublishedValueFallback.TryGetValue(content, alias, culture, segment, fallback, defaultValue, out var value)) + if (PublishedValueFallback.TryGetValue(content, alias, culture, segment, fallback, defaultValue, out var value, out property)) return value; // else... if we have a property, at least let the converter return its own @@ -234,29 +219,6 @@ namespace Umbraco.Web return property == null ? default : property.Value(culture, segment); } - // fixme - .Value() refactoring - in progress - public static IHtmlString Value(this IPublishedContent content, string aliases, Func format, string alt = "", int fallback = 0) - { - var aliasesA = aliases.Split(','); - if (aliasesA.Length == 0) - return new HtmlString(string.Empty); - - throw new NotImplementedException("WorkInProgress"); - - var property = content.GetProperty(aliasesA[0]); - - //var property = aliases.Split(',') - // .Where(x => string.IsNullOrWhiteSpace(x) == false) - // .Select(x => content.GetProperty(x.Trim(), recurse)) - // .FirstOrDefault(x => x != null); - - //if (format == null) format = x => x.ToString(); - - //return property != null - // ? new HtmlString(format(property.Value())) - // : new HtmlString(alt); - } - #endregion #region Variations @@ -992,9 +954,8 @@ namespace Umbraco.Web /// public static IEnumerable Children(this IPublishedContent content, string culture = null) { - if (content == null) throw new ArgumentNullException(nameof(content)); + if (content == null) throw new ArgumentNullException(nameof(content)); // fixme wtf is this? -// return content.Children.Where(x => { if (!x.ContentType.VariesByCulture()) return true; // invariant = always ok @@ -1056,10 +1017,7 @@ namespace Umbraco.Web /// /// Gets the first child of the content, of a given content type. /// - /// The content. - /// The content type alias. - /// The first child of content, of the given content type. - public static IPublishedContent FirstChild(this IPublishedContent content, string alias, string culture = null) + public static IPublishedContent FirstChild(this IPublishedContent content, string alias, string culture = null) // fixme oops { return content.Children(culture,alias).FirstOrDefault(); } From 3af859e02013eba56cc3227b64d5f81e5713c508 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Mon, 21 Jan 2019 16:29:59 +0000 Subject: [PATCH 188/437] Updates default log levels that we ship out of the box for V8 - It was a very chatty Verbose, now set to Info --- src/Umbraco.Web.UI/config/serilog.config | 2 +- src/Umbraco.Web.UI/config/serilog.user.config | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI/config/serilog.config b/src/Umbraco.Web.UI/config/serilog.config index a0a8f8658a..9638d285ce 100644 --- a/src/Umbraco.Web.UI/config/serilog.config +++ b/src/Umbraco.Web.UI/config/serilog.config @@ -5,7 +5,7 @@ - + diff --git a/src/Umbraco.Web.UI/config/serilog.user.config b/src/Umbraco.Web.UI/config/serilog.user.config index c308c25104..374657795e 100644 --- a/src/Umbraco.Web.UI/config/serilog.user.config +++ b/src/Umbraco.Web.UI/config/serilog.user.config @@ -3,7 +3,7 @@ - + - - -
diff --git a/src/Umbraco.Web.UI/Umbraco/developer/Macros/EditMacro.aspx.cs b/src/Umbraco.Web.UI/Umbraco/developer/Macros/EditMacro.aspx.cs index f2d2d5dcd3..478c14b5c4 100644 --- a/src/Umbraco.Web.UI/Umbraco/developer/Macros/EditMacro.aspx.cs +++ b/src/Umbraco.Web.UI/Umbraco/developer/Macros/EditMacro.aspx.cs @@ -115,8 +115,6 @@ namespace Umbraco.Web.UI.Umbraco.Developer.Macros protected IEnumerable GetMacroParameterEditors() { - // we need to show the depracated ones for backwards compatibility - // FIXME not managing deprecated here?! return Current.ParameterEditors; } diff --git a/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs b/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs index 65b7a1560a..d1e1d63630 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs @@ -273,8 +273,6 @@ namespace Umbraco.Web.PublishedCache.NuCache /// public override PublishedItemType ItemType => _contentNode.ContentType.ItemType; - // fixme - // was => _contentData.Published == false; /// public override bool IsDraft(string culture = null) { diff --git a/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs b/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs index 3cca34fe77..8675aefd1a 100755 --- a/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs @@ -201,7 +201,7 @@ namespace Umbraco.Web.PublishedCache.NuCache private void InitializeRepositoryEvents() { - //fixme: The reason these events are in the repository is for legacy, the events should exist at the service + //todo: The reason these events are in the repository is for legacy, the events should exist at the service // level now since we can fire these events within the transaction... so move the events to service level // plug repository event handlers @@ -584,7 +584,7 @@ namespace Umbraco.Web.PublishedCache.NuCache continue; } - // fixme - should we do some RV check here? (later) + // todo- should we do some RV check here? (later) var capture = payload; using (var scope = _scopeProvider.CreateScope()) @@ -674,7 +674,7 @@ namespace Umbraco.Web.PublishedCache.NuCache continue; } - // fixme - should we do some RV checks here? (later) + // todo- should we do some RV checks here? (later) var capture = payload; using (var scope = _scopeProvider.CreateScope()) @@ -773,7 +773,7 @@ namespace Umbraco.Web.PublishedCache.NuCache using (_contentStore.GetWriter(_scopeProvider)) using (_mediaStore.GetWriter(_scopeProvider)) { - // fixme - need to add a datatype lock + // todo - need to add a datatype lock // this is triggering datatypes reload in the factory, and right after we create some // content types by loading them ... there's a race condition here, which would require // some locking on datatypes diff --git a/src/Umbraco.Web/PublishedCache/NuCache/SnapDictionary.cs b/src/Umbraco.Web/PublishedCache/NuCache/SnapDictionary.cs index 67fe72d31b..b0231368af 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/SnapDictionary.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/SnapDictionary.cs @@ -30,7 +30,6 @@ namespace Umbraco.Web.PublishedCache.NuCache private Task _collectTask; private volatile int _wlocked; - // fixme - collection trigger (ok for now) // minGenDelta to be adjusted // we may want to throttle collects even if delta is reached // we may want to force collect if delta is not reached but very old @@ -107,7 +106,7 @@ namespace Umbraco.Web.PublishedCache.NuCache } // gets a scope contextual representing a locked writer to the dictionary - // fixme GetScopedWriter? should the dict have a ref onto the scope provider? + // GetScopedWriter? should the dict have a ref onto the scope provider? public IDisposable GetWriter(IScopeProvider scopeProvider) { return ScopeContextualBase.Get(scopeProvider, _instanceId, scoped => new SnapDictionaryWriter(this, scoped)); diff --git a/src/Umbraco.Web/PublishedCache/PublishedElement.cs b/src/Umbraco.Web/PublishedCache/PublishedElement.cs index 6c90a28e0d..41902e3e26 100644 --- a/src/Umbraco.Web/PublishedCache/PublishedElement.cs +++ b/src/Umbraco.Web/PublishedCache/PublishedElement.cs @@ -12,7 +12,7 @@ namespace Umbraco.Web.PublishedCache // // at the moment we do NOT support models for sets - that would require // an entirely new models factory + not even sure it makes sense at all since - // sets are created manually fixme yes it does! + // sets are created manually todo yes it does! - what does this all mean? // internal class PublishedElement : IPublishedElement { diff --git a/src/Umbraco.Web/PublishedCache/PublishedMember.cs b/src/Umbraco.Web/PublishedCache/PublishedMember.cs index 46abc098cc..ef95b2846c 100644 --- a/src/Umbraco.Web/PublishedCache/PublishedMember.cs +++ b/src/Umbraco.Web/PublishedCache/PublishedMember.cs @@ -25,7 +25,6 @@ namespace Umbraco.Web.PublishedCache _membershipUser = member; _publishedMemberType = publishedMemberType ?? throw new ArgumentNullException(nameof(publishedMemberType)); - // fixme // RawValueProperty is used for two things here // - for the 'map properties' thing that we should really get rid of // - for populating properties that every member should always have, and that we force-create @@ -49,8 +48,6 @@ namespace Umbraco.Web.PublishedCache #region Membership provider member properties - // fixme why this? - public string Email => _membershipUser.Email; public string UserName => _membershipUser.Username; diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/SafeXmlReaderWriter.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/SafeXmlReaderWriter.cs index ade6cbf30b..672aad1e3e 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/SafeXmlReaderWriter.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/SafeXmlReaderWriter.cs @@ -5,7 +5,7 @@ using Umbraco.Core.Scoping; namespace Umbraco.Web.PublishedCache.XmlPublishedCache { - // fixme should be a ScopeContextualBase + // todo should be a ScopeContextualBase internal class SafeXmlReaderWriter : IDisposable { private readonly bool _scoped; diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs index 2e19fc423b..2b3bc39452 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs @@ -369,7 +369,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache } catch (InvalidOperationException e) { - // fixme - enable! + // todo - enable! //content.Instance.RefreshContentFromDatabase(); throw new InvalidOperationException($"{e.Message}. This usually indicates that the content cache is corrupt; the content cache has been rebuilt in an attempt to self-fix the issue."); } diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlStore.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlStore.cs index 614515e433..0d7d188dac 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlStore.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlStore.cs @@ -69,7 +69,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache // internal for unit tests // no file nor db, no config check - // fixme - er, we DO have a DB? + // todo - er, we DO have a DB? internal XmlStore(IContentTypeService contentTypeService, IContentService contentService, IScopeProvider scopeProvider, RoutesCache routesCache, PublishedContentTypeCache contentTypeCache, IPublishedSnapshotAccessor publishedSnapshotAccessor, MainDom mainDom, bool testing, bool enableRepositoryEvents, IDocumentRepository documentRepository, IMediaRepository mediaRepository, IMemberRepository memberRepository, IGlobalSettings globalSettings, IEntityXmlSerializer entitySerializer) @@ -602,7 +602,7 @@ AND (umbracoNode.id=@id)"; // should we have async versions that would do: ? // var releaser = await _xmlLock.LockAsync(); // - // fixme - not sure about the "resync current published snapshot" thing here, see 7.6... + // todo - not sure about the "resync current published snapshot" thing here, see 7.6... // gets a locked safe read access to the main xml private SafeXmlReaderWriter GetSafeXmlReader() @@ -641,7 +641,7 @@ AND (umbracoNode.id=@id)"; public void EnsureFilePermission() { - // FIXME - but do we really have a store, initialized, at that point? + // todo - but do we really have a store, initialized, at that point? var filename = _xmlFileName + ".temp"; File.WriteAllText(filename, "TEMP"); File.Delete(filename); @@ -1559,8 +1559,8 @@ ORDER BY umbracoNode.level, umbracoNode.sortOrder"; // need to update the published xml if we're saving the published version, // or having an impact on that version - we update the published xml even when masked - // fixme - in the repo... either its 'unpublished' and 'publishing', or 'published' and 'published', this has changed! - // fixme - what are we serializing really? which properties? + // todo - in the repo... either its 'unpublished' and 'publishing', or 'published' and 'published', this has changed! + // todo - what are we serializing really? which properties? // if not publishing, no change to published xml if (((Content) entity).PublishedState != PublishedState.Publishing) @@ -1669,7 +1669,7 @@ ORDER BY umbracoNode.level, umbracoNode.sortOrder"; // RepositoryCacheMode.Scoped because we do NOT want to use the L2 cache that may be out-of-sync // hopefully this does not cause issues and we're not nested in another scope w/different mode - // fixme - well, guess what? + // todo - well, guess what? // original code made sure the repository used no cache // now we're using the Scoped scope cache mode // and then? @@ -2027,7 +2027,7 @@ AND cmsPreviewXml.nodeId IS NULL OR cmsPreviewXml.xml NOT LIKE '% key=""' { // every non-trashed media item should have a corresponding row in cmsContentXml // and that row should have the key="..." attribute - // fixme - where's the trashed test here? + // todo - where's the trashed test here? var mediaObjectType = Constants.ObjectTypes.Media; var db = scope.Database; diff --git a/src/Umbraco.Web/PublishedContentExtensions.cs b/src/Umbraco.Web/PublishedContentExtensions.cs index f38df4288f..530c9bd9b4 100644 --- a/src/Umbraco.Web/PublishedContentExtensions.cs +++ b/src/Umbraco.Web/PublishedContentExtensions.cs @@ -251,7 +251,7 @@ namespace Umbraco.Web public static IEnumerable SearchDescendants(this IPublishedContent content, string term, string indexName = null) { - //fixme: pass in the IExamineManager + //todo inject examine manager indexName = string.IsNullOrEmpty(indexName) ? Constants.UmbracoIndexes.ExternalIndexName : indexName; if (!ExamineManager.Instance.TryGetIndex(indexName, out var index)) @@ -272,7 +272,7 @@ namespace Umbraco.Web public static IEnumerable SearchChildren(this IPublishedContent content, string term, string indexName = null) { - //fixme: pass in the IExamineManager + //todo inject examine manager indexName = string.IsNullOrEmpty(indexName) ? Constants.UmbracoIndexes.ExternalIndexName : indexName; if (!ExamineManager.Instance.TryGetIndex(indexName, out var index)) @@ -954,7 +954,7 @@ namespace Umbraco.Web /// public static IEnumerable Children(this IPublishedContent content, string culture = null) { - if (content == null) throw new ArgumentNullException(nameof(content)); // fixme wtf is this? + if (content == null) throw new ArgumentNullException(nameof(content)); // fixme/task wtf is this? return content.Children.Where(x => { @@ -1017,7 +1017,7 @@ namespace Umbraco.Web /// /// Gets the first child of the content, of a given content type. /// - public static IPublishedContent FirstChild(this IPublishedContent content, string alias, string culture = null) // fixme oops + public static IPublishedContent FirstChild(this IPublishedContent content, string alias, string culture = null) // fixme/task oops { return content.Children(culture,alias).FirstOrDefault(); } diff --git a/src/Umbraco.Web/PublishedElementExtensions.cs b/src/Umbraco.Web/PublishedElementExtensions.cs index cd6ede9a7c..3250dbc2ce 100644 --- a/src/Umbraco.Web/PublishedElementExtensions.cs +++ b/src/Umbraco.Web/PublishedElementExtensions.cs @@ -69,25 +69,6 @@ namespace Umbraco.Web return prop != null && prop.HasValue(culture, segment); } - // fixme - .Value() refactoring - in progress - // missing variations... - - /// - /// Returns one of two strings depending on whether the content has a value for a property identified by its alias. - /// - /// The content. - /// The property alias. - /// The value to return if the content has a value for the property. - /// The value to return if the content has no value for the property. - /// Either or depending on whether the content - /// has a value for the property identified by the alias. - public static IHtmlString IfValue(this IPublishedElement content, string alias, string valueIfTrue, string valueIfFalse = null) - { - return content.HasValue(alias) - ? new HtmlString(valueIfTrue) - : new HtmlString(valueIfFalse ?? string.Empty); - } - #endregion #region Value @@ -165,57 +146,6 @@ namespace Umbraco.Web #endregion - #region Value or Umbraco.Field - WORK IN PROGRESS - - // fixme - .Value() refactoring - in progress - // trying to reproduce Umbraco.Field so we can get rid of it - // - // what we want: - // - alt aliases - // - recursion - // - default value - // - before & after (if value) - // - // convertLineBreaks: should be an extension string.ConvertLineBreaks() - // stripParagraphs: should be an extension string.StripParagraphs() - // format: should use the standard .ToString(format) - // - // see UmbracoComponentRenderer.Field - which is ugly ;-( - - // recurse first, on each alias (that's how it's done in Field) - // - // there is no strongly typed recurse, etc => needs to be in ModelsBuilder? - - // that one can only happen in ModelsBuilder as that's where the attributes are defined - // the attribute that carries the alias is in ModelsBuilder! - //public static TValue Value(this TModel content, Expression> propertySelector, ...) - // where TModel : IPublishedElement - //{ - // PropertyInfo pi = GetPropertyFromExpression(propertySelector); - // var attr = pi.GetCustomAttribute(); - // var alias = attr.Alias; - // return content.Value(alias, ...) - //} - - // recurse should be implemented via fallback - - // todo - that one should be refactored, missing culture and so many things - public static IHtmlString Value(this IPublishedElement content, string aliases, Func format, string alt = "") - { - if (format == null) format = x => x.ToString(); - - var property = aliases.Split(',') - .Where(x => string.IsNullOrWhiteSpace(x) == false) - .Select(x => content.GetProperty(x.Trim())) - .FirstOrDefault(x => x != null); - - return property != null - ? new HtmlString(format(property.Value())) - : new HtmlString(alt); - } - - #endregion - #region ToIndexedArray public static IndexedArrayItem[] ToIndexedArray(this IEnumerable source) diff --git a/src/Umbraco.Web/Routing/ContentFinderByUrlAlias.cs b/src/Umbraco.Web/Routing/ContentFinderByUrlAlias.cs index 4979a59d45..fc1712dfbd 100644 --- a/src/Umbraco.Web/Routing/ContentFinderByUrlAlias.cs +++ b/src/Umbraco.Web/Routing/ContentFinderByUrlAlias.cs @@ -96,7 +96,7 @@ namespace Umbraco.Web.Routing return v.InvariantContains(a1) || v.InvariantContains(a2); } - // fixme - even with Linq, what happens below has to be horribly slow + // todo - even with Linq, what happens below has to be horribly slow // but the only solution is to entirely refactor url providers to stop being dynamic if (rootNodeId > 0) diff --git a/src/Umbraco.Web/Routing/DomainHelper.cs b/src/Umbraco.Web/Routing/DomainHelper.cs index edfcb33aa5..8ba06363dc 100644 --- a/src/Umbraco.Web/Routing/DomainHelper.cs +++ b/src/Umbraco.Web/Routing/DomainHelper.cs @@ -107,7 +107,7 @@ namespace Umbraco.Web.Routing /// An optional function to filter the list of domains, if more than one applies. /// The domain and its normalized uri, that best matches the specified uri and cultures. /// - /// fixme - must document and explain this all + /// todo - must document and explain this all /// If is null, pick the first domain that matches , /// else the first that matches , else the first one (ordered by id), else null. /// If is not null, look for domains that would be a base uri of the current uri, @@ -244,7 +244,7 @@ namespace Umbraco.Web.Routing /// The domains and their normalized uris, that match the specified uri. internal static IEnumerable SelectDomains(IEnumerable domains, Uri uri) { - // fixme where are we matching ?!!? + // todo where are we matching ?!!? return domains .Where(d => d.IsWildcard == false) .Select(d => new DomainAndUri(d, uri)) diff --git a/src/Umbraco.Web/Routing/PublishedRouter.cs b/src/Umbraco.Web/Routing/PublishedRouter.cs index 04e189785b..b95977c3a3 100644 --- a/src/Umbraco.Web/Routing/PublishedRouter.cs +++ b/src/Umbraco.Web/Routing/PublishedRouter.cs @@ -19,8 +19,7 @@ using RenderingEngine = Umbraco.Core.RenderingEngine; namespace Umbraco.Web.Routing { - // fixme - make this public - // fixme - making sense to have an interface? + // todo - making sense to have an interface? public class PublishedRouter { private readonly IWebRoutingSection _webRoutingSection; @@ -53,7 +52,7 @@ namespace Umbraco.Web.Routing GetRolesForLogin = s => Roles.Provider.GetRolesForUser(s); } - // fixme + // todo // in 7.7 this is cached in the PublishedContentRequest, which ... makes little sense // killing it entirely, if we need cache, just implement it properly !! // this is all soooo weird @@ -381,7 +380,7 @@ namespace Umbraco.Web.Routing // NOTE: we could start with what's the current default? - // fixme - bad - we probably should be using the appropriate filesystems! + // todo - bad - we probably should be using the appropriate filesystems! if (FindTemplateRenderingEngineInDirectory(new DirectoryInfo(IOHelper.MapPath(SystemDirectories.MvcViews)), alias, new[] { ".cshtml", ".vbhtml" })) diff --git a/src/Umbraco.Web/Routing/SiteDomainHelper.cs b/src/Umbraco.Web/Routing/SiteDomainHelper.cs index 30abfea901..7879b22402 100644 --- a/src/Umbraco.Web/Routing/SiteDomainHelper.cs +++ b/src/Umbraco.Web/Routing/SiteDomainHelper.cs @@ -181,7 +181,7 @@ namespace Umbraco.Web.Routing /// public virtual IEnumerable MapDomains(IReadOnlyCollection domainAndUris, Uri current, bool excludeDefault, string culture, string defaultCulture) { - // fixme ignoring cultures entirely? + // todo ignoring cultures entirely? var currentAuthority = current.GetLeftPart(UriPartial.Authority); KeyValuePair[] candidateSites = null; @@ -279,7 +279,7 @@ namespace Umbraco.Web.Routing if (domainAndUris == null) throw new ArgumentNullException(nameof(domainAndUris)); if (domainAndUris.Count == 0) throw new ArgumentException("Cannot be empty.", nameof(domainAndUris)); - // fixme how shall we deal with cultures? + // todo how shall we deal with cultures? // we do our best, but can't do the impossible // get the "default" domain ie the first one for the culture, else the first one (exists, length > 0) diff --git a/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs b/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs index 1a0bf8d1b0..832699b5d7 100644 --- a/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs +++ b/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs @@ -108,7 +108,7 @@ namespace Umbraco.Web.Runtime .SetDefaultRenderMvcController(); // default controller for template views composition.WithCollectionBuilder() - .Add(() => composition.TypeLoader.GetTypes()); // fixme which searchable trees?! + .Add(() => composition.TypeLoader.GetTypes()); composition.Register(Lifetime.Request); diff --git a/src/Umbraco.Web/Scheduling/IBackgroundTaskRunner.cs b/src/Umbraco.Web/Scheduling/IBackgroundTaskRunner.cs index e8fd754622..b478ed581c 100644 --- a/src/Umbraco.Web/Scheduling/IBackgroundTaskRunner.cs +++ b/src/Umbraco.Web/Scheduling/IBackgroundTaskRunner.cs @@ -15,6 +15,6 @@ namespace Umbraco.Web.Scheduling void Add(T task); bool TryAdd(T task); - // fixme - complete the interface? + // todo - complete the interface? } } diff --git a/src/Umbraco.Web/Scheduling/ScheduledPublishing.cs b/src/Umbraco.Web/Scheduling/ScheduledPublishing.cs index 4d5d5a467a..0d533a4da2 100644 --- a/src/Umbraco.Web/Scheduling/ScheduledPublishing.cs +++ b/src/Umbraco.Web/Scheduling/ScheduledPublishing.cs @@ -56,7 +56,7 @@ namespace Umbraco.Web.Scheduling // ensure we run with an UmbracoContext, because this may run in a background task, // yet developers may be using the 'current' UmbracoContext in the event handlers // - // fixme + // todo // - or maybe not, CacheRefresherComponent already ensures a context when handling events // - UmbracoContext 'current' needs to be refactored and cleaned up // - batched messenger should not depend on a current HttpContext diff --git a/src/Umbraco.Web/Search/ExamineComponent.cs b/src/Umbraco.Web/Search/ExamineComponent.cs index 05a1258441..4735780231 100644 --- a/src/Umbraco.Web/Search/ExamineComponent.cs +++ b/src/Umbraco.Web/Search/ExamineComponent.cs @@ -154,7 +154,6 @@ namespace Umbraco.Web.Search _rebuildOnStartupRunner = new BackgroundTaskRunner( "RebuildIndexesOnStartup", - //new BackgroundTaskRunnerOptions{ LongRunning= true }, //fixme, this flag doesn't have any affect anymore logger); _rebuildOnStartupRunner.TryAdd(task); @@ -214,7 +213,7 @@ namespace Umbraco.Web.Search // just ignore that payload // so what?! - //fixme: Rebuild the index at this point? + //todo: Rebuild the index at this point? } else // RefreshNode or RefreshBranch (maybe trashed) { diff --git a/src/Umbraco.Web/Security/MembershipHelper.cs b/src/Umbraco.Web/Security/MembershipHelper.cs index 6ae8ff8c96..db93df953f 100644 --- a/src/Umbraco.Web/Security/MembershipHelper.cs +++ b/src/Umbraco.Web/Security/MembershipHelper.cs @@ -326,7 +326,7 @@ namespace Umbraco.Web.Security switch (umbracoType) { case UmbracoObjectTypes.Member: - // fixme - need to implement Get(guid)! + // todo - need to implement Get(guid)! var memberAttempt = entityService.GetId(guidUdi.Guid, umbracoType); if (memberAttempt.Success) return GetById(memberAttempt.Result); diff --git a/src/Umbraco.Web/Templates/TemplateRenderer.cs b/src/Umbraco.Web/Templates/TemplateRenderer.cs index a339f45714..db786655b4 100644 --- a/src/Umbraco.Web/Templates/TemplateRenderer.cs +++ b/src/Umbraco.Web/Templates/TemplateRenderer.cs @@ -37,8 +37,8 @@ namespace Umbraco.Web.Templates _umbracoContext = umbracoContext ?? throw new ArgumentNullException(nameof(umbracoContext)); } - private IFileService FileService => Current.Services.FileService; // fixme inject - private PublishedRouter PublishedRouter => Core.Composing.Current.Factory.GetInstance(); // fixme inject + private IFileService FileService => Current.Services.FileService; // todo inject + private PublishedRouter PublishedRouter => Core.Composing.Current.Factory.GetInstance(); // todo inject /// diff --git a/src/Umbraco.Web/Trees/ContentTreeController.cs b/src/Umbraco.Web/Trees/ContentTreeController.cs index 46ee6cd8b5..8113a85690 100644 --- a/src/Umbraco.Web/Trees/ContentTreeController.cs +++ b/src/Umbraco.Web/Trees/ContentTreeController.cs @@ -235,7 +235,6 @@ namespace Umbraco.Web.Trees AddActionNode(item, menu, true); AddActionNode(item, menu, opensDialog: true); AddActionNode(item, menu, opensDialog: true); - //fixme - conver this editor to angular AddActionNode(item, menu, true, convert: true, opensDialog: true); if (EmailSender.CanSendRequiredEmail) { @@ -308,7 +307,7 @@ namespace Umbraco.Web.Trees entity.Name = "[[" + entity.Id + "]]"; } - //fixme: Remove the need for converting to legacy + //todo: Remove the need for converting to legacy private void AddActionNode(IUmbracoEntity item, MenuItemCollection menu, bool hasSeparator = false, bool convert = false, bool opensDialog = false) where TAction : IAction { diff --git a/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs b/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs index ae62f800e9..ccf3798270 100644 --- a/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs +++ b/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs @@ -401,7 +401,7 @@ namespace Umbraco.Web.Trees internal IEnumerable GetAllowedUserMenuItemsForNode(IUmbracoEntity dd) { var permission = Services.UserService.GetPermissions(Security.CurrentUser, dd.Path); - //fixme: inject + //todo: inject var actions = Current.Actions.FromEntityPermission(permission) .ToList(); diff --git a/src/Umbraco.Web/Trees/FilesTreeController.cs b/src/Umbraco.Web/Trees/FilesTreeController.cs index 947522747d..598eb713eb 100644 --- a/src/Umbraco.Web/Trees/FilesTreeController.cs +++ b/src/Umbraco.Web/Trees/FilesTreeController.cs @@ -8,7 +8,7 @@ namespace Umbraco.Web.Trees [Tree(Constants.Applications.Settings, "files", "Files", "icon-folder", "icon-folder", sortOrder: 13, initialize: false)] public class FilesTreeController : FileSystemTreeController { - protected override IFileSystem FileSystem => new PhysicalFileSystem("~/"); // fixme inject + protected override IFileSystem FileSystem => new PhysicalFileSystem("~/"); // todo inject private static readonly string[] ExtensionsStatic = { "*" }; diff --git a/src/Umbraco.Web/Trees/ITree.cs b/src/Umbraco.Web/Trees/ITree.cs index 867beda20e..2821d4bfbb 100644 --- a/src/Umbraco.Web/Trees/ITree.cs +++ b/src/Umbraco.Web/Trees/ITree.cs @@ -1,6 +1,6 @@ namespace Umbraco.Web.Trees { - //fixme - we don't really use this, it is nice to have the treecontroller, attribute and ApplicationTree streamlined to implement this but it's not used + //todo- we don't really use this, it is nice to have the treecontroller, attribute and ApplicationTree streamlined to implement this but it's not used //leave as internal for now, maybe we'll use in the future, means we could pass around ITree internal interface ITree { diff --git a/src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs b/src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs index f271d276c6..277094d3c6 100644 --- a/src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs +++ b/src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs @@ -12,7 +12,7 @@ namespace Umbraco.Web.Trees /// internal class LegacyTreeDataConverter { - //fixme: remove this whole class when everything is angularized + //todo: remove this whole class when everything is angularized /// /// This will look at the legacy IAction's JsFunctionName and convert it to a confirmation dialog view if possible diff --git a/src/Umbraco.Web/Trees/ScriptsTreeController.cs b/src/Umbraco.Web/Trees/ScriptsTreeController.cs index cd56cc4790..191c9a7f8e 100644 --- a/src/Umbraco.Web/Trees/ScriptsTreeController.cs +++ b/src/Umbraco.Web/Trees/ScriptsTreeController.cs @@ -9,7 +9,7 @@ namespace Umbraco.Web.Trees [Tree(Constants.Applications.Settings, Constants.Trees.Scripts, "Scripts", "icon-folder", "icon-folder", sortOrder: 10)] public class ScriptsTreeController : FileSystemTreeController { - protected override IFileSystem FileSystem => Current.FileSystems.ScriptsFileSystem; // fixme inject + protected override IFileSystem FileSystem => Current.FileSystems.ScriptsFileSystem; // todo inject private static readonly string[] ExtensionsStatic = { "js" }; diff --git a/src/Umbraco.Web/Trees/StylesheetsTreeController.cs b/src/Umbraco.Web/Trees/StylesheetsTreeController.cs index 548e8ae928..f64e9fd752 100644 --- a/src/Umbraco.Web/Trees/StylesheetsTreeController.cs +++ b/src/Umbraco.Web/Trees/StylesheetsTreeController.cs @@ -8,7 +8,7 @@ namespace Umbraco.Web.Trees [Tree(Constants.Applications.Settings, Constants.Trees.Stylesheets, "Stylesheets", "icon-folder", "icon-folder", sortOrder: 9)] public class StylesheetsTreeController : FileSystemTreeController { - protected override IFileSystem FileSystem => Current.FileSystems.StylesheetsFileSystem; // fixme inject + protected override IFileSystem FileSystem => Current.FileSystems.StylesheetsFileSystem; // todo inject private static readonly string[] ExtensionsStatic = { "css" }; diff --git a/src/Umbraco.Web/UI/Controls/ProgressBar.cs b/src/Umbraco.Web/UI/Controls/ProgressBar.cs index a40509cfb8..3e87da1d6f 100644 --- a/src/Umbraco.Web/UI/Controls/ProgressBar.cs +++ b/src/Umbraco.Web/UI/Controls/ProgressBar.cs @@ -8,7 +8,6 @@ namespace Umbraco.Web.UI.Controls protected override void Render(System.Web.UI.HtmlTextWriter writer) { - // fixme - image is gone! base.ImageUrl = "/images/progressBar.gif"; base.AlternateText = Title; diff --git a/src/Umbraco.Web/UI/Controls/UmbracoControl.cs b/src/Umbraco.Web/UI/Controls/UmbracoControl.cs index 596e834ff9..c56e4fe07f 100644 --- a/src/Umbraco.Web/UI/Controls/UmbracoControl.cs +++ b/src/Umbraco.Web/UI/Controls/UmbracoControl.cs @@ -20,7 +20,7 @@ namespace Umbraco.Web.UI.Controls UmbracoContext = umbracoContext ?? throw new ArgumentNullException(nameof(umbracoContext)); Umbraco = new UmbracoHelper(umbracoContext, services); - // fixme inject somehow + // todo inject somehow Logger = Current.Logger; ProfilingLogger = Current.ProfilingLogger; Services = Current.Services; diff --git a/src/Umbraco.Web/UI/Controls/UmbracoUserControl.cs b/src/Umbraco.Web/UI/Controls/UmbracoUserControl.cs index 9c68540c58..f4cd7f1b50 100644 --- a/src/Umbraco.Web/UI/Controls/UmbracoUserControl.cs +++ b/src/Umbraco.Web/UI/Controls/UmbracoUserControl.cs @@ -31,7 +31,7 @@ namespace Umbraco.Web.UI.Controls Umbraco = new UmbracoHelper(umbracoContext, services); Members = Current.Factory.GetInstance(); - // fixme inject somehow + // todo inject somehow Logger = Current.Logger; ProfilingLogger = Current.ProfilingLogger; Services = Current.Services; diff --git a/src/Umbraco.Web/UmbracoContext.cs b/src/Umbraco.Web/UmbracoContext.cs index a4de900e7c..41ac309653 100644 --- a/src/Umbraco.Web/UmbracoContext.cs +++ b/src/Umbraco.Web/UmbracoContext.cs @@ -41,7 +41,7 @@ namespace Umbraco.Web /// A value indicating whether to replace the existing context. /// The "current" UmbracoContext. /// - /// fixme - this needs to be clarified + /// todo - this needs to be clarified /// /// If is true then the "current" UmbracoContext is replaced /// with a new one even if there is one already. See . Has to do with diff --git a/src/Umbraco.Web/UmbracoHelper.cs b/src/Umbraco.Web/UmbracoHelper.cs index b6ffdca105..ee57054dc9 100644 --- a/src/Umbraco.Web/UmbracoHelper.cs +++ b/src/Umbraco.Web/UmbracoHelper.cs @@ -325,23 +325,14 @@ namespace Umbraco.Web var umbracoType = Constants.UdiEntityType.ToUmbracoObjectType(udi.EntityType); - var entityService = Current.Services.EntityService; switch (umbracoType) { case UmbracoObjectTypes.Document: return Content(guidUdi.Guid); case UmbracoObjectTypes.Media: - // fixme - need to implement Media(guid)! - var mediaAttempt = entityService.GetId(guidUdi.Guid, umbracoType); - if (mediaAttempt.Success) - return Media(mediaAttempt.Result); - break; + return Media(guidUdi.Guid); case UmbracoObjectTypes.Member: - // fixme - need to implement Member(guid)! - var memberAttempt = entityService.GetId(guidUdi.Guid, umbracoType); - if (memberAttempt.Success) - return Member(memberAttempt.Result); - break; + return Member(guidUdi.Guid); } return null; @@ -650,7 +641,7 @@ namespace Umbraco.Web //TODO: This is horrible but until the media cache properly supports GUIDs we have no choice here and // currently there won't be any way to add this method correctly to `ITypedPublishedContentQuery` without breaking an interface and adding GUID support for media - var entityService = Current.Services.EntityService; // fixme inject + var entityService = Current.Services.EntityService; // todo inject var mediaAttempt = entityService.GetId(id, UmbracoObjectTypes.Media); return mediaAttempt.Success ? ContentQuery.Media(mediaAttempt.Result) : null; } diff --git a/src/Umbraco.Web/UmbracoHttpHandler.cs b/src/Umbraco.Web/UmbracoHttpHandler.cs index ed56ea6053..009272963c 100644 --- a/src/Umbraco.Web/UmbracoHttpHandler.cs +++ b/src/Umbraco.Web/UmbracoHttpHandler.cs @@ -23,7 +23,7 @@ namespace Umbraco.Web UmbracoContext = umbracoContext; Umbraco = new UmbracoHelper(umbracoContext, services); - // fixme inject somehow + // todo inject somehow Logger = Current.Logger; ProfilingLogger = Current.ProfilingLogger; Services = Current.Services; diff --git a/src/Umbraco.Web/WebApi/Filters/EnableOverrideAuthorizationAttribute.cs b/src/Umbraco.Web/WebApi/Filters/EnableOverrideAuthorizationAttribute.cs index b5a3f395ad..7828400487 100644 --- a/src/Umbraco.Web/WebApi/Filters/EnableOverrideAuthorizationAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/EnableOverrideAuthorizationAttribute.cs @@ -11,6 +11,6 @@ namespace Umbraco.Web.WebApi.Filters [AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = true)] public sealed class EnableOverrideAuthorizationAttribute : Attribute { - //fixme we should remove this and use the System.Web.Http.OverrideAuthorizationAttribute which uses IOverrideFilter instead + //todo we should remove this and use the System.Web.Http.OverrideAuthorizationAttribute which uses IOverrideFilter instead } } diff --git a/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForContentAttribute.cs b/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForContentAttribute.cs index 1601a23bc1..2deefc8a15 100644 --- a/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForContentAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForContentAttribute.cs @@ -83,13 +83,13 @@ namespace Umbraco.Web.WebApi.Filters } else if (Udi.TryParse(argument, true, out Udi udi)) { - //fixme: inject? we can't because this is an attribute but we could provide ctors and empty ctors that pass in the required services + //todo: inject? we can't because this is an attribute but we could provide ctors and empty ctors that pass in the required services nodeId = Current.Services.EntityService.GetId(udi).Result; } else { Guid.TryParse(argument, out Guid key); - //fixme: inject? we can't because this is an attribute but we could provide ctors and empty ctors that pass in the required services + //todo: inject? we can't because this is an attribute but we could provide ctors and empty ctors that pass in the required services nodeId = Current.Services.EntityService.GetId(key, UmbracoObjectTypes.Document).Result; } } diff --git a/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForMediaAttribute.cs b/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForMediaAttribute.cs index f0dd58f9a9..866941d41d 100644 --- a/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForMediaAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForMediaAttribute.cs @@ -42,7 +42,7 @@ namespace Umbraco.Web.WebApi.Filters _paramName = paramName; } - // fixme v8 guess this is not used anymore, source is ignored?! + // todo v8 guess this is not used anymore, source is ignored?! public EnsureUserPermissionForMediaAttribute(string paramName, DictionarySource source) { if (string.IsNullOrEmpty(paramName)) throw new ArgumentNullOrEmptyException(nameof(paramName)); diff --git a/src/Umbraco.Web/WebApi/Filters/OverridableAuthorizationAttribute.cs b/src/Umbraco.Web/WebApi/Filters/OverridableAuthorizationAttribute.cs index b63e9d1505..d56411952d 100644 --- a/src/Umbraco.Web/WebApi/Filters/OverridableAuthorizationAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/OverridableAuthorizationAttribute.cs @@ -5,7 +5,7 @@ using System.Web.Http.Controllers; namespace Umbraco.Web.WebApi.Filters { - //fixme remove this since we don't need it, see notes in EnableOverrideAuthorizationAttribute + //todo remove this since we don't need it, see notes in EnableOverrideAuthorizationAttribute /// /// Abstract auth filter class that can be used to enable overriding class auth filters at the action level diff --git a/src/Umbraco.Web/WebApi/UmbracoAuthorizeAttribute.cs b/src/Umbraco.Web/WebApi/UmbracoAuthorizeAttribute.cs index f282fce5ba..700554e731 100644 --- a/src/Umbraco.Web/WebApi/UmbracoAuthorizeAttribute.cs +++ b/src/Umbraco.Web/WebApi/UmbracoAuthorizeAttribute.cs @@ -19,7 +19,7 @@ namespace Umbraco.Web.WebApi /// internal static bool Enable = true; - // fixme - inject! + // todo - inject! private readonly UmbracoContext _umbracoContext; private readonly IRuntimeState _runtimeState; From 025d0eae18f291b68c8d0121c649d2450ce194d8 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 22 Jan 2019 10:14:07 +0100 Subject: [PATCH 197/437] Logviewer code cleanup. --- .../Logging/Viewer/CountingFilter.cs | 17 +++--- .../Logging/Viewer/ErrorCounterFilter.cs | 4 +- .../Logging/Viewer/ExpressionFilter.cs | 56 +++++++++---------- src/Umbraco.Core/Logging/Viewer/ILogViewer.cs | 20 +++---- .../Logging/Viewer/JsonLogViewer.cs | 43 +++++--------- src/Umbraco.Core/Logging/Viewer/LogMessage.cs | 15 ++--- .../Logging/Viewer/LogViewerComposer.cs | 1 + .../Logging/Viewer/LogViewerSourceBase.cs | 41 +++++++------- .../Logging/Viewer/MessageTemplateFilter.cs | 6 +- .../Umbraco/config/lang/en_us.xml | 1 + 10 files changed, 93 insertions(+), 111 deletions(-) diff --git a/src/Umbraco.Core/Logging/Viewer/CountingFilter.cs b/src/Umbraco.Core/Logging/Viewer/CountingFilter.cs index 36c3c9c45c..cac2a90e38 100644 --- a/src/Umbraco.Core/Logging/Viewer/CountingFilter.cs +++ b/src/Umbraco.Core/Logging/Viewer/CountingFilter.cs @@ -1,4 +1,5 @@ -using Serilog.Events; +using System; +using Serilog.Events; namespace Umbraco.Core.Logging.Viewer { @@ -9,16 +10,13 @@ namespace Umbraco.Core.Logging.Viewer Counts = new LogLevelCounts(); } - public LogLevelCounts Counts { get; set; } + public LogLevelCounts Counts { get; } public bool TakeLogEvent(LogEvent e) - { + { switch (e.Level) { - case LogEventLevel.Verbose: - break; - case LogEventLevel.Debug: Counts.Debug++; break; @@ -38,10 +36,11 @@ namespace Umbraco.Core.Logging.Viewer case LogEventLevel.Fatal: Counts.Fatal++; break; - - default: + case LogEventLevel.Verbose: break; - } + default: + throw new ArgumentOutOfRangeException(); + } //Don't add it to the list return false; diff --git a/src/Umbraco.Core/Logging/Viewer/ErrorCounterFilter.cs b/src/Umbraco.Core/Logging/Viewer/ErrorCounterFilter.cs index 8889b62a03..1b4864bee6 100644 --- a/src/Umbraco.Core/Logging/Viewer/ErrorCounterFilter.cs +++ b/src/Umbraco.Core/Logging/Viewer/ErrorCounterFilter.cs @@ -4,12 +4,12 @@ namespace Umbraco.Core.Logging.Viewer { public class ErrorCounterFilter : ILogFilter { - public int count; + public int Count { get; private set; } public bool TakeLogEvent(LogEvent e) { if (e.Level == LogEventLevel.Fatal || e.Level == LogEventLevel.Error || e.Exception != null) - count++; + Count++; //Don't add it to the list return false; diff --git a/src/Umbraco.Core/Logging/Viewer/ExpressionFilter.cs b/src/Umbraco.Core/Logging/Viewer/ExpressionFilter.cs index c559b55c95..1b529c9be9 100644 --- a/src/Umbraco.Core/Logging/Viewer/ExpressionFilter.cs +++ b/src/Umbraco.Core/Logging/Viewer/ExpressionFilter.cs @@ -8,53 +8,49 @@ namespace Umbraco.Core.Logging.Viewer //Log Expression Filters (pass in filter exp string) public class ExpressionFilter : ILogFilter { - private Func _filter; - private readonly string expressionOperators = "()+=*<>%-"; + private readonly Func _filter; + private const string ExpressionOperators = "()+=*<>%-"; public ExpressionFilter(string filterExpression) { - Func filter = null; + Func filter; - if (string.IsNullOrEmpty(filterExpression) == false) + if (string.IsNullOrEmpty(filterExpression)) { - // If the expression is one word and doesn't contain a serilog operator then we can perform a like search - if (!filterExpression.Contains(" ") && !filterExpression.ContainsAny(expressionOperators.Select(c => c))) + return; + } + + // If the expression is one word and doesn't contain a serilog operator then we can perform a like search + if (!filterExpression.Contains(" ") && !filterExpression.ContainsAny(ExpressionOperators.Select(c => c))) + { + filter = PerformMessageLikeFilter(filterExpression); + } + else // check if it's a valid expression + { + // If the expression evaluates then make it into a filter + if (FilterLanguage.TryCreateFilter(filterExpression, out var eval, out _)) { + filter = evt => true.Equals(eval(evt)); + } + else + { + //Assume the expression was a search string and make a Like filter from that filter = PerformMessageLikeFilter(filterExpression); } - else // check if it's a valid expression - { - // If the expression evaluates then make it into a filter - if (FilterLanguage.TryCreateFilter(filterExpression, out Func eval, out string error)) - { - filter = evt => true.Equals(eval(evt)); - } - else - { - //Assume the expression was a search string and make a Like filter from that - filter = PerformMessageLikeFilter(filterExpression); - } - } - - _filter = filter; } + + _filter = filter; } - + public bool TakeLogEvent(LogEvent e) { - if(_filter == null) - { - //If no filter has been setup - take all log items - return true; - } - - return _filter(e); + return _filter == null || _filter(e); } private Func PerformMessageLikeFilter(string filterExpression) { var filterSearch = $"@Message like '%{FilterLanguage.EscapeLikeExpressionContent(filterExpression)}%'"; - if (FilterLanguage.TryCreateFilter(filterSearch, out var eval, out var error)) + if (FilterLanguage.TryCreateFilter(filterSearch, out var eval, out _)) { return evt => true.Equals(eval(evt)); } diff --git a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs index 73b518980c..4aaf6d25f2 100644 --- a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs @@ -1,5 +1,4 @@ -using Serilog.Events; -using System; +using System; using System.Collections.Generic; using Umbraco.Core.Models; using Umbraco.Core.Persistence.DatabaseModelDefinitions; @@ -9,24 +8,19 @@ namespace Umbraco.Core.Logging.Viewer public interface ILogViewer { /// - /// Get all logs from your chosen datasource back as Serilog LogEvents + /// Get all saved searches from your chosen data source /// - IEnumerable GetLogs(DateTimeOffset startDate, DateTimeOffset endDate, ILogFilter filter, int skip, int take); + IReadOnlyList GetSavedSearches(); /// - /// Get all saved searches from your chosen datasource + /// Adds a new saved search to chosen data source and returns the updated searches /// - IEnumerable GetSavedSearches(); + IReadOnlyList AddSavedSearch(string name, string query); /// - /// Adds a new saved search to chosen datasource and returns the updated searches + /// Deletes a saved search to chosen data source and returns the remaining searches /// - IEnumerable AddSavedSearch(string name, string query); - - /// - /// Deletes a saved search to chosen datasource and returns the remaining searches - /// - IEnumerable DeleteSavedSearch(string name, string query); + IReadOnlyList DeleteSavedSearch(string name, string query); /// /// A count of number of errors diff --git a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs index 957a4af79b..6abd1037a7 100644 --- a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs @@ -1,16 +1,17 @@ using System; using System.Collections.Generic; using System.IO; +using System.Linq; using Serilog.Events; using Serilog.Formatting.Compact.Reader; namespace Umbraco.Core.Logging.Viewer { - public partial class JsonLogViewer : LogViewerSourceBase + public class JsonLogViewer : LogViewerSourceBase { - private string _logsPath; + private readonly string _logsPath; - public JsonLogViewer(string logsPath = "", string searchPath = "") : base(pathToSearches: searchPath) + public JsonLogViewer(string logsPath = "", string searchPath = "") : base(searchPath) { if (string.IsNullOrEmpty(logsPath)) logsPath = $@"{AppDomain.CurrentDomain.BaseDirectory}\App_Data\Logs\"; @@ -18,15 +19,12 @@ namespace Umbraco.Core.Logging.Viewer _logsPath = logsPath; } - const int FileSizeCap = 100; + private const int FileSizeCap = 100; - public override bool CanHandleLargeLogs { get => false; } + public override bool CanHandleLargeLogs => false; public override bool CheckCanOpenLogs(DateTimeOffset startDate, DateTimeOffset endDate) { - //Open the JSON log file for the range of dates(and exclude machinename) Could be several for LB - var dateRange = endDate - startDate; - //Log Directory var logDirectory = _logsPath; @@ -38,33 +36,23 @@ namespace Umbraco.Core.Logging.Viewer for (var day = startDate.Date; day.Date <= endDate.Date; day = day.AddDays(1)) { //Filename ending to search for (As could be multiple) - var filesToFind = $"*{day.ToString("yyyyMMdd")}.json"; + var filesToFind = $"*{day:yyyyMMdd}.json"; var filesForCurrentDay = Directory.GetFiles(logDirectory, filesToFind); - //Foreach file we find - open it - foreach (var filePath in filesForCurrentDay) - { - //Get the current filesize in bytes ! - var byteFileSize = new FileInfo(filePath).Length; - - fileSizeCount += byteFileSize; - } + fileSizeCount += filesForCurrentDay.Sum(x => new FileInfo(x).Length); } - //The GetLogSize call on JsonLogViewer returns the total filesize in bytes - //Check if the logsize is not greater than 100Mb (FileSizeCap) + //The GetLogSize call on JsonLogViewer returns the total file size in bytes + //Check if the log size is not greater than 100Mb (FileSizeCap) var logSizeAsMegabytes = fileSizeCount / 1024 / 1024; return logSizeAsMegabytes <= FileSizeCap; } - public override IEnumerable GetLogs(DateTimeOffset startDate, DateTimeOffset endDate, ILogFilter filter, int skip, int take) + protected override IReadOnlyList GetLogs(DateTimeOffset startDate, DateTimeOffset endDate, ILogFilter filter, int skip, int take) { var logs = new List(); - //Open the JSON log file for the range of dates (and exclude machinename) Could be several for LB - var dateRange = endDate - startDate; - //Log Directory var logDirectory = $@"{AppDomain.CurrentDomain.BaseDirectory}\App_Data\Logs\"; @@ -75,7 +63,7 @@ namespace Umbraco.Core.Logging.Viewer for (var day = startDate.Date; day.Date <= endDate.Date; day = day.AddDays(1)) { //Filename ending to search for (As could be multiple) - var filesToFind = $"*{day.ToString("yyyyMMdd")}.json"; + var filesToFind = $"*{day:yyyyMMdd}.json"; var filesForCurrentDay = Directory.GetFiles(logDirectory, filesToFind); @@ -89,8 +77,7 @@ namespace Umbraco.Core.Logging.Viewer using (var stream = new StreamReader(fs)) { var reader = new LogEventReader(stream); - LogEvent evt; - while (reader.TryRead(out evt)) + while (reader.TryRead(out var evt)) { //TODO - convert psuedo code if (count > skip + take) @@ -108,7 +95,7 @@ namespace Umbraco.Core.Logging.Viewer { logs.Add(evt); } - + count++; } } @@ -118,6 +105,6 @@ namespace Umbraco.Core.Logging.Viewer return logs; } - + } } diff --git a/src/Umbraco.Core/Logging/Viewer/LogMessage.cs b/src/Umbraco.Core/Logging/Viewer/LogMessage.cs index c03b26fa98..c9310ad200 100644 --- a/src/Umbraco.Core/Logging/Viewer/LogMessage.cs +++ b/src/Umbraco.Core/Logging/Viewer/LogMessage.cs @@ -4,12 +4,13 @@ using Serilog.Events; using System; using System.Collections.Generic; +// ReSharper disable UnusedAutoPropertyAccessor.Global namespace Umbraco.Core.Logging.Viewer { public class LogMessage { /// - /// The time at which the logevent occurred. + /// The time at which the log event occurred. /// public DateTimeOffset Timestamp { get; set; } @@ -18,24 +19,24 @@ namespace Umbraco.Core.Logging.Viewer /// [JsonConverter(typeof(StringEnumConverter))] public LogEventLevel Level { get; set; } - + /// - /// The message template describing the logevent. + /// The message template describing the log event. /// public string MessageTemplateText { get; set; } /// - /// The message template filled with the logevent properties. + /// The message template filled with the log event properties. /// public string RenderedMessage { get; set; } /// - /// Properties associated with the logevent, including those presented in Serilog.Events.LogEvent.MessageTemplate. + /// Properties associated with the log event, including those presented in Serilog.Events.LogEvent.MessageTemplate. /// public IReadOnlyDictionary Properties { get; set; } - + /// - /// An exception associated with the logevent, or null. + /// An exception associated with the log event, or null. /// public string Exception { get; set; } } diff --git a/src/Umbraco.Core/Logging/Viewer/LogViewerComposer.cs b/src/Umbraco.Core/Logging/Viewer/LogViewerComposer.cs index d3f507bdd4..f3d1b5137f 100644 --- a/src/Umbraco.Core/Logging/Viewer/LogViewerComposer.cs +++ b/src/Umbraco.Core/Logging/Viewer/LogViewerComposer.cs @@ -3,6 +3,7 @@ namespace Umbraco.Core.Logging.Viewer { [RuntimeLevel(MinLevel = RuntimeLevel.Run)] + // ReSharper disable once UnusedMember.Global public class LogViewerComposer : ICoreComposer { public void Compose(Composition composition) diff --git a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs index 5ac6353dfb..3578a56e74 100644 --- a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs +++ b/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs @@ -11,23 +11,27 @@ namespace Umbraco.Core.Logging.Viewer { public abstract class LogViewerSourceBase : ILogViewer { - public LogViewerSourceBase(string pathToSearches = "") + protected LogViewerSourceBase(string pathToSearches = "") { if (string.IsNullOrEmpty(pathToSearches)) + // ReSharper disable once StringLiteralTypo pathToSearches = IOHelper.MapPath("~/Config/logviewer.searches.config.js"); _searchesConfigPath = pathToSearches; } - private string _searchesConfigPath; + private readonly string _searchesConfigPath; public abstract bool CanHandleLargeLogs { get; } - - public abstract IEnumerable GetLogs(DateTimeOffset startDate, DateTimeOffset endDate, ILogFilter filter, int skip, int take); - + + /// + /// Get all logs from your chosen data source back as Serilog LogEvents + /// + protected abstract IReadOnlyList GetLogs(DateTimeOffset startDate, DateTimeOffset endDate, ILogFilter filter, int skip, int take); + public abstract bool CheckCanOpenLogs(DateTimeOffset startDate, DateTimeOffset endDate); - public virtual IEnumerable GetSavedSearches() + public virtual IReadOnlyList GetSavedSearches() { //Our default implementation @@ -35,10 +39,10 @@ namespace Umbraco.Core.Logging.Viewer EnsureFileExists(_searchesConfigPath, "[]"); var rawJson = System.IO.File.ReadAllText(_searchesConfigPath); - return JsonConvert.DeserializeObject>(rawJson); + return JsonConvert.DeserializeObject(rawJson); } - public virtual IEnumerable AddSavedSearch(string name, string query) + public virtual IReadOnlyList AddSavedSearch(string name, string query) { //Get the existing items var searches = GetSavedSearches().ToList(); @@ -46,7 +50,7 @@ namespace Umbraco.Core.Logging.Viewer //Add the new item to the bottom of the list searches.Add(new SavedLogSearch { Name = name, Query = query }); - //Serilaize to JSON string + //Serialize to JSON string var rawJson = JsonConvert.SerializeObject(searches, Formatting.Indented); //If file does not exist - lets create it with an empty array @@ -60,7 +64,7 @@ namespace Umbraco.Core.Logging.Viewer return searches; } - public virtual IEnumerable DeleteSavedSearch(string name, string query) + public virtual IReadOnlyList DeleteSavedSearch(string name, string query) { //Get the existing items var searches = GetSavedSearches().ToList(); @@ -68,7 +72,7 @@ namespace Umbraco.Core.Logging.Viewer //Removes the search searches.RemoveAll(s => s.Name.Equals(name) && s.Query.Equals(query)); - //Serilaize to JSON string + //Serialize to JSON string var rawJson = JsonConvert.SerializeObject(searches, Formatting.Indented); //Write it back down to file @@ -82,7 +86,7 @@ namespace Umbraco.Core.Logging.Viewer { var errorCounter = new ErrorCounterFilter(); GetLogs(startDate, endDate, errorCounter, 0, int.MaxValue); - return errorCounter.count; + return errorCounter.Count; } public LogLevelCounts GetLogLevelCounts(DateTimeOffset startDate, DateTimeOffset endDate) @@ -97,7 +101,7 @@ namespace Umbraco.Core.Logging.Viewer var messageTemplates = new MessageTemplateFilter(); GetLogs(startDate, endDate, messageTemplates, 0, int.MaxValue); - var templates = messageTemplates.counts. + var templates = messageTemplates.Counts. Select(x => new LogTemplate { MessageTemplate = x.Key, Count = x.Value }) .OrderByDescending(x=> x.Count); @@ -112,20 +116,20 @@ namespace Umbraco.Core.Logging.Viewer { var expression = new ExpressionFilter(filterExpression); var filteredLogs = GetLogs(startDate, endDate, expression, 0, int.MaxValue); - + //This is user used the checkbox UI to toggle which log levels they wish to see //If an empty array or null - its implied all levels to be viewed if (logLevels?.Length > 0) { var logsAfterLevelFilters = new List(); - bool validLogType = true; + var validLogType = true; foreach (var level in logLevels) { //Check if level string is part of the LogEventLevel enum if(Enum.IsDefined(typeof(LogEventLevel), level)) { validLogType = true; - logsAfterLevelFilters.AddRange(filteredLogs.Where(x => x.Level.ToString().ToLowerInvariant() == level.ToLowerInvariant())); + logsAfterLevelFilters.AddRange(filteredLogs.Where(x => string.Equals(x.Level.ToString(), level, StringComparison.InvariantCultureIgnoreCase))); } else { @@ -139,8 +143,7 @@ namespace Umbraco.Core.Logging.Viewer } } - long totalRecords = filteredLogs.Count(); - long pageIndex = pageNumber - 1; + long totalRecords = filteredLogs.Count; //Order By, Skip, Take & Select var logMessages = filteredLogs @@ -163,7 +166,7 @@ namespace Umbraco.Core.Logging.Viewer }; } - private void EnsureFileExists(string path, string contents) + private static void EnsureFileExists(string path, string contents) { var absolutePath = IOHelper.MapPath(path); if (System.IO.File.Exists(absolutePath)) return; diff --git a/src/Umbraco.Core/Logging/Viewer/MessageTemplateFilter.cs b/src/Umbraco.Core/Logging/Viewer/MessageTemplateFilter.cs index 01f9d7c290..55a3823e3e 100644 --- a/src/Umbraco.Core/Logging/Viewer/MessageTemplateFilter.cs +++ b/src/Umbraco.Core/Logging/Viewer/MessageTemplateFilter.cs @@ -5,12 +5,12 @@ namespace Umbraco.Core.Logging.Viewer { public class MessageTemplateFilter : ILogFilter { - public Dictionary counts = new Dictionary(); + public readonly Dictionary Counts = new Dictionary(); public bool TakeLogEvent(LogEvent e) { var templateText = e.MessageTemplate.Text; - if (counts.TryGetValue(templateText, out var count)) + if (Counts.TryGetValue(templateText, out var count)) { count++; } @@ -19,7 +19,7 @@ namespace Umbraco.Core.Logging.Viewer count = 1; } - counts[templateText] = count; + Counts[templateText] = count; //Don't add it to the list return false; 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 8ce9282d71..8ee200ab2a 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml @@ -1680,6 +1680,7 @@ To manage your website, simply open the Umbraco back office and start adding con Scripts Stylesheets Templates + Log Viewer Users Settings Templating From 70315d4a5fa626b44ce73e756533c6e575bbfd26 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 22 Jan 2019 10:36:44 +0100 Subject: [PATCH 198/437] Make as must of the log viewer internal as possible --- src/Umbraco.Core/Logging/Viewer/CountingFilter.cs | 2 +- src/Umbraco.Core/Logging/Viewer/ErrorCounterFilter.cs | 2 +- src/Umbraco.Core/Logging/Viewer/ExpressionFilter.cs | 2 +- src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs | 2 +- src/Umbraco.Core/Logging/Viewer/MessageTemplateFilter.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Core/Logging/Viewer/CountingFilter.cs b/src/Umbraco.Core/Logging/Viewer/CountingFilter.cs index cac2a90e38..bce0e0e9f8 100644 --- a/src/Umbraco.Core/Logging/Viewer/CountingFilter.cs +++ b/src/Umbraco.Core/Logging/Viewer/CountingFilter.cs @@ -3,7 +3,7 @@ using Serilog.Events; namespace Umbraco.Core.Logging.Viewer { - public class CountingFilter : ILogFilter + internal class CountingFilter : ILogFilter { public CountingFilter() { diff --git a/src/Umbraco.Core/Logging/Viewer/ErrorCounterFilter.cs b/src/Umbraco.Core/Logging/Viewer/ErrorCounterFilter.cs index 1b4864bee6..63f85b1087 100644 --- a/src/Umbraco.Core/Logging/Viewer/ErrorCounterFilter.cs +++ b/src/Umbraco.Core/Logging/Viewer/ErrorCounterFilter.cs @@ -2,7 +2,7 @@ namespace Umbraco.Core.Logging.Viewer { - public class ErrorCounterFilter : ILogFilter + internal class ErrorCounterFilter : ILogFilter { public int Count { get; private set; } diff --git a/src/Umbraco.Core/Logging/Viewer/ExpressionFilter.cs b/src/Umbraco.Core/Logging/Viewer/ExpressionFilter.cs index 1b529c9be9..f38897d47e 100644 --- a/src/Umbraco.Core/Logging/Viewer/ExpressionFilter.cs +++ b/src/Umbraco.Core/Logging/Viewer/ExpressionFilter.cs @@ -6,7 +6,7 @@ using Serilog.Filters.Expressions; namespace Umbraco.Core.Logging.Viewer { //Log Expression Filters (pass in filter exp string) - public class ExpressionFilter : ILogFilter + internal class ExpressionFilter : ILogFilter { private readonly Func _filter; private const string ExpressionOperators = "()+=*<>%-"; diff --git a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs index 6abd1037a7..36cfad23e7 100644 --- a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs @@ -7,7 +7,7 @@ using Serilog.Formatting.Compact.Reader; namespace Umbraco.Core.Logging.Viewer { - public class JsonLogViewer : LogViewerSourceBase + internal class JsonLogViewer : LogViewerSourceBase { private readonly string _logsPath; diff --git a/src/Umbraco.Core/Logging/Viewer/MessageTemplateFilter.cs b/src/Umbraco.Core/Logging/Viewer/MessageTemplateFilter.cs index 55a3823e3e..4a724d9147 100644 --- a/src/Umbraco.Core/Logging/Viewer/MessageTemplateFilter.cs +++ b/src/Umbraco.Core/Logging/Viewer/MessageTemplateFilter.cs @@ -3,7 +3,7 @@ using Serilog.Events; namespace Umbraco.Core.Logging.Viewer { - public class MessageTemplateFilter : ILogFilter + internal class MessageTemplateFilter : ILogFilter { public readonly Dictionary Counts = new Dictionary(); From 62617537fa55def7e9d631e636c4e396c129665b Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Tue, 22 Jan 2019 10:05:14 +0000 Subject: [PATCH 199/437] Change icon from scary bug to box-alt --- src/Umbraco.Web/Trees/LogViewerTreeController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Trees/LogViewerTreeController.cs b/src/Umbraco.Web/Trees/LogViewerTreeController.cs index e77deb4efd..22a1c799d6 100644 --- a/src/Umbraco.Web/Trees/LogViewerTreeController.cs +++ b/src/Umbraco.Web/Trees/LogViewerTreeController.cs @@ -34,7 +34,7 @@ namespace Umbraco.Web.Trees //this will load in a custom UI instead of the dashboard for the root node root.RoutePath = string.Format("{0}/{1}/{2}", Constants.Applications.Settings, Constants.Trees.LogViewer, "overview"); - root.Icon = "icon-bug"; + root.Icon = "icon-box-alt"; root.HasChildren = false; root.MenuUrl = null; From 626b9e8f7b27f1dc1903f060ba220ef36dc108fc Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Tue, 22 Jan 2019 10:07:56 +0000 Subject: [PATCH 200/437] Remove a TODO comment that was hanging around --- src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs index 36cfad23e7..ea2c8aa49f 100644 --- a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs +++ b/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs @@ -79,7 +79,6 @@ namespace Umbraco.Core.Logging.Viewer var reader = new LogEventReader(stream); while (reader.TryRead(out var evt)) { - //TODO - convert psuedo code if (count > skip + take) { break; From e349ead8b559347089371f409367eced3c1eeb52 Mon Sep 17 00:00:00 2001 From: Stephan Date: Tue, 22 Jan 2019 13:08:47 +0100 Subject: [PATCH 201/437] Better error message --- .../Models/PublishedContent/PublishedContentTypeFactory.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedContentTypeFactory.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedContentTypeFactory.cs index 5de5842eda..efb39ba844 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedContentTypeFactory.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedContentTypeFactory.cs @@ -79,7 +79,7 @@ namespace Umbraco.Core.Models.PublishedContent } if (!publishedDataTypes.TryGetValue(id, out var dataType)) - throw new ArgumentException("Not a valid datatype identifier.", nameof(id)); + throw new ArgumentException($"Could not find a datatype with identifier {id}.", nameof(id)); return dataType; } From ad026e25d71218a624a356ea06d8bda35394bf68 Mon Sep 17 00:00:00 2001 From: Stephan Date: Tue, 22 Jan 2019 09:31:47 +0100 Subject: [PATCH 202/437] Cleanup trees --- .../Editors/BackOfficeServerVariables.cs | 70 ++++++++-------- .../Mvc/PluginControllerAttribute.cs | 20 +++-- src/Umbraco.Web/Runtime/WebRuntimeComposer.cs | 12 +-- .../Search/SearchableTreeCollection.cs | 2 +- src/Umbraco.Web/Services/ITreeService.cs | 33 +++----- src/Umbraco.Web/Services/TreeService.cs | 57 ++++--------- .../Trees/ApplicationTreeController.cs | 2 +- .../Trees/ContentBlueprintTreeController.cs | 4 +- .../Trees/ContentTypeTreeController.cs | 4 +- src/Umbraco.Web/Trees/CoreTreeAttribute.cs | 13 +-- .../Trees/DataTypeTreeController.cs | 6 +- .../Trees/DictionaryTreeController.cs | 4 +- src/Umbraco.Web/Trees/FilesTreeController.cs | 9 +- src/Umbraco.Web/Trees/ITree.cs | 9 +- .../Trees/LanguageTreeController.cs | 4 +- src/Umbraco.Web/Trees/MacrosTreeController.cs | 4 +- .../Trees/MediaTypeTreeController.cs | 4 +- .../Trees/MemberGroupTreeController.cs | 2 +- src/Umbraco.Web/Trees/MemberTreeController.cs | 2 +- .../Trees/MemberTypeTreeController.cs | 4 +- .../Trees/PackagesTreeController.cs | 2 +- .../Trees/PartialViewMacrosTreeController.cs | 4 +- .../Trees/PartialViewsTreeController.cs | 4 +- .../Trees/RelationTypeTreeController.cs | 4 +- .../Trees/ScriptsTreeController.cs | 4 +- .../Trees/StylesheetsTreeController.cs | 4 +- .../Trees/TemplatesTreeController.cs | 4 +- src/Umbraco.Web/Trees/Tree.cs | 31 ++++--- src/Umbraco.Web/Trees/TreeAttribute.cs | 83 +++++++++---------- src/Umbraco.Web/Trees/TreeCollection.cs | 12 +-- .../Trees/TreeCollectionBuilder.cs | 50 +++++++++-- src/Umbraco.Web/Trees/TreeController.cs | 52 ++++++------ src/Umbraco.Web/Trees/TreeControllerBase.cs | 23 ++--- src/Umbraco.Web/Trees/UserTreeController.cs | 2 +- src/Umbraco.Web/TypeLoaderExtensions.cs | 29 ++----- .../UI/Pages/UmbracoEnsuredPage.cs | 2 +- .../Filters/UmbracoTreeAuthorizeAttribute.cs | 2 +- 37 files changed, 277 insertions(+), 300 deletions(-) diff --git a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs index 40891efe9e..d8d580dcd0 100644 --- a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs +++ b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.Configuration; using System.Linq; +using System.Runtime.Serialization; using System.Web; using System.Web.Configuration; using System.Web.Mvc; @@ -348,7 +349,10 @@ namespace Umbraco.Web.Editors { "umbracoPlugins", new Dictionary { - {"trees", GetTreePluginsMetaData()} + // for each tree that is [PluginController], get + // alias -> areaName + // so that routing (route.js) can look for views + { "trees", GetPluginTrees().ToArray() } } }, { @@ -389,43 +393,41 @@ namespace Umbraco.Web.Editors return defaultVals; } - private IEnumerable> GetTreePluginsMetaData() + private class PluginTree { - var treeTypes = TreeControllerTypes.Value; - //get all plugin trees with their attributes - var treesWithAttributes = treeTypes.Select(x => new - { - tree = x, - attributes = - x.GetCustomAttributes(false) - }).ToArray(); - - var pluginTreesWithAttributes = treesWithAttributes - //don't resolve any tree decorated with CoreTreeAttribute - .Where(x => x.attributes.All(a => (a is CoreTreeAttribute) == false)) - //we only care about trees with the PluginControllerAttribute - .Where(x => x.attributes.Any(a => a is PluginControllerAttribute)) - .ToArray(); - - return (from p in pluginTreesWithAttributes - let treeAttr = p.attributes.OfType().Single() - let pluginAttr = p.attributes.OfType().Single() - select new Dictionary - { - {"alias", treeAttr.TreeAlias}, {"packageFolder", pluginAttr.AreaName} - }).ToArray(); + [DataMember(Name = "alias")] + public string Alias { get; set; } + [DataMember(Name = "packageFolder")] + public string PackageFolder { get; set; } } - /// - /// A lazy reference to all tree controller types - /// - /// - /// We are doing this because if we constantly resolve the tree controller types from the PluginManager it will re-scan and also re-log that - /// it's resolving which is unecessary and annoying. - /// - private static readonly Lazy> TreeControllerTypes - = new Lazy>(() => Current.TypeLoader.GetAttributedTreeControllers().ToArray()); // todo inject + private IEnumerable GetPluginTrees() + { + // used to be (cached) + //var treeTypes = Current.TypeLoader.GetAttributedTreeControllers(); + // + // ie inheriting from TreeController and marked with TreeAttribute + // + // do this instead + // inheriting from TreeControllerBase and marked with TreeAttribute + var trees = Current.Factory.GetInstance(); + + foreach (var tree in trees) + { + var treeType = tree.TreeControllerType; + + // exclude anything marked with CoreTreeAttribute + var coreTree = treeType.GetCustomAttribute(false); + if (coreTree != null) continue; + + // exclude anything not marked with PluginControllerAttribute + var pluginController = treeType.GetCustomAttribute(false); + if (pluginController == null) continue; + + yield return new PluginTree { Alias = tree.TreeAlias, PackageFolder = pluginController.AreaName }; + } + } /// /// Returns the server variables regarding the application state diff --git a/src/Umbraco.Web/Mvc/PluginControllerAttribute.cs b/src/Umbraco.Web/Mvc/PluginControllerAttribute.cs index 6c8b8f19ee..332f1fd2a9 100644 --- a/src/Umbraco.Web/Mvc/PluginControllerAttribute.cs +++ b/src/Umbraco.Web/Mvc/PluginControllerAttribute.cs @@ -4,23 +4,27 @@ using System.Linq; namespace Umbraco.Web.Mvc { /// - /// An attribute applied to a plugin controller that requires that it is routed to its own area + /// Indicates that a controller is a plugin tree controller and should be routed to its own area. /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] public class PluginControllerAttribute : Attribute { - public string AreaName { get; private set; } - + /// + /// Initializes a new instance of the class. + /// + /// public PluginControllerAttribute(string areaName) { - //validate this, only letters and digits allowed. - if (areaName.Any(c => !Char.IsLetterOrDigit(c))) - { - throw new FormatException("The areaName specified " + areaName + " can only contains letters and digits"); - } + // validate this, only letters and digits allowed. + if (areaName.Any(c => !char.IsLetterOrDigit(c))) + throw new FormatException($"Invalid area name \"{areaName}\": the area name can only contains letters and digits."); AreaName = areaName; } + /// + /// Gets the name of the area. + /// + public string AreaName { get; } } } diff --git a/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs b/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs index 1a0bf8d1b0..2dda1a793c 100644 --- a/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs +++ b/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs @@ -203,14 +203,10 @@ namespace Umbraco.Web.Runtime .Append(); // register back office trees - foreach (var treeControllerType in umbracoApiControllerTypes - .Where(x => typeof(TreeControllerBase).IsAssignableFrom(x))) - { - var attribute = treeControllerType.GetCustomAttribute(false); - if (attribute == null) continue; - var tree = new Tree(attribute.SortOrder, attribute.ApplicationAlias, attribute.TreeAlias, attribute.TreeTitle, treeControllerType, attribute.IsSingleNodeTree); - composition.WithCollectionBuilder().Trees.Add(tree); - } + // the collection builder only accepts types inheriting from TreeControllerBase + // and will filter out those that are not attributed with TreeAttribute + composition.WithCollectionBuilder() + .AddTreeControllers(umbracoApiControllerTypes.Where(x => typeof(TreeControllerBase).IsAssignableFrom(x))); } } } diff --git a/src/Umbraco.Web/Search/SearchableTreeCollection.cs b/src/Umbraco.Web/Search/SearchableTreeCollection.cs index 032782b466..8f7c6ece0b 100644 --- a/src/Umbraco.Web/Search/SearchableTreeCollection.cs +++ b/src/Umbraco.Web/Search/SearchableTreeCollection.cs @@ -32,7 +32,7 @@ namespace Umbraco.Web.Search var found = searchableTrees.FirstOrDefault(x => x.TreeAlias.InvariantEquals(appTree.TreeAlias)); if (found != null) { - dictionary[found.TreeAlias] = new SearchableApplicationTree(appTree.ApplicationAlias, appTree.TreeAlias, found); + dictionary[found.TreeAlias] = new SearchableApplicationTree(appTree.SectionAlias, appTree.TreeAlias, found); } } return dictionary; diff --git a/src/Umbraco.Web/Services/ITreeService.cs b/src/Umbraco.Web/Services/ITreeService.cs index 96787086c6..691e5a6370 100644 --- a/src/Umbraco.Web/Services/ITreeService.cs +++ b/src/Umbraco.Web/Services/ITreeService.cs @@ -1,41 +1,32 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Umbraco.Core.Models; -using Umbraco.Core.Models.ContentEditing; -using Umbraco.Web.Models.ContentEditing; +using System.Collections.Generic; using Umbraco.Web.Trees; namespace Umbraco.Web.Services { + /// + /// Represents a service which manages section trees. + /// public interface ITreeService { /// - /// Gets an ApplicationTree by it's tree alias. + /// Gets a tree. /// /// The tree alias. - /// An ApplicationTree instance Tree GetByAlias(string treeAlias); /// - /// Gets all applicationTrees registered in umbraco from the umbracoAppTree table.. + /// Gets all trees. /// - /// Returns a ApplicationTree Array IEnumerable GetAll(); - + /// - /// Gets the application tree for the applcation with the specified alias + /// Gets all trees for a section. /// - /// The application alias. - /// Returns a ApplicationTree Array - IEnumerable GetTrees(string sectionAlias); - + IEnumerable GetBySection(string sectionAlias); + /// - /// Gets the grouped application trees for the application with the specified alias + /// Gets all trees for a section, grouped. /// - /// - /// - IDictionary> GetGroupedTrees(string sectionAlias); + IDictionary> GetBySectionGrouped(string sectionAlias); } - } diff --git a/src/Umbraco.Web/Services/TreeService.cs b/src/Umbraco.Web/Services/TreeService.cs index f58dce59bc..c697a89a62 100644 --- a/src/Umbraco.Web/Services/TreeService.cs +++ b/src/Umbraco.Web/Services/TreeService.cs @@ -6,65 +6,38 @@ using Umbraco.Web.Trees; namespace Umbraco.Web.Services { + /// + /// Implements . + /// internal class TreeService : ITreeService { private readonly TreeCollection _treeCollection; - private readonly Lazy>> _groupedTrees; + /// + /// Initializes a new instance of the class. + /// + /// public TreeService(TreeCollection treeCollection) { _treeCollection = treeCollection; - _groupedTrees = new Lazy>>(InitGroupedTrees); } /// - public Tree GetByAlias(string treeAlias) => _treeCollection.FirstOrDefault(t => t.TreeAlias == treeAlias); + public Tree GetByAlias(string treeAlias) => _treeCollection.FirstOrDefault(x => x.TreeAlias == treeAlias); /// public IEnumerable GetAll() => _treeCollection; /// - public IEnumerable GetTrees(string sectionAlias) - => GetAll().Where(x => x.ApplicationAlias.InvariantEquals(sectionAlias)).OrderBy(x => x.SortOrder).ToList(); + public IEnumerable GetBySection(string sectionAlias) + => _treeCollection.Where(x => x.SectionAlias.InvariantEquals(sectionAlias)).OrderBy(x => x.SortOrder).ToList(); - public IDictionary> GetGroupedTrees(string sectionAlias) + /// + public IDictionary> GetBySectionGrouped(string sectionAlias) { - var result = new Dictionary>(); - var foundTrees = GetTrees(sectionAlias).ToList(); - foreach(var treeGroup in _groupedTrees.Value) - { - List resultGroup = null; - foreach(var tree in foundTrees) - { - foreach(var treeAliasInGroup in treeGroup) - { - if (tree.TreeAlias != treeAliasInGroup) continue; - - if (resultGroup == null) resultGroup = new List(); - resultGroup.Add(tree); - } - } - if (resultGroup != null) - result[treeGroup.Key ?? string.Empty] = resultGroup; //key cannot be null so make empty string - } - return result; + return GetBySection(sectionAlias).GroupBy(x => x.TreeGroup).ToDictionary( + x => x.Key ?? "", + x => (IEnumerable) x.ToArray()); } - - /// - /// Creates a group of all tree groups and their tree aliases - /// - /// - /// - /// Used to initialize the field - /// - private IReadOnlyCollection> InitGroupedTrees() - { - var result = GetAll() - .Select(x => (treeAlias: x.TreeAlias, treeGroup: x.TreeControllerType.GetCustomAttribute(false)?.TreeGroup)) - .GroupBy(x => x.treeGroup, x => x.treeAlias) - .ToList(); - return result; - } - } } diff --git a/src/Umbraco.Web/Trees/ApplicationTreeController.cs b/src/Umbraco.Web/Trees/ApplicationTreeController.cs index 2541221537..75ae623580 100644 --- a/src/Umbraco.Web/Trees/ApplicationTreeController.cs +++ b/src/Umbraco.Web/Trees/ApplicationTreeController.cs @@ -60,7 +60,7 @@ namespace Umbraco.Web.Trees if (string.IsNullOrEmpty(application)) throw new HttpResponseException(HttpStatusCode.NotFound); //find all tree definitions that have the current application alias - var groupedTrees = _treeService.GetGroupedTrees(application); + var groupedTrees = _treeService.GetBySectionGrouped(application); var allTrees = groupedTrees.Values.SelectMany(x => x).ToList(); if (string.IsNullOrEmpty(tree) == false || allTrees.Count == 1) diff --git a/src/Umbraco.Web/Trees/ContentBlueprintTreeController.cs b/src/Umbraco.Web/Trees/ContentBlueprintTreeController.cs index cce40eb047..e3ecef2a0d 100644 --- a/src/Umbraco.Web/Trees/ContentBlueprintTreeController.cs +++ b/src/Umbraco.Web/Trees/ContentBlueprintTreeController.cs @@ -18,9 +18,9 @@ namespace Umbraco.Web.Trees /// This authorizes based on access to the content section even though it exists in the settings /// [UmbracoApplicationAuthorize(Constants.Applications.Content)] - [Tree(Constants.Applications.Settings, Constants.Trees.ContentBlueprints, null, sortOrder: 12)] + [Tree(Constants.Applications.Settings, Constants.Trees.ContentBlueprints, SortOrder = 12, TreeGroup = Constants.Trees.Groups.Settings)] [PluginController("UmbracoTrees")] - [CoreTree(TreeGroup = Constants.Trees.Groups.Settings)] + [CoreTree] public class ContentBlueprintTreeController : TreeController { diff --git a/src/Umbraco.Web/Trees/ContentTypeTreeController.cs b/src/Umbraco.Web/Trees/ContentTypeTreeController.cs index 3c6b9c782c..a7544f71d2 100644 --- a/src/Umbraco.Web/Trees/ContentTypeTreeController.cs +++ b/src/Umbraco.Web/Trees/ContentTypeTreeController.cs @@ -15,9 +15,9 @@ using Umbraco.Web.WebApi.Filters; namespace Umbraco.Web.Trees { [UmbracoTreeAuthorize(Constants.Trees.DocumentTypes)] - [Tree(Constants.Applications.Settings, Constants.Trees.DocumentTypes, null, sortOrder: 0)] + [Tree(Constants.Applications.Settings, Constants.Trees.DocumentTypes, SortOrder = 0, TreeGroup = Constants.Trees.Groups.Settings)] [Mvc.PluginController("UmbracoTrees")] - [CoreTree(TreeGroup = Constants.Trees.Groups.Settings)] + [CoreTree] public class ContentTypeTreeController : TreeController, ISearchableTree { protected override TreeNode CreateRootNode(FormDataCollection queryStrings) diff --git a/src/Umbraco.Web/Trees/CoreTreeAttribute.cs b/src/Umbraco.Web/Trees/CoreTreeAttribute.cs index 1b485aea6a..2d6ffe6a15 100644 --- a/src/Umbraco.Web/Trees/CoreTreeAttribute.cs +++ b/src/Umbraco.Web/Trees/CoreTreeAttribute.cs @@ -3,19 +3,12 @@ namespace Umbraco.Web.Trees { /// - /// Indicates that a tree is a core tree and shouldn't be treated as a plugin tree + /// Indicates that a tree is a core tree and should not be treated as a plugin tree. /// /// - /// This ensures that umbraco will look in the umbraco folders for views for this tree + /// This ensures that umbraco will look in the umbraco folders for views for this tree. /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] internal class CoreTreeAttribute : Attribute - { - public string TreeGroup { get; set; } - - public CoreTreeAttribute() - { - - } - } + { } } diff --git a/src/Umbraco.Web/Trees/DataTypeTreeController.cs b/src/Umbraco.Web/Trees/DataTypeTreeController.cs index 8b38bee865..c3b2fd631e 100644 --- a/src/Umbraco.Web/Trees/DataTypeTreeController.cs +++ b/src/Umbraco.Web/Trees/DataTypeTreeController.cs @@ -17,9 +17,9 @@ using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Trees { [UmbracoTreeAuthorize(Constants.Trees.DataTypes)] - [Tree(Constants.Applications.Settings, Constants.Trees.DataTypes, null, sortOrder:3)] + [Tree(Constants.Applications.Settings, Constants.Trees.DataTypes, SortOrder = 3, TreeGroup = Constants.Trees.Groups.Settings)] [PluginController("UmbracoTrees")] - [CoreTree(TreeGroup = Constants.Trees.Groups.Settings)] + [CoreTree] public class DataTypeTreeController : TreeController, ISearchableTree { protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) @@ -121,7 +121,7 @@ namespace Umbraco.Web.Trees }); if (container.HasChildren == false) - { + { //can delete data type menu.Items.Add(Services.TextService, opensDialog: true); } diff --git a/src/Umbraco.Web/Trees/DictionaryTreeController.cs b/src/Umbraco.Web/Trees/DictionaryTreeController.cs index 6c8f576732..6f8d4f547d 100644 --- a/src/Umbraco.Web/Trees/DictionaryTreeController.cs +++ b/src/Umbraco.Web/Trees/DictionaryTreeController.cs @@ -17,8 +17,8 @@ namespace Umbraco.Web.Trees // dictionary items in templates, even when we dont have authorization to manage the dictionary items )] [Mvc.PluginController("UmbracoTrees")] - [CoreTree(TreeGroup = Constants.Trees.Groups.Settings)] - [Tree(Constants.Applications.Translation, Constants.Trees.Dictionary, null)] + [CoreTree] + [Tree(Constants.Applications.Translation, Constants.Trees.Dictionary, TreeGroup = Constants.Trees.Groups.Settings)] public class DictionaryTreeController : TreeController { protected override TreeNode CreateRootNode(FormDataCollection queryStrings) diff --git a/src/Umbraco.Web/Trees/FilesTreeController.cs b/src/Umbraco.Web/Trees/FilesTreeController.cs index 947522747d..7e326870e3 100644 --- a/src/Umbraco.Web/Trees/FilesTreeController.cs +++ b/src/Umbraco.Web/Trees/FilesTreeController.cs @@ -1,14 +1,13 @@ -using Umbraco.Core; -using Umbraco.Core.IO; +using Umbraco.Core.IO; using Umbraco.Web.Models.Trees; namespace Umbraco.Web.Trees { - [CoreTree(TreeGroup = Constants.Trees.Groups.Templating)] - [Tree(Constants.Applications.Settings, "files", "Files", "icon-folder", "icon-folder", sortOrder: 13, initialize: false)] + // this is not a section tree - do not mark with [Tree] + [CoreTree] public class FilesTreeController : FileSystemTreeController { - protected override IFileSystem FileSystem => new PhysicalFileSystem("~/"); // fixme inject + protected override IFileSystem FileSystem => new PhysicalFileSystem("~/"); private static readonly string[] ExtensionsStatic = { "*" }; diff --git a/src/Umbraco.Web/Trees/ITree.cs b/src/Umbraco.Web/Trees/ITree.cs index 867beda20e..3427e4c40e 100644 --- a/src/Umbraco.Web/Trees/ITree.cs +++ b/src/Umbraco.Web/Trees/ITree.cs @@ -1,7 +1,7 @@ namespace Umbraco.Web.Trees { //fixme - we don't really use this, it is nice to have the treecontroller, attribute and ApplicationTree streamlined to implement this but it's not used - //leave as internal for now, maybe we'll use in the future, means we could pass around ITree + //leave as internal for now, maybe we'll use in the future, means we could pass around ITree internal interface ITree { /// @@ -13,7 +13,12 @@ /// /// Gets the section alias. /// - string ApplicationAlias { get; } + string SectionAlias { get; } + + /// + /// Gets the tree group. + /// + string TreeGroup { get; } /// /// Gets the tree alias. diff --git a/src/Umbraco.Web/Trees/LanguageTreeController.cs b/src/Umbraco.Web/Trees/LanguageTreeController.cs index 5b0ed8701f..ac2c0571e0 100644 --- a/src/Umbraco.Web/Trees/LanguageTreeController.cs +++ b/src/Umbraco.Web/Trees/LanguageTreeController.cs @@ -7,9 +7,9 @@ using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Trees { [UmbracoTreeAuthorize(Constants.Trees.Languages)] - [Tree(Constants.Applications.Settings, Constants.Trees.Languages, null, sortOrder: 11)] + [Tree(Constants.Applications.Settings, Constants.Trees.Languages, SortOrder = 11, TreeGroup = Constants.Trees.Groups.Settings)] [PluginController("UmbracoTrees")] - [CoreTree(TreeGroup = Constants.Trees.Groups.Settings)] + [CoreTree] public class LanguageTreeController : TreeController { protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) diff --git a/src/Umbraco.Web/Trees/MacrosTreeController.cs b/src/Umbraco.Web/Trees/MacrosTreeController.cs index 0300dbd6c6..77b13416ff 100644 --- a/src/Umbraco.Web/Trees/MacrosTreeController.cs +++ b/src/Umbraco.Web/Trees/MacrosTreeController.cs @@ -12,9 +12,9 @@ using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Trees { [UmbracoTreeAuthorize(Constants.Trees.Macros)] - [Tree(Constants.Applications.Settings, Constants.Trees.Macros, "Macros", sortOrder: 4)] + [Tree(Constants.Applications.Settings, Constants.Trees.Macros, TreeTitle = "Macros", SortOrder = 4, TreeGroup = Constants.Trees.Groups.Settings)] [PluginController("UmbracoTrees")] - [CoreTree(TreeGroup = Constants.Trees.Groups.Settings)] + [CoreTree] public class MacrosTreeController : TreeController { protected override TreeNode CreateRootNode(FormDataCollection queryStrings) diff --git a/src/Umbraco.Web/Trees/MediaTypeTreeController.cs b/src/Umbraco.Web/Trees/MediaTypeTreeController.cs index b93c1ac9e3..4a5ace0aeb 100644 --- a/src/Umbraco.Web/Trees/MediaTypeTreeController.cs +++ b/src/Umbraco.Web/Trees/MediaTypeTreeController.cs @@ -16,9 +16,9 @@ using Umbraco.Web.Models.ContentEditing; namespace Umbraco.Web.Trees { [UmbracoTreeAuthorize(Constants.Trees.MediaTypes)] - [Tree(Constants.Applications.Settings, Constants.Trees.MediaTypes, null, sortOrder:1)] + [Tree(Constants.Applications.Settings, Constants.Trees.MediaTypes, SortOrder = 1, TreeGroup = Constants.Trees.Groups.Settings)] [Mvc.PluginController("UmbracoTrees")] - [CoreTree(TreeGroup = Constants.Trees.Groups.Settings)] + [CoreTree] public class MediaTypeTreeController : TreeController, ISearchableTree { protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) diff --git a/src/Umbraco.Web/Trees/MemberGroupTreeController.cs b/src/Umbraco.Web/Trees/MemberGroupTreeController.cs index 9c8c8ea4e0..ea2412e4bd 100644 --- a/src/Umbraco.Web/Trees/MemberGroupTreeController.cs +++ b/src/Umbraco.Web/Trees/MemberGroupTreeController.cs @@ -8,7 +8,7 @@ using Umbraco.Web.WebApi.Filters; namespace Umbraco.Web.Trees { [UmbracoTreeAuthorize(Constants.Trees.MemberGroups)] - [Tree(Constants.Applications.Members, Constants.Trees.MemberGroups, null, sortOrder: 1)] + [Tree(Constants.Applications.Members, Constants.Trees.MemberGroups, SortOrder = 1)] [Mvc.PluginController("UmbracoTrees")] [CoreTree] public class MemberGroupTreeController : MemberTypeAndGroupTreeControllerBase diff --git a/src/Umbraco.Web/Trees/MemberTreeController.cs b/src/Umbraco.Web/Trees/MemberTreeController.cs index d1219da466..03c68dd67a 100644 --- a/src/Umbraco.Web/Trees/MemberTreeController.cs +++ b/src/Umbraco.Web/Trees/MemberTreeController.cs @@ -26,7 +26,7 @@ namespace Umbraco.Web.Trees Constants.Applications.Content, Constants.Applications.Media, Constants.Applications.Members)] - [Tree(Constants.Applications.Members, Constants.Trees.Members, null, sortOrder: 0)] + [Tree(Constants.Applications.Members, Constants.Trees.Members, SortOrder = 0)] [PluginController("UmbracoTrees")] [CoreTree] [SearchableTree("searchResultFormatter", "configureMemberResult")] diff --git a/src/Umbraco.Web/Trees/MemberTypeTreeController.cs b/src/Umbraco.Web/Trees/MemberTypeTreeController.cs index 7bf04010f2..3a72460963 100644 --- a/src/Umbraco.Web/Trees/MemberTypeTreeController.cs +++ b/src/Umbraco.Web/Trees/MemberTypeTreeController.cs @@ -7,9 +7,9 @@ using Umbraco.Web.WebApi.Filters; namespace Umbraco.Web.Trees { - [CoreTree(TreeGroup = Constants.Trees.Groups.Settings)] + [CoreTree] [UmbracoTreeAuthorize(Constants.Trees.MemberTypes)] - [Tree(Constants.Applications.Settings, Constants.Trees.MemberTypes, null, sortOrder: 2)] + [Tree(Constants.Applications.Settings, Constants.Trees.MemberTypes, SortOrder = 2, TreeGroup = Constants.Trees.Groups.Settings)] public class MemberTypeTreeController : MemberTypeAndGroupTreeControllerBase { protected override TreeNode CreateRootNode(FormDataCollection queryStrings) diff --git a/src/Umbraco.Web/Trees/PackagesTreeController.cs b/src/Umbraco.Web/Trees/PackagesTreeController.cs index 68b67f9fe2..9b1bf98823 100644 --- a/src/Umbraco.Web/Trees/PackagesTreeController.cs +++ b/src/Umbraco.Web/Trees/PackagesTreeController.cs @@ -8,7 +8,7 @@ using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Trees { [UmbracoTreeAuthorize(Constants.Trees.Packages)] - [Tree(Constants.Applications.Packages, Constants.Trees.Packages, null, sortOrder: 0, isSingleNodeTree: true)] + [Tree(Constants.Applications.Packages, Constants.Trees.Packages, SortOrder = 0, IsSingleNodeTree = true)] [PluginController("UmbracoTrees")] [CoreTree] public class PackagesTreeController : TreeController diff --git a/src/Umbraco.Web/Trees/PartialViewMacrosTreeController.cs b/src/Umbraco.Web/Trees/PartialViewMacrosTreeController.cs index c874b01244..dc107ad303 100644 --- a/src/Umbraco.Web/Trees/PartialViewMacrosTreeController.cs +++ b/src/Umbraco.Web/Trees/PartialViewMacrosTreeController.cs @@ -10,10 +10,10 @@ namespace Umbraco.Web.Trees /// /// Tree for displaying partial view macros in the developer app /// - [Tree(Constants.Applications.Settings, Constants.Trees.PartialViewMacros, null, sortOrder: 8)] + [Tree(Constants.Applications.Settings, Constants.Trees.PartialViewMacros, SortOrder = 8, TreeGroup = Constants.Trees.Groups.Templating)] [UmbracoTreeAuthorize(Constants.Trees.PartialViewMacros)] [PluginController("UmbracoTrees")] - [CoreTree(TreeGroup = Constants.Trees.Groups.Templating)] + [CoreTree] public class PartialViewMacrosTreeController : PartialViewsTreeController { protected override IFileSystem FileSystem => Current.FileSystems.MacroPartialsFileSystem; diff --git a/src/Umbraco.Web/Trees/PartialViewsTreeController.cs b/src/Umbraco.Web/Trees/PartialViewsTreeController.cs index a7aa8f134e..60805d4dac 100644 --- a/src/Umbraco.Web/Trees/PartialViewsTreeController.cs +++ b/src/Umbraco.Web/Trees/PartialViewsTreeController.cs @@ -10,10 +10,10 @@ namespace Umbraco.Web.Trees /// /// Tree for displaying partial views in the settings app /// - [Tree(Constants.Applications.Settings, Constants.Trees.PartialViews, null, sortOrder: 7)] + [Tree(Constants.Applications.Settings, Constants.Trees.PartialViews, SortOrder = 7, TreeGroup = Constants.Trees.Groups.Templating)] [UmbracoTreeAuthorize(Constants.Trees.PartialViews)] [PluginController("UmbracoTrees")] - [CoreTree(TreeGroup = Constants.Trees.Groups.Templating)] + [CoreTree] public class PartialViewsTreeController : FileSystemTreeController { protected override IFileSystem FileSystem => Current.FileSystems.PartialViewsFileSystem; diff --git a/src/Umbraco.Web/Trees/RelationTypeTreeController.cs b/src/Umbraco.Web/Trees/RelationTypeTreeController.cs index 1888044d8d..82e07c5226 100644 --- a/src/Umbraco.Web/Trees/RelationTypeTreeController.cs +++ b/src/Umbraco.Web/Trees/RelationTypeTreeController.cs @@ -9,9 +9,9 @@ using Umbraco.Web.Actions; namespace Umbraco.Web.Trees { [UmbracoTreeAuthorize(Constants.Trees.RelationTypes)] - [Tree(Constants.Applications.Settings, Constants.Trees.RelationTypes, null, sortOrder: 5)] + [Tree(Constants.Applications.Settings, Constants.Trees.RelationTypes, SortOrder = 5, TreeGroup = Constants.Trees.Groups.Settings)] [Mvc.PluginController("UmbracoTrees")] - [CoreTree(TreeGroup = Constants.Trees.Groups.Settings)] + [CoreTree] public class RelationTypeTreeController : TreeController { protected override MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings) diff --git a/src/Umbraco.Web/Trees/ScriptsTreeController.cs b/src/Umbraco.Web/Trees/ScriptsTreeController.cs index cd56cc4790..bb002c7dda 100644 --- a/src/Umbraco.Web/Trees/ScriptsTreeController.cs +++ b/src/Umbraco.Web/Trees/ScriptsTreeController.cs @@ -5,8 +5,8 @@ using Umbraco.Web.Models.Trees; namespace Umbraco.Web.Trees { - [CoreTree(TreeGroup = Constants.Trees.Groups.Templating)] - [Tree(Constants.Applications.Settings, Constants.Trees.Scripts, "Scripts", "icon-folder", "icon-folder", sortOrder: 10)] + [CoreTree] + [Tree(Constants.Applications.Settings, Constants.Trees.Scripts, TreeTitle = "Scripts", IconOpen = "icon-folder", IconClosed = "icon-folder", SortOrder = 10, TreeGroup = Constants.Trees.Groups.Templating)] public class ScriptsTreeController : FileSystemTreeController { protected override IFileSystem FileSystem => Current.FileSystems.ScriptsFileSystem; // fixme inject diff --git a/src/Umbraco.Web/Trees/StylesheetsTreeController.cs b/src/Umbraco.Web/Trees/StylesheetsTreeController.cs index 548e8ae928..b47c225b2f 100644 --- a/src/Umbraco.Web/Trees/StylesheetsTreeController.cs +++ b/src/Umbraco.Web/Trees/StylesheetsTreeController.cs @@ -4,8 +4,8 @@ using Umbraco.Web.Composing; namespace Umbraco.Web.Trees { - [CoreTree(TreeGroup = Constants.Trees.Groups.Templating)] - [Tree(Constants.Applications.Settings, Constants.Trees.Stylesheets, "Stylesheets", "icon-folder", "icon-folder", sortOrder: 9)] + [CoreTree] + [Tree(Constants.Applications.Settings, Constants.Trees.Stylesheets, TreeTitle = "Stylesheets", IconOpen = "icon-folder", IconClosed = "icon-folder", SortOrder = 9, TreeGroup = Constants.Trees.Groups.Templating)] public class StylesheetsTreeController : FileSystemTreeController { protected override IFileSystem FileSystem => Current.FileSystems.StylesheetsFileSystem; // fixme inject diff --git a/src/Umbraco.Web/Trees/TemplatesTreeController.cs b/src/Umbraco.Web/Trees/TemplatesTreeController.cs index c074f828d4..5db8c4b7cb 100644 --- a/src/Umbraco.Web/Trees/TemplatesTreeController.cs +++ b/src/Umbraco.Web/Trees/TemplatesTreeController.cs @@ -16,9 +16,9 @@ using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Trees { [UmbracoTreeAuthorize(Constants.Trees.Templates)] - [Tree(Constants.Applications.Settings, Constants.Trees.Templates, null, sortOrder:6)] + [Tree(Constants.Applications.Settings, Constants.Trees.Templates, SortOrder = 6, TreeGroup = Constants.Trees.Groups.Templating)] [PluginController("UmbracoTrees")] - [CoreTree(TreeGroup = Constants.Trees.Groups.Templating)] + [CoreTree] public class TemplatesTreeController : TreeController, ISearchableTree { protected override TreeNode CreateRootNode(FormDataCollection queryStrings) diff --git a/src/Umbraco.Web/Trees/Tree.cs b/src/Umbraco.Web/Trees/Tree.cs index 39f5cec1eb..b0a24e3b2b 100644 --- a/src/Umbraco.Web/Trees/Tree.cs +++ b/src/Umbraco.Web/Trees/Tree.cs @@ -1,46 +1,44 @@ using System; using System.Diagnostics; using Umbraco.Core.Services; -using Umbraco.Web.Models.Trees; namespace Umbraco.Web.Trees { - [DebuggerDisplay("Tree - {TreeAlias} ({ApplicationAlias})")] + [DebuggerDisplay("Tree - {TreeAlias} ({SectionAlias})")] public class Tree : ITree { - public Tree(int sortOrder, string applicationAlias, string alias, string title, Type treeControllerType, bool isSingleNodeTree) + public Tree(int sortOrder, string applicationAlias, string group, string alias, string title, Type treeControllerType, bool isSingleNodeTree) { SortOrder = sortOrder; - ApplicationAlias = applicationAlias; + SectionAlias = applicationAlias; + TreeGroup = group; TreeAlias = alias; TreeTitle = title; TreeControllerType = treeControllerType; IsSingleNodeTree = isSingleNodeTree; } - + /// - /// - /// Gets or sets the sort order. - /// public int SortOrder { get; set; } - /// - /// Gets the application alias. - /// - public string ApplicationAlias { get; set; } + /// + public string SectionAlias { get; set; } + + /// + public string TreeGroup { get; } /// public string TreeAlias { get; } /// - /// - /// Gets or sets the tree title (fallback if the tree alias isn't localized) - /// - /// The title. public string TreeTitle { get; set; } + /// public bool IsSingleNodeTree { get; } + /// + /// Gets the tree controller type. + /// public Type TreeControllerType { get; } internal static string GetRootNodeDisplayName(ITree tree, ILocalizedTextService textService) @@ -64,6 +62,5 @@ namespace Umbraco.Web.Trees return label; } - } } diff --git a/src/Umbraco.Web/Trees/TreeAttribute.cs b/src/Umbraco.Web/Trees/TreeAttribute.cs index dd63f8c172..bfd7b53f4a 100644 --- a/src/Umbraco.Web/Trees/TreeAttribute.cs +++ b/src/Umbraco.Web/Trees/TreeAttribute.cs @@ -1,10 +1,9 @@ using System; -using Umbraco.Web.Models.Trees; namespace Umbraco.Web.Trees { /// - /// Identifies an application tree + /// Identifies a section tree. /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] public class TreeAttribute : Attribute, ITree @@ -12,54 +11,50 @@ namespace Umbraco.Web.Trees /// /// Initializes a new instance of the class. /// - /// The app alias. - /// - public TreeAttribute(string appAlias, - string treeAlias) : this(appAlias, treeAlias, null) + public TreeAttribute(string sectionAlias, string treeAlias) { - } - - /// - /// Initializes a new instance of the class. - /// - /// The app alias. - /// - /// - /// The icon closed. - /// The icon open. - /// if set to true [initialize]. - /// The sort order. - /// Flag to define if this tree is a single node tree (will never contain child nodes, full screen app) - public TreeAttribute(string appAlias, - string treeAlias, - string treeTitle, - string iconClosed = "icon-folder", - string iconOpen = "icon-folder-open", - bool initialize = true, - int sortOrder = 0, - bool isSingleNodeTree = false) - { - ApplicationAlias = appAlias; + SectionAlias = sectionAlias; TreeAlias = treeAlias; - TreeTitle = treeTitle; - IconClosed = iconClosed; - IconOpen = iconOpen; - Initialize = initialize; - SortOrder = sortOrder; - IsSingleNodeTree = isSingleNodeTree; } - public string ApplicationAlias { get; } - public string TreeAlias { get; } - public string TreeTitle { get; } - public string IconClosed { get; } - public string IconOpen { get; } - public bool Initialize { get; } - public int SortOrder { get; } + /// + /// Gets the section alias. + /// + public string SectionAlias { get; } /// - /// Flag to define if this tree is a single node tree (will never contain child nodes, full screen app) + /// Gets the tree alias. /// - public bool IsSingleNodeTree { get; } + public string TreeAlias { get; } + + /// + /// Gets or sets the tree title. + /// + public string TreeTitle { get; set; } + + /// + /// Gets or sets the group of the tree. + /// + public string TreeGroup { get; set; } + + /// + /// Gets or sets the tree icon when closed. + /// + public string IconClosed { get; set; } = "icon-folder"; + + /// + /// Gets or sets the tree icon when open. + /// + public string IconOpen { get; set; } = "icon-folder-open"; + + /// + /// Gets or sets the tree sort order. + /// + public int SortOrder { get; set; } + + /// + /// Gets or sets a value indicating whether the tree is a single-node tree (no child nodes, full screen app). + /// + public bool IsSingleNodeTree { get; set; } } } diff --git a/src/Umbraco.Web/Trees/TreeCollection.cs b/src/Umbraco.Web/Trees/TreeCollection.cs index a7bfe52295..76404d4ac5 100644 --- a/src/Umbraco.Web/Trees/TreeCollection.cs +++ b/src/Umbraco.Web/Trees/TreeCollection.cs @@ -1,15 +1,11 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Collections.Generic; using Umbraco.Core.Composing; -using Umbraco.Core.Models; -using Umbraco.Core.Models.ContentEditing; -using Umbraco.Web.Models.ContentEditing; namespace Umbraco.Web.Trees { + /// + /// Represents the collection of section trees. + /// public class TreeCollection : BuilderCollectionBase { public TreeCollection(IEnumerable items) diff --git a/src/Umbraco.Web/Trees/TreeCollectionBuilder.cs b/src/Umbraco.Web/Trees/TreeCollectionBuilder.cs index ae2675bac9..ad2a99a6c7 100644 --- a/src/Umbraco.Web/Trees/TreeCollectionBuilder.cs +++ b/src/Umbraco.Web/Trees/TreeCollectionBuilder.cs @@ -1,17 +1,55 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; +using Umbraco.Core; using Umbraco.Core.Composing; namespace Umbraco.Web.Trees { + // todo + // this is a weird collection builder because it actually contains trees, not types + // and it does not really rely on DI to instantiate anything - but meh + // can we have trees that don't have a controller, or something? looks like, no + // and then, we should not register trees here, and only create them when creating + // the collection! + + /// + /// Builds a . + /// public class TreeCollectionBuilder : ICollectionBuilder { - /// - /// expose the list of trees which developers can manipulate before the collection is created - /// - public List Trees { get; } = new List(); + private readonly List _trees = new List(); - public TreeCollection CreateCollection(IFactory factory) => new TreeCollection(Trees); + public TreeCollection CreateCollection(IFactory factory) => new TreeCollection(_trees); public void RegisterWith(IRegister register) => register.Register(CreateCollection, Lifetime.Singleton); + + public void AddTreeController() + where TController : TreeControllerBase + => AddTreeController(typeof(TController)); + + public void AddTreeController(Type controllerType) + { + if (!typeof(TreeControllerBase).IsAssignableFrom(controllerType)) + throw new ArgumentException($"Type {controllerType} does not inherit from {typeof(TreeControllerBase).FullName}."); + + var attribute = controllerType.GetCustomAttribute(false); + if (attribute == null) return; // todo - shouldn't we throw or at least log? + var tree = new Tree(attribute.SortOrder, attribute.SectionAlias, attribute.TreeGroup, attribute.TreeAlias, attribute.TreeTitle, controllerType, attribute.IsSingleNodeTree); + _trees.Add(tree); + } + + public void AddTreeControllers(IEnumerable controllerTypes) + { + foreach (var controllerType in controllerTypes) + AddTreeController(controllerType); + } + + // todo - do we want to support this? + public void AddTree(Tree tree) + => _trees.Add(tree); + + // todo - do we want to support this? + public void AddTrees(IEnumerable tree) + => _trees.AddRange(tree); } } diff --git a/src/Umbraco.Web/Trees/TreeController.cs b/src/Umbraco.Web/Trees/TreeController.cs index 733c526331..bc9345eb1d 100644 --- a/src/Umbraco.Web/Trees/TreeController.cs +++ b/src/Umbraco.Web/Trees/TreeController.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Concurrent; -using System.Linq; using Umbraco.Core; using Umbraco.Core.Cache; using Umbraco.Core.Configuration; @@ -15,53 +14,50 @@ namespace Umbraco.Web.Trees /// public abstract class TreeController : TreeControllerBase { - private TreeAttribute _attribute; + private static readonly ConcurrentDictionary TreeAttributeCache = new ConcurrentDictionary(); - protected TreeController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState) : base(globalSettings, umbracoContext, sqlContext, services, appCaches, logger, runtimeState) + private readonly TreeAttribute _treeAttribute; + + protected TreeController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState) + : base(globalSettings, umbracoContext, sqlContext, services, appCaches, logger, runtimeState) { - Initialize(); + _treeAttribute = GetTreeAttribute(); } protected TreeController() { - Initialize(); + _treeAttribute = GetTreeAttribute(); } /// public override string RootNodeDisplayName => Tree.GetRootNodeDisplayName(this, Services.TextService); /// - public override string TreeAlias => _attribute.TreeAlias; - /// - public override string TreeTitle => _attribute.TreeTitle; - /// - public override string ApplicationAlias => _attribute.ApplicationAlias; - /// - public override int SortOrder => _attribute.SortOrder; - /// - public override bool IsSingleNodeTree => _attribute.IsSingleNodeTree; + public override string TreeGroup => _treeAttribute.TreeGroup; - private void Initialize() - { - _attribute = GetTreeAttribute(); - } + /// + public override string TreeAlias => _treeAttribute.TreeAlias; - private static readonly ConcurrentDictionary TreeAttributeCache = new ConcurrentDictionary(); + /// + public override string TreeTitle => _treeAttribute.TreeTitle; + + /// + public override string SectionAlias => _treeAttribute.SectionAlias; + + /// + public override int SortOrder => _treeAttribute.SortOrder; + + /// + public override bool IsSingleNodeTree => _treeAttribute.IsSingleNodeTree; private TreeAttribute GetTreeAttribute() { return TreeAttributeCache.GetOrAdd(GetType(), type => { - //Locate the tree attribute - var treeAttributes = type - .GetCustomAttributes(false) - .ToArray(); - - if (treeAttributes.Length == 0) + var treeAttribute = type.GetCustomAttribute(false); + if (treeAttribute == null) throw new InvalidOperationException("The Tree controller is missing the " + typeof(TreeAttribute).FullName + " attribute"); - - //assign the properties of this object to those of the metadata attribute - return treeAttributes[0]; + return treeAttribute; }); } } diff --git a/src/Umbraco.Web/Trees/TreeControllerBase.cs b/src/Umbraco.Web/Trees/TreeControllerBase.cs index d06d768f2d..e2e9c21c66 100644 --- a/src/Umbraco.Web/Trees/TreeControllerBase.cs +++ b/src/Umbraco.Web/Trees/TreeControllerBase.cs @@ -2,7 +2,6 @@ using System.Globalization; using System.Linq; using System.Net.Http.Formatting; -using System.Web.Http.Routing; using Umbraco.Core; using Umbraco.Core.Cache; using Umbraco.Core.Configuration; @@ -19,7 +18,7 @@ using Umbraco.Web.WebApi.Filters; namespace Umbraco.Web.Trees { /// - /// A base controller reference for non-attributed trees (un-registered). + /// A base controller reference for non-attributed trees (un-registered). /// /// /// Developers should generally inherit from TreeController. @@ -28,13 +27,11 @@ namespace Umbraco.Web.Trees public abstract class TreeControllerBase : UmbracoAuthorizedApiController, ITree { protected TreeControllerBase() - { - } - - protected TreeControllerBase(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState) : base(globalSettings, umbracoContext, sqlContext, services, appCaches, logger, runtimeState) - { - } + { } + protected TreeControllerBase(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState) + : base(globalSettings, umbracoContext, sqlContext, services, appCaches, logger, runtimeState) + { } /// /// The method called to render the contents of the tree structure @@ -62,14 +59,21 @@ namespace Umbraco.Web.Trees /// public abstract string RootNodeDisplayName { get; } + /// + public abstract string TreeGroup { get; } + /// public abstract string TreeAlias { get; } + /// public abstract string TreeTitle { get; } + /// - public abstract string ApplicationAlias { get; } + public abstract string SectionAlias { get; } + /// public abstract int SortOrder { get; } + /// public abstract bool IsSingleNodeTree { get; } @@ -402,5 +406,4 @@ namespace Umbraco.Web.Trees handler?.Invoke(instance, e); } } - } diff --git a/src/Umbraco.Web/Trees/UserTreeController.cs b/src/Umbraco.Web/Trees/UserTreeController.cs index 95f041cac5..91078b2be8 100644 --- a/src/Umbraco.Web/Trees/UserTreeController.cs +++ b/src/Umbraco.Web/Trees/UserTreeController.cs @@ -7,7 +7,7 @@ using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Trees { [UmbracoTreeAuthorize(Constants.Trees.Users)] - [Tree(Constants.Applications.Users, Constants.Trees.Users, null, sortOrder: 0, isSingleNodeTree: true)] + [Tree(Constants.Applications.Users, Constants.Trees.Users, SortOrder = 0, IsSingleNodeTree = true)] [PluginController("UmbracoTrees")] [CoreTree] public class UserTreeController : TreeController diff --git a/src/Umbraco.Web/TypeLoaderExtensions.cs b/src/Umbraco.Web/TypeLoaderExtensions.cs index 4d09783ca9..1cf8bc124c 100644 --- a/src/Umbraco.Web/TypeLoaderExtensions.cs +++ b/src/Umbraco.Web/TypeLoaderExtensions.cs @@ -1,8 +1,6 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Media; using Umbraco.Web.Mvc; -using Umbraco.Web.Trees; using Umbraco.Web.WebApi; using Umbraco.Core.Composing; @@ -10,29 +8,20 @@ using Umbraco.Core.Composing; namespace Umbraco.Web { /// - /// Extension methods for the PluginTypemgr + /// Provides extension methods for the class. /// public static class TypeLoaderExtensions { /// - /// Returns all available TreeApiController's in application that are attribute with TreeAttribute + /// Gets all types implementing . /// - /// - /// - internal static IEnumerable GetAttributedTreeControllers(this TypeLoader mgr) - { - return mgr.GetTypesWithAttribute(); - } + internal static IEnumerable GetSurfaceControllers(this TypeLoader typeLoader) + => typeLoader.GetTypes(); - internal static IEnumerable GetSurfaceControllers(this TypeLoader mgr) - { - return mgr.GetTypes(); - } - - internal static IEnumerable GetUmbracoApiControllers(this TypeLoader mgr) - { - return mgr.GetTypes(); - } - + /// + /// Gets all types implementing . + /// + internal static IEnumerable GetUmbracoApiControllers(this TypeLoader typeLoader) + => typeLoader.GetTypes(); } } diff --git a/src/Umbraco.Web/UI/Pages/UmbracoEnsuredPage.cs b/src/Umbraco.Web/UI/Pages/UmbracoEnsuredPage.cs index cafdfb0e04..f1b2cda368 100644 --- a/src/Umbraco.Web/UI/Pages/UmbracoEnsuredPage.cs +++ b/src/Umbraco.Web/UI/Pages/UmbracoEnsuredPage.cs @@ -33,7 +33,7 @@ namespace Umbraco.Web.UI.Pages .GetByAlias(treeAuth.TreeAlias); if (treeByAlias != null) { - CurrentApp = treeByAlias.ApplicationAlias; + CurrentApp = treeByAlias.SectionAlias; } } } diff --git a/src/Umbraco.Web/WebApi/Filters/UmbracoTreeAuthorizeAttribute.cs b/src/Umbraco.Web/WebApi/Filters/UmbracoTreeAuthorizeAttribute.cs index 5ad3da7f4d..1bea963ee1 100644 --- a/src/Umbraco.Web/WebApi/Filters/UmbracoTreeAuthorizeAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/UmbracoTreeAuthorizeAttribute.cs @@ -44,7 +44,7 @@ namespace Umbraco.Web.WebApi.Filters var apps = _treeAliases.Select(x => Current.TreeService .GetByAlias(x)) .WhereNotNull() - .Select(x => x.ApplicationAlias) + .Select(x => x.SectionAlias) .Distinct() .ToArray(); From 1fc2ea9345a3e1d8b501a3cf51d2a3aee63d3e4e Mon Sep 17 00:00:00 2001 From: Robert Date: Tue, 22 Jan 2019 14:30:23 +0100 Subject: [PATCH 203/437] Fixes composition in Media Types --- src/Umbraco.Web/Editors/ContentTypeControllerBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs b/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs index 773f2830ca..9cfde94a3a 100644 --- a/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs +++ b/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs @@ -174,7 +174,7 @@ namespace Umbraco.Web.Editors break; case UmbracoObjectTypes.MediaType: - source = Services.ContentTypeService.Get(contentTypeId); + source = Services.MediaTypeService.Get(contentTypeId); break; case UmbracoObjectTypes.MemberType: From e651d5917a69ec874c9242026203d169eca6c9f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 22 Jan 2019 14:38:10 +0100 Subject: [PATCH 204/437] Finds and set the active ContentApp when running init, fixing the issue of retuning to a node after editing the DocType in infinity editing. Fixes #4185 --- .../components/content/edit.controller.js | 63 +++++--- .../src/views/media/edit.html | 2 +- .../src/views/media/media.edit.controller.js | 139 ++++++++++++------ .../src/views/mediatypes/edit.controller.js | 5 +- 4 files changed, 143 insertions(+), 66 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js index 89c8b541d1..ecaf8b3ad3 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js @@ -26,20 +26,43 @@ $scope.allowOpen = true; $scope.app = null; - function init(content) { - if (!$scope.app) { - // set first app to active + function init() { + + var content = $scope.content; + + // we need to check wether an app is present in the current data, if not we will present the default app. + var isAppPresent = false; + + // on first init, we dont have any apps. but if we are re-initializing, we do, but ... + if ($scope.app) { + + // lets check if it still exists as part of our apps array. (if not we have made a change to our docType, even just a re-save of the docType it will turn into new Apps.) + _.forEach(content.apps, function(app) { + if (app === $scope.app) { + isAppPresent = true; + } + }); + + // if we did reload our DocType, but still have the same app we will try to find it by the alias. + if (isAppPresent === false) { + _.forEach(content.apps, function(app) { + if (app.alias === $scope.app.alias) { + isAppPresent = true; + app.active = true; + $scope.appChanged(app); + } + }); + } + + } + + // if we still dont have a app, lets show the first one: + if (isAppPresent === false) { content.apps[0].active = true; - $scope.app = content.apps[0]; + $scope.appChanged(content.apps[0]); } - - if (infiniteMode) { - createInfiniteModeButtons(content); - } else { - createButtons(content); - } - - editorState.set($scope.content); + + editorState.set(content); //We fetch all ancestors of the node to generate the footer breadcrumb navigation if (!$scope.page.isNew) { @@ -129,7 +152,7 @@ "/content/content/edit/" + data.parentId; } - init($scope.content); + init(); syncTreeNode($scope.content, $scope.content.path, true); @@ -337,7 +360,7 @@ showNotifications: args.showNotifications }).then(function (data) { //success - init($scope.content); + init(); syncTreeNode($scope.content, data.path); eventsService.emit("content.saved", { content: $scope.content, action: args.action }); @@ -439,7 +462,7 @@ $scope.content = data; - init($scope.content); + init(); resetLastListPageNumber($scope.content); @@ -478,7 +501,7 @@ .then(function (data) { formHelper.resetForm({ scope: $scope }); contentEditingHelper.reBindChangedProperties($scope.content, data); - init($scope.content); + init(); syncTreeNode($scope.content, data.path); $scope.page.buttonGroupState = "success"; eventsService.emit("content.unpublished", { content: $scope.content }); @@ -915,8 +938,14 @@ * @param {any} app */ $scope.appChanged = function (app) { + $scope.app = app; - createButtons($scope.content); + + if (infiniteMode) { + createInfiniteModeButtons($scope.content); + } else { + createButtons($scope.content); + } }; // methods for infinite editing 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 be1219f052..35f9a6f7ff 100644 --- a/src/Umbraco.Web.UI.Client/src/views/media/edit.html +++ b/src/Umbraco.Web.UI.Client/src/views/media/edit.html @@ -14,7 +14,7 @@ hide-description="true" hide-alias="true" navigation="content.apps" - on-select-navigation-item="appChanged(app)"> + on-select-navigation-item="appChanged(item)"> diff --git a/src/Umbraco.Web.UI.Client/src/views/media/media.edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/media/media.edit.controller.js index 19932887fd..af7184c82f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/media/media.edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/media/media.edit.controller.js @@ -6,7 +6,10 @@ * @description * The controller for the media editor */ -function mediaEditController($scope, $routeParams, $q, appState, mediaResource, entityResource, navigationService, notificationsService, angularHelper, serverValidationManager, contentEditingHelper, fileManager, formHelper, editorState, umbRequestHelper, $http, eventsService) { +function mediaEditController($scope, $routeParams, $q, appState, mediaResource, + entityResource, navigationService, notificationsService, angularHelper, + serverValidationManager, contentEditingHelper, fileManager, formHelper, + editorState, umbRequestHelper, $http, eventsService) { var evts = []; var nodeId = null; @@ -41,7 +44,90 @@ function mediaEditController($scope, $routeParams, $q, appState, mediaResource, $scope.page.listViewPath = null; $scope.page.saveButtonState = "init"; $scope.page.submitButtonLabel = "Save"; + $scope.app = null; + if (create) { + + $scope.page.loading = true; + + mediaResource.getScaffold(nodeId, $routeParams.doctype) + .then(function (data) { + $scope.content = data; + + init(); + + $scope.page.loading = false; + + }); + } + else { + $scope.page.loading = true; + loadMedia() + .then(function(){ + $scope.page.loading = false; + }); + } + + function init() { + + var content = $scope.content; + + // we need to check wether an app is present in the current data, if not we will present the default app. + var isAppPresent = false; + + // on first init, we dont have any apps. but if we are re-initializing, we do, but ... + if ($scope.app) { + + // lets check if it still exists as part of our apps array. (if not we have made a change to our docType, even just a re-save of the docType it will turn into new Apps.) + _.forEach(content.apps, function(app) { + if (app === $scope.app) { + isAppPresent = true; + } + }); + + // if we did reload our DocType, but still have the same app we will try to find it by the alias. + if (isAppPresent === false) { + _.forEach(content.apps, function(app) { + if (app.alias === $scope.app.alias) { + isAppPresent = true; + app.active = true; + $scope.appChanged(app); + } + }); + } + + } + + // if we still dont have a app, lets show the first one: + if (isAppPresent === false) { + content.apps[0].active = true; + $scope.appChanged(content.apps[0]); + } + + + editorState.set($scope.content); + + bindEvents(); + + } + + function bindEvents() { + //bindEvents can be called more than once and we don't want to have multiple bound events + for (var e in evts) { + eventsService.unsubscribe(evts[e]); + } + + evts.push(eventsService.on("editors.mediaType.saved", function(name, args) { + // if this media item uses the updated media type we need to reload the media item + if(args && args.mediaType && args.mediaType.key === $scope.content.contentType.key) { + $scope.page.loading = true; + loadMedia().then(function() { + $scope.page.loading = false; + }); + } + })); + } + /** Syncs the content item to it's tree node - this occurs on first load and after saving */ function syncTreeNode(content, path, initialLoad) { @@ -68,45 +154,6 @@ function mediaEditController($scope, $routeParams, $q, appState, mediaResource, }); } } - - if (create) { - - $scope.page.loading = true; - - mediaResource.getScaffold(nodeId, $routeParams.doctype) - .then(function (data) { - $scope.content = data; - - editorState.set($scope.content); - - init(); - - $scope.page.loading = false; - - }); - } - else { - $scope.page.loading = true; - loadMedia() - .then(function(){ - $scope.page.loading = false; - }); - } - - function init() { - - if (!$scope.app) { - // set first app to active - $scope.content.apps[0].active = true; - $scope.app = $scope.content.apps[0]; - } - - // setup infinite mode - if(infiniteMode) { - $scope.page.submitButtonLabel = "Save and Close"; - } - - } $scope.save = function () { @@ -212,14 +259,12 @@ function mediaEditController($scope, $routeParams, $q, appState, mediaResource, $scope.appChanged = function (app) { $scope.app = app; - } - - evts.push(eventsService.on("editors.mediaType.saved", function(name, args) { - // if this media item uses the updated media type we need to reload the media item - if(args && args.mediaType && args.mediaType.key === $scope.content.contentType.key) { - loadMedia(); + + // setup infinite mode + if(infiniteMode) { + $scope.page.submitButtonLabel = "Save and Close"; } - })); + } //ensure to unregister from all events! $scope.$on('$destroy', function () { diff --git a/src/Umbraco.Web.UI.Client/src/views/mediatypes/edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/mediatypes/edit.controller.js index c8aba53cf5..0740f7866f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/mediatypes/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/mediatypes/edit.controller.js @@ -9,7 +9,10 @@ (function () { "use strict"; - function MediaTypesEditController($scope, $routeParams, mediaTypeResource, dataTypeResource, editorState, contentEditingHelper, formHelper, navigationService, iconHelper, contentTypeHelper, notificationsService, $filter, $q, localizationService, overlayHelper, eventsService) { + function MediaTypesEditController($scope, $routeParams, mediaTypeResource, + dataTypeResource, editorState, contentEditingHelper, formHelper, + navigationService, iconHelper, contentTypeHelper, notificationsService, + $filter, $q, localizationService, overlayHelper, eventsService) { var vm = this; var evts = []; From 9b9c9ef4556aed3f9f75e3231e9099c9dce09da1 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Tue, 22 Jan 2019 14:59:32 +0000 Subject: [PATCH 205/437] Adds Sections() ordered collection to the Composition, so devs can ammend the collection, change order etc --- src/Umbraco.Web/CompositionExtensions.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Umbraco.Web/CompositionExtensions.cs b/src/Umbraco.Web/CompositionExtensions.cs index d33b1addf5..246127b312 100644 --- a/src/Umbraco.Web/CompositionExtensions.cs +++ b/src/Umbraco.Web/CompositionExtensions.cs @@ -9,6 +9,7 @@ using Umbraco.Web.PublishedCache; using Umbraco.Web.Routing; using Umbraco.Web.ContentApps; using Umbraco.Web.Tour; +using Umbraco.Web.Trees; // the namespace here is intentional - although defined in Umbraco.Web assembly, // this class should be visible when using Umbraco.Core.Components, alongside @@ -84,6 +85,13 @@ namespace Umbraco.Core.Components public static UrlProviderCollectionBuilder UrlProviders(this Composition composition) => composition.WithCollectionBuilder(); + /// + /// Gets the backoffice sections/applications collection builder. + /// + /// The composition. + public static BackOfficeSectionCollectionBuilder Sections(this Composition composition) + => composition.WithCollectionBuilder(); + #endregion #region Uniques From e1175b814ed6df6a47ad015dac7b9e6b15d6eafa Mon Sep 17 00:00:00 2001 From: Rasmus John Pedersen Date: Mon, 21 Jan 2019 20:08:09 +0100 Subject: [PATCH 206/437] Add Multi Url Picker --- src/Umbraco.Core/Constants-PropertyEditors.cs | 5 + .../multiurlpicker.controller.js | 135 ++++++++++++++ .../multiurlpicker/multiurlpicker.html | 77 ++++++++ .../Models/ContentEditing/LinkDisplay.cs | 36 ++++ src/Umbraco.Web/Models/Link.cs | 13 ++ src/Umbraco.Web/Models/LinkType.cs | 9 + .../MultiUrlPickerConfiguration.cs | 13 ++ .../MultiUrlPickerConfigurationEditor.cs | 8 + .../MultiUrlPickerPropertyEditor.cs | 26 +++ .../MultiUrlPickerValueEditor.cs | 176 ++++++++++++++++++ .../MultiUrlPickerValueConverter.cs | 93 +++++++++ src/Umbraco.Web/Umbraco.Web.csproj | 8 + 12 files changed, 599 insertions(+) create mode 100644 src/Umbraco.Web.UI.Client/src/views/propertyeditors/multiurlpicker/multiurlpicker.controller.js create mode 100644 src/Umbraco.Web.UI.Client/src/views/propertyeditors/multiurlpicker/multiurlpicker.html create mode 100644 src/Umbraco.Web/Models/ContentEditing/LinkDisplay.cs create mode 100644 src/Umbraco.Web/Models/Link.cs create mode 100644 src/Umbraco.Web/Models/LinkType.cs create mode 100644 src/Umbraco.Web/PropertyEditors/MultiUrlPickerConfiguration.cs create mode 100644 src/Umbraco.Web/PropertyEditors/MultiUrlPickerConfigurationEditor.cs create mode 100644 src/Umbraco.Web/PropertyEditors/MultiUrlPickerPropertyEditor.cs create mode 100644 src/Umbraco.Web/PropertyEditors/MultiUrlPickerValueEditor.cs create mode 100644 src/Umbraco.Web/PropertyEditors/ValueConverters/MultiUrlPickerValueConverter.cs diff --git a/src/Umbraco.Core/Constants-PropertyEditors.cs b/src/Umbraco.Core/Constants-PropertyEditors.cs index b09987ad90..b9f20fb449 100644 --- a/src/Umbraco.Core/Constants-PropertyEditors.cs +++ b/src/Umbraco.Core/Constants-PropertyEditors.cs @@ -178,6 +178,11 @@ namespace Umbraco.Core /// Nested Content. /// public const string NestedContent = "Umbraco.NestedContent"; + + /// + /// Alias for the multi url picker editor. + /// + public const string MultiUrlPicker = "Umbraco.MultiUrlPicker"; } /// 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 new file mode 100644 index 0000000000..af53dc86aa --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/multiurlpicker/multiurlpicker.controller.js @@ -0,0 +1,135 @@ +function multiUrlPickerController($scope, angularHelper, localizationService, entityResource, iconHelper, editorService) { + + $scope.renderModel = []; + + if ($scope.preview) { + return; + } + + if (!Array.isArray($scope.model.value)) { + $scope.model.value = []; + } + + var currentForm = angularHelper.getCurrentForm($scope); + + $scope.sortableOptions = { + distance: 10, + tolerance: "pointer", + scroll: true, + zIndex: 6000, + update: function () { + currentForm.$setDirty(); + } + }; + + $scope.model.value.forEach(function (link) { + link.icon = iconHelper.convertFromLegacyIcon(link.icon); + $scope.renderModel.push(link); + }); + + $scope.$on("formSubmitting", function () { + $scope.model.value = $scope.renderModel; + }); + + $scope.$watch( + function () { + return $scope.renderModel.length; + }, + function () { + //Validate! + if ($scope.model.config && $scope.model.config.minNumber && parseInt($scope.model.config.minNumber) > $scope.renderModel.length) { + $scope.multiUrlPickerForm.minCount.$setValidity("minCount", false); + } + else { + $scope.multiUrlPickerForm.minCount.$setValidity("minCount", true); + } + + if ($scope.model.config && $scope.model.config.maxNumber && parseInt($scope.model.config.maxNumber) < $scope.renderModel.length) { + $scope.multiUrlPickerForm.maxCount.$setValidity("maxCount", false); + } + else { + $scope.multiUrlPickerForm.maxCount.$setValidity("maxCount", true); + } + $scope.sortableOptions.disabled = $scope.renderModel.length === 1; + } + ); + + $scope.remove = function ($index) { + $scope.renderModel.splice($index, 1); + + currentForm.$setDirty(); + }; + + $scope.openLinkPicker = function (link, $index) { + var target = link ? { + name: link.name, + anchor: link.queryString, + // the linkPicker breaks if it get an udi for media + udi: link.isMedia ? null : link.udi, + url: link.url, + target: link.target + } : null; + + var linkPicker = { + currentTarget: target, + submit: function (model) { + if (model.target.url) { + // if an anchor exists, check that it is appropriately prefixed + if (model.target.anchor && model.target.anchor[0] !== '?' && model.target.anchor[0] !== '#') { + model.target.anchor = (model.target.anchor.indexOf('=') === -1 ? '#' : '?') + model.target.anchor; + } + if (link) { + if (link.isMedia && link.url === model.target.url) { + // we can assume the existing media item is changed and no new file has been selected + // so we don't need to update the udi and isMedia fields + } else { + link.udi = model.target.udi; + link.isMedia = model.target.isMedia; + } + + link.name = model.target.name || model.target.url; + link.queryString = model.target.anchor; + link.target = model.target.target; + link.url = model.target.url; + } else { + link = { + isMedia: model.target.isMedia, + name: model.target.name || model.target.url, + queryString: model.target.anchor, + target: model.target.target, + udi: model.target.udi, + url: model.target.url + }; + $scope.renderModel.push(link); + } + + if (link.udi) { + var entityType = link.isMedia ? "media" : "document"; + + entityResource.getById(link.udi, entityType).then(function (data) { + link.icon = iconHelper.convertFromLegacyIcon(data.icon); + link.published = (data.metaData && data.metaData.IsPublished === false && entityType === "Document") ? false : true; + link.trashed = data.trashed; + if (link.trashed) { + item.url = localizationService.dictionary.general_recycleBin; + } + }); + } else { + link.icon = "icon-link"; + link.published = true; + } + + currentForm.$setDirty(); + } + editorService.close(); + }, + close: function () { + editorService.close(); + } + }; + editorService.linkPicker(linkPicker); + }; +} + +angular.module("umbraco").controller("Umbraco.PropertyEditors.MultiUrlPickerController", multiUrlPickerController); + 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 new file mode 100644 index 0000000000..ca79c7faa0 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/multiurlpicker/multiurlpicker.html @@ -0,0 +1,77 @@ +
+

+

+ + +
+ + +
+ + + Add + + +
+ + + + + Add between {{model.config.minNumber}} and {{model.config.maxNumber}} items + + You can only have {{model.config.maxNumber}} items selected + + + + + + Add {{model.config.minNumber - renderModel.length}} item(s) + + You can only have {{model.config.maxNumber}} items selected + + + + + + Add up to {{model.config.maxNumber}} items + + You can only have {{model.config.maxNumber}} items selected + + + + + + Add at least {{model.config.minNumber}} item(s) + + +
+ + + + + +
+
+ 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/Models/ContentEditing/LinkDisplay.cs b/src/Umbraco.Web/Models/ContentEditing/LinkDisplay.cs new file mode 100644 index 0000000000..857ae2c318 --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/LinkDisplay.cs @@ -0,0 +1,36 @@ +using System.Runtime.Serialization; +using Umbraco.Core; + +namespace Umbraco.Web.Models.ContentEditing +{ + [DataContract(Name = "link", Namespace = "")] + internal class LinkDisplay + { + [DataMember(Name = "icon")] + public string Icon { get; set; } + + [DataMember(Name = "isMedia")] + public bool IsMedia { get; set; } + + [DataMember(Name = "name")] + public string Name { get; set; } + + [DataMember(Name = "published")] + public bool Published { get; set; } + + [DataMember(Name = "queryString")] + public string QueryString { get; set; } + + [DataMember(Name = "target")] + public string Target { get; set; } + + [DataMember(Name = "trashed")] + public bool Trashed { get; set; } + + [DataMember(Name = "udi")] + public GuidUdi Udi { get; set; } + + [DataMember(Name = "url")] + public string Url { get; set; } + } +} diff --git a/src/Umbraco.Web/Models/Link.cs b/src/Umbraco.Web/Models/Link.cs new file mode 100644 index 0000000000..74ad4ad2af --- /dev/null +++ b/src/Umbraco.Web/Models/Link.cs @@ -0,0 +1,13 @@ +using Umbraco.Core; + +namespace Umbraco.Web.Models +{ + public class Link + { + public string Name { get; set; } + public string Target { get; set; } + public LinkType Type { get; set; } + public Udi Udi { get; set; } + public string Url { get; set; } + } +} diff --git a/src/Umbraco.Web/Models/LinkType.cs b/src/Umbraco.Web/Models/LinkType.cs new file mode 100644 index 0000000000..3db3165d7f --- /dev/null +++ b/src/Umbraco.Web/Models/LinkType.cs @@ -0,0 +1,9 @@ +namespace Umbraco.Web.Models +{ + public enum LinkType + { + Content, + Media, + External + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/PropertyEditors/MultiUrlPickerConfiguration.cs b/src/Umbraco.Web/PropertyEditors/MultiUrlPickerConfiguration.cs new file mode 100644 index 0000000000..515512eff8 --- /dev/null +++ b/src/Umbraco.Web/PropertyEditors/MultiUrlPickerConfiguration.cs @@ -0,0 +1,13 @@ +using Umbraco.Core.PropertyEditors; + +namespace Umbraco.Web.PropertyEditors +{ + public class MultiUrlPickerConfiguration + { + [ConfigurationField("minNumber", "Minimum number of items", "number")] + public int MinNumber { get; set; } + + [ConfigurationField("maxNumber", "Maximum number of items", "number")] + public int MaxNumber { get; set; } + } +} diff --git a/src/Umbraco.Web/PropertyEditors/MultiUrlPickerConfigurationEditor.cs b/src/Umbraco.Web/PropertyEditors/MultiUrlPickerConfigurationEditor.cs new file mode 100644 index 0000000000..e780e410a7 --- /dev/null +++ b/src/Umbraco.Web/PropertyEditors/MultiUrlPickerConfigurationEditor.cs @@ -0,0 +1,8 @@ +using Umbraco.Core.PropertyEditors; + +namespace Umbraco.Web.PropertyEditors +{ + public class MultiUrlPickerConfigurationEditor : ConfigurationEditor + { + } +} diff --git a/src/Umbraco.Web/PropertyEditors/MultiUrlPickerPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/MultiUrlPickerPropertyEditor.cs new file mode 100644 index 0000000000..54bf5c4d15 --- /dev/null +++ b/src/Umbraco.Web/PropertyEditors/MultiUrlPickerPropertyEditor.cs @@ -0,0 +1,26 @@ +using System; +using Umbraco.Core; +using Umbraco.Core.PropertyEditors; +using Umbraco.Core.Logging; +using Umbraco.Core.Services; +using Umbraco.Web.PublishedCache; + +namespace Umbraco.Web.PropertyEditors +{ + [DataEditor(Constants.PropertyEditors.Aliases.MultiUrlPicker, EditorType.PropertyValue|EditorType.MacroParameter, "Multi Url Picker", "multiurlpicker", ValueType = "JSON", Group = "pickers", Icon = "icon-link")] + public class MultiUrlPickerPropertyEditor : DataEditor + { + private readonly IEntityService _entityService; + private readonly IPublishedSnapshotAccessor _publishedSnapshotAccessor; + + public MultiUrlPickerPropertyEditor(ILogger logger, IEntityService entityService, IPublishedSnapshotAccessor publishedSnapshotAccessor) : base(logger, EditorType.PropertyValue|EditorType.MacroParameter) + { + _entityService = entityService ?? throw new ArgumentNullException(nameof(entityService)); + _publishedSnapshotAccessor = publishedSnapshotAccessor ?? throw new ArgumentNullException(nameof(publishedSnapshotAccessor)); + } + + protected override IConfigurationEditor CreateConfigurationEditor() => new MultiUrlPickerConfigurationEditor(); + + protected override IDataValueEditor CreateValueEditor() => new MultiUrlPickerValueEditor(_entityService, _publishedSnapshotAccessor, Logger, Attribute); + } +} diff --git a/src/Umbraco.Web/PropertyEditors/MultiUrlPickerValueEditor.cs b/src/Umbraco.Web/PropertyEditors/MultiUrlPickerValueEditor.cs new file mode 100644 index 0000000000..381627eac2 --- /dev/null +++ b/src/Umbraco.Web/PropertyEditors/MultiUrlPickerValueEditor.cs @@ -0,0 +1,176 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; +using Umbraco.Core; +using Umbraco.Core.Logging; +using Umbraco.Core.Models; +using Umbraco.Core.Models.Editors; +using Umbraco.Core.Models.Entities; +using Umbraco.Core.PropertyEditors; +using Umbraco.Core.Services; +using Umbraco.Web.Models.ContentEditing; +using Umbraco.Web.PublishedCache; + +namespace Umbraco.Web.PropertyEditors +{ + public class MultiUrlPickerValueEditor : DataValueEditor + { + private readonly IEntityService _entityService; + private readonly ILogger _logger; + private readonly IPublishedSnapshotAccessor _publishedSnapshotAccessor; + + public MultiUrlPickerValueEditor(IEntityService entityService, IPublishedSnapshotAccessor publishedSnapshotAccessor, ILogger logger, DataEditorAttribute attribute) : base(attribute) + { + _entityService = entityService ?? throw new ArgumentNullException(nameof(entityService)); + _publishedSnapshotAccessor = publishedSnapshotAccessor ?? throw new ArgumentNullException(nameof(publishedSnapshotAccessor)); + _logger = logger ?? throw new ArgumentNullException(nameof(logger)); + } + + public override object ToEditor(Property property, IDataTypeService dataTypeService, string culture = null, string segment = null) + { + var value = property.GetValue(culture, segment)?.ToString(); + + if (string.IsNullOrEmpty(value)) + { + return Enumerable.Empty(); + } + + try + { + var links = JsonConvert.DeserializeObject>(value); + + var documentLinks = links.FindAll(link => link.Udi != null && link.Udi.EntityType == Constants.UdiEntityType.Document); + var mediaLinks = links.FindAll(link => link.Udi != null && link.Udi.EntityType == Constants.UdiEntityType.Media); + + var entities = new List(); + if (documentLinks.Count > 0) + { + entities.AddRange( + _entityService.GetAll(UmbracoObjectTypes.Document, documentLinks.Select(link => link.Udi.Guid).ToArray()) + ); + } + + if (mediaLinks.Count > 0) + { + entities.AddRange( + _entityService.GetAll(UmbracoObjectTypes.Media, mediaLinks.Select(link => link.Udi.Guid).ToArray()) + ); + } + + var result = new List(); + foreach (var dto in links) + { + GuidUdi udi = null; + var icon = "icon-link"; + var isMedia = false; + var published = true; + var trashed = false; + var url = dto.Url; + + if (dto.Udi != null) + { + IUmbracoEntity entity = entities.Find(e => e.Key == dto.Udi.Guid); + if (entity == null) + { + continue; + } + + if (entity is IDocumentEntitySlim documentEntity) + { + icon = documentEntity.ContentTypeIcon; + published = culture == null ? documentEntity.Published : documentEntity.PublishedCultures.Contains(culture); + udi = new GuidUdi(Constants.UdiEntityType.Document, documentEntity.Key); + url = _publishedSnapshotAccessor.PublishedSnapshot.Content.GetById(entity.Key)?.Url ?? "#"; + trashed = documentEntity.Trashed; + } + else if(entity is IContentEntitySlim contentEntity) + { + icon = contentEntity.ContentTypeIcon; + isMedia = true; + published = !contentEntity.Trashed; + udi = new GuidUdi(Constants.UdiEntityType.Media, contentEntity.Key); + url = _publishedSnapshotAccessor.PublishedSnapshot.Media.GetById(entity.Key)?.Url ?? "#"; + trashed = contentEntity.Trashed; + } + else + { + // Not supported + continue; + } + } + + result.Add(new LinkDisplay + { + Icon = icon, + IsMedia = isMedia, + Name = dto.Name, + Target = dto.Target, + Trashed = trashed, + Published = published, + Udi = udi, + Url = url + }); + } + return result; + } + catch (Exception ex) + { + _logger.Error("Error getting links", ex); + } + + return base.ToEditor(property, dataTypeService, culture, segment); + } + + + public override object FromEditor(ContentPropertyData editorValue, object currentValue) + { + var value = editorValue.Value?.ToString(); + + if (string.IsNullOrEmpty(value)) + { + return string.Empty; + } + + try + { + return JsonConvert.SerializeObject( + from link in JsonConvert.DeserializeObject>(value) + select new MultiUrlPickerValueEditor.LinkDto + { + Name = link.Name, + 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 + }); + } + catch (Exception ex) + { + _logger.Error("Error saving links", ex); + } + + return base.FromEditor(editorValue, currentValue); + } + + [DataContract] + internal class LinkDto + { + [DataMember(Name = "name")] + public string Name { get; set; } + + [DataMember(Name = "target")] + public string Target { get; set; } + + [DataMember(Name = "udi")] + public GuidUdi Udi { get; set; } + + [DataMember(Name = "url")] + public string Url { get; set; } + } + } +} diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/MultiUrlPickerValueConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/MultiUrlPickerValueConverter.cs new file mode 100644 index 0000000000..c2c604cb7f --- /dev/null +++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/MultiUrlPickerValueConverter.cs @@ -0,0 +1,93 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Linq; +using Umbraco.Core; +using Umbraco.Core.Logging; +using Umbraco.Core.Models.PublishedContent; +using Umbraco.Core.PropertyEditors; +using Umbraco.Web.Models; +using Umbraco.Web.PublishedCache; + +namespace Umbraco.Web.PropertyEditors.ValueConverters +{ + public class MultiUrlPickerValueConverter : PropertyValueConverterBase + { + private readonly IPublishedSnapshotAccessor _publishedSnapshotAccessor; + private readonly IProfilingLogger _proflog; + + public MultiUrlPickerValueConverter(IPublishedSnapshotAccessor publishedSnapshotAccessor, IProfilingLogger proflog) + { + _publishedSnapshotAccessor = publishedSnapshotAccessor ?? throw new ArgumentNullException(nameof(publishedSnapshotAccessor)); + _proflog = proflog ?? throw new ArgumentNullException(nameof(proflog)); + } + + public override bool IsConverter(PublishedPropertyType propertyType) => Constants.PropertyEditors.Aliases.MultiUrlPicker.Equals(propertyType.EditorAlias); + + public override Type GetPropertyValueType(PublishedPropertyType propertyType) => + propertyType.DataType.ConfigurationAs().MaxNumber == 1 ? + typeof(Link) : + typeof(IEnumerable); + + public override PropertyCacheLevel GetPropertyCacheLevel(PublishedPropertyType propertyType) => PropertyCacheLevel.Snapshot; + + public override bool? IsValue(object value, PropertyValueLevel level) => value?.ToString() != "[]"; + + public override object ConvertSourceToIntermediate(IPublishedElement owner, PublishedPropertyType propertyType, object source, bool preview) => source?.ToString(); + + public override object ConvertIntermediateToObject(IPublishedElement owner, PublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object inter, bool preview) + { + using (_proflog.DebugDuration($"ConvertPropertyToLinks ({propertyType.DataType.Id})")) + { + var maxNumber = propertyType.DataType.ConfigurationAs().MaxNumber; + + if (inter == null) + { + return maxNumber == 1 ? null : Enumerable.Empty(); + } + + var links = new List(); + var dtos = JsonConvert.DeserializeObject>(inter.ToString()); + + foreach (var dto in dtos) + { + var type = LinkType.External; + var url = dto.Url; + + if (dto.Udi != null) + { + type = dto.Udi.EntityType == Core.Constants.UdiEntityType.Media + ? LinkType.Media + : LinkType.Content; + + var content = type == LinkType.Media ? + _publishedSnapshotAccessor.PublishedSnapshot.Media.GetById(preview, dto.Udi.Guid) : + _publishedSnapshotAccessor.PublishedSnapshot.Content.GetById(preview, dto.Udi.Guid); + + if (content == null) + { + continue; + } + url = content.Url; + } + + links.Add( + new Link + { + Name = dto.Name, + Target = dto.Target, + Type = type, + Udi = dto.Udi, + Url = url, + } + ); + } + + if (maxNumber == 1) return links.FirstOrDefault(); + if (maxNumber > 0) return links.Take(maxNumber); + return links; + } + } + } +} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index a6f380b0dd..6736f7512b 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -167,8 +167,16 @@ + + + + + + + + From ce4fc6654e92f9abd0fe4bac3e7ad057bda2bcda Mon Sep 17 00:00:00 2001 From: Stephan Date: Tue, 22 Jan 2019 17:32:46 +0100 Subject: [PATCH 207/437] Fix NestedContent tests now we have isElement --- .../Models/PublishedContent/PublishedContentType.cs | 11 +++++------ .../PublishedContent/PublishedContentTypeFactory.cs | 8 ++++---- src/Umbraco.Tests/Published/NestedContentTests.cs | 3 +-- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs index cb4463fa6f..083e8dcc6e 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs @@ -20,7 +20,7 @@ namespace Umbraco.Core.Models.PublishedContent /// Initializes a new instance of the class with a content type. /// public PublishedContentType(IContentTypeComposition contentType, IPublishedContentTypeFactory factory) - : this(contentType.Id, contentType.Alias, contentType.GetItemType(), contentType.CompositionAliases(), contentType.Variations) + : this(contentType.Id, contentType.Alias, contentType.GetItemType(), contentType.CompositionAliases(), contentType.Variations, contentType.IsElement) { var propertyTypes = contentType.CompositionPropertyTypes .Select(x => factory.CreatePropertyType(this, x)) @@ -31,8 +31,6 @@ namespace Umbraco.Core.Models.PublishedContent _propertyTypes = propertyTypes.ToArray(); - IsElement = contentType.IsElement; - InitializeIndexes(); } @@ -43,8 +41,8 @@ namespace Umbraco.Core.Models.PublishedContent /// This constructor is for tests and is not intended to be used directly from application code. /// Values are assumed to be consisted and are not checked. /// - public PublishedContentType(int id, string alias, PublishedItemType itemType, IEnumerable compositionAliases, IEnumerable propertyTypes, ContentVariation variations) - : this (id, alias, itemType, compositionAliases, variations) + public PublishedContentType(int id, string alias, PublishedItemType itemType, IEnumerable compositionAliases, IEnumerable propertyTypes, ContentVariation variations, bool isElement = false) + : this (id, alias, itemType, compositionAliases, variations, isElement) { var propertyTypesA = propertyTypes.ToArray(); foreach (var propertyType in propertyTypesA) @@ -54,13 +52,14 @@ namespace Umbraco.Core.Models.PublishedContent InitializeIndexes(); } - private PublishedContentType(int id, string alias, PublishedItemType itemType, IEnumerable compositionAliases, ContentVariation variations) + private PublishedContentType(int id, string alias, PublishedItemType itemType, IEnumerable compositionAliases, ContentVariation variations, bool isElement) { Id = id; Alias = alias; ItemType = itemType; CompositionAliases = new HashSet(compositionAliases, StringComparer.InvariantCultureIgnoreCase); Variations = variations; + IsElement = isElement; } private void InitializeIndexes() diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedContentTypeFactory.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedContentTypeFactory.cs index efb39ba844..abf4156d7f 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedContentTypeFactory.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedContentTypeFactory.cs @@ -32,15 +32,15 @@ namespace Umbraco.Core.Models.PublishedContent } // for tests - internal PublishedContentType CreateContentType(int id, string alias, IEnumerable propertyTypes, ContentVariation variations = ContentVariation.Nothing) + internal PublishedContentType CreateContentType(int id, string alias, IEnumerable propertyTypes, ContentVariation variations = ContentVariation.Nothing, bool isElement = false) { - return new PublishedContentType(id, alias, PublishedItemType.Content, Enumerable.Empty(), propertyTypes, variations); + return new PublishedContentType(id, alias, PublishedItemType.Content, Enumerable.Empty(), propertyTypes, variations, isElement); } // for tests - internal PublishedContentType CreateContentType(int id, string alias, IEnumerable compositionAliases, IEnumerable propertyTypes, ContentVariation variations = ContentVariation.Nothing) + internal PublishedContentType CreateContentType(int id, string alias, IEnumerable compositionAliases, IEnumerable propertyTypes, ContentVariation variations = ContentVariation.Nothing, bool isElement = false) { - return new PublishedContentType(id, alias, PublishedItemType.Content, compositionAliases, propertyTypes, variations); + return new PublishedContentType(id, alias, PublishedItemType.Content, compositionAliases, propertyTypes, variations, isElement); } /// diff --git a/src/Umbraco.Tests/Published/NestedContentTests.cs b/src/Umbraco.Tests/Published/NestedContentTests.cs index fc1b4d8f3c..b5d6182c28 100644 --- a/src/Umbraco.Tests/Published/NestedContentTests.cs +++ b/src/Umbraco.Tests/Published/NestedContentTests.cs @@ -11,7 +11,6 @@ using Umbraco.Core.Logging; using Umbraco.Core.Models; using Umbraco.Core.Models.PublishedContent; using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Services; using Umbraco.Tests.TestHelpers; using Umbraco.Web; using Umbraco.Web.Models; @@ -132,7 +131,7 @@ namespace Umbraco.Tests.Published var contentType1 = factory.CreateContentType(1, "content1", new[] { propertyType1 }); var contentType2 = factory.CreateContentType(2, "content2", new[] { propertyType2 }); - var contentTypeN1 = factory.CreateContentType(2, "contentN1", new[] { propertyTypeN1 }); + var contentTypeN1 = factory.CreateContentType(2, "contentN1", new[] { propertyTypeN1 }, isElement: true); // mocked content cache returns content types contentCache From d9cc1f4cb83615be57c90b7b0aa9a5a78d1dfbf9 Mon Sep 17 00:00:00 2001 From: Stephan Date: Tue, 22 Jan 2019 18:25:02 +0100 Subject: [PATCH 208/437] Fix more tests --- src/Umbraco.Tests/Composing/TypeLoaderTests.cs | 2 +- src/Umbraco.Tests/Testing/UmbracoTestBase.cs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Tests/Composing/TypeLoaderTests.cs b/src/Umbraco.Tests/Composing/TypeLoaderTests.cs index add3424599..6b3ce3eb4e 100644 --- a/src/Umbraco.Tests/Composing/TypeLoaderTests.cs +++ b/src/Umbraco.Tests/Composing/TypeLoaderTests.cs @@ -279,7 +279,7 @@ AnotherContentFinder public void GetDataEditors() { var types = _typeLoader.GetDataEditors(); - Assert.AreEqual(39, types.Count()); + Assert.AreEqual(40, types.Count()); } /// diff --git a/src/Umbraco.Tests/Testing/UmbracoTestBase.cs b/src/Umbraco.Tests/Testing/UmbracoTestBase.cs index 2216ba6c1f..7cd7be240b 100644 --- a/src/Umbraco.Tests/Testing/UmbracoTestBase.cs +++ b/src/Umbraco.Tests/Testing/UmbracoTestBase.cs @@ -38,6 +38,7 @@ using Umbraco.Tests.Testing.Objects.Accessors; using Umbraco.Web.Actions; using Umbraco.Web.Composing.Composers; using Umbraco.Web.ContentApps; +using Umbraco.Web.PublishedCache; using Current = Umbraco.Core.Composing.Current; using Umbraco.Web.Routing; using Umbraco.Web.Trees; @@ -216,6 +217,7 @@ namespace Umbraco.Tests.Testing Composition.WithCollectionBuilder(); Composition.RegisterUnique(); Composition.RegisterUnique(); + Composition.RegisterUnique(); // register back office sections in the order we want them rendered Composition.WithCollectionBuilder().Append() From 45735a5529678a76178ef0dda8111661c9b5e4a0 Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Tue, 22 Jan 2019 21:57:16 +0100 Subject: [PATCH 209/437] v8: Add missing localizations (#4199) --- src/Umbraco.Web.UI/Umbraco/config/lang/da.xml | 25 +++++++++++++++++++ src/Umbraco.Web.UI/Umbraco/config/lang/en.xml | 23 +++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml index 61f1c5c16d..a2ac0c10ce 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml @@ -118,6 +118,8 @@ Nummerorden Indsæt makro Indsæt billede + Udgiv og luk + Udgiv med undersider Redigér relationer Tilbage til listen Gem @@ -125,6 +127,7 @@ Gem og planlæg Gem og send til udgivelse Gem listevisning + Planlæg Forhåndsvisning Forhåndsvisning er deaktiveret fordi der ikke er nogen skabelon tildelt Vælg formattering @@ -142,6 +145,7 @@ Brugeren har slettet indholdet Brugeren har afpubliceret indholdet Brugeren har gemt og udgivet indholdet + Brugeren har gemt og udgivet indholdet for sprogene: %0% Brugeren har gemt indholdet Brugeren har flyttet indholdet Brugeren har kopieret indholdet @@ -224,6 +228,8 @@ Udgivet Udgivet (Ventede ændringer) Udgivelsesstatus + Udgiv med undersider for at udgive %0% og alle sider under og dermed gøre deres indhold offentligt tilgængelige.]]> + Udgiv med undersider for at udgive de valgte sprog og de samme sprog for sider under og dermed gøre deres indhold offentligt tilgængelige.]]> Udgivelsesdato Afpubliceringsdato Fjern dato @@ -251,6 +257,23 @@ Tilføj en ny tekstboks Fjern denne tekstboks Indholdsrod + Medtag udkast: udgiv også ikke-publicerede sider. + Denne værdi er skjult.Hvis du har brug for adgang til at se denne værdi, bedes du kontakte din web-administrator. + Denne værdi er skjult. + Hvilke sprog vil du gerne udgive? Alle sprog med indhold gemmes! + Hvilke sprog vil du gerne udgive? + Hvilke sprog vil du gerne gemme? + Alle sprog med indhold gemmes ved oprettelsen! + Hvilke sprog vil du gerne sende til godkendelse? + Hvilke sprog vil du gerne planlægge? + Vælg sproget du vil afpublicere. Afpublicering af et obligatorisk sprog vil afpublicere alle sprog. + Udgivne sprog + Ikke-udgivne sprog + Uændrede sprog + Klar til at udgive? + Klar til at gemme? + Send til godkendelse + Vælg dato og klokkeslæt for at udgive og/eller afpublicere indholdet. Opret en ny indholdsskabelon fra '%0%' @@ -310,6 +333,8 @@ Kassér ændringer Du har ikke-gemte ændringer Er du sikker på du vil navigere væk fra denne side? - du har ikke-gemte ændringer + Afpublicering vil fjerne denne side og alle dets undersider fra websitet. + Du har ikke-gemte ændringer. Hvis du ændrer dokumenttype, kasseres ændringerne. Færdig diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml index 81b02c545e..3ad0603bf7 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml @@ -123,6 +123,8 @@ Numeric List Insert macro Insert picture + Publish and close + Publish with descendants Edit relations Return to list Save @@ -130,6 +132,7 @@ Save and schedule Save and send for approval Save list view + Schedule Preview Preview is disabled because there's no template assigned Choose style @@ -236,6 +239,8 @@ Published Published (pending changes) Publication Status + Publish with descendants to publish %0% and all content items underneath and thereby making their content publicly available.]]> + Publish with descendants to publish the selected languages and the same languages of content items underneath and thereby making their content publicly available.]]> Publish at Unpublish at Clear Date @@ -263,8 +268,23 @@ Add another text box Remove this text box Content root + Include drafts: also publish unpublished content items. This value is hidden. If you need access to view this value please contact your website administrator. This value is hidden. + What languages would you like to publish? All languages with content are saved! + What languages would you like to publish? + What languages would you like to save? + All languages with content are saved on creation! + What languages would you like to send for approval? + What languages would you like to schedule? + Select the languages to unpublish. Unpublishing a mandatory language will unpublish all languages. + Published Languages + Unpublished Languages + Unmodified Languages + Ready to Publish? + Ready to Save? + Send for approval + Select the date and time to publish and/or unpublish the content item. Create a new Content Template from '%0%' @@ -325,7 +345,10 @@ Discard changes You have unsaved changes Are you sure you want to navigate away from this page? - you have unsaved changes + Publishing will make the selected items visible on the site. + Unpublishing will remove the selected items and all their descendants from the site. Unpublishing will remove this page and all its descendants from the site. + You have unsaved changes. Making changes to the Document Type will discard the changes. Done From e252a0849b8ae614d328de6150d846cf01320712 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Wed, 28 Nov 2018 21:50:23 +0100 Subject: [PATCH 210/437] Add "default empty" prevalue to date and datetime --- .../propertyeditors/datepicker/datepicker.controller.js | 4 ++-- src/Umbraco.Web/PropertyEditors/DatePreValueEditor.cs | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) 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 70c6bb4531..c8bd070944 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 @@ -145,9 +145,9 @@ function dateTimePickerController($scope, notificationsService, assetsService, a var element = $element.find("div:first"); - // Open the datepicker and add a changeDate eventlistener + // Open the datepicker and add a changeDate eventlistener element - .datetimepicker(angular.extend({ useCurrent: true }, $scope.model.config)) + .datetimepicker(angular.extend({ useCurrent: $scope.model.config.defaultEmpty !== "1" }, $scope.model.config)) .on("dp.change", applyDate) .on("dp.error", function(a, b, c) { $scope.hasDatetimePickerValue = false; diff --git a/src/Umbraco.Web/PropertyEditors/DatePreValueEditor.cs b/src/Umbraco.Web/PropertyEditors/DatePreValueEditor.cs index dde4d6c2f1..709212b6ff 100644 --- a/src/Umbraco.Web/PropertyEditors/DatePreValueEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/DatePreValueEditor.cs @@ -6,5 +6,8 @@ namespace Umbraco.Web.PropertyEditors { [PreValueField("format", "Date format", "textstring", Description = "If left empty then the format is YYYY-MM-DD. (see momentjs.com for supported formats)")] public string DefaultValue { get; set; } + + [PreValueField("defaultEmpty", "Default empty", "boolean", Description = "When enabled the date picker will remain empty when opened. Otherwise it will default to \"today\".")] + public string DefaultEmpty { get; set; } } -} \ No newline at end of file +} From a8d5bd6d1fa30cc7fa678ceb274db5cec35ed2c0 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Tue, 22 Jan 2019 22:05:12 +0100 Subject: [PATCH 211/437] Don't let the users empty the recycle bin without delete permissions (#3699) --- src/Umbraco.Web/Editors/ContentController.cs | 2 +- src/Umbraco.Web/Trees/ContentTreeControllerBase.cs | 9 ++++++++- .../Filters/EnsureUserPermissionForContentAttribute.cs | 6 ++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web/Editors/ContentController.cs b/src/Umbraco.Web/Editors/ContentController.cs index 6caf490e38..c77fe04b0d 100644 --- a/src/Umbraco.Web/Editors/ContentController.cs +++ b/src/Umbraco.Web/Editors/ContentController.cs @@ -847,7 +847,7 @@ namespace Umbraco.Web.Editors /// [HttpDelete] [HttpPost] - [EnsureUserPermissionForContent(Constants.System.RecycleBinContent)] + [EnsureUserPermissionForContent(Constants.System.RecycleBinContent, 'D')] public HttpResponseMessage EmptyRecycleBin() { Services.ContentService.EmptyRecycleBin(); diff --git a/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs b/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs index 9326872111..1a0a135bac 100644 --- a/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs +++ b/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs @@ -346,8 +346,15 @@ namespace Umbraco.Web.Trees { if (RecycleBinId.ToInvariantString() == id) { + // get the default assigned permissions for this user + var actions = ActionsResolver.Current.FromActionSymbols(Security.CurrentUser.GetPermissions(Constants.System.RecycleBinContentString, Services.UserService)).ToList(); + var menu = new MenuItemCollection(); - menu.Items.Add(ui.Text("actions", "emptyTrashcan")); + // only add empty recycle bin if the current user is allowed to delete by default + if (actions.Contains(ActionDelete.Instance)) + { + menu.Items.Add(ui.Text("actions", "emptyTrashcan")); + } menu.Items.Add(ui.Text("actions", ActionRefresh.Instance.Alias), true); return menu; } diff --git a/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForContentAttribute.cs b/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForContentAttribute.cs index 1a5fc4d07c..18880b9f96 100644 --- a/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForContentAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForContentAttribute.cs @@ -40,6 +40,12 @@ namespace Umbraco.Web.WebApi.Filters _nodeId = nodeId; } + public EnsureUserPermissionForContentAttribute(int nodeId, char permissionToCheck) + : this(nodeId) + { + _permissionToCheck = permissionToCheck; + } + public EnsureUserPermissionForContentAttribute(string paramName) { if (string.IsNullOrWhiteSpace(paramName)) throw new ArgumentException("Value cannot be null or whitespace.", "paramName"); From 6983f3d43a39ae377f31451b46876291f4ba3918 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Tue, 22 Jan 2019 22:50:12 +0100 Subject: [PATCH 212/437] V8: Clean up trashed content options (#4136) --- .../components/content/edit.controller.js | 77 +------------------ .../src/views/components/content/edit.html | 12 +-- src/Umbraco.Web/Editors/ContentController.cs | 1 + 3 files changed, 5 insertions(+), 85 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js index 89c8b541d1..59d17f02ef 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js @@ -151,6 +151,9 @@ */ function createButtons(content) { + // for trashed items, the save button is the primary action - otherwise it's a secondary action + $scope.page.saveButtonStyle = content.trashed ? "primary" : "info"; + // only create the save/publish/preview buttons if the // content app is "Conent" if ($scope.app && $scope.app.alias !== "umbContent" && $scope.app.alias !== "umbInfo") { @@ -401,34 +404,6 @@ } } - function moveNode(node, target) { - - contentResource.move({ "parentId": target.id, "id": node.id }) - .then(function (path) { - - // remove the node that we're working on - if ($scope.page.menu.currentNode) { - treeService.removeNode($scope.page.menu.currentNode); - } - - // sync the destination node - if (!infiniteMode) { - navigationService.syncTree({ tree: "content", path: path, forceReload: true, activate: false }); - } - - $scope.page.buttonRestore = "success"; - notificationsService.success("Successfully restored " + node.name + " to " + target.name); - - // reload the node - loadContent(); - - }, function (err) { - $scope.page.buttonRestore = "error"; - notificationsService.error("Cannot automatically restore this item", err); - }); - - } - if ($scope.page.isNew) { $scope.page.loading = true; @@ -840,52 +815,6 @@ } }; - $scope.restore = function (content) { - - $scope.page.buttonRestore = "busy"; - - relationResource.getByChildId(content.id, "relateParentDocumentOnDelete").then(function (data) { - - var relation = null; - var target = null; - var error = { headline: "Cannot automatically restore this item", content: "Use the Move menu item to move it manually" }; - - if (data.length === 0) { - notificationsService.error(error.headline, "There is no 'restore' relation found for this node. Use the Move menu item to move it manually."); - $scope.page.buttonRestore = "error"; - return; - } - - relation = data[0]; - - if (relation.parentId === -1) { - target = { id: -1, name: "Root" }; - moveNode(content, target); - } else { - contentResource.getById(relation.parentId).then(function (data) { - target = data; - - // make sure the target item isn't in the recycle bin - if (target.path.indexOf("-20") !== -1) { - notificationsService.error(error.headline, "The item you want to restore it under (" + target.name + ") is in the recycle bin. Use the Move menu item to move the item manually."); - $scope.page.buttonRestore = "error"; - return; - } - - moveNode(content, target); - - }, function (err) { - $scope.page.buttonRestore = "error"; - notificationsService.error(error.headline, error.content); - }); - } - - }, function (err) { - $scope.page.buttonRestore = "error"; - notificationsService.error(error.headline, error.content); - }); - }; - /* publish method used in infinite editing */ $scope.publishAndClose = function (content) { $scope.publishAndCloseButtonState = "busy"; diff --git a/src/Umbraco.Web.UI.Client/src/views/components/content/edit.html b/src/Umbraco.Web.UI.Client/src/views/components/content/edit.html index d5ee000e87..adde101baa 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/content/edit.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/content/edit.html @@ -49,7 +49,7 @@ ng-if="page.showSaveButton" alias="save" type="button" - button-style="info" + button-style="{{page.saveButtonStyle}}" state="page.saveButtonState" action="save(content)" label-key="buttons_save" @@ -85,16 +85,6 @@ type="button"> - - - diff --git a/src/Umbraco.Web/Editors/ContentController.cs b/src/Umbraco.Web/Editors/ContentController.cs index a96d0b767f..b574dc8f29 100644 --- a/src/Umbraco.Web/Editors/ContentController.cs +++ b/src/Umbraco.Web/Editors/ContentController.cs @@ -2034,6 +2034,7 @@ namespace Umbraco.Web.Editors private ContentItemDisplay MapToDisplay(IContent content) { var display = Mapper.Map(content); + display.AllowPreview = display.AllowPreview && content.Trashed == false; return display; } From c405d1b6d1a4089e40b098ace63a05b38ebdfa86 Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Tue, 22 Jan 2019 22:11:36 +0100 Subject: [PATCH 213/437] Fix localization of buttons in modals --- .../directives/components/content/edit.controller.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js index 59d17f02ef..60d44abfa5 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js @@ -483,7 +483,7 @@ view: "views/content/overlays/sendtopublish.html", variants: $scope.content.variants, //set a model property for the dialog skipFormValidation: true, //when submitting the overlay form, skip any client side validation - submitButtonLabel: "Send for approval", + submitButtonLabelKey: "buttons_saveToPublish", submit: function (model) { model.submitButtonState = "busy"; clearNotifications($scope.content); @@ -539,7 +539,7 @@ view: "views/content/overlays/publish.html", variants: $scope.content.variants, //set a model property for the dialog skipFormValidation: true, //when submitting the overlay form, skip any client side validation - submitButtonLabel: "Publish", + submitButtonLabelKey: "buttons_saveAndPublish", submit: function (model) { model.submitButtonState = "busy"; clearNotifications($scope.content); @@ -600,7 +600,7 @@ view: "views/content/overlays/save.html", variants: $scope.content.variants, //set a model property for the dialog skipFormValidation: true, //when submitting the overlay form, skip any client side validation - submitButtonLabel: "Save", + submitButtonLabelKey: "buttons_save", submit: function (model) { model.submitButtonState = "busy"; clearNotifications($scope.content); @@ -672,7 +672,7 @@ view: "views/content/overlays/schedule.html", variants: $scope.content.variants, //set a model property for the dialog skipFormValidation: true, //when submitting the overlay form, skip any client side validation - submitButtonLabel: "Schedule", + submitButtonLabelKey: "buttons_schedulePublish", submit: function (model) { model.submitButtonState = "busy"; clearNotifications($scope.content); From 977423e094035e6c041b30b2b84f770b558f305a Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Sun, 20 Jan 2019 21:58:43 +0100 Subject: [PATCH 214/437] Remove old delete dialog, add new dialog view + set delete button state --- .../src/views/packages/delete.controller.js | 32 ------------------- .../src/views/packages/delete.html | 13 -------- .../src/views/packages/overlays/delete.html | 7 ++++ .../packages/views/created.controller.js | 12 +++++-- .../src/views/packages/views/created.html | 3 +- src/Umbraco.Web.UI/Umbraco/config/lang/da.xml | 1 + src/Umbraco.Web.UI/Umbraco/config/lang/en.xml | 1 + .../Umbraco/config/lang/en_us.xml | 1 + 8 files changed, 21 insertions(+), 49 deletions(-) delete mode 100644 src/Umbraco.Web.UI.Client/src/views/packages/delete.controller.js delete mode 100644 src/Umbraco.Web.UI.Client/src/views/packages/delete.html create mode 100644 src/Umbraco.Web.UI.Client/src/views/packages/overlays/delete.html diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/packages/delete.controller.js deleted file mode 100644 index 134336afce..0000000000 --- a/src/Umbraco.Web.UI.Client/src/views/packages/delete.controller.js +++ /dev/null @@ -1,32 +0,0 @@ -/** - * @ngdoc controller - * @name Umbraco.Editors.Packages.DeleteController - * @function - * - * @description - * The controller for deleting content - */ -function PackageDeleteController($scope, packageResource, treeService, navigationService) { - - $scope.performDelete = function() { - - //mark it for deletion (used in the UI) - $scope.currentNode.loading = true; - packageResource.deleteCreatedPackage($scope.currentNode.id).then(function () { - $scope.currentNode.loading = false; - - //get the root node before we remove it - var rootNode = treeService.getTreeRoot($scope.currentNode); - - treeService.removeNode($scope.currentNode); - navigationService.hideMenu(); - }); - - }; - - $scope.cancel = function() { - navigationService.hideDialog(); - }; -} - -angular.module("umbraco").controller("Umbraco.Editors.Packages.DeleteController", PackageDeleteController); diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/delete.html b/src/Umbraco.Web.UI.Client/src/views/packages/delete.html deleted file mode 100644 index 1a802ab657..0000000000 --- a/src/Umbraco.Web.UI.Client/src/views/packages/delete.html +++ /dev/null @@ -1,13 +0,0 @@ -
-
- -

- Are you sure you want to delete {{currentNode.name}} ? -

- - - - - -
-
diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/overlays/delete.html b/src/Umbraco.Web.UI.Client/src/views/packages/overlays/delete.html new file mode 100644 index 0000000000..d5a7035904 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/packages/overlays/delete.html @@ -0,0 +1,7 @@ +
+
+ This will delete the language {{model.package.name}} [version: {{model.package.version}}]. +
+ + Are you sure you want to delete? +
diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/views/created.controller.js b/src/Umbraco.Web.UI.Client/src/views/packages/views/created.controller.js index 9d06ea1092..4379c525c8 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/views/created.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/packages/views/created.controller.js @@ -25,6 +25,8 @@ event.preventDefault(); const dialog = { + view: "views/packages/overlays/delete.html", + package: createdPackage, submitButtonLabelKey: "contentTypeEditor_yesDelete", submit: function (model) { performDelete(index, createdPackage); @@ -48,10 +50,14 @@ } - function performDelete(index, createdPackage) { - packageResource.deleteCreatedPackage(createdPackage.id).then(()=> { + function performDelete(index, createdPackage) { + createdPackage.deleteButtonState = "busy"; + + packageResource.deleteCreatedPackage(createdPackage.id).then(function () { vm.createdPackages.splice(index, 1); - }, angular.noop); + }, function (err) { + createdPackage.deleteButtonState = "error"; + }); } function goToPackage(createdPackage) { diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/views/created.html b/src/Umbraco.Web.UI.Client/src/views/packages/views/created.html index 0da9a966fd..825152d17e 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/views/created.html +++ b/src/Umbraco.Web.UI.Client/src/views/packages/views/created.html @@ -32,8 +32,9 @@
diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml index a2ac0c10ce..5ece650343 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml @@ -832,6 +832,7 @@ Mange hilsner fra Umbraco robotten Oprettet Opret pakke Vælg pakken fra din computer. Umbraco pakker er oftest en ".zip" fil + Dette vil slette pakken Slip her for at uploade eller klik her for at vælge pakkefil Upload pakke diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml index 3ad0603bf7..2e63acd3c3 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml @@ -1078,6 +1078,7 @@ To manage your website, simply open the Umbraco back office and start adding con Choose Package from your machine, by clicking the Browse
button and locating the package. Umbraco packages usually have a ".umb" or ".zip" extension. ]]> + This will delete the package Drop to upload or click here to choose package file Upload package 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 a76372b188..86484b1393 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml @@ -1081,6 +1081,7 @@ To manage your website, simply open the Umbraco back office and start adding con Choose Package from your machine, by clicking the Browse
button and locating the package. Umbraco packages usually have a ".umb" or ".zip" extension. ]]> + This will delete the package Drop to upload or click here to choose package file Upload package From fc12f2b802a415cb8e6417b40474f84f644efc8d Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Sun, 20 Jan 2019 21:59:50 +0100 Subject: [PATCH 215/437] Add track by on package lists --- src/Umbraco.Web.UI.Client/src/views/packages/views/created.html | 2 +- .../src/views/packages/views/installed.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/views/created.html b/src/Umbraco.Web.UI.Client/src/views/packages/views/created.html index 825152d17e..f52ecf1c3d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/views/created.html +++ b/src/Umbraco.Web.UI.Client/src/views/packages/views/created.html @@ -16,7 +16,7 @@ - +
diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/views/installed.html b/src/Umbraco.Web.UI.Client/src/views/packages/views/installed.html index 888bf02c4e..5fe3ac300a 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/views/installed.html +++ b/src/Umbraco.Web.UI.Client/src/views/packages/views/installed.html @@ -9,7 +9,7 @@ - +
From d8f0af1a94d14fc9b79882e11be4bddcf79b3fb1 Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Tue, 22 Jan 2019 20:37:47 +0100 Subject: [PATCH 216/437] Fix plural localization --- src/Umbraco.Web.UI/umbraco/config/lang/da.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml index b4ab08422e..3223478dd7 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml @@ -1458,9 +1458,9 @@ Mange hilsner fra Umbraco robotten Makroer Medietyper Medlemmer - Medlemsgruppe + Medlemsgrupper Roller - Medlemstype + Medlemstyper Dokumenttyper Relationstyper Pakker From ca98fad9186f253f48b3ae6d4e6b6212474b9c4a Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Tue, 22 Jan 2019 20:22:57 +0100 Subject: [PATCH 217/437] Update box heading in log viewer overview --- .../src/views/logviewer/overview.html | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html index 45ee3d5382..67d89e5ee7 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.html @@ -28,7 +28,7 @@
- Saved Searches + @@ -48,7 +48,7 @@ - Common Log Messages + Total Unique Message types: {{ vm.commonLogMessages.length }}
@@ -71,7 +71,7 @@
- Number of Errors + {{ vm.numberOfErrors }} @@ -79,14 +79,16 @@ - Log Types + + chart-options="vm.chartOptions"> + +
From 01de2eb266f4f877e492905f4eddfd0637c936b5 Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Tue, 22 Jan 2019 19:54:23 +0100 Subject: [PATCH 218/437] Synctree in log viewer overview --- .../src/views/logviewer/overview.controller.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js index c504d7caea..b64ad36245 100644 --- a/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/logviewer/overview.controller.js @@ -1,7 +1,7 @@ (function () { "use strict"; - function LogViewerOverviewController($q, $location, logViewerResource) { + function LogViewerOverviewController($q, $location, $timeout, logViewerResource, navigationService) { var vm = this; vm.loading = false; @@ -102,6 +102,9 @@ vm.loading = false; }); + $timeout(function () { + navigationService.syncTree({ tree: "logViewer", path: "-1" }); + }); } function searchLogQuery(logQuery){ From 78319bae9e0c9ed19af9d89436e498099f563707 Mon Sep 17 00:00:00 2001 From: Chris Houston Date: Tue, 22 Jan 2019 18:03:39 -0500 Subject: [PATCH 219/437] Temp8 fix typos 2 (#4130) --- src/Umbraco.Core/Attempt.cs | 2 +- src/Umbraco.Core/AttemptOfTResult.cs | 2 +- src/Umbraco.Core/AttemptOfTResultTStatus.cs | 2 +- .../Cache/FastDictionaryAppCacheBase.cs | 2 +- src/Umbraco.Core/Cache/ICacheRefresher.cs | 2 +- .../Cache/IRepositoryCachePolicy.cs | 2 +- .../Components/CompositionExtensions.cs | 2 +- src/Umbraco.Core/Composing/TypeFinder.cs | 8 +-- src/Umbraco.Core/Composing/TypeHelper.cs | 2 +- src/Umbraco.Core/Composing/TypeLoader.cs | 2 +- src/Umbraco.Core/Configuration/CoreDebug.cs | 2 +- .../Configuration/UmbracoVersion.cs | 2 +- src/Umbraco.Core/Constants-Conventions.cs | 2 +- src/Umbraco.Core/ContentExtensions.cs | 2 +- src/Umbraco.Core/DecimalExtensions.cs | 2 +- src/Umbraco.Core/DictionaryExtensions.cs | 4 +- src/Umbraco.Core/EnumerableExtensions.cs | 2 +- .../Events/CancellableEventArgs.cs | 4 +- .../Events/MacroErrorEventArgs.cs | 2 +- src/Umbraco.Core/Events/MoveEventArgs.cs | 8 +-- .../Events/QueuingEventDispatcherBase.cs | 26 +++++----- .../Events/SupersedeEventAttribute.cs | 2 +- src/Umbraco.Core/ExpressionHelper.cs | 4 +- src/Umbraco.Core/FileResources/Files.resx | 4 +- src/Umbraco.Core/HashGenerator.cs | 4 +- src/Umbraco.Core/HexEncoder.cs | 8 +-- src/Umbraco.Core/IO/IFileSystem.cs | 2 +- src/Umbraco.Core/Logging/IProfiler.cs | 2 +- .../Logging/Serilog/LoggerConfigExtensions.cs | 2 +- src/Umbraco.Core/MainDom.cs | 4 +- .../Manifest/DataEditorConverter.cs | 8 +-- .../Expressions/Create/ICreateBuilder.cs | 6 +-- .../Install/DatabaseSchemaCreator.cs | 4 +- src/Umbraco.Core/Migrations/MigrationPlan.cs | 2 +- .../Upgrade/V_7_10_0/RenamePreviewFolder.cs | 4 +- .../AddIndexesToUmbracoRelationTables.cs | 2 +- .../Upgrade/V_7_7_0/AddUserGroupTables.cs | 4 +- .../Upgrade/V_7_7_0/UpdateUserTables.cs | 2 +- src/Umbraco.Core/Models/ContentBase.cs | 16 +++--- src/Umbraco.Core/Models/DeepCloneHelper.cs | 2 +- .../Models/Entities/EntityBase.cs | 2 +- .../Models/Entities/IHaveAdditionalData.cs | 2 +- src/Umbraco.Core/Models/IContentTypeBase.cs | 4 +- .../Models/IContentTypeComposition.cs | 2 +- .../Models/Identity/BackOfficeIdentityUser.cs | 2 +- .../Models/Identity/IIdentityUserLogin.cs | 2 +- .../Models/Identity/IdentityUserLogin.cs | 4 +- src/Umbraco.Core/Models/Media.cs | 6 +-- src/Umbraco.Core/Models/MediaExtensions.cs | 2 +- src/Umbraco.Core/Models/Member.cs | 2 +- .../Models/Membership/IProfile.cs | 2 +- .../Models/Membership/UserGroup.cs | 2 +- src/Umbraco.Core/Models/ObjectTypes.cs | 4 +- .../Models/PropertyGroupCollection.cs | 2 +- src/Umbraco.Core/Models/PropertyType.cs | 4 +- .../IPublishedModelFactory.cs | 6 +-- .../PublishedContent/IPublishedProperty.cs | 2 +- .../Models/PublishedContent/ModelType.cs | 10 ++-- .../PublishedContent/PublishedDataType.cs | 2 +- .../PublishedContent/PublishedPropertyType.cs | 12 ++--- src/Umbraco.Core/Models/ServerRegistration.cs | 6 +-- src/Umbraco.Core/Models/UmbracoObjectTypes.cs | 2 +- src/Umbraco.Core/Models/UserExtensions.cs | 6 +-- src/Umbraco.Core/NetworkHelper.cs | 2 +- src/Umbraco.Core/ObjectExtensions.cs | 6 +-- .../Packaging/CompiledPackageXmlParser.cs | 6 +-- .../Packaging/IPackageInstallation.cs | 2 +- .../Packaging/PackageActionRunner.cs | 2 +- .../Packaging/PackageDataInstallation.cs | 16 +++--- .../Packaging/PackageExtraction.cs | 2 +- .../Packaging/PackagesRepository.cs | 2 +- .../Persistence/BulkDataReader.cs | 2 +- .../ForeignKeyAttribute.cs | 2 +- .../DbIndexDefinition.cs | 2 +- .../Factories/ContentBaseFactory.cs | 4 +- .../Factories/MemberTypeReadOnlyFactory.cs | 2 +- .../Persistence/Factories/PropertyFactory.cs | 2 +- src/Umbraco.Core/Persistence/LocalDb.cs | 2 +- .../Persistence/NPocoSqlExtensions.cs | 2 +- .../Persistence/PocoDataDataReader.cs | 2 +- .../IContentTypeRepositoryBase.cs | 2 +- .../IPartialViewMacroRepository.cs | 2 +- .../Repositories/IUserGroupRepository.cs | 4 +- .../Repositories/IUserRepository.cs | 2 +- .../Implement/ContentRepositoryBase.cs | 2 +- .../Implement/ContentTypeRepository.cs | 2 +- .../Implement/ContentTypeRepositoryBase.cs | 9 ++-- .../Implement/DocumentBlueprintRepository.cs | 2 +- .../Implement/DocumentRepository.cs | 6 +-- .../Implement/MediaTypeRepository.cs | 2 +- .../Implement/MemberRepository.cs | 4 +- .../Implement/MemberTypeRepository.cs | 2 +- .../Implement/TemplateRepository.cs | 2 +- .../Implement/UserGroupRepository.cs | 4 +- .../Repositories/Implement/UserRepository.cs | 4 +- .../SqlSyntax/SqlSyntaxProviderBase.cs | 2 +- .../ConfigurationEditorOfTConfiguration.cs | 4 +- .../PropertyEditors/ConfigurationField.cs | 2 +- .../PropertyEditors/DataEditorAttribute.cs | 4 +- .../PropertyEditors/DataValueEditor.cs | 8 +-- .../IPropertyValueConverter.cs | 4 +- src/Umbraco.Core/ReadLock.cs | 2 +- src/Umbraco.Core/Runtime/CoreRuntime.cs | 2 +- src/Umbraco.Core/SafeCallContext.cs | 4 +- src/Umbraco.Core/Scoping/IScopeContext.cs | 2 +- src/Umbraco.Core/Scoping/ScopeProvider.cs | 2 +- .../Security/BackOfficeUserStore.cs | 4 +- .../Security/MembershipProviderBase.cs | 4 +- .../MembershipProviderPasswordValidator.cs | 2 +- .../Security/UmbracoBackOfficeIdentity.cs | 2 +- .../NoTypeConverterJsonConverter.cs | 2 +- .../Changes/ContentTypeChangeTypes.cs | 2 +- .../Services/ContentTypeServiceExtensions.cs | 4 +- src/Umbraco.Core/Services/IConsentService.cs | 2 +- src/Umbraco.Core/Services/IContentService.cs | 4 +- .../Services/IContentServiceBase.cs | 2 +- src/Umbraco.Core/Services/IDataTypeService.cs | 10 ++-- src/Umbraco.Core/Services/IEntityService.cs | 2 +- .../Services/IExternalLoginService.cs | 2 +- src/Umbraco.Core/Services/IFileService.cs | 2 +- src/Umbraco.Core/Services/IMediaService.cs | 4 +- .../Services/IMembershipMemberService.cs | 4 +- src/Umbraco.Core/Services/IUserService.cs | 4 +- .../Services/Implement/ContentService.cs | 20 ++++---- .../Services/Implement/ContentTypeService.cs | 18 +++---- ...peServiceBaseOfTRepositoryTItemTService.cs | 2 +- .../Services/Implement/DataTypeService.cs | 12 ++--- .../Implement/ExternalLoginService.cs | 2 +- .../Services/Implement/FileService.cs | 2 +- .../Services/Implement/LocalizationService.cs | 2 +- .../Implement/LocalizedTextService.cs | 2 +- .../LocalizedTextServiceFileSources.cs | 2 +- .../Services/Implement/MediaService.cs | 8 +-- .../Services/Implement/MemberGroupService.cs | 2 +- .../Services/Implement/NotificationService.cs | 8 +-- .../Services/Implement/PackagingService.cs | 4 +- .../Services/Implement/RelationService.cs | 2 +- .../Services/Implement/UserService.cs | 8 +-- .../LocalizedTextServiceExtensions.cs | 2 +- .../Services/OperationResultType.cs | 2 +- .../Services/PublishResultType.cs | 2 +- .../Services/UserServiceExtensions.cs | 2 +- src/Umbraco.Core/StringExtensions.cs | 32 ++++++------ .../Strings/DefaultShortStringHelper.cs | 4 +- .../Strings/DefaultShortStringHelperConfig.cs | 2 +- src/Umbraco.Core/Strings/Diff.cs | 50 +++++++++---------- .../Strings/IShortStringHelper.cs | 2 +- .../Strings/Utf8ToAsciiConverter.cs | 4 +- .../Sync/DatabaseServerMessenger.cs | 8 +-- src/Umbraco.Core/Sync/IServerMessenger.cs | 4 +- .../Sync/ServerSyncWebServiceClient.cs | 2 +- src/Umbraco.Core/TypeExtensions.cs | 4 +- src/Umbraco.Core/UriExtensions.cs | 2 +- src/Umbraco.Core/WriteLock.cs | 2 +- src/Umbraco.Core/Xml/DynamicContext.cs | 2 +- .../Xml/UmbracoXPathPathSyntaxParser.cs | 2 +- .../Xml/XPath/NavigableNavigator.cs | 2 +- .../Xml/XPathNavigatorExtensions.cs | 2 +- src/Umbraco.Core/Xml/XmlHelper.cs | 2 +- src/Umbraco.Core/Xml/XmlNodeListFactory.cs | 2 +- .../Models/Mapping/ActionButtonsResolver.cs | 2 +- .../Trees/ApplicationTreeController.cs | 2 +- .../PackageActions/publishRootDocument.cs | 2 +- 163 files changed, 343 insertions(+), 344 deletions(-) diff --git a/src/Umbraco.Core/Attempt.cs b/src/Umbraco.Core/Attempt.cs index 5871626505..d13ec6394c 100644 --- a/src/Umbraco.Core/Attempt.cs +++ b/src/Umbraco.Core/Attempt.cs @@ -8,7 +8,7 @@ namespace Umbraco.Core public static class Attempt { // note: - // cannot rely on overloads only to differenciate between with/without status + // cannot rely on overloads only to differentiate between with/without status // in some cases it will always be ambiguous, so be explicit w/ 'WithStatus' methods /// diff --git a/src/Umbraco.Core/AttemptOfTResult.cs b/src/Umbraco.Core/AttemptOfTResult.cs index 55b1ea0a1e..79fae017e2 100644 --- a/src/Umbraco.Core/AttemptOfTResult.cs +++ b/src/Umbraco.Core/AttemptOfTResult.cs @@ -121,7 +121,7 @@ namespace Umbraco.Core } /// - /// Implicity operator to check if the attempt was successful without having to access the 'success' property + /// Implicitly operator to check if the attempt was successful without having to access the 'success' property /// /// /// diff --git a/src/Umbraco.Core/AttemptOfTResultTStatus.cs b/src/Umbraco.Core/AttemptOfTResultTStatus.cs index ca66b0a961..8ce21e36c3 100644 --- a/src/Umbraco.Core/AttemptOfTResultTStatus.cs +++ b/src/Umbraco.Core/AttemptOfTResultTStatus.cs @@ -130,7 +130,7 @@ namespace Umbraco.Core } /// - /// Implicity operator to check if the attempt was successful without having to access the 'success' property + /// Implicitly operator to check if the attempt was successful without having to access the 'success' property /// /// /// diff --git a/src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs b/src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs index 371ab90a57..21e2b63597 100644 --- a/src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs +++ b/src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs @@ -83,7 +83,7 @@ namespace Umbraco.Core.Cache } return entries .Select(x => GetSafeLazyValue((Lazy)x.Value)) // return exceptions as null - .Where(x => x != null); // backward compat, don't store null values in the cache + .Where(x => x != null); // backward compatible, don't store null values in the cache } /// diff --git a/src/Umbraco.Core/Cache/ICacheRefresher.cs b/src/Umbraco.Core/Cache/ICacheRefresher.cs index 96cb9d5418..a9ac76af6e 100644 --- a/src/Umbraco.Core/Cache/ICacheRefresher.cs +++ b/src/Umbraco.Core/Cache/ICacheRefresher.cs @@ -4,7 +4,7 @@ using Umbraco.Core.Composing; namespace Umbraco.Core.Cache { /// - /// The IcacheRefresher Interface is used for loadbalancing. + /// The IcacheRefresher Interface is used for load balancing. /// /// public interface ICacheRefresher : IDiscoverable diff --git a/src/Umbraco.Core/Cache/IRepositoryCachePolicy.cs b/src/Umbraco.Core/Cache/IRepositoryCachePolicy.cs index 305ed00f9a..020f4f7dd9 100644 --- a/src/Umbraco.Core/Cache/IRepositoryCachePolicy.cs +++ b/src/Umbraco.Core/Cache/IRepositoryCachePolicy.cs @@ -48,7 +48,7 @@ namespace Umbraco.Core.Cache /// Updates an entity. /// /// The entity. - /// The reopsitory PersistUpdatedItem method. + /// The repository PersistUpdatedItem method. /// Updates the entity in the repository, and updates the cache accordingly. void Update(TEntity entity, Action persistUpdated); diff --git a/src/Umbraco.Core/Components/CompositionExtensions.cs b/src/Umbraco.Core/Components/CompositionExtensions.cs index bb23e89b81..2aef865994 100644 --- a/src/Umbraco.Core/Components/CompositionExtensions.cs +++ b/src/Umbraco.Core/Components/CompositionExtensions.cs @@ -203,7 +203,7 @@ namespace Umbraco.Core.Components /// Sets the server registrar. /// /// The composition. - /// A function creating a server registar. + /// A function creating a server registrar. public static void SetServerRegistrar(this Composition composition, Func factory) { composition.RegisterUnique(factory); diff --git a/src/Umbraco.Core/Composing/TypeFinder.cs b/src/Umbraco.Core/Composing/TypeFinder.cs index 86d3863994..4086eb394b 100644 --- a/src/Umbraco.Core/Composing/TypeFinder.cs +++ b/src/Umbraco.Core/Composing/TypeFinder.cs @@ -163,8 +163,8 @@ namespace Umbraco.Core.Composing /// /// Return a list of found local Assemblies excluding the known assemblies we don't want to scan - /// and exluding the ones passed in and excluding the exclusion list filter, the results of this are - /// cached for perforance reasons. + /// and excluding the ones passed in and excluding the exclusion list filter, the results of this are + /// cached for performance reasons. /// /// /// @@ -183,7 +183,7 @@ namespace Umbraco.Core.Composing } /// - /// Return a distinct list of found local Assemblies and exluding the ones passed in and excluding the exclusion list filter + /// Return a distinct list of found local Assemblies and excluding the ones passed in and excluding the exclusion list filter /// /// /// @@ -204,7 +204,7 @@ namespace Umbraco.Core.Composing } /// - /// this is our assembly filter to filter out known types that def dont contain types we'd like to find or plugins + /// this is our assembly filter to filter out known types that def don't contain types we'd like to find or plugins /// /// /// NOTE the comma vs period... comma delimits the name in an Assembly FullName property so if it ends with comma then its an exact name match diff --git a/src/Umbraco.Core/Composing/TypeHelper.cs b/src/Umbraco.Core/Composing/TypeHelper.cs index 999d8d15f4..c2746bef96 100644 --- a/src/Umbraco.Core/Composing/TypeHelper.cs +++ b/src/Umbraco.Core/Composing/TypeHelper.cs @@ -153,7 +153,7 @@ namespace Umbraco.Core.Composing { var others = types.Except(new[] {curr}); - //is the curr type a common denominator for all others ? + //is the current type a common denominator for all others ? var isBase = others.All(curr.IsAssignableFrom); //if this type is the base for all others diff --git a/src/Umbraco.Core/Composing/TypeLoader.cs b/src/Umbraco.Core/Composing/TypeLoader.cs index b31f16f30a..a2d6349ea0 100644 --- a/src/Umbraco.Core/Composing/TypeLoader.cs +++ b/src/Umbraco.Core/Composing/TypeLoader.cs @@ -109,7 +109,7 @@ namespace Umbraco.Core.Composing /// Gets or sets the set of assemblies to scan. /// /// - /// If not explicitely set, defaults to all assemblies except those that are know to not have any of the + /// If not explicitly set, defaults to all assemblies except those that are know to not have any of the /// types we might scan. Because we only scan for application types, this means we can safely exclude GAC assemblies /// for example. /// This is for unit tests. diff --git a/src/Umbraco.Core/Configuration/CoreDebug.cs b/src/Umbraco.Core/Configuration/CoreDebug.cs index a71b311d7c..3e39eb6db5 100644 --- a/src/Umbraco.Core/Configuration/CoreDebug.cs +++ b/src/Umbraco.Core/Configuration/CoreDebug.cs @@ -15,7 +15,7 @@ namespace Umbraco.Core.Configuration // this helps troubleshooting rogue scopes that we forget to complete public bool LogUncompletedScopes { get; } - // when true, the Logger creates a minidump of w3wp in ~/App_Data/MiniDump whenever it logs + // when true, the Logger creates a mini dump of w3wp in ~/App_Data/MiniDump whenever it logs // an error due to a ThreadAbortException that is due to a timeout. public bool DumpOnTimeoutThreadAbort { get; } } diff --git a/src/Umbraco.Core/Configuration/UmbracoVersion.cs b/src/Umbraco.Core/Configuration/UmbracoVersion.cs index 05cb64325c..7cb1a61cf1 100644 --- a/src/Umbraco.Core/Configuration/UmbracoVersion.cs +++ b/src/Umbraco.Core/Configuration/UmbracoVersion.cs @@ -44,7 +44,7 @@ namespace Umbraco.Core.Configuration /// /// /// The assembly version is the value of the . - /// Is is the one that the CLR checks for compatibility. Therefore, it changes only on + /// Is the one that the CLR checks for compatibility. Therefore, it changes only on /// hard-breaking changes (for instance, on new major versions). /// public static Version AssemblyVersion {get; } diff --git a/src/Umbraco.Core/Constants-Conventions.cs b/src/Umbraco.Core/Constants-Conventions.cs index eb1a6e2925..b3281e8967 100644 --- a/src/Umbraco.Core/Constants-Conventions.cs +++ b/src/Umbraco.Core/Constants-Conventions.cs @@ -195,7 +195,7 @@ namespace Umbraco.Core public const string LastLockoutDateLabel = "Last Lockout Date"; /// - /// Property alias for the number of failed login attemps + /// Property alias for the number of failed login attempts /// public const string FailedPasswordAttempts = "umbracoMemberFailedPasswordAttempts"; diff --git a/src/Umbraco.Core/ContentExtensions.cs b/src/Umbraco.Core/ContentExtensions.cs index dce97ed0e3..dabd7b4bd5 100644 --- a/src/Umbraco.Core/ContentExtensions.cs +++ b/src/Umbraco.Core/ContentExtensions.cs @@ -85,7 +85,7 @@ namespace Umbraco.Core #endregion /// - /// Removes characters that are not valide XML characters from all entity properties + /// Removes characters that are not valid XML characters from all entity properties /// of type string. See: http://stackoverflow.com/a/961504/5018 /// /// diff --git a/src/Umbraco.Core/DecimalExtensions.cs b/src/Umbraco.Core/DecimalExtensions.cs index 24afb9f7a9..8b3218d88c 100644 --- a/src/Umbraco.Core/DecimalExtensions.cs +++ b/src/Umbraco.Core/DecimalExtensions.cs @@ -13,7 +13,7 @@ /// /// The value to normalize. /// The normalized value. - /// Normalizing changes the scaling factor and removes trailing zeroes, + /// Normalizing changes the scaling factor and removes trailing zeros, /// so 1.2500m comes out as 1.25m. public static decimal Normalize(this decimal value) { diff --git a/src/Umbraco.Core/DictionaryExtensions.cs b/src/Umbraco.Core/DictionaryExtensions.cs index fb44ec7dcd..d9e998dbd1 100644 --- a/src/Umbraco.Core/DictionaryExtensions.cs +++ b/src/Umbraco.Core/DictionaryExtensions.cs @@ -10,7 +10,7 @@ using System.Web; namespace Umbraco.Core { /// - /// Extension methods for dictionary & concurrentdictionary + /// Extension methods for Dictionary & ConcurrentDictionary /// internal static class DictionaryExtensions { @@ -72,7 +72,7 @@ namespace Umbraco.Core /// /// Taken from: http://stackoverflow.com/questions/12240219/is-there-a-way-to-use-concurrentdictionary-tryupdate-with-a-lambda-expression /// - /// WARNING: If the value changes after we've retreived it, then the item will not be updated + /// WARNING: If the value changes after we've retrieved it, then the item will not be updated /// public static bool TryUpdateOptimisitic(this ConcurrentDictionary dict, TKey key, Func updateFactory) { diff --git a/src/Umbraco.Core/EnumerableExtensions.cs b/src/Umbraco.Core/EnumerableExtensions.cs index dc07f7c1f1..d71ccb04b9 100644 --- a/src/Umbraco.Core/EnumerableExtensions.cs +++ b/src/Umbraco.Core/EnumerableExtensions.cs @@ -265,7 +265,7 @@ namespace Umbraco.Core return -1; } - ///Finds the index of the first occurence of an item in an enumerable. + ///Finds the index of the first occurrence of an item in an enumerable. ///The enumerable to search. ///The item to find. ///The index of the first matching item, or -1 if the item was not found. diff --git a/src/Umbraco.Core/Events/CancellableEventArgs.cs b/src/Umbraco.Core/Events/CancellableEventArgs.cs index e0eb24c579..0f3091c46a 100644 --- a/src/Umbraco.Core/Events/CancellableEventArgs.cs +++ b/src/Umbraco.Core/Events/CancellableEventArgs.cs @@ -61,7 +61,7 @@ namespace Umbraco.Core.Events { if (CanCancel == false) { - throw new InvalidOperationException("This event argument class does not support cancelling."); + throw new InvalidOperationException("This event argument class does not support canceling."); } return _cancel; } @@ -69,7 +69,7 @@ namespace Umbraco.Core.Events { if (CanCancel == false) { - throw new InvalidOperationException("This event argument class does not support cancelling."); + throw new InvalidOperationException("This event argument class does not support canceling."); } _cancel = value; } diff --git a/src/Umbraco.Core/Events/MacroErrorEventArgs.cs b/src/Umbraco.Core/Events/MacroErrorEventArgs.cs index fee31356fc..afabec4d98 100644 --- a/src/Umbraco.Core/Events/MacroErrorEventArgs.cs +++ b/src/Umbraco.Core/Events/MacroErrorEventArgs.cs @@ -35,7 +35,7 @@ namespace Umbraco.Core.Events public MacroErrorBehaviour Behaviour { get; set; } /// - /// The html code to display when Behavior is Content. + /// The HTML code to display when Behavior is Content. /// public string Html { get; set; } } diff --git a/src/Umbraco.Core/Events/MoveEventArgs.cs b/src/Umbraco.Core/Events/MoveEventArgs.cs index aaeddc6921..f1b09917d8 100644 --- a/src/Umbraco.Core/Events/MoveEventArgs.cs +++ b/src/Umbraco.Core/Events/MoveEventArgs.cs @@ -14,7 +14,7 @@ namespace Umbraco.Core.Events /// /// /// - /// A colleciton of MoveEventInfo objects that exposes all entities that have been moved during a single move operation + /// A collection of MoveEventInfo objects that exposes all entities that have been moved during a single move operation /// public MoveEventArgs(bool canCancel, EventMessages eventMessages, params MoveEventInfo[] moveInfo) : base(default, canCancel, eventMessages) @@ -34,7 +34,7 @@ namespace Umbraco.Core.Events /// /// /// - /// A colleciton of MoveEventInfo objects that exposes all entities that have been moved during a single move operation + /// A collection of MoveEventInfo objects that exposes all entities that have been moved during a single move operation /// public MoveEventArgs(EventMessages eventMessages, params MoveEventInfo[] moveInfo) : base(default, eventMessages) @@ -54,7 +54,7 @@ namespace Umbraco.Core.Events /// /// /// - /// A colleciton of MoveEventInfo objects that exposes all entities that have been moved during a single move operation + /// A collection of MoveEventInfo objects that exposes all entities that have been moved during a single move operation /// public MoveEventArgs(bool canCancel, params MoveEventInfo[] moveInfo) : base(default, canCancel) @@ -73,7 +73,7 @@ namespace Umbraco.Core.Events /// Constructor accepting a collection of MoveEventInfo objects /// /// - /// A colleciton of MoveEventInfo objects that exposes all entities that have been moved during a single move operation + /// A collection of MoveEventInfo objects that exposes all entities that have been moved during a single move operation /// public MoveEventArgs(params MoveEventInfo[] moveInfo) : base(default) diff --git a/src/Umbraco.Core/Events/QueuingEventDispatcherBase.cs b/src/Umbraco.Core/Events/QueuingEventDispatcherBase.cs index 8a4df686ee..b4dc6187fa 100644 --- a/src/Umbraco.Core/Events/QueuingEventDispatcherBase.cs +++ b/src/Umbraco.Core/Events/QueuingEventDispatcherBase.cs @@ -109,9 +109,9 @@ namespace Umbraco.Core.Events public Type[] SupersedeTypes { get; set; } } - // this is way too convoluted, the superceede attribute is used only on DeleteEventargs to specify - // that it superceeds save, publish, move and copy - BUT - publish event args is also used for - // unpublishing and should NOT be superceeded - so really it should not be managed at event args + // this is way too convoluted, the supersede attribute is used only on DeleteEventargs to specify + // that it supersedes save, publish, move and copy - BUT - publish event args is also used for + // unpublishing and should NOT be superseded - so really it should not be managed at event args // level but at event level // // what we want is: @@ -136,7 +136,7 @@ namespace Umbraco.Core.Events var result = new List(); var resultArgs = new List(); - // eagerly fetch superceeded arg types for each arg type + // eagerly fetch superseded arg types for each arg type var argTypeSuperceeding = events.Select(x => x.Args.GetType()) .Distinct() .ToDictionary(x => x, x => x.GetCustomAttributes(false).Select(y => y.SupersededEventArgsType).ToArray()); @@ -178,7 +178,7 @@ namespace Umbraco.Core.Events continue; } - // look for this entity in superceding event args + // look for this entity in superseding event args // found = must be removed (ie not added), else track if (IsSuperceeded(eventEntity, infos, entities) == false) { @@ -203,7 +203,7 @@ namespace Umbraco.Core.Events if (eventEntity == null) continue; - // look for this entity in superceding event args + // look for this entity in superseding event args // found = must be removed, else track if (IsSuperceeded(eventEntity, infos, entities)) toRemove.Add(eventEntity); @@ -211,7 +211,7 @@ namespace Umbraco.Core.Events entities.Add(Tuple.Create(eventEntity, infos)); } - // remove superceded entities + // remove superseded entities foreach (var entity in toRemove) eventObjects.Remove(entity); @@ -286,13 +286,13 @@ namespace Umbraco.Core.Events // determines if a given entity, appearing in a given event definition, should be filtered out, // considering the entities that have already been visited - an entity is filtered out if it - // appears in another even definition, which superceedes this event definition. + // appears in another even definition, which supersedes this event definition. private static bool IsSuperceeded(IEntity entity, EventDefinitionInfos infos, List> entities) { //var argType = meta.EventArgsType; var argType = infos.EventDefinition.Args.GetType(); - // look for other instances of the same entity, coming from an event args that supercedes other event args, + // look for other instances of the same entity, coming from an event args that supersedes other event args, // ie is marked with the attribute, and is not this event args (cannot supersede itself) var superceeding = entities .Where(x => x.Item2.SupersedeTypes.Length > 0 // has the attribute @@ -304,20 +304,20 @@ namespace Umbraco.Core.Events if (superceeding.Length == 0) return false; - // delete event args does NOT superceedes 'unpublished' event + // delete event args does NOT supersedes 'unpublished' event if (argType.IsGenericType && argType.GetGenericTypeDefinition() == typeof(PublishEventArgs<>) && infos.EventDefinition.EventName == "Unpublished") return false; - // found occurences, need to determine if this event args is superceded + // found occurrences, need to determine if this event args is superseded if (argType.IsGenericType) { // generic, must compare type arguments var supercededBy = superceeding.FirstOrDefault(x => x.Item2.SupersedeTypes.Any(y => - // superceeding a generic type which has the same generic type definition + // superseding a generic type which has the same generic type definition // (but ... no matter the generic type parameters? could be different?) y.IsGenericTypeDefinition && y == argType.GetGenericTypeDefinition() - // or superceeding a non-generic type which is ... (but... how is this ever possible? argType *is* generic?) + // or superceeding a non-generic type which is ... (but... how is this ever possible? argType *is* generic? || y.IsGenericTypeDefinition == false && y == argType)); return supercededBy != null; } diff --git a/src/Umbraco.Core/Events/SupersedeEventAttribute.cs b/src/Umbraco.Core/Events/SupersedeEventAttribute.cs index 30a218a677..2488890a73 100644 --- a/src/Umbraco.Core/Events/SupersedeEventAttribute.cs +++ b/src/Umbraco.Core/Events/SupersedeEventAttribute.cs @@ -4,7 +4,7 @@ namespace Umbraco.Core.Events { /// /// This is used to know if the event arg attributed should supersede another event arg type when - /// tracking events for the same entity. If one event args supercedes another then the event args that have been superseded + /// tracking events for the same entity. If one event args supersedes another then the event args that have been superseded /// will mean that the event will not be dispatched or the args will be filtered to exclude the entity. /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] diff --git a/src/Umbraco.Core/ExpressionHelper.cs b/src/Umbraco.Core/ExpressionHelper.cs index db0e06eedb..7d5a246f0d 100644 --- a/src/Umbraco.Core/ExpressionHelper.cs +++ b/src/Umbraco.Core/ExpressionHelper.cs @@ -58,7 +58,7 @@ namespace Umbraco.Core { var boxedMember = unary.Operand as MemberExpression; if (boxedMember == null) - throw new ArgumentException("The type of property could not be infered, try specifying the type parameters explicitly. This can happen if you have tried to access PropertyInfo where the property's return type is a value type, but the expression is trying to convert it to an object"); + throw new ArgumentException("The type of property could not be inferred, try specifying the type parameters explicitly. This can happen if you have tried to access PropertyInfo where the property's return type is a value type, but the expression is trying to convert it to an object"); else member = boxedMember; } } @@ -75,7 +75,7 @@ namespace Umbraco.Core if (type != propInfo.ReflectedType && !type.IsSubclassOf(propInfo.ReflectedType)) throw new ArgumentException(string.Format( - "Expresion '{0}' refers to a property that is not from type {1}.", + "Expression '{0}' refers to a property that is not from type {1}.", propertyLambda, type)); diff --git a/src/Umbraco.Core/FileResources/Files.resx b/src/Umbraco.Core/FileResources/Files.resx index 823aacefb7..29c7feee77 100644 --- a/src/Umbraco.Core/FileResources/Files.resx +++ b/src/Umbraco.Core/FileResources/Files.resx @@ -37,7 +37,7 @@ mimetype set. The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not + ResXResourceReader how to stop persisting the object. This is currently not extensible. For a given mimetype the value must be set accordingly: Note - application/x-microsoft.net.object.binary.base64 is the format @@ -121,4 +121,4 @@ blockingweb.config;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - \ No newline at end of file + diff --git a/src/Umbraco.Core/HashGenerator.cs b/src/Umbraco.Core/HashGenerator.cs index f8e45c362d..80cc3c3de4 100644 --- a/src/Umbraco.Core/HashGenerator.cs +++ b/src/Umbraco.Core/HashGenerator.cs @@ -54,7 +54,7 @@ namespace Umbraco.Core { //I've tried to no allocate a new string with this which can be done if we use the CompareInfo.GetSortKey method which will create a new //byte array that we can use to write to the output, however this also allocates new objects so i really don't think the performance - //would be much different. In any case, i'll leave this here for reference. We could write the bytes out based on the sort key, + //would be much different. In any case, I'll leave this here for reference. We could write the bytes out based on the sort key, //this is how we could deal with case insensitivity without allocating another string //for reference see: https://stackoverflow.com/a/10452967/694494 //we could go a step further and s.Normalize() but we're not really dealing with crazy unicode with this class so far. @@ -131,7 +131,7 @@ namespace Umbraco.Core //create a StringBuilder object var stringBuilder = new StringBuilder(); - //loop to each each byte + //loop to each byte foreach (var b in hashedByteArray) { //append it to our StringBuilder diff --git a/src/Umbraco.Core/HexEncoder.cs b/src/Umbraco.Core/HexEncoder.cs index 073dc8b543..9202fd48fc 100644 --- a/src/Umbraco.Core/HexEncoder.cs +++ b/src/Umbraco.Core/HexEncoder.cs @@ -4,11 +4,11 @@ using System.Runtime.CompilerServices; namespace Umbraco.Core { /// - /// Provides methods for encoding byte arrays into hexidecimal strings. + /// Provides methods for encoding byte arrays into hexadecimal strings. /// internal static class HexEncoder { - // LUT's that provide the hexidecimal representation of each possible byte value. + // LUT's that provide the hexadecimal representation of each possible byte value. private static readonly char[] HexLutBase = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; // The base LUT arranged in 16x each item order. 0 * 16, 1 * 16, .... F * 16 @@ -18,7 +18,7 @@ namespace Umbraco.Core private static readonly char[] HexLutLo = Enumerable.Range(0, 256).Select(x => HexLutBase[x % 0x10]).ToArray(); /// - /// Converts a to a hexidecimal formatted padded to 2 digits. + /// Converts a to a hexadecimal formatted padded to 2 digits. /// /// The bytes. /// The . @@ -40,7 +40,7 @@ namespace Umbraco.Core } /// - /// Converts a to a hexidecimal formatted padded to 2 digits + /// Converts a to a hexadecimal formatted padded to 2 digits /// and split into blocks with the given char separator. /// /// The bytes. diff --git a/src/Umbraco.Core/IO/IFileSystem.cs b/src/Umbraco.Core/IO/IFileSystem.cs index 14b015a468..0405c5925a 100644 --- a/src/Umbraco.Core/IO/IFileSystem.cs +++ b/src/Umbraco.Core/IO/IFileSystem.cs @@ -76,7 +76,7 @@ namespace Umbraco.Core.IO IEnumerable GetFiles(string path, string filter); /// - /// Gets a representing the file at the gieven path. + /// Gets a representing the file at the given path. /// /// The path to the file. /// diff --git a/src/Umbraco.Core/Logging/IProfiler.cs b/src/Umbraco.Core/Logging/IProfiler.cs index 53d1d96072..1327651197 100644 --- a/src/Umbraco.Core/Logging/IProfiler.cs +++ b/src/Umbraco.Core/Logging/IProfiler.cs @@ -11,7 +11,7 @@ namespace Umbraco.Core.Logging /// Renders the profiling results. /// /// The profiling results. - /// Generally used for Html rendering. + /// Generally used for HTML rendering. string Render(); /// diff --git a/src/Umbraco.Core/Logging/Serilog/LoggerConfigExtensions.cs b/src/Umbraco.Core/Logging/Serilog/LoggerConfigExtensions.cs index 1c6f9853a2..6775ea7417 100644 --- a/src/Umbraco.Core/Logging/Serilog/LoggerConfigExtensions.cs +++ b/src/Umbraco.Core/Logging/Serilog/LoggerConfigExtensions.cs @@ -92,7 +92,7 @@ namespace Umbraco.Core.Logging.Serilog /// /// Reads settings from /config/serilog.user.config - /// That allows a separate logging pipeline to be configured that wil not affect the main Umbraco log + /// That allows a separate logging pipeline to be configured that will not affect the main Umbraco log /// /// A Serilog LoggerConfiguration public static LoggerConfiguration ReadFromUserConfigFile(this LoggerConfiguration logConfig) diff --git a/src/Umbraco.Core/MainDom.cs b/src/Umbraco.Core/MainDom.cs index 0b4551a7cc..ca875c2167 100644 --- a/src/Umbraco.Core/MainDom.cs +++ b/src/Umbraco.Core/MainDom.cs @@ -165,7 +165,7 @@ namespace Umbraco.Core // which may timeout, and this is accepted - see comments below // signal, then wait for the lock, then make sure the event is - // resetted (maybe there was noone listening..) + // reset (maybe there was noone listening..) _signal.Set(); // if more than 1 instance reach that point, one will get the lock @@ -175,7 +175,7 @@ namespace Umbraco.Core _isMainDom = true; // we need to reset the event, because otherwise we would end up - // signaling ourselves and commiting suicide immediately. + // signaling ourselves and committing suicide immediately. // only 1 instance can reach that point, but other instances may // have started and be trying to get the lock - they will timeout, // which is accepted diff --git a/src/Umbraco.Core/Manifest/DataEditorConverter.cs b/src/Umbraco.Core/Manifest/DataEditorConverter.cs index 20efee1607..86982e17f2 100644 --- a/src/Umbraco.Core/Manifest/DataEditorConverter.cs +++ b/src/Umbraco.Core/Manifest/DataEditorConverter.cs @@ -71,7 +71,7 @@ namespace Umbraco.Core.Manifest if (jobject["editor"] == null) throw new InvalidOperationException("Missing 'editor' value."); - // explicitely assign a value editor of type ValueEditor + // explicitly assign a value editor of type ValueEditor // (else the deserializer will try to read it before setting it) // (and besides it's an interface) target.ExplicitValueEditor = new DataValueEditor(); @@ -88,7 +88,7 @@ namespace Umbraco.Core.Manifest if (jobject["prevalues"] is JObject config) { - // explicitely assign a configuration editor of type ConfigurationEditor + // explicitly assign a configuration editor of type ConfigurationEditor // (else the deserializer will try to read it before setting it) // (and besides it's an interface) target.ExplicitConfigurationEditor = new ConfigurationEditor(); @@ -129,12 +129,12 @@ namespace Umbraco.Core.Manifest // "config": { "key1": "value1", "key2": "value2" ... } // } // - // the view is at top level, but should be down one level to be propertly + // the view is at top level, but should be down one level to be properly // deserialized as a ParameterValueEditor property -> need to move it if (jobject.Property("view") != null) { - // explicitely assign a value editor of type ParameterValueEditor + // explicitly assign a value editor of type ParameterValueEditor target.ExplicitValueEditor = new DataValueEditor(); // move the 'view' property diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/ICreateBuilder.cs b/src/Umbraco.Core/Migrations/Expressions/Create/ICreateBuilder.cs index ee4361d745..98716a42a4 100644 --- a/src/Umbraco.Core/Migrations/Expressions/Create/ICreateBuilder.cs +++ b/src/Umbraco.Core/Migrations/Expressions/Create/ICreateBuilder.cs @@ -14,17 +14,17 @@ namespace Umbraco.Core.Migrations.Expressions.Create public interface ICreateBuilder : IFluentBuilder { /// - /// Builds a Create Table expresion, and executes. + /// Builds a Create Table expression, and executes. /// IExecutableBuilder Table(bool withoutKeysAndIndexes = false); /// - /// Builds a Create Keys and Indexes expresion, and executes. + /// Builds a Create Keys and Indexes expression, and executes. /// IExecutableBuilder KeysAndIndexes(); /// - /// Builds a Create Keys and Indexes expresion, and executes. + /// Builds a Create Keys and Indexes expression, and executes. /// IExecutableBuilder KeysAndIndexes(Type typeOfDto); diff --git a/src/Umbraco.Core/Migrations/Install/DatabaseSchemaCreator.cs b/src/Umbraco.Core/Migrations/Install/DatabaseSchemaCreator.cs index 204e2463de..5cc818a6d2 100644 --- a/src/Umbraco.Core/Migrations/Install/DatabaseSchemaCreator.cs +++ b/src/Umbraco.Core/Migrations/Install/DatabaseSchemaCreator.cs @@ -161,7 +161,7 @@ namespace Umbraco.Core.Migrations.Install /// /// /// - /// This does not validate any database constraints that are not PKs or FKs because Umbraco does not create a database with non PK/FK contraints. + /// This does not validate any database constraints that are not PKs or FKs because Umbraco does not create a database with non PK/FK constraints. /// Any unique "constraints" in the database are done with unique indexes. /// private void ValidateDbConstraints(DatabaseSchemaResult result) @@ -399,7 +399,7 @@ namespace Umbraco.Core.Migrations.Install /// Creates a new table in the database for the specified . /// /// Whether the table should be overwritten if it already exists. - /// The the representing the table. + /// The representing the table. /// /// /// If has been decorated with an , the name from diff --git a/src/Umbraco.Core/Migrations/MigrationPlan.cs b/src/Umbraco.Core/Migrations/MigrationPlan.cs index 85d9c1d2cc..9ede9f04f2 100644 --- a/src/Umbraco.Core/Migrations/MigrationPlan.cs +++ b/src/Umbraco.Core/Migrations/MigrationPlan.cs @@ -61,7 +61,7 @@ namespace Umbraco.Core.Migrations // register the target state if we don't know it already // this is how we keep track of the final state - because // transitions could be defined in any order, that might - // be overriden afterwards. + // be overridden afterwards. if (!_transitions.ContainsKey(targetState)) _transitions.Add(targetState, null); diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_7_10_0/RenamePreviewFolder.cs b/src/Umbraco.Core/Migrations/Upgrade/V_7_10_0/RenamePreviewFolder.cs index a73fb8a325..48e6d0085d 100644 --- a/src/Umbraco.Core/Migrations/Upgrade/V_7_10_0/RenamePreviewFolder.cs +++ b/src/Umbraco.Core/Migrations/Upgrade/V_7_10_0/RenamePreviewFolder.cs @@ -5,7 +5,7 @@ using File = System.IO.File; namespace Umbraco.Core.Migrations.Upgrade.V_7_10_0 { /// - /// Renames the preview folder containing static html files to ensure it does not interfere with the MVC route + /// Renames the preview folder containing static HTML files to ensure it does not interfere with the MVC route /// that is now supposed to render these views dynamically. We don't want to delete as people may have made /// customizations to these files that would need to be migrated to the new .cshtml view files. /// @@ -25,7 +25,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_7_10_0 { Directory.Move(previewFolderPath, newPath); var readmeText = - $"Static html files used for preview and canvas editing functionality no longer live in this directory.\r\n" + + $"Static HTML files used for preview and canvas editing functionality no longer live in this directory.\r\n" + $"Instead they have been recreated as MVC views and can now be found in '~/Umbraco/Views/Preview'.\r\n" + $"See issue: http://issues.umbraco.org/issue/U4-11090"; File.WriteAllText(Path.Combine(newPath, "readme.txt"), readmeText); diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_7_6_0/AddIndexesToUmbracoRelationTables.cs b/src/Umbraco.Core/Migrations/Upgrade/V_7_6_0/AddIndexesToUmbracoRelationTables.cs index 17dd060376..9042ae105e 100644 --- a/src/Umbraco.Core/Migrations/Upgrade/V_7_6_0/AddIndexesToUmbracoRelationTables.cs +++ b/src/Umbraco.Core/Migrations/Upgrade/V_7_6_0/AddIndexesToUmbracoRelationTables.cs @@ -18,7 +18,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_7_6_0 if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_umbracoRelation_parentChildType")) == false) { //This will remove any corrupt/duplicate data in the relation table before the index is applied - //Ensure this executes in a defered block which will be done inside of the migration transaction + //Ensure this executes in a deferred block which will be done inside of the migration transaction var database = Database; //We need to check if this index has corrupted data and then clear that data diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_7_7_0/AddUserGroupTables.cs b/src/Umbraco.Core/Migrations/Upgrade/V_7_7_0/AddUserGroupTables.cs index f5fdd8df2b..edd78e6c84 100644 --- a/src/Umbraco.Core/Migrations/Upgrade/V_7_7_0/AddUserGroupTables.cs +++ b/src/Umbraco.Core/Migrations/Upgrade/V_7_7_0/AddUserGroupTables.cs @@ -27,7 +27,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_7_7_0 var constraints = SqlSyntax.GetConstraintsPerColumn(Context.Database).Distinct().ToArray(); var columns = SqlSyntax.GetColumnsInSchema(Context.Database).ToArray(); - //In some very rare cases, there might alraedy be user group tables that we'll need to remove first + //In some very rare cases, there might already be user group tables that we'll need to remove first //but of course we don't want to remove the tables we will be creating below if they already exist so //need to do some checks first since these old rare tables have a different schema RemoveOldTablesIfExist(tables, columns); @@ -83,7 +83,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_7_7_0 } /// - /// In some very rare cases, there might alraedy be user group tables that we'll need to remove first + /// In some very rare cases, there might already be user group tables that we'll need to remove first /// but of course we don't want to remove the tables we will be creating below if they already exist so /// need to do some checks first since these old rare tables have a different schema /// diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_7_7_0/UpdateUserTables.cs b/src/Umbraco.Core/Migrations/Upgrade/V_7_7_0/UpdateUserTables.cs index 3714427cd7..509b3f91dd 100644 --- a/src/Umbraco.Core/Migrations/Upgrade/V_7_7_0/UpdateUserTables.cs +++ b/src/Umbraco.Core/Migrations/Upgrade/V_7_7_0/UpdateUserTables.cs @@ -14,7 +14,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_7_7_0 public override void Migrate() { - //Don't exeucte if the column is already there + //Don't execute if the column is already there var columns = SqlSyntax.GetColumnsInSchema(Context.Database).ToArray(); if (columns.Any(x => x.TableName.InvariantEquals("umbracoUser") && x.ColumnName.InvariantEquals("createDate")) == false) diff --git a/src/Umbraco.Core/Models/ContentBase.cs b/src/Umbraco.Core/Models/ContentBase.cs index 2128dc9d78..0d4e9ce789 100644 --- a/src/Umbraco.Core/Models/ContentBase.cs +++ b/src/Umbraco.Core/Models/ContentBase.cs @@ -391,7 +391,7 @@ namespace Umbraco.Core.Models #region Dirty /// - /// Overriden to include user properties. + /// Overridden to include user properties. public override void ResetDirtyProperties(bool rememberDirty) { base.ResetDirtyProperties(rememberDirty); @@ -408,14 +408,14 @@ namespace Umbraco.Core.Models } /// - /// Overriden to include user properties. + /// Overridden to include user properties. public override bool IsDirty() { return IsEntityDirty() || this.IsAnyUserPropertyDirty(); } /// - /// Overriden to include user properties. + /// Overridden to include user properties. public override bool WasDirty() { return WasEntityDirty() || this.WasAnyUserPropertyDirty(); @@ -438,7 +438,7 @@ namespace Umbraco.Core.Models } /// - /// Overriden to include user properties. + /// Overridden to include user properties. public override bool IsPropertyDirty(string propertyName) { if (base.IsPropertyDirty(propertyName)) @@ -448,7 +448,7 @@ namespace Umbraco.Core.Models } /// - /// Overriden to include user properties. + /// Overridden to include user properties. public override bool WasPropertyDirty(string propertyName) { if (base.WasPropertyDirty(propertyName)) @@ -458,7 +458,7 @@ namespace Umbraco.Core.Models } /// - /// Overriden to include user properties. + /// Overridden to include user properties. public override IEnumerable GetDirtyProperties() { var instanceProperties = base.GetDirtyProperties(); @@ -467,7 +467,7 @@ namespace Umbraco.Core.Models } /// - /// Overriden to include user properties. + /// Overridden to include user properties. public override IEnumerable GetWereDirtyProperties() { var instanceProperties = base.GetWereDirtyProperties(); @@ -479,7 +479,7 @@ namespace Umbraco.Core.Models /// /// - /// Overriden to deal with specific object instances + /// Overridden to deal with specific object instances /// protected override void PerformDeepClone(object clone) { diff --git a/src/Umbraco.Core/Models/DeepCloneHelper.cs b/src/Umbraco.Core/Models/DeepCloneHelper.cs index 44a714c2c1..6470de912b 100644 --- a/src/Umbraco.Core/Models/DeepCloneHelper.cs +++ b/src/Umbraco.Core/Models/DeepCloneHelper.cs @@ -91,7 +91,7 @@ namespace Umbraco.Core.Models || (propertyInfo.PropertyType.IsInterface && propertyInfo.PropertyType.IsGenericType == false)) { //if its an array, we'll create a list to work with first and then convert to array later - //otherwise if its just a regular derivitave of IEnumerable, we can use a list too + //otherwise if its just a regular derivative of IEnumerable, we can use a list too return new ClonePropertyInfo(propertyInfo) { GenericListType = typeof(List) }; } //skip instead of trying to create instance of abstract or interface diff --git a/src/Umbraco.Core/Models/Entities/EntityBase.cs b/src/Umbraco.Core/Models/Entities/EntityBase.cs index 5c6f943c60..6c9bf3d711 100644 --- a/src/Umbraco.Core/Models/Entities/EntityBase.cs +++ b/src/Umbraco.Core/Models/Entities/EntityBase.cs @@ -140,7 +140,7 @@ namespace Umbraco.Core.Models.Entities // same identity if // - same object (reference equals) - // - or same Clr type, both have identities, and they are identical + // - or same CLR type, both have identities, and they are identical if (ReferenceEquals(this, other)) return true; diff --git a/src/Umbraco.Core/Models/Entities/IHaveAdditionalData.cs b/src/Umbraco.Core/Models/Entities/IHaveAdditionalData.cs index e2a74db060..597856b86d 100644 --- a/src/Umbraco.Core/Models/Entities/IHaveAdditionalData.cs +++ b/src/Umbraco.Core/Models/Entities/IHaveAdditionalData.cs @@ -18,7 +18,7 @@ namespace Umbraco.Core.Models.Entities /// Gets additional data for this entity. /// /// Can be empty, but never null. To avoid allocating, do not - /// test for emptyness, but use instead. + /// test for emptiness, but use instead. IDictionary AdditionalData { get; } /// diff --git a/src/Umbraco.Core/Models/IContentTypeBase.cs b/src/Umbraco.Core/Models/IContentTypeBase.cs index 787e347b37..aea84d9767 100644 --- a/src/Umbraco.Core/Models/IContentTypeBase.cs +++ b/src/Umbraco.Core/Models/IContentTypeBase.cs @@ -68,7 +68,7 @@ namespace Umbraco.Core.Models /// /// The culture. /// The segment. - /// A value indicating whether wilcards are supported. + /// A value indicating whether wildcard are supported. /// True if the combination is valid; otherwise false. /// /// The combination must match the content type variation exactly. For instance, if the content type varies by culture, @@ -81,7 +81,7 @@ namespace Umbraco.Core.Models /// /// The culture. /// The segment. - /// A value indicating whether wilcards are supported. + /// A value indicating whether wildcard are supported. /// True if the combination is valid; otherwise false. /// /// The combination must be valid for properties of the content type. For instance, if the content type varies by culture, diff --git a/src/Umbraco.Core/Models/IContentTypeComposition.cs b/src/Umbraco.Core/Models/IContentTypeComposition.cs index 3113f795cd..84e436e46f 100644 --- a/src/Umbraco.Core/Models/IContentTypeComposition.cs +++ b/src/Umbraco.Core/Models/IContentTypeComposition.cs @@ -31,7 +31,7 @@ namespace Umbraco.Core.Models bool AddContentType(IContentTypeComposition contentType); /// - /// Removes a ContentType with the supplied alias from the the list of composite ContentTypes + /// Removes a ContentType with the supplied alias from the list of composite ContentTypes /// /// Alias of a /// True if ContentType was removed, otherwise returns False diff --git a/src/Umbraco.Core/Models/Identity/BackOfficeIdentityUser.cs b/src/Umbraco.Core/Models/Identity/BackOfficeIdentityUser.cs index 13a13e9dff..d118cd526e 100644 --- a/src/Umbraco.Core/Models/Identity/BackOfficeIdentityUser.cs +++ b/src/Umbraco.Core/Models/Identity/BackOfficeIdentityUser.cs @@ -95,7 +95,7 @@ namespace Umbraco.Core.Models.Identity } /// - /// Returns true if an Id has been set on this object this will be false if the object is new and not peristed to the database + /// Returns true if an Id has been set on this object this will be false if the object is new and not persisted to the database /// public bool HasIdentity => _hasIdentity; diff --git a/src/Umbraco.Core/Models/Identity/IIdentityUserLogin.cs b/src/Umbraco.Core/Models/Identity/IIdentityUserLogin.cs index 198f87cf21..276f601771 100644 --- a/src/Umbraco.Core/Models/Identity/IIdentityUserLogin.cs +++ b/src/Umbraco.Core/Models/Identity/IIdentityUserLogin.cs @@ -5,7 +5,7 @@ namespace Umbraco.Core.Models.Identity public interface IIdentityUserLogin : IEntity, IRememberBeingDirty { /// - /// The login provider for the login (i.e. facebook, google) + /// The login provider for the login (i.e. Facebook, Google) /// /// string LoginProvider { get; set; } diff --git a/src/Umbraco.Core/Models/Identity/IdentityUserLogin.cs b/src/Umbraco.Core/Models/Identity/IdentityUserLogin.cs index 28a9fe2f15..5876f420b4 100644 --- a/src/Umbraco.Core/Models/Identity/IdentityUserLogin.cs +++ b/src/Umbraco.Core/Models/Identity/IdentityUserLogin.cs @@ -4,7 +4,7 @@ using Umbraco.Core.Models.Entities; namespace Umbraco.Core.Models.Identity { /// - /// Entity type for a user's login (i.e. facebook, google) + /// Entity type for a user's login (i.e. Facebook, Google) /// /// public class IdentityUserLogin : EntityBase, IIdentityUserLogin @@ -26,7 +26,7 @@ namespace Umbraco.Core.Models.Identity } /// - /// The login provider for the login (i.e. facebook, google) + /// The login provider for the login (i.e. Facebook, Google) /// /// public string LoginProvider { get; set; } diff --git a/src/Umbraco.Core/Models/Media.cs b/src/Umbraco.Core/Models/Media.cs index 9c13a22caa..a0f3aa35de 100644 --- a/src/Umbraco.Core/Models/Media.cs +++ b/src/Umbraco.Core/Models/Media.cs @@ -15,7 +15,7 @@ namespace Umbraco.Core.Models /// /// Constructor for creating a Media object /// - /// ame of the Media object + /// name of the Media object /// Parent object /// MediaType for the current Media object public Media(string name, IMedia parent, IMediaType contentType) @@ -25,7 +25,7 @@ namespace Umbraco.Core.Models /// /// Constructor for creating a Media object /// - /// ame of the Media object + /// name of the Media object /// Parent object /// MediaType for the current Media object /// Collection of properties @@ -38,7 +38,7 @@ namespace Umbraco.Core.Models /// /// Constructor for creating a Media object /// - /// ame of the Media object + /// name of the Media object /// Id of the Parent IMedia /// MediaType for the current Media object public Media(string name, int parentId, IMediaType contentType) diff --git a/src/Umbraco.Core/Models/MediaExtensions.cs b/src/Umbraco.Core/Models/MediaExtensions.cs index 5cc4cc8fe5..2945856817 100644 --- a/src/Umbraco.Core/Models/MediaExtensions.cs +++ b/src/Umbraco.Core/Models/MediaExtensions.cs @@ -46,7 +46,7 @@ namespace Umbraco.Core.Models } } - // hrm, without knowing what it is, just adding a string here might not be very nice + // Without knowing what it is, just adding a string here might not be very nice return string.Empty; } diff --git a/src/Umbraco.Core/Models/Member.cs b/src/Umbraco.Core/Models/Member.cs index 38927898cf..c47f68c930 100644 --- a/src/Umbraco.Core/Models/Member.cs +++ b/src/Umbraco.Core/Models/Member.cs @@ -226,7 +226,7 @@ namespace Umbraco.Core.Models /// Gets or sets the raw password answer value /// /// - /// For security reasons this value should be encrypted, the encryption process is handled by the memberhip provider + /// For security reasons this value should be encrypted, the encryption process is handled by the membership provider /// Alias: umbracoMemberPasswordRetrievalAnswer /// /// Part of the standard properties collection. diff --git a/src/Umbraco.Core/Models/Membership/IProfile.cs b/src/Umbraco.Core/Models/Membership/IProfile.cs index 335faa6c11..7da095bb14 100644 --- a/src/Umbraco.Core/Models/Membership/IProfile.cs +++ b/src/Umbraco.Core/Models/Membership/IProfile.cs @@ -1,7 +1,7 @@ namespace Umbraco.Core.Models.Membership { /// - /// Defines the the User Profile interface + /// Defines the User Profile interface /// public interface IProfile { diff --git a/src/Umbraco.Core/Models/Membership/UserGroup.cs b/src/Umbraco.Core/Models/Membership/UserGroup.cs index db21c78438..e3e812f4c1 100644 --- a/src/Umbraco.Core/Models/Membership/UserGroup.cs +++ b/src/Umbraco.Core/Models/Membership/UserGroup.cs @@ -24,7 +24,7 @@ namespace Umbraco.Core.Models.Membership private static readonly Lazy Ps = new Lazy(); - // ReSharper disable once ClassNeverInstantiated.Local // lazy-instanciated in Ps + // ReSharper disable once ClassNeverInstantiated.Local // lazy-instantiated in Ps private class PropertySelectors { public readonly PropertyInfo NameSelector = ExpressionHelper.GetPropertyInfo(x => x.Name); diff --git a/src/Umbraco.Core/Models/ObjectTypes.cs b/src/Umbraco.Core/Models/ObjectTypes.cs index 2eb4d70a3a..dd943ee02b 100644 --- a/src/Umbraco.Core/Models/ObjectTypes.cs +++ b/src/Umbraco.Core/Models/ObjectTypes.cs @@ -76,7 +76,7 @@ namespace Umbraco.Core.Models } /// - /// Gets the Clr type corresponding to an object type Guid. + /// Gets the CLR type corresponding to an object type Guid. /// public static Type GetClrType(Guid objectType) { @@ -145,7 +145,7 @@ namespace Umbraco.Core.Models } /// - /// Gets the Clr type corresponding to this Umbraco object type. + /// Gets the CLR type corresponding to this Umbraco object type. /// public static Type GetClrType(this UmbracoObjectTypes objectType) { diff --git a/src/Umbraco.Core/Models/PropertyGroupCollection.cs b/src/Umbraco.Core/Models/PropertyGroupCollection.cs index 8b493e3118..5fe47b52a4 100644 --- a/src/Umbraco.Core/Models/PropertyGroupCollection.cs +++ b/src/Umbraco.Core/Models/PropertyGroupCollection.cs @@ -74,7 +74,7 @@ namespace Umbraco.Core.Models { _addLocker.EnterWriteLock(); - //Note this is done to ensure existig groups can be renamed + //Note this is done to ensure existing groups can be renamed if (item.HasIdentity && item.Id > 0) { var exists = Contains(item.Id); diff --git a/src/Umbraco.Core/Models/PropertyType.cs b/src/Umbraco.Core/Models/PropertyType.cs index 6373dbec9a..377e86d2e5 100644 --- a/src/Umbraco.Core/Models/PropertyType.cs +++ b/src/Umbraco.Core/Models/PropertyType.cs @@ -287,7 +287,7 @@ namespace Umbraco.Core.Models /// Converts a value assigned to a property. /// /// - /// The input value can be pretty much anything, and is converted to the actual Clr type + /// The input value can be pretty much anything, and is converted to the actual CLR type /// expected by the property (eg an integer if the property values are integers). /// Throws if the value cannot be converted. /// @@ -345,7 +345,7 @@ namespace Umbraco.Core.Models var convDecimal = value.TryConvertTo(); if (convDecimal) { - // need to normalize the value (change the scaling factor and remove trailing zeroes) + // need to normalize the value (change the scaling factor and remove trailing zeros) // because the underlying database is going to mess with the scaling factor anyways. converted = convDecimal.Result.Normalize(); return true; diff --git a/src/Umbraco.Core/Models/PublishedContent/IPublishedModelFactory.cs b/src/Umbraco.Core/Models/PublishedContent/IPublishedModelFactory.cs index 25d9643bed..ae4caf352e 100644 --- a/src/Umbraco.Core/Models/PublishedContent/IPublishedModelFactory.cs +++ b/src/Umbraco.Core/Models/PublishedContent/IPublishedModelFactory.cs @@ -24,10 +24,10 @@ namespace Umbraco.Core.Models.PublishedContent IList CreateModelList(string alias); /// - /// Maps a Clr type that may contain model types, to an actual Clr type. + /// Maps a CLR type that may contain model types, to an actual CLR type. /// - /// The Clr type. - /// The actual Clr type. + /// The CLR type. + /// The actual CLR type. /// See for more details. Type MapModelType(Type type); } diff --git a/src/Umbraco.Core/Models/PublishedContent/IPublishedProperty.cs b/src/Umbraco.Core/Models/PublishedContent/IPublishedProperty.cs index cfab82213a..9a00e94d3e 100644 --- a/src/Umbraco.Core/Models/PublishedContent/IPublishedProperty.cs +++ b/src/Umbraco.Core/Models/PublishedContent/IPublishedProperty.cs @@ -29,7 +29,7 @@ /// Gets the source value of the property. /// /// - /// The source value is whatever was passed to the property when it was instanciated, and it is + /// The source value is whatever was passed to the property when it was instantiated, and it is /// somewhat implementation-dependent -- depending on how the IPublishedCache is implemented. /// The XmlPublishedCache source values are strings exclusively since they come from the Xml cache. /// For other caches that get their source value from the database, it would be either a string, diff --git a/src/Umbraco.Core/Models/PublishedContent/ModelType.cs b/src/Umbraco.Core/Models/PublishedContent/ModelType.cs index a366742cc5..540abda2c5 100644 --- a/src/Umbraco.Core/Models/PublishedContent/ModelType.cs +++ b/src/Umbraco.Core/Models/PublishedContent/ModelType.cs @@ -9,7 +9,7 @@ namespace Umbraco.Core.Models.PublishedContent { /// /// - /// Represents the Clr type of a model. + /// Represents the CLR type of a model. /// /// /// ModelType.For("alias") @@ -43,11 +43,11 @@ namespace Umbraco.Core.Models.PublishedContent => new ModelType(alias); /// - /// Gets the actual Clr type by replacing model types, if any. + /// Gets the actual CLR type by replacing model types, if any. /// /// The type. /// The model types map. - /// The actual Clr type. + /// The actual CLR type. public static Type Map(Type type, Dictionary modelTypes) => Map(type, modelTypes, false); @@ -82,11 +82,11 @@ namespace Umbraco.Core.Models.PublishedContent } /// - /// Gets the actual Clr type name by replacing model types, if any. + /// Gets the actual CLR type name by replacing model types, if any. /// /// The type. /// The model types map. - /// The actual Clr type name. + /// The actual CLR type name. public static string MapToName(Type type, Dictionary map) => MapToName(type, map, false); diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedDataType.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedDataType.cs index f3f10e63e2..566319ab74 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedDataType.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedDataType.cs @@ -31,7 +31,7 @@ namespace Umbraco.Core.Models.PublishedContent public int Id { get; } /// - /// Gets the dat type editor alias. + /// Gets the data type editor alias. /// public string EditorAlias { get; } diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs index 1a99076b2c..0860fdb822 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs @@ -283,11 +283,11 @@ namespace Umbraco.Core.Models.PublishedContent } /// - /// Gets the property model Clr type. + /// Gets the property model CLR type. /// /// - /// The model Clr type may be a type, or may contain types. - /// For the actual Clr type, see . + /// The model CLR type may be a type, or may contain types. + /// For the actual CLR type, see . /// public Type ModelClrType { @@ -299,12 +299,12 @@ namespace Umbraco.Core.Models.PublishedContent } /// - /// Gets the property Clr type. + /// Gets the property CLR type. /// /// - /// Returns the actual Clr type which does not contain types. + /// Returns the actual CLR type which does not contain types. /// Mapping from may throw if some instances - /// could not be mapped to actual Clr types. + /// could not be mapped to actual CLR types. /// public Type ClrType { diff --git a/src/Umbraco.Core/Models/ServerRegistration.cs b/src/Umbraco.Core/Models/ServerRegistration.cs index 0e135f34d6..db0e9b8c3b 100644 --- a/src/Umbraco.Core/Models/ServerRegistration.cs +++ b/src/Umbraco.Core/Models/ServerRegistration.cs @@ -26,13 +26,13 @@ namespace Umbraco.Core.Models } /// - /// Initialiazes a new instance of the class. + /// Initializes a new instance of the class. /// public ServerRegistration() { } /// - /// Initialiazes a new instance of the class. + /// Initializes a new instance of the class. /// /// The unique id of the server registration. /// The server url. @@ -54,7 +54,7 @@ namespace Umbraco.Core.Models } /// - /// Initialiazes a new instance of the class. + /// Initializes a new instance of the class. /// /// The server url. /// The unique server identity. diff --git a/src/Umbraco.Core/Models/UmbracoObjectTypes.cs b/src/Umbraco.Core/Models/UmbracoObjectTypes.cs index ff080f2cc1..6f7272beee 100644 --- a/src/Umbraco.Core/Models/UmbracoObjectTypes.cs +++ b/src/Umbraco.Core/Models/UmbracoObjectTypes.cs @@ -5,7 +5,7 @@ using Umbraco.Core.CodeAnnotations; namespace Umbraco.Core.Models { /// - /// Enum used to represent the Umbraco Object Types and thier associated GUIDs + /// Enum used to represent the Umbraco Object Types and their associated GUIDs /// public enum UmbracoObjectTypes { diff --git a/src/Umbraco.Core/Models/UserExtensions.cs b/src/Umbraco.Core/Models/UserExtensions.cs index 19726cc5a5..e14d7ee2de 100644 --- a/src/Umbraco.Core/Models/UserExtensions.cs +++ b/src/Umbraco.Core/Models/UserExtensions.cs @@ -47,7 +47,7 @@ namespace Umbraco.Core.Models } /// - /// Tries to lookup the user's gravatar to see if the endpoint can be reached, if so it returns the valid URL + /// Tries to lookup the user's Gravatar to see if the endpoint can be reached, if so it returns the valid URL /// /// /// @@ -59,7 +59,7 @@ namespace Umbraco.Core.Models // If FIPS is required, never check the Gravatar service as it only supports MD5 hashing. // Unfortunately, if the FIPS setting is enabled on Windows, using MD5 will throw an exception // and the website will not run. - // Also, check if the user has explicitly removed all avatars including a gravatar, this will be possible and the value will be "none" + // Also, check if the user has explicitly removed all avatars including a Gravatar, this will be possible and the value will be "none" if (user.Avatar == "none" || CryptoConfig.AllowOnlyFipsAlgorithms) { return new string[0]; @@ -70,7 +70,7 @@ namespace Umbraco.Core.Models var gravatarHash = user.Email.ToMd5(); var gravatarUrl = "https://www.gravatar.com/avatar/" + gravatarHash + "?d=404"; - //try gravatar + //try Gravatar var gravatarAccess = cache.GetCacheItem("UserAvatar" + user.Id, () => { // Test if we can reach this URL, will fail when there's network or firewall errors diff --git a/src/Umbraco.Core/NetworkHelper.cs b/src/Umbraco.Core/NetworkHelper.cs index 8f310ccf0c..8f7c7c1eb8 100644 --- a/src/Umbraco.Core/NetworkHelper.cs +++ b/src/Umbraco.Core/NetworkHelper.cs @@ -38,7 +38,7 @@ namespace Umbraco.Core catch { //if we get here it means we cannot access the machine name - throw new ApplicationException("Cannot resolve the current machine name eithe by Environment.MachineName or by Dns.GetHostname()"); + throw new ApplicationException("Cannot resolve the current machine name either by Environment.MachineName or by Dns.GetHostname()"); } } } diff --git a/src/Umbraco.Core/ObjectExtensions.cs b/src/Umbraco.Core/ObjectExtensions.cs index 1bc2fb48a5..1a66cb96fb 100644 --- a/src/Umbraco.Core/ObjectExtensions.cs +++ b/src/Umbraco.Core/ObjectExtensions.cs @@ -153,7 +153,7 @@ namespace Umbraco.Core // Recursively call into this method with the inner (not-nullable) type and handle the outcome var inner = input.TryConvertTo(underlying); - // And if sucessful, fall on through to rewrap in a nullable; if failed, pass on the exception + // And if successful, fall on through to rewrap in a nullable; if failed, pass on the exception if (inner.Success) { input = inner.Result; // Now fall on through... @@ -216,7 +216,7 @@ namespace Umbraco.Core return Attempt.Succeed(input); } - // Re-check convertables since we altered the input through recursion + // Re-check convertibles since we altered the input through recursion if (input is IConvertible convertible2) { return Attempt.Succeed(Convert.ChangeType(convertible2, target)); @@ -391,7 +391,7 @@ namespace Umbraco.Core } internal static void CheckThrowObjectDisposed(this IDisposable disposable, bool isDisposed, string objectname) { - //TODO: Localise this exception + //TODO: Localize this exception if (isDisposed) throw new ObjectDisposedException(objectname); } diff --git a/src/Umbraco.Core/Packaging/CompiledPackageXmlParser.cs b/src/Umbraco.Core/Packaging/CompiledPackageXmlParser.cs index 9e6339178e..8dccf73814 100644 --- a/src/Umbraco.Core/Packaging/CompiledPackageXmlParser.cs +++ b/src/Umbraco.Core/Packaging/CompiledPackageXmlParser.cs @@ -153,7 +153,7 @@ namespace Umbraco.Core.Packaging { if (actionsElement == null) return Enumerable.Empty(); - //invariant check ... because people can realy enter anything :/ + //invariant check ... because people can really enter anything :/ if (!string.Equals("actions", actionsElement.Name.LocalName, StringComparison.InvariantCultureIgnoreCase)) throw new FormatException("Must be \"\" as root"); @@ -161,7 +161,7 @@ namespace Umbraco.Core.Packaging var actionElementName = actionsElement.Elements().First().Name.LocalName; - //invariant check ... because people can realy enter anything :/ + //invariant check ... because people can really enter anything :/ if (!string.Equals("action", actionElementName, StringComparison.InvariantCultureIgnoreCase)) throw new FormatException("Must be \" - /// This will run the uninstallation sequence for this + /// This will run the uninstall sequence for this /// /// /// diff --git a/src/Umbraco.Core/Packaging/PackageActionRunner.cs b/src/Umbraco.Core/Packaging/PackageActionRunner.cs index 38275d5f0a..dba2690c0c 100644 --- a/src/Umbraco.Core/Packaging/PackageActionRunner.cs +++ b/src/Umbraco.Core/Packaging/PackageActionRunner.cs @@ -7,7 +7,7 @@ using Umbraco.Core._Legacy.PackageActions; namespace Umbraco.Core.Packaging { /// - /// Package actions are executed on packge install / uninstall. + /// Package actions are executed on package install / uninstall. /// internal class PackageActionRunner : IPackageActionRunner { diff --git a/src/Umbraco.Core/Packaging/PackageDataInstallation.cs b/src/Umbraco.Core/Packaging/PackageDataInstallation.cs index 9bea527b91..72dc0cb325 100644 --- a/src/Umbraco.Core/Packaging/PackageDataInstallation.cs +++ b/src/Umbraco.Core/Packaging/PackageDataInstallation.cs @@ -182,7 +182,7 @@ namespace Umbraco.Core.Packaging /// Optional parent Id for the content being imported /// A dictionary of already imported document types (basically used as a cache) /// Optional Id of the user performing the import - /// An enumrable list of generated content + /// An enumerable list of generated content public IEnumerable ImportContent(CompiledPackageDocument packageDocument, int parentId, IDictionary importedDocumentTypes, int userId) { var element = packageDocument.XmlData; @@ -343,7 +343,7 @@ namespace Umbraco.Core.Packaging /// /// Xml to import /// Optional id of the User performing the operation. Default is zero (admin). - /// An enumrable list of generated ContentTypes + /// An enumerable list of generated ContentTypes public IEnumerable ImportDocumentTypes(IEnumerable docTypeElements, int userId) { return ImportDocumentTypes(docTypeElements.ToList(), true, userId); @@ -355,12 +355,12 @@ namespace Umbraco.Core.Packaging /// Xml to import /// Boolean indicating whether or not to import the /// Optional id of the User performing the operation. Default is zero (admin). - /// An enumrable list of generated ContentTypes + /// An enumerable list of generated ContentTypes public IEnumerable ImportDocumentTypes(IReadOnlyCollection unsortedDocumentTypes, bool importStructure, int userId) { var importedContentTypes = new Dictionary(); - //When you are importing a single doc type we have to assume that the depedencies are already there. + //When you are importing a single doc type we have to assume that the dependencies are already there. //Otherwise something like uSync won't work. var graph = new TopoGraph>(x => x.Key, x => x.Dependencies); var isSingleDocTypeImport = unsortedDocumentTypes.Count == 1; @@ -437,7 +437,7 @@ namespace Umbraco.Core.Packaging if (importStructure) { var updatedContentTypes = new List(); - //Update the structure here - we can't do it untill all DocTypes have been created + //Update the structure here - we can't do it until all DocTypes have been created foreach (var documentType in documentTypes) { var alias = documentType.Element("Info").Element("Alias").Value; @@ -796,7 +796,7 @@ namespace Umbraco.Core.Packaging /// /// Xml to import /// Optional id of the user - /// An enumrable list of generated DataTypeDefinitions + /// An enumerable list of generated DataTypeDefinitions public IEnumerable ImportDataTypes(IReadOnlyCollection dataTypeElements, int userId) { var dataTypes = new List(); @@ -815,7 +815,7 @@ namespace Umbraco.Core.Packaging parentId = importedFolders[dataTypeDefinitionName]; var definition = _dataTypeService.GetDataType(dataTypeDefinitionId); - //If the datatypedefinition doesn't already exist we create a new new according to the one in the package xml + //If the datatype definition doesn't already exist we create a new according to the one in the package xml if (definition == null) { var databaseType = databaseTypeAttribute?.Value.EnumParse(true) ?? ValueStorageType.Ntext; @@ -1195,7 +1195,7 @@ namespace Umbraco.Core.Packaging /// /// Xml to import /// Optional user id - /// An enumrable list of generated Templates + /// An enumerable list of generated Templates public IEnumerable ImportTemplates(IReadOnlyCollection templateElements, int userId) { var templates = new List(); diff --git a/src/Umbraco.Core/Packaging/PackageExtraction.cs b/src/Umbraco.Core/Packaging/PackageExtraction.cs index 48093da45f..d3150f4409 100644 --- a/src/Umbraco.Core/Packaging/PackageExtraction.cs +++ b/src/Umbraco.Core/Packaging/PackageExtraction.cs @@ -56,7 +56,7 @@ namespace Umbraco.Core.Packaging // Check if the file is a valid package if (alowedExtension.All(ae => ae.InvariantEquals(extension) == false)) { - throw new ArgumentException("Error - file isn't a package. only extentions: \"{string.Join(", ", alowedExtension)}\" is allowed"); + throw new ArgumentException("Error - file isn't a package. only extensions: \"{string.Join(", ", alowedExtension)}\" is allowed"); } } diff --git a/src/Umbraco.Core/Packaging/PackagesRepository.cs b/src/Umbraco.Core/Packaging/PackagesRepository.cs index 1df232f62d..dcf3b62e55 100644 --- a/src/Umbraco.Core/Packaging/PackagesRepository.cs +++ b/src/Umbraco.Core/Packaging/PackagesRepository.cs @@ -505,7 +505,7 @@ namespace Umbraco.Core.Packaging /// Converts a umbraco stylesheet to a package xml node /// /// The name of the stylesheet. - /// if set to true [incluce properties]. + /// if set to true [include properties]. /// private XElement GetStylesheetXml(string name, bool includeProperties) { diff --git a/src/Umbraco.Core/Persistence/BulkDataReader.cs b/src/Umbraco.Core/Persistence/BulkDataReader.cs index 6ede6a1859..1eaa88ee88 100644 --- a/src/Umbraco.Core/Persistence/BulkDataReader.cs +++ b/src/Umbraco.Core/Persistence/BulkDataReader.cs @@ -160,7 +160,7 @@ namespace Umbraco.Core.Persistence /// A helper method to support . /// /// - /// This methds does extensive argument checks. These errors will cause hard to diagnose exceptions in latter + /// This methods does extensive argument checks. These errors will cause hard to diagnose exceptions in latter /// processing so it is important to detect them when they can be easily associated with the code defect. /// /// diff --git a/src/Umbraco.Core/Persistence/DatabaseAnnotations/ForeignKeyAttribute.cs b/src/Umbraco.Core/Persistence/DatabaseAnnotations/ForeignKeyAttribute.cs index 35cb4a8087..fceb32d609 100644 --- a/src/Umbraco.Core/Persistence/DatabaseAnnotations/ForeignKeyAttribute.cs +++ b/src/Umbraco.Core/Persistence/DatabaseAnnotations/ForeignKeyAttribute.cs @@ -16,7 +16,7 @@ namespace Umbraco.Core.Persistence.DatabaseAnnotations internal string OnUpdate { get; set; } /// - /// Gets or sets the name of the foreign key refence + /// Gets or sets the name of the foreign key reference /// /// /// Overrides the default naming of a foreign key reference: diff --git a/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/DbIndexDefinition.cs b/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/DbIndexDefinition.cs index f447d6a560..3c6915dc34 100644 --- a/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/DbIndexDefinition.cs +++ b/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/DbIndexDefinition.cs @@ -3,7 +3,7 @@ namespace Umbraco.Core.Persistence.DatabaseModelDefinitions { /// - /// Represents a database index definition retreived by querying the database + /// Represents a database index definition retrieved by querying the database /// internal class DbIndexDefinition { diff --git a/src/Umbraco.Core/Persistence/Factories/ContentBaseFactory.cs b/src/Umbraco.Core/Persistence/Factories/ContentBaseFactory.cs index 7548574735..97e172f98f 100644 --- a/src/Umbraco.Core/Persistence/Factories/ContentBaseFactory.cs +++ b/src/Umbraco.Core/Persistence/Factories/ContentBaseFactory.cs @@ -187,7 +187,7 @@ namespace Umbraco.Core.Persistence.Factories } /// - /// Buils a dto from an IMedia item. + /// Builds a dto from an IMedia item. /// public static MediaDto BuildDto(IMedia entity) { @@ -204,7 +204,7 @@ namespace Umbraco.Core.Persistence.Factories } /// - /// Buils a dto from an IMember item. + /// Builds a dto from an IMember item. /// public static MemberDto BuildDto(IMember entity) { diff --git a/src/Umbraco.Core/Persistence/Factories/MemberTypeReadOnlyFactory.cs b/src/Umbraco.Core/Persistence/Factories/MemberTypeReadOnlyFactory.cs index cbbcb03649..8e3c7db3b0 100644 --- a/src/Umbraco.Core/Persistence/Factories/MemberTypeReadOnlyFactory.cs +++ b/src/Umbraco.Core/Persistence/Factories/MemberTypeReadOnlyFactory.cs @@ -43,7 +43,7 @@ namespace Umbraco.Core.Persistence.Factories var propertyTypes = GetPropertyTypes(dto, memberType, standardPropertyTypes); - //By Convention we add 9 stnd PropertyTypes - This is only here to support loading of types that didn't have these conventions before. + //By Convention we add 9 standard PropertyTypes - This is only here to support loading of types that didn't have these conventions before. foreach (var standardPropertyType in standardPropertyTypes) { if (dto.PropertyTypes.Any(x => x.Alias.Equals(standardPropertyType.Key))) continue; diff --git a/src/Umbraco.Core/Persistence/Factories/PropertyFactory.cs b/src/Umbraco.Core/Persistence/Factories/PropertyFactory.cs index 83b1ffa792..d83650d798 100644 --- a/src/Umbraco.Core/Persistence/Factories/PropertyFactory.cs +++ b/src/Umbraco.Core/Persistence/Factories/PropertyFactory.cs @@ -104,7 +104,7 @@ namespace Umbraco.Core.Persistence.Factories /// The properties to map /// /// out parameter indicating that one or more properties have been edited - /// out parameter containing a collection of of edited cultures when the contentVariation varies by culture + /// out parameter containing a collection of edited cultures when the contentVariation varies by culture /// public static IEnumerable BuildDtos(ContentVariation contentVariation, int currentVersionId, int publishedVersionId, IEnumerable properties, ILanguageRepository languageRepository, out bool edited, out HashSet editedCultures) diff --git a/src/Umbraco.Core/Persistence/LocalDb.cs b/src/Umbraco.Core/Persistence/LocalDb.cs index 11fa52fa48..94e930abe9 100644 --- a/src/Umbraco.Core/Persistence/LocalDb.cs +++ b/src/Umbraco.Core/Persistence/LocalDb.cs @@ -275,7 +275,7 @@ namespace Umbraco.Core.Persistence /// /// The database should not exist in the LocalDb instance. /// It will be attached with its name being its MDF filename (full path), uppercased, when - /// the first connection is opened, and remain attached until explicitely detached. + /// the first connection is opened, and remain attached until explicitly detached. /// public string GetAttachedConnectionString(string databaseName, string filesPath) { diff --git a/src/Umbraco.Core/Persistence/NPocoSqlExtensions.cs b/src/Umbraco.Core/Persistence/NPocoSqlExtensions.cs index 119c11c6ca..10735f865c 100644 --- a/src/Umbraco.Core/Persistence/NPocoSqlExtensions.cs +++ b/src/Umbraco.Core/Persistence/NPocoSqlExtensions.cs @@ -816,7 +816,7 @@ namespace Umbraco.Core.Persistence /// /// The type of the Dto to select. /// The origin Sql. - /// An expression speficying the reference. + /// An expression specifying the reference. /// An expression to apply to the Sql statement before adding the reference selection. /// The Sql statement. /// The expression applies to the Sql statement before the reference selection diff --git a/src/Umbraco.Core/Persistence/PocoDataDataReader.cs b/src/Umbraco.Core/Persistence/PocoDataDataReader.cs index 7bfc31f66c..1d7d301b87 100644 --- a/src/Umbraco.Core/Persistence/PocoDataDataReader.cs +++ b/src/Umbraco.Core/Persistence/PocoDataDataReader.cs @@ -90,7 +90,7 @@ namespace Umbraco.Core.Persistence } else { - //get the SqlDbType from the clr type + //get the SqlDbType from the CLR type sqlDbType = _sqlSyntaxProvider.GetSqlDbType(col.PropertyType); } diff --git a/src/Umbraco.Core/Persistence/Repositories/IContentTypeRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/IContentTypeRepositoryBase.cs index cc9b86c56b..69b0698a96 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IContentTypeRepositoryBase.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IContentTypeRepositoryBase.cs @@ -16,7 +16,7 @@ namespace Umbraco.Core.Persistence.Repositories /// /// The original alias. /// The original alias with a number appended to it, so that it is unique. - /// Unique accross all content, media and member types. + /// Unique across all content, media and member types. string GetUniqueAlias(string alias); diff --git a/src/Umbraco.Core/Persistence/Repositories/IPartialViewMacroRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IPartialViewMacroRepository.cs index fd83ffdfcc..b360f9b1a5 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IPartialViewMacroRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IPartialViewMacroRepository.cs @@ -1,6 +1,6 @@ namespace Umbraco.Core.Persistence.Repositories { - // this only exists to differenciate with IPartialViewRepository in IoC + // this only exists to differentiate with IPartialViewRepository in IoC // without resorting to constants, names, whatever - and IPartialViewRepository // is implemented by PartialViewRepository and IPartialViewMacroRepository by // PartialViewMacroRepository - just to inject the proper filesystem. diff --git a/src/Umbraco.Core/Persistence/Repositories/IUserGroupRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IUserGroupRepository.cs index fa4b21dbc8..85fa8d894b 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IUserGroupRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IUserGroupRepository.cs @@ -26,14 +26,14 @@ namespace Umbraco.Core.Persistence.Repositories void AddOrUpdateGroupWithUsers(IUserGroup userGroup, int[] userIds); /// - /// Gets explicilty defined permissions for the group for specified entities + /// Gets explicitly defined permissions for the group for specified entities /// /// /// Array of entity Ids, if empty will return permissions for the group for all entities EntityPermissionCollection GetPermissions(int[] groupIds, params int[] entityIds); /// - /// Gets explicilt and default permissions (if requested) permissions for the group for specified entities + /// Gets explicit and default permissions (if requested) permissions for the group for specified entities /// /// /// If true will include the group's default permissions if no permissions are explicitly assigned diff --git a/src/Umbraco.Core/Persistence/Repositories/IUserRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IUserRepository.cs index c9ed1af558..0ec7972d08 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IUserRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IUserRepository.cs @@ -51,7 +51,7 @@ namespace Umbraco.Core.Persistence.Repositories /// /// A filter to only include users that do not belong to these user groups /// - /// Optional parameter to filter by specfied user state + /// Optional parameter to filter by specified user state /// IEnumerable GetPagedResultsByQuery(IQuery query, long pageIndex, int pageSize, out long totalRecords, Expression> orderBy, Direction orderDirection = Direction.Ascending, diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs index 3cf9f50e40..8057c87578 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs @@ -515,7 +515,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement } // now we have - // - the definitinos + // - the definitions // - all property data dtos // - tag editors // and we need to build the proper property collections diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepository.cs index 773716b401..a9bb097346 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepository.cs @@ -82,7 +82,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var dtos = Database.Fetch(sql); return - //This returns a lookup from the GetAll cached looup + //This returns a lookup from the GetAll cached lookup (dtos.Any() ? GetMany(dtos.DistinctBy(x => x.ContentTypeDto.NodeId).Select(x => x.ContentTypeDto.NodeId).ToArray()) : Enumerable.Empty()) diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs index 45532fc06a..3bc730d5d0 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs @@ -103,7 +103,6 @@ namespace Umbraco.Core.Persistence.Repositories.Implement .On(left => left.DataTypeId, right => right.NodeId); var translator = new SqlTranslator(sqlClause, query); - var sql = translator.Translate() .OrderBy(x => x.PropertyTypeGroupId); @@ -121,7 +120,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { var dto = ContentTypeFactory.BuildContentTypeDto(entity); - //Cannot add a duplicate content type type + //Cannot add a duplicate content type var exists = Database.ExecuteScalar(@"SELECT COUNT(*) FROM cmsContentType INNER JOIN umbracoNode ON cmsContentType.nodeId = umbracoNode.id WHERE cmsContentType." + SqlSyntax.GetQuotedColumnName("alias") + @"= @alias @@ -1318,7 +1317,7 @@ AND umbracoNode.id <> @id", parentMediaTypeIds = new Dictionary>(); var mappedMediaTypes = new List(); - //loop through each result and fill in our required values, each row will contain different requried data than the rest. + //loop through each result and fill in our required values, each row will contain different required data than the rest. // it is much quicker to iterate each result and populate instead of looking up the values over and over in the result like // we used to do. var queue = new Queue(result); @@ -1725,7 +1724,7 @@ ORDER BY contentTypeId, groupId, id"; } /// - /// Gets all entities of the spefified type + /// Gets all entities of the specified type /// /// /// @@ -1749,7 +1748,7 @@ ORDER BY contentTypeId, groupId, id"; public string GetUniqueAlias(string alias) { - // alias is unique accross ALL content types! + // alias is unique across ALL content types! var aliasColumn = SqlSyntax.GetQuotedColumnName("alias"); var aliases = Database.Fetch(@"SELECT cmsContentType." + aliasColumn + @" FROM cmsContentType INNER JOIN umbracoNode ON cmsContentType.nodeId = umbracoNode.id diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentBlueprintRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentBlueprintRepository.cs index 09fa420f26..7176e092c9 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentBlueprintRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentBlueprintRepository.cs @@ -11,7 +11,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement /// /// /// It would be nicer if we could separate most of this down into a smaller version of the ContentRepository class, however to do that - /// requires quite a lot of work since we'd need to re-organize the interhitance quite a lot or create a helper class to perform a lot of the underlying logic. + /// requires quite a lot of work since we'd need to re-organize the inheritance quite a lot or create a helper class to perform a lot of the underlying logic. /// /// TODO: Create a helper method to contain most of the underlying logic for the ContentRepository /// diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs index 0011a384ab..344c0b9489 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs @@ -562,7 +562,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement Database.Execute(deleteDocumentVariations); // todo NPoco InsertBulk issue? - // we should use the native NPoco InsertBulk here but it causes problems (not sure exaclty all scenarios) + // we should use the native NPoco InsertBulk here but it causes problems (not sure exactly all scenarios) // but by using SQL Server and updating a variants name will cause: Unable to cast object of type // 'Umbraco.Core.Persistence.FaultHandling.RetryDbConnection' to type 'System.Data.SqlClient.SqlConnection'. // (same in PersistNewItem above) @@ -1333,7 +1333,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // variant content = update with default culture or anything really EnsureInvariantNameExists(content); - // ensure that that invariant name is unique + // ensure that invariant name is unique EnsureInvariantNameIsUnique(content); // and finally, @@ -1352,7 +1352,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement if (content.CultureInfos.Count == 0) throw new InvalidOperationException("Cannot save content with an empty name."); - // and then, we need to set the invariant name implicitely, + // and then, we need to set the invariant name implicitly, // using the default culture if it has a name, otherwise anything we can var defaultCulture = LanguageRepository.GetDefaultIsoCode(); content.Name = defaultCulture != null && content.CultureInfos.TryGetValue(defaultCulture, out var cultureName) diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MediaTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/MediaTypeRepository.cs index 4639871a4a..5287af353a 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/MediaTypeRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/MediaTypeRepository.cs @@ -85,7 +85,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var dtos = Database.Fetch(sql); return - //This returns a lookup from the GetAll cached looup + //This returns a lookup from the GetAll cached lookup (dtos.Any() ? GetMany(dtos.DistinctBy(x => x.NodeId).Select(x => x.NodeId).ToArray()) : Enumerable.Empty()) diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs index 3106a5f16e..9d7556f356 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs @@ -70,7 +70,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // check if the query is based on properties or not var wheres = query.GetWhereClauses(); - //this is a pretty rudimentary check but wil work, we just need to know if this query requires property + //this is a pretty rudimentary check but will work, we just need to know if this query requires property // level queries if (wheres.Any(x => x.Item1.Contains("cmsPropertyType"))) { @@ -583,7 +583,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // load all properties for all documents from database in 1 query - indexed by version id var properties = GetPropertyCollections(temps); - // assign properites + // assign properties foreach (var temp in temps) { temp.Content.Properties = properties[temp.VersionId]; diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberTypeRepository.cs index b81ce4010b..22a5059be7 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberTypeRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberTypeRepository.cs @@ -205,7 +205,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement entity.Icon = "icon-user"; } - //By Convention we add 9 stnd PropertyTypes to an Umbraco MemberType + //By Convention we add 9 standard PropertyTypes to an Umbraco MemberType entity.AddPropertyGroup(Constants.Conventions.Member.StandardPropertiesGroupName); var standardPropertyTypes = Constants.Conventions.Member.GetStandardPropertyTypeStubs(); foreach (var standardPropertyType in standardPropertyTypes) diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/TemplateRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/TemplateRepository.cs index fc27c38d70..a183894462 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/TemplateRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/TemplateRepository.cs @@ -480,7 +480,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement public IEnumerable GetAll(params string[] aliases) { //We must call the base (normal) GetAll method - // which is cached. This is a specialized method and unfortunatley with the params[] it + // which is cached. This is a specialized method and unfortunately with the params[] it // overlaps with the normal GetAll method. if (aliases.Any() == false) return base.GetMany(); diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/UserGroupRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/UserGroupRepository.cs index c76a5de0d0..b42060b6cc 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/UserGroupRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/UserGroupRepository.cs @@ -89,7 +89,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement /// - /// Gets explicilty defined permissions for the group for specified entities + /// Gets explicitly defined permissions for the group for specified entities /// /// /// Array of entity Ids, if empty will return permissions for the group for all entities @@ -99,7 +99,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement } /// - /// Gets explicilt and default permissions (if requested) permissions for the group for specified entities + /// Gets explicit and default permissions (if requested) permissions for the group for specified entities /// /// /// If true will include the group's default permissions if no permissions are explicitly assigned diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs index dc5e8e5d4b..2242c65256 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs @@ -169,7 +169,7 @@ ORDER BY colName"; public Guid CreateLoginSession(int userId, string requestingIpAddress, bool cleanStaleSessions = true) { - //TODO: I know this doesn't follow the normal repository conventions which would require us to crete a UserSessionRepository + //TODO: I know this doesn't follow the normal repository conventions which would require us to create a UserSessionRepository //and also business logic models for these objects but that's just so overkill for what we are doing //and now that everything is properly in a transaction (Scope) there doesn't seem to be much reason for using that anymore var now = DateTime.UtcNow; @@ -690,7 +690,7 @@ ORDER BY colName"; /// /// A filter to only include users that do not belong to these user groups /// - /// Optional parameter to filter by specfied user state + /// Optional parameter to filter by specified user state /// /// /// diff --git a/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs b/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs index 9dec7de451..d6ceeaa3e6 100644 --- a/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs +++ b/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs @@ -477,7 +477,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax var dbTypeDefinition = column.Size != default(int) ? $"{definition}({column.Size})" : definition; - //NOTE Percision is left out + //NOTE Precision is left out return dbTypeDefinition; } diff --git a/src/Umbraco.Core/PropertyEditors/ConfigurationEditorOfTConfiguration.cs b/src/Umbraco.Core/PropertyEditors/ConfigurationEditorOfTConfiguration.cs index cf007e681d..9d1193ac82 100644 --- a/src/Umbraco.Core/PropertyEditors/ConfigurationEditorOfTConfiguration.cs +++ b/src/Umbraco.Core/PropertyEditors/ConfigurationEditorOfTConfiguration.cs @@ -54,7 +54,7 @@ namespace Umbraco.Core.PropertyEditors continue; } - // if the field has its own type, instanciate it + // if the field has its own type, instantiate it try { field = (ConfigurationField) Activator.CreateInstance(attribute.Type); @@ -130,7 +130,7 @@ namespace Umbraco.Core.PropertyEditors /// The current configuration object. public virtual TConfiguration FromConfigurationEditor(IDictionary editorValues, TConfiguration configuration) { - // note - editorValue contains a mix of Clr types (string, int...) and JToken + // note - editorValue contains a mix of CLR types (string, int...) and JToken // turning everything back into a JToken... might not be fastest but is simplest // for now diff --git a/src/Umbraco.Core/PropertyEditors/ConfigurationField.cs b/src/Umbraco.Core/PropertyEditors/ConfigurationField.cs index 3acd67b0c2..ac74953230 100644 --- a/src/Umbraco.Core/PropertyEditors/ConfigurationField.cs +++ b/src/Umbraco.Core/PropertyEditors/ConfigurationField.cs @@ -65,7 +65,7 @@ namespace Umbraco.Core.PropertyEditors public string PropertyName { get; set; } /// - /// Gets or sets the property clr type of the field. + /// Gets or sets the property CLR type of the field. /// [JsonIgnore] public Type PropertyType { get; set; } diff --git a/src/Umbraco.Core/PropertyEditors/DataEditorAttribute.cs b/src/Umbraco.Core/PropertyEditors/DataEditorAttribute.cs index 9a9a105ca8..ca08127d51 100644 --- a/src/Umbraco.Core/PropertyEditors/DataEditorAttribute.cs +++ b/src/Umbraco.Core/PropertyEditors/DataEditorAttribute.cs @@ -48,7 +48,7 @@ namespace Umbraco.Core.PropertyEditors /// The friendly name of the editor. /// The view to use to render the editor. /// - /// Set to to explicitely set the view to null. + /// Set to to explicitly set the view to null. /// Otherwise, cannot be null nor empty. /// public DataEditorAttribute(string alias, EditorType type, string name, string view) @@ -129,4 +129,4 @@ namespace Umbraco.Core.PropertyEditors /// A deprecated editor is still supported but not proposed in the UI. public bool IsDeprecated { get; set; } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs b/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs index 154fbfae98..153039dedb 100644 --- a/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs @@ -93,7 +93,7 @@ namespace Umbraco.Core.PropertyEditors // mandatory and regex validators cannot be part of valueEditor.Validators because they // depend on values that are not part of the configuration, .Mandatory and .ValidationRegEx, - // so they have to be explicitely invoked here. + // so they have to be explicitly invoked here. if (required) { @@ -128,7 +128,7 @@ namespace Umbraco.Core.PropertyEditors public virtual IValueFormatValidator FormatValidator => new RegexValidator(); /// - /// If this is is true than the editor will be displayed full width without a label + /// If this is true than the editor will be displayed full width without a label /// [JsonProperty("hideLabel")] public bool HideLabel { get; set; } @@ -196,7 +196,7 @@ namespace Umbraco.Core.PropertyEditors /// /// /// - /// The current value that has been persisted to the database for this editor. This value may be usesful for + /// The current value that has been persisted to the database for this editor. This value may be useful for /// how the value then get's deserialized again to be re-persisted. In most cases it will probably not be used. /// /// @@ -318,7 +318,7 @@ namespace Umbraco.Core.PropertyEditors /// /// /// By default, this returns the value of ConvertDbToString but ensures that if the db value type is - /// NVarchar or NText, the value is returned as a CDATA fragment - elxe it's a Text fragment. + /// NVarchar or NText, the value is returned as a CDATA fragment - else it's a Text fragment. /// Returns an XText or XCData instance which must be wrapped in a element. /// If the value is empty we will not return as CDATA since that will just take up more space in the file. /// diff --git a/src/Umbraco.Core/PropertyEditors/IPropertyValueConverter.cs b/src/Umbraco.Core/PropertyEditors/IPropertyValueConverter.cs index 258febe813..f6a7cbf32f 100644 --- a/src/Umbraco.Core/PropertyEditors/IPropertyValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/IPropertyValueConverter.cs @@ -62,7 +62,7 @@ namespace Umbraco.Core.PropertyEditors /// The converter should be prepared to handle both situations. /// When source values are strings, the converter must handle empty strings, whitespace /// strings, and xml-whitespace strings appropriately, ie it should know whether to preserve - /// whitespaces. + /// white spaces. /// object ConvertSourceToIntermediate(IPublishedElement owner, PublishedPropertyType propertyType, object source, bool preview); @@ -99,7 +99,7 @@ namespace Umbraco.Core.PropertyEditors /// indicating that no value has been assigned to the property. It is up to the converter to determine /// what to return in that case: either null, or the default value... /// If successful, the result should be either null, a string, or an XPathNavigator - /// instance. Whether an xml-whitespace string should be returned as null or litterally, is + /// instance. Whether an xml-whitespace string should be returned as null or literally, is /// up to the converter. /// The converter may want to return an XML fragment that represent a part of the content tree, /// but should pay attention not to create infinite loops that would kill XPath and XSLT. diff --git a/src/Umbraco.Core/ReadLock.cs b/src/Umbraco.Core/ReadLock.cs index d575401b10..9d3ef22168 100644 --- a/src/Umbraco.Core/ReadLock.cs +++ b/src/Umbraco.Core/ReadLock.cs @@ -11,7 +11,7 @@ namespace Umbraco.Core /// /// /// Intended as an infrastructure class. - /// This is a very unefficient way to lock as it allocates one object each time we lock, + /// This is a very inefficient way to lock as it allocates one object each time we lock, /// so it's OK to use this class for things that happen once, where it is convenient, but not /// for performance-critical code! /// diff --git a/src/Umbraco.Core/Runtime/CoreRuntime.cs b/src/Umbraco.Core/Runtime/CoreRuntime.cs index 6918c9b423..13e6aae149 100644 --- a/src/Umbraco.Core/Runtime/CoreRuntime.cs +++ b/src/Umbraco.Core/Runtime/CoreRuntime.cs @@ -328,7 +328,7 @@ namespace Umbraco.Core.Runtime { // need the deep clone runtime cache provider to ensure entities are cached properly, ie // are cloned in and cloned out - no request-based cache here since no web-based context, - // is overriden by the web runtime + // is overridden by the web runtime return new AppCaches( new DeepCloneAppCache(new ObjectCacheAppCache()), diff --git a/src/Umbraco.Core/SafeCallContext.cs b/src/Umbraco.Core/SafeCallContext.cs index 357def0a97..95394409bb 100644 --- a/src/Umbraco.Core/SafeCallContext.cs +++ b/src/Umbraco.Core/SafeCallContext.cs @@ -45,8 +45,8 @@ namespace Umbraco.Core // // note // see System.Transactions - // pre 4.5.1, the TransactionScope would not flow in async, and then then introduced - // an option to store in in the LLC so that it flows + // pre 4.5.1, the TransactionScope would not flow in async, and then introduced + // an option to store in the LLC so that it flows // they are using a conditional weak table to store the data, and what they store in // LLC is the key - which is just an empty MarshalByRefObject that is created with // the transaction scope - that way, they can "clear current data" provided that diff --git a/src/Umbraco.Core/Scoping/IScopeContext.cs b/src/Umbraco.Core/Scoping/IScopeContext.cs index 093ebef4f7..0a267e67e2 100644 --- a/src/Umbraco.Core/Scoping/IScopeContext.cs +++ b/src/Umbraco.Core/Scoping/IScopeContext.cs @@ -7,7 +7,7 @@ namespace Umbraco.Core.Scoping /// /// A scope context can enlist objects that will be attached to the scope, and available /// for the duration of the scope. In addition, it can enlist actions, that will run when the - /// scope is exiting, and after the database transaction has been commited. + /// scope is exiting, and after the database transaction has been committed. public interface IScopeContext { /// diff --git a/src/Umbraco.Core/Scoping/ScopeProvider.cs b/src/Umbraco.Core/Scoping/ScopeProvider.cs index ea68a05f15..3c0fa94327 100644 --- a/src/Umbraco.Core/Scoping/ScopeProvider.cs +++ b/src/Umbraco.Core/Scoping/ScopeProvider.cs @@ -425,7 +425,7 @@ namespace Umbraco.Core.Scoping // LogHelper.Debug("CallContext: " + Environment.StackTrace); //} - // all scope instances that are currently beeing tracked + // all scope instances that are currently being tracked private static readonly object StaticScopeInfosLock = new object(); private static readonly Dictionary StaticScopeInfos = new Dictionary(); diff --git a/src/Umbraco.Core/Security/BackOfficeUserStore.cs b/src/Umbraco.Core/Security/BackOfficeUserStore.cs index 2dc14c727f..2d9469180a 100644 --- a/src/Umbraco.Core/Security/BackOfficeUserStore.cs +++ b/src/Umbraco.Core/Security/BackOfficeUserStore.cs @@ -538,7 +538,7 @@ namespace Umbraco.Core.Security /// /// /// - /// Currently we do not suport a timed lock out, when they are locked out, an admin will have to reset the status + /// Currently we do not support a timed lock out, when they are locked out, an admin will have to reset the status /// public Task GetLockoutEndDateAsync(BackOfficeIdentityUser user) { @@ -555,7 +555,7 @@ namespace Umbraco.Core.Security /// /// /// - /// Currently we do not suport a timed lock out, when they are locked out, an admin will have to reset the status + /// Currently we do not support a timed lock out, when they are locked out, an admin will have to reset the status /// public Task SetLockoutEndDateAsync(BackOfficeIdentityUser user, DateTimeOffset lockoutEnd) { diff --git a/src/Umbraco.Core/Security/MembershipProviderBase.cs b/src/Umbraco.Core/Security/MembershipProviderBase.cs index f6b2483206..633e12bcc1 100644 --- a/src/Umbraco.Core/Security/MembershipProviderBase.cs +++ b/src/Umbraco.Core/Security/MembershipProviderBase.cs @@ -522,7 +522,7 @@ namespace Umbraco.Core.Security protected abstract MembershipUser PerformCreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status); /// - /// Gets the members password if password retreival is enabled + /// Gets the members password if password retrieval is enabled /// /// /// @@ -539,7 +539,7 @@ namespace Umbraco.Core.Security } /// - /// Gets the members password if password retreival is enabled + /// Gets the members password if password retrieval is enabled /// /// /// diff --git a/src/Umbraco.Core/Security/MembershipProviderPasswordValidator.cs b/src/Umbraco.Core/Security/MembershipProviderPasswordValidator.cs index 9a1b3c5ae8..e3448db181 100644 --- a/src/Umbraco.Core/Security/MembershipProviderPasswordValidator.cs +++ b/src/Umbraco.Core/Security/MembershipProviderPasswordValidator.cs @@ -5,7 +5,7 @@ using Microsoft.AspNet.Identity; namespace Umbraco.Core.Security { /// - /// Ensure that both the normal password validator rules are processed along with the underlying memberhsip provider rules + /// Ensure that both the normal password validator rules are processed along with the underlying membership provider rules /// public class MembershipProviderPasswordValidator : PasswordValidator { diff --git a/src/Umbraco.Core/Security/UmbracoBackOfficeIdentity.cs b/src/Umbraco.Core/Security/UmbracoBackOfficeIdentity.cs index 589673d601..e9693747cf 100644 --- a/src/Umbraco.Core/Security/UmbracoBackOfficeIdentity.cs +++ b/src/Umbraco.Core/Security/UmbracoBackOfficeIdentity.cs @@ -113,7 +113,7 @@ namespace Umbraco.Core.Security /// Returns the required claim types for a back office identity /// /// - /// This does not incude the role claim type or allowed apps type since that is a collection and in theory could be empty + /// This does not include the role claim type or allowed apps type since that is a collection and in theory could be empty /// public static IEnumerable RequiredBackOfficeIdentityClaimTypes => new[] { diff --git a/src/Umbraco.Core/Serialization/NoTypeConverterJsonConverter.cs b/src/Umbraco.Core/Serialization/NoTypeConverterJsonConverter.cs index dcc084238b..b06ee870de 100644 --- a/src/Umbraco.Core/Serialization/NoTypeConverterJsonConverter.cs +++ b/src/Umbraco.Core/Serialization/NoTypeConverterJsonConverter.cs @@ -9,7 +9,7 @@ namespace Umbraco.Core.Serialization /// /// /// - /// In some cases thsi is required if your model has an explicit type converter, see: http://stackoverflow.com/a/31328131/694494 + /// In some cases this is required if your model has an explicit type converter, see: http://stackoverflow.com/a/31328131/694494 /// /// NOTE: I was going to use this for the ImageCropDataSetConverter to convert to String, which would have worked by putting this attribute: /// [JsonConverter(typeof(NoTypeConverterJsonConverter{ImageCropDataSet}))] on top of the ImageCropDataSet class, however it turns out we diff --git a/src/Umbraco.Core/Services/Changes/ContentTypeChangeTypes.cs b/src/Umbraco.Core/Services/Changes/ContentTypeChangeTypes.cs index e5298ef235..497f7d47a9 100644 --- a/src/Umbraco.Core/Services/Changes/ContentTypeChangeTypes.cs +++ b/src/Umbraco.Core/Services/Changes/ContentTypeChangeTypes.cs @@ -7,7 +7,7 @@ namespace Umbraco.Core.Services.Changes { None = 0, Create = 1, // item type has been created, no impact - RefreshMain = 2, // changed, impacts content (adding ppty or composition does NOT) + RefreshMain = 2, // changed, impacts content (adding property or composition does NOT) RefreshOther = 4, // changed, other changes Remove = 8 // item type has been removed } diff --git a/src/Umbraco.Core/Services/ContentTypeServiceExtensions.cs b/src/Umbraco.Core/Services/ContentTypeServiceExtensions.cs index 06ba1ada79..f643039dca 100644 --- a/src/Umbraco.Core/Services/ContentTypeServiceExtensions.cs +++ b/src/Umbraco.Core/Services/ContentTypeServiceExtensions.cs @@ -58,7 +58,7 @@ namespace Umbraco.Core.Services } // if it is not used then composition is possible - // hashset guarantees unicity on Id + // hashset guarantees uniqueness on Id var list = new HashSet(new DelegateEqualityComparer( (x, y) => x.Id == y.Id, x => x.Id)); @@ -141,7 +141,7 @@ namespace Umbraco.Core.Services { if (ctype == null) return Enumerable.Empty(); - // hashset guarantees unicity on Id + // hashset guarantees uniqueness on Id var all = new HashSet(new DelegateEqualityComparer( (x, y) => x.Id == y.Id, x => x.Id)); diff --git a/src/Umbraco.Core/Services/IConsentService.cs b/src/Umbraco.Core/Services/IConsentService.cs index fdcf18bc74..c6478ddd2b 100644 --- a/src/Umbraco.Core/Services/IConsentService.cs +++ b/src/Umbraco.Core/Services/IConsentService.cs @@ -37,7 +37,7 @@ namespace Umbraco.Core.Services /// Determines whether is a start pattern. /// Determines whether is a start pattern. /// Determines whether to include the history of consents. - /// Consents matching the paramters. + /// Consents matching the parameters. IEnumerable LookupConsent(string source = null, string context = null, string action = null, bool sourceStartsWith = false, bool contextStartsWith = false, bool actionStartsWith = false, bool includeHistory = false); diff --git a/src/Umbraco.Core/Services/IContentService.cs b/src/Umbraco.Core/Services/IContentService.cs index d9a8191441..3a3c43c6a0 100644 --- a/src/Umbraco.Core/Services/IContentService.cs +++ b/src/Umbraco.Core/Services/IContentService.cs @@ -182,7 +182,7 @@ namespace Umbraco.Core.Services IQuery filter = null, Ordering ordering = null); /// - /// Gets paged documents of a content content + /// Gets paged documents of a content /// /// The page number. /// The page number. @@ -303,7 +303,7 @@ namespace Umbraco.Core.Services /// Copies a document. /// /// - /// Optionaly recursively copies all children. + /// Optionally recursively copies all children. /// IContent Copy(IContent content, int parentId, bool relateToOriginal, bool recursive, int userId = 0); diff --git a/src/Umbraco.Core/Services/IContentServiceBase.cs b/src/Umbraco.Core/Services/IContentServiceBase.cs index a748e88fb4..439c55d0d0 100644 --- a/src/Umbraco.Core/Services/IContentServiceBase.cs +++ b/src/Umbraco.Core/Services/IContentServiceBase.cs @@ -1,7 +1,7 @@ namespace Umbraco.Core.Services { /// - /// Placehold for sharing logic between the content, media (and member) services + /// Placeholder for sharing logic between the content, media (and member) services /// TODO: Start sharing the logic! /// public interface IContentServiceBase : IService diff --git a/src/Umbraco.Core/Services/IDataTypeService.cs b/src/Umbraco.Core/Services/IDataTypeService.cs index 06aef3f1c7..537c0e629f 100644 --- a/src/Umbraco.Core/Services/IDataTypeService.cs +++ b/src/Umbraco.Core/Services/IDataTypeService.cs @@ -51,21 +51,21 @@ namespace Umbraco.Core.Services /// Saves an /// /// to save - /// Id of the user issueing the save + /// Id of the user issuing the save void Save(IDataType dataType, int userId = 0); /// /// Saves a collection of /// /// to save - /// Id of the user issueing the save + /// Id of the user issuing the save void Save(IEnumerable dataTypeDefinitions, int userId = 0); /// /// Saves a collection of /// /// to save - /// Id of the user issueing the save + /// Id of the user issuing the save /// Boolean indicating whether or not to raise events void Save(IEnumerable dataTypeDefinitions, int userId, bool raiseEvents); @@ -77,14 +77,14 @@ namespace Umbraco.Core.Services /// all the data that references this . /// /// to delete - /// Id of the user issueing the deletion + /// Id of the user issuing the deletion void Delete(IDataType dataType, int userId = 0); /// /// Gets a by its control Id /// /// Alias of the property editor - /// Collection of objects with a matching contorl id + /// Collection of objects with a matching control id IEnumerable GetByEditorAlias(string propertyEditorAlias); Attempt> Move(IDataType toMove, int parentId); diff --git a/src/Umbraco.Core/Services/IEntityService.cs b/src/Umbraco.Core/Services/IEntityService.cs index a9a3c0c59b..3f398cc1e9 100644 --- a/src/Umbraco.Core/Services/IEntityService.cs +++ b/src/Umbraco.Core/Services/IEntityService.cs @@ -264,7 +264,7 @@ namespace Umbraco.Core.Services UmbracoObjectTypes GetObjectType(IUmbracoEntity entity); /// - /// Gets the Clr type of an entity. + /// Gets the CLR type of an entity. /// Type GetEntityType(int id); diff --git a/src/Umbraco.Core/Services/IExternalLoginService.cs b/src/Umbraco.Core/Services/IExternalLoginService.cs index 535b797d61..a81543cf2d 100644 --- a/src/Umbraco.Core/Services/IExternalLoginService.cs +++ b/src/Umbraco.Core/Services/IExternalLoginService.cs @@ -18,7 +18,7 @@ namespace Umbraco.Core.Services /// /// Returns all logins matching the login info - generally there should only be one but in some cases - /// there might be more than one depending on if an adminstrator has been editing/removing members + /// there might be more than one depending on if an administrator has been editing/removing members /// /// /// diff --git a/src/Umbraco.Core/Services/IFileService.cs b/src/Umbraco.Core/Services/IFileService.cs index daf5d9b80c..a895eff7e1 100644 --- a/src/Umbraco.Core/Services/IFileService.cs +++ b/src/Umbraco.Core/Services/IFileService.cs @@ -130,7 +130,7 @@ namespace Umbraco.Core.Services /// /// Gets a object by its identifier. /// - /// The identifer of the template. + /// The identifier of the template. /// The object matching the identifier, or null. ITemplate GetTemplate(int id); diff --git a/src/Umbraco.Core/Services/IMediaService.cs b/src/Umbraco.Core/Services/IMediaService.cs index ce46b197a0..ce2062d08d 100644 --- a/src/Umbraco.Core/Services/IMediaService.cs +++ b/src/Umbraco.Core/Services/IMediaService.cs @@ -109,7 +109,7 @@ namespace Umbraco.Core.Services IQuery filter = null, Ordering ordering = null); /// - /// Gets paged documents of a content content + /// Gets paged documents of a content /// /// The page number. /// The page number. @@ -179,7 +179,7 @@ namespace Umbraco.Core.Services /// /// This needs extra care and attention as its potentially a dangerous and extensive operation /// Ids of the s - /// Optional Id of the user issueing the delete operation + /// Optional Id of the user issuing the delete operation void DeleteMediaOfTypes(IEnumerable mediaTypeIds, int userId = 0); /// diff --git a/src/Umbraco.Core/Services/IMembershipMemberService.cs b/src/Umbraco.Core/Services/IMembershipMemberService.cs index 23d0fc2765..448b0c761a 100644 --- a/src/Umbraco.Core/Services/IMembershipMemberService.cs +++ b/src/Umbraco.Core/Services/IMembershipMemberService.cs @@ -9,7 +9,7 @@ namespace Umbraco.Core.Services /// Defines part of the MemberService, which is specific to methods used by the membership provider. /// /// - /// Idea is to have this is an isolated interface so that it can be easily 'replaced' in the membership provider impl. + /// Idea is to have this as an isolated interface so that it can be easily 'replaced' in the membership provider implementation. /// public interface IMembershipMemberService : IMembershipMemberService, IMembershipRoleService { @@ -29,7 +29,7 @@ namespace Umbraco.Core.Services /// either for the MemberService or for the UserService. /// /// - /// Idea is to have this is an isolated interface so that it can be easily 'replaced' in the membership provider impl. + /// Idea is to have this as an isolated interface so that it can be easily 'replaced' in the membership provider implementation. /// public interface IMembershipMemberService : IService where T : class, IMembershipUser diff --git a/src/Umbraco.Core/Services/IUserService.cs b/src/Umbraco.Core/Services/IUserService.cs index a926ce32aa..35a3be9eac 100644 --- a/src/Umbraco.Core/Services/IUserService.cs +++ b/src/Umbraco.Core/Services/IUserService.cs @@ -137,7 +137,7 @@ namespace Umbraco.Core.Services /// /// If no permissions are found for a particular entity then the user's default permissions will be applied /// User to retrieve permissions for - /// Specifiying nothing will return all user permissions for all nodes that have explicit permissions defined + /// Specifying nothing will return all user permissions for all nodes that have explicit permissions defined /// An enumerable list of /// /// This will return the default permissions for the user's groups for node ids that don't have explicitly defined permissions @@ -151,7 +151,7 @@ namespace Umbraco.Core.Services /// /// Flag indicating if we want to include the default group permissions for each result if there are not explicit permissions set /// - /// Specifiying nothing will return all permissions for all nodes + /// Specifying nothing will return all permissions for all nodes /// An enumerable list of EntityPermissionCollection GetPermissions(IUserGroup[] groups, bool fallbackToDefaultPermissions, params int[] nodeIds); diff --git a/src/Umbraco.Core/Services/Implement/ContentService.cs b/src/Umbraco.Core/Services/Implement/ContentService.cs index 9223793269..e1304a324f 100644 --- a/src/Umbraco.Core/Services/Implement/ContentService.cs +++ b/src/Umbraco.Core/Services/Implement/ContentService.cs @@ -519,7 +519,7 @@ namespace Umbraco.Core.Services.Implement /// An Enumerable list of objects public IEnumerable GetAncestors(int id) { - // intentionnaly not locking + // intentionally not locking var content = GetById(id); return GetAncestors(content); } @@ -628,7 +628,7 @@ namespace Umbraco.Core.Services.Implement /// Parent object public IContent GetParent(int id) { - // intentionnaly not locking + // intentionally not locking var content = GetById(id); return GetParent(content); } @@ -722,9 +722,9 @@ namespace Umbraco.Core.Services.Implement } /// - /// Checks if the passed in can be published based on the anscestors publish state. + /// Checks if the passed in can be published based on the ancestors publish state. /// - /// to check if anscestors are published + /// to check if ancestors are published /// True if the Content can be published, otherwise False public bool IsPathPublishable(IContent content) { @@ -875,7 +875,7 @@ namespace Umbraco.Core.Services.Implement // if culture is specific, first publish the invariant values, then publish the culture itself. // if culture is '*', then publish them all (including variants) - // explicitely SaveAndPublish a specific culture also publishes invariant values + // explicitly SaveAndPublish a specific culture also publishes invariant values if (!culture.IsNullOrWhiteSpace() && culture != "*") { // publish the invariant values @@ -1112,7 +1112,7 @@ namespace Umbraco.Core.Services.Implement } // if was not published and now is... descendants that were 'published' (but - // had an unpublished ancestor) are 're-published' ie not explicitely published + // had an unpublished ancestor) are 're-published' ie not explicitly published // but back as 'published' nevertheless if (!branchOne && isNew == false && previouslyPublished == false && HasChildren(content.Id)) { @@ -1833,7 +1833,7 @@ namespace Umbraco.Core.Services.Implement return OperationResult.Cancel(evtMsgs); } - // emptying the recycle bin means deleting whetever is in there - do it properly! + // emptying the recycle bin means deleting whatever is in there - do it properly! var query = Query().Where(x => x.ParentId == Constants.System.RecycleBinContent); var contents = _documentRepository.Get(query).ToArray(); foreach (var content in contents) @@ -1983,8 +1983,8 @@ namespace Umbraco.Core.Services.Implement /// Sends an to Publication, which executes handlers and events for the 'Send to Publication' action. /// /// The to send to publication - /// Optional Id of the User issueing the send to publication - /// True if sending publication was succesfull otherwise false + /// Optional Id of the User issuing the send to publication + /// True if sending publication was successful otherwise false public bool SendToPublication(IContent content, int userId = 0) { using (var scope = ScopeProvider.CreateScope()) @@ -2550,7 +2550,7 @@ namespace Umbraco.Core.Services.Implement /// inheritance and compositions, which need to be managed outside of this method. /// /// Id of the - /// Optional Id of the user issueing the delete operation + /// Optional Id of the user issuing the delete operation public void DeleteOfTypes(IEnumerable contentTypeIds, int userId = 0) { //TODO: This currently this is called from the ContentTypeService but that needs to change, diff --git a/src/Umbraco.Core/Services/Implement/ContentTypeService.cs b/src/Umbraco.Core/Services/Implement/ContentTypeService.cs index fa818496ff..206f11e5b0 100644 --- a/src/Umbraco.Core/Services/Implement/ContentTypeService.cs +++ b/src/Umbraco.Core/Services/Implement/ContentTypeService.cs @@ -43,47 +43,47 @@ namespace Umbraco.Core.Services.Implement } /// - /// Gets all property type aliases accross content, media and member types. + /// Gets all property type aliases across content, media and member types. /// /// All property type aliases. - /// Beware! Works accross content, media and member types. + /// Beware! Works across content, media and member types. public IEnumerable GetAllPropertyTypeAliases() { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - // that one is special because it works accross content, media and member types + // that one is special because it works across content, media and member types scope.ReadLock(Constants.Locks.ContentTypes, Constants.Locks.MediaTypes, Constants.Locks.MemberTypes); return Repository.GetAllPropertyTypeAliases(); } } /// - /// Gets all content type aliases accross content, media and member types. + /// Gets all content type aliases across content, media and member types. /// /// Optional object types guid to restrict to content, and/or media, and/or member types. /// All content type aliases. - /// Beware! Works accross content, media and member types. + /// Beware! Works across content, media and member types. public IEnumerable GetAllContentTypeAliases(params Guid[] guids) { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - // that one is special because it works accross content, media and member types + // that one is special because it works across content, media and member types scope.ReadLock(Constants.Locks.ContentTypes, Constants.Locks.MediaTypes, Constants.Locks.MemberTypes); return Repository.GetAllContentTypeAliases(guids); } } /// - /// Gets all content type id for aliases accross content, media and member types. + /// Gets all content type id for aliases across content, media and member types. /// /// Aliases to look for. /// All content type ids. - /// Beware! Works accross content, media and member types. + /// Beware! Works across content, media and member types. public IEnumerable GetAllContentTypeIds(string[] aliases) { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - // that one is special because it works accross content, media and member types + // that one is special because it works across content, media and member types scope.ReadLock(Constants.Locks.ContentTypes, Constants.Locks.MediaTypes, Constants.Locks.MemberTypes); return Repository.GetAllContentTypeIds(aliases); } diff --git a/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs b/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs index 234fa0b1e0..a9e75e6f29 100644 --- a/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs +++ b/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs @@ -125,7 +125,7 @@ namespace Umbraco.Core.Services.Implement // note // this is meant to run *after* uow.Commit() so must use WasPropertyDirty() everywhere - // instead of IsPropertyDirty() since dirty properties have been resetted already + // instead of IsPropertyDirty() since dirty properties have been reset already var changes = new List>(); diff --git a/src/Umbraco.Core/Services/Implement/DataTypeService.cs b/src/Umbraco.Core/Services/Implement/DataTypeService.cs index 16b0dfd953..b97c3a3ee7 100644 --- a/src/Umbraco.Core/Services/Implement/DataTypeService.cs +++ b/src/Umbraco.Core/Services/Implement/DataTypeService.cs @@ -262,7 +262,7 @@ namespace Umbraco.Core.Services.Implement /// Gets a by its control Id /// /// Alias of the property editor - /// Collection of objects with a matching contorl id + /// Collection of objects with a matching control id public IEnumerable GetByEditorAlias(string propertyEditorAlias) { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) @@ -330,7 +330,7 @@ namespace Umbraco.Core.Services.Implement /// Saves an /// /// to save - /// Id of the user issueing the save + /// Id of the user issuing the save public void Save(IDataType dataType, int userId = 0) { dataType.CreatorId = userId; @@ -362,7 +362,7 @@ namespace Umbraco.Core.Services.Implement /// Saves a collection of /// /// to save - /// Id of the user issueing the save + /// Id of the user issuing the save public void Save(IEnumerable dataTypeDefinitions, int userId = 0) { Save(dataTypeDefinitions, userId, true); @@ -372,7 +372,7 @@ namespace Umbraco.Core.Services.Implement /// Saves a collection of /// /// to save - /// Id of the user issueing the save + /// Id of the user issuing the save /// Boolean indicating whether or not to raise events public void Save(IEnumerable dataTypeDefinitions, int userId, bool raiseEvents) { @@ -412,7 +412,7 @@ namespace Umbraco.Core.Services.Implement /// all the data that references this . /// /// to delete - /// Optional Id of the user issueing the deletion + /// Optional Id of the user issuing the deletion public void Delete(IDataType dataType, int userId = 0) { using (var scope = ScopeProvider.CreateScope()) @@ -444,7 +444,7 @@ namespace Umbraco.Core.Services.Implement // so... we are modifying content types here. the service will trigger Deleted event, // which will propagate to DataTypeCacheRefresher which will clear almost every cache // there is to clear... and in addition published snapshot caches will clear themselves too, so - // this is probably safe alghough it looks... weird. + // this is probably safe although it looks... weird. // // what IS weird is that a content type is losing a property and we do NOT raise any // content type event... so ppl better listen on the data type events too. diff --git a/src/Umbraco.Core/Services/Implement/ExternalLoginService.cs b/src/Umbraco.Core/Services/Implement/ExternalLoginService.cs index 59f031ad6e..aedf3874dd 100644 --- a/src/Umbraco.Core/Services/Implement/ExternalLoginService.cs +++ b/src/Umbraco.Core/Services/Implement/ExternalLoginService.cs @@ -36,7 +36,7 @@ namespace Umbraco.Core.Services.Implement /// /// Returns all logins matching the login info - generally there should only be one but in some cases - /// there might be more than one depending on if an adminstrator has been editing/removing members + /// there might be more than one depending on if an administrator has been editing/removing members /// /// /// diff --git a/src/Umbraco.Core/Services/Implement/FileService.cs b/src/Umbraco.Core/Services/Implement/FileService.cs index bbf5a687a8..da82d38e36 100644 --- a/src/Umbraco.Core/Services/Implement/FileService.cs +++ b/src/Umbraco.Core/Services/Implement/FileService.cs @@ -434,7 +434,7 @@ namespace Umbraco.Core.Services.Implement /// /// Gets a object by its identifier. /// - /// The identifer of the template. + /// The identifier of the template. /// The object matching the identifier, or null. public ITemplate GetTemplate(int id) { diff --git a/src/Umbraco.Core/Services/Implement/LocalizationService.cs b/src/Umbraco.Core/Services/Implement/LocalizationService.cs index c972b949d6..678ea10da2 100644 --- a/src/Umbraco.Core/Services/Implement/LocalizationService.cs +++ b/src/Umbraco.Core/Services/Implement/LocalizationService.cs @@ -442,7 +442,7 @@ namespace Umbraco.Core.Services.Implement /// /// This is here to take care of a hack - the DictionaryTranslation model contains an ILanguage reference which we don't want but /// we cannot remove it because it would be a large breaking change, so we need to make sure it's resolved lazily. This is because - /// if developers have a lot of dictionary items and translations, the caching and cloning size gets much much larger because of + /// if developers have a lot of dictionary items and translations, the caching and cloning size gets much larger because of /// the large object graphs. So now we don't cache or clone the attached ILanguage /// private void EnsureDictionaryItemLanguageCallback(IDictionaryItem d) diff --git a/src/Umbraco.Core/Services/Implement/LocalizedTextService.cs b/src/Umbraco.Core/Services/Implement/LocalizedTextService.cs index 923b9994d1..9401cefa7d 100644 --- a/src/Umbraco.Core/Services/Implement/LocalizedTextService.cs +++ b/src/Umbraco.Core/Services/Implement/LocalizedTextService.cs @@ -111,7 +111,7 @@ namespace Umbraco.Core.Services.Implement //convert all areas + keys to a single key with a '/' result = GetStoredTranslations(xmlSource, culture); - //merge with the english file in case there's keys in there that don't exist in the local file + //merge with the English file in case there's keys in there that don't exist in the local file var englishCulture = new CultureInfo("en-US"); if (culture.Equals(englishCulture) == false) { diff --git a/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs b/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs index 430c2b3d3c..f19dd9f63e 100644 --- a/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs +++ b/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs @@ -181,7 +181,7 @@ namespace Umbraco.Core.Services.Implement if (xMasterDoc.Root == null) return; if (_supplementFileSources != null) { - //now load in suplementary + //now load in supplementary var found = _supplementFileSources.Where(x => { var fileName = Path.GetFileName(x.File.FullName); diff --git a/src/Umbraco.Core/Services/Implement/MediaService.cs b/src/Umbraco.Core/Services/Implement/MediaService.cs index 4c5fea0baa..357352c182 100644 --- a/src/Umbraco.Core/Services/Implement/MediaService.cs +++ b/src/Umbraco.Core/Services/Implement/MediaService.cs @@ -451,7 +451,7 @@ namespace Umbraco.Core.Services.Implement /// An Enumerable list of objects public IEnumerable GetAncestors(int id) { - // intentionnaly not locking + // intentionally not locking var media = GetById(id); return GetAncestors(media); } @@ -547,7 +547,7 @@ namespace Umbraco.Core.Services.Implement /// Parent object public IMedia GetParent(int id) { - // intentionnaly not locking + // intentionally not locking var media = GetById(id); return GetParent(media); } @@ -1045,7 +1045,7 @@ namespace Umbraco.Core.Services.Implement // v7 EmptyingRecycleBin and EmptiedRecycleBin events are greatly simplified since // each deleted items will have its own deleting/deleted events. so, files and such - // emptying the recycle bin means deleting whetever is in there - do it properly! + // emptying the recycle bin means deleting whatever is in there - do it properly! // are managed by Delete, and not here. // no idea what those events are for, keep a simplified version var args = new RecycleBinEventArgs(nodeObjectType, evtMsgs); @@ -1055,7 +1055,7 @@ namespace Umbraco.Core.Services.Implement scope.Complete(); return OperationResult.Cancel(evtMsgs); } - // emptying the recycle bin means deleting whetever is in there - do it properly! + // emptying the recycle bin means deleting whatever is in there - do it properly! var query = Query().Where(x => x.ParentId == Constants.System.RecycleBinMedia); var medias = _mediaRepository.Get(query).ToArray(); foreach (var media in medias) diff --git a/src/Umbraco.Core/Services/Implement/MemberGroupService.cs b/src/Umbraco.Core/Services/Implement/MemberGroupService.cs index d9ae7e4261..b07bb61dc1 100644 --- a/src/Umbraco.Core/Services/Implement/MemberGroupService.cs +++ b/src/Umbraco.Core/Services/Implement/MemberGroupService.cs @@ -23,7 +23,7 @@ namespace Umbraco.Core.Services.Implement MemberGroupRepository.SavingMemberGroup += MemberGroupRepository_SavingMemberGroup; } - #region Proxied event handlers + #region Proxy event handlers void MemberGroupRepository_SavingMemberGroup(IMemberGroupRepository sender, SaveEventArgs e) { diff --git a/src/Umbraco.Core/Services/Implement/NotificationService.cs b/src/Umbraco.Core/Services/Implement/NotificationService.cs index 214882a8f2..a4aedec438 100644 --- a/src/Umbraco.Core/Services/Implement/NotificationService.cs +++ b/src/Umbraco.Core/Services/Implement/NotificationService.cs @@ -77,7 +77,7 @@ namespace Umbraco.Core.Services.Implement //exit if there are no entities if (entitiesL.Count == 0) return; - //put all entity's paths into a list with the same indicies + //put all entity's paths into a list with the same indices var paths = entitiesL.Select(x => x.Path.Split(',').Select(int.Parse).ToArray()).ToArray(); // lazily get versions @@ -301,7 +301,7 @@ namespace Umbraco.Core.Services.Implement { if (!_contentSection.DisableHtmlEmail) { - //create the html summary for invariant content + //create the HTML summary for invariant content //list all of the property values like we used to summary.Append("
"); @@ -318,7 +318,7 @@ namespace Umbraco.Core.Services.Implement var oldProperty = oldDoc.Properties[p.PropertyType.Alias]; oldText = oldProperty.GetValue() != null ? oldProperty.GetValue().ToString() : ""; - // replace html with char equivalent + // replace HTML with char equivalent ReplaceHtmlSymbols(ref oldText); ReplaceHtmlSymbols(ref newText); } @@ -343,7 +343,7 @@ namespace Umbraco.Core.Services.Implement if (!_contentSection.DisableHtmlEmail) { - //Create the html based summary (ul of culture names) + //Create the HTML based summary (ul of culture names) var culturesChanged = content.CultureInfos.Where(x => x.Value.WasDirty()) .Select(x => x.Key) diff --git a/src/Umbraco.Core/Services/Implement/PackagingService.cs b/src/Umbraco.Core/Services/Implement/PackagingService.cs index 24ef818624..9c4c6290a9 100644 --- a/src/Umbraco.Core/Services/Implement/PackagingService.cs +++ b/src/Umbraco.Core/Services/Implement/PackagingService.cs @@ -69,10 +69,10 @@ namespace Umbraco.Core.Services.Implement } catch (HttpRequestException ex) { - throw new ConnectionException("An error occuring downloading the package from " + url, ex); + throw new ConnectionException("An error occurring downloading the package from " + url, ex); } - //successfull + //successful if (bytes.Length > 0) { var packagePath = IOHelper.MapPath(SystemDirectories.Packages); diff --git a/src/Umbraco.Core/Services/Implement/RelationService.cs b/src/Umbraco.Core/Services/Implement/RelationService.cs index 4d610da4f9..dc9693766f 100644 --- a/src/Umbraco.Core/Services/Implement/RelationService.cs +++ b/src/Umbraco.Core/Services/Implement/RelationService.cs @@ -381,7 +381,7 @@ namespace Umbraco.Core.Services.Implement /// The created public IRelation Relate(int parentId, int childId, IRelationType relationType) { - // Ensure that the RelationType has an indentity before using it to relate two entities + // Ensure that the RelationType has an identity before using it to relate two entities if (relationType.HasIdentity == false) Save(relationType); diff --git a/src/Umbraco.Core/Services/Implement/UserService.cs b/src/Umbraco.Core/Services/Implement/UserService.cs index 4d01b97ad8..1a88464231 100644 --- a/src/Umbraco.Core/Services/Implement/UserService.cs +++ b/src/Umbraco.Core/Services/Implement/UserService.cs @@ -929,7 +929,7 @@ namespace Umbraco.Core.Services.Implement /// Get explicitly assigned permissions for a user and optional node ids /// /// User to retrieve permissions for - /// Specifiying nothing will return all permissions for all nodes + /// Specifying nothing will return all permissions for all nodes /// An enumerable list of public EntityPermissionCollection GetPermissions(IUser user, params int[] nodeIds) { @@ -946,7 +946,7 @@ namespace Umbraco.Core.Services.Implement /// /// Flag indicating if we want to include the default group permissions for each result if there are not explicit permissions set /// - /// Specifiying nothing will return all permissions for all nodes + /// Specifying nothing will return all permissions for all nodes /// An enumerable list of private IEnumerable GetPermissions(IReadOnlyUserGroup[] groups, bool fallbackToDefaultPermissions, params int[] nodeIds) { @@ -965,7 +965,7 @@ namespace Umbraco.Core.Services.Implement /// /// Flag indicating if we want to include the default group permissions for each result if there are not explicit permissions set /// - /// Specifiying nothing will return all permissions for all nodes + /// Specifying nothing will return all permissions for all nodes /// An enumerable list of public EntityPermissionCollection GetPermissions(IUserGroup[] groups, bool fallbackToDefaultPermissions, params int[] nodeIds) { @@ -1073,7 +1073,7 @@ namespace Umbraco.Core.Services.Implement { if (entityPermission.IsDefaultPermissions == false) { - //explicit permision found so we'll append it and move on, the collection is a hashset anyways + //explicit permission found so we'll append it and move on, the collection is a hashset anyways //so only supports adding one element per groupid/contentid resultPermissions.Add(entityPermission); added = true; diff --git a/src/Umbraco.Core/Services/LocalizedTextServiceExtensions.cs b/src/Umbraco.Core/Services/LocalizedTextServiceExtensions.cs index b41e7739ba..51fdb7e8e3 100644 --- a/src/Umbraco.Core/Services/LocalizedTextServiceExtensions.cs +++ b/src/Umbraco.Core/Services/LocalizedTextServiceExtensions.cs @@ -56,7 +56,7 @@ namespace Umbraco.Core.Services } /// - /// Convert an array of strings to a dictionary of indicies -> values + /// Convert an array of strings to a dictionary of indices -> values /// /// /// diff --git a/src/Umbraco.Core/Services/OperationResultType.cs b/src/Umbraco.Core/Services/OperationResultType.cs index 01d0434b87..8ad24aafb8 100644 --- a/src/Umbraco.Core/Services/OperationResultType.cs +++ b/src/Umbraco.Core/Services/OperationResultType.cs @@ -5,7 +5,7 @@ /// public enum OperationResultType : byte { - // all "ResultType" enums must be byte-based, and declare Failed = 128, and declare + // all "ResultType" enum's must be byte-based, and declare Failed = 128, and declare // every failure codes as >128 - see OperationResult and OperationResultType for details. /// diff --git a/src/Umbraco.Core/Services/PublishResultType.cs b/src/Umbraco.Core/Services/PublishResultType.cs index acf2b43951..418e5c0896 100644 --- a/src/Umbraco.Core/Services/PublishResultType.cs +++ b/src/Umbraco.Core/Services/PublishResultType.cs @@ -5,7 +5,7 @@ /// public enum PublishResultType : byte { - // all "ResultType" enums must be byte-based, and declare Failed = 128, and declare + // all "ResultType" enum's must be byte-based, and declare Failed = 128, and declare // every failure codes as >128 - see OperationResult and OperationResultType for details. #region Success - Publish diff --git a/src/Umbraco.Core/Services/UserServiceExtensions.cs b/src/Umbraco.Core/Services/UserServiceExtensions.cs index 7e392ffb39..31c446352e 100644 --- a/src/Umbraco.Core/Services/UserServiceExtensions.cs +++ b/src/Umbraco.Core/Services/UserServiceExtensions.cs @@ -27,7 +27,7 @@ namespace Umbraco.Core.Services /// /// Flag indicating if we want to include the default group permissions for each result if there are not explicit permissions set /// - /// Specifiying nothing will return all permissions for all nodes + /// Specifying nothing will return all permissions for all nodes /// An enumerable list of public static EntityPermissionCollection GetPermissions(this IUserService service, IUserGroup group, bool fallbackToDefaultPermissions, params int[] nodeIds) { diff --git a/src/Umbraco.Core/StringExtensions.cs b/src/Umbraco.Core/StringExtensions.cs index b6a1103097..463e5a6a5c 100644 --- a/src/Umbraco.Core/StringExtensions.cs +++ b/src/Umbraco.Core/StringExtensions.cs @@ -82,7 +82,7 @@ namespace Umbraco.Core } /// - /// Based on the input string, this will detect if the strnig is a JS path or a JS snippet. + /// Based on the input string, this will detect if the string is a JS path or a JS snippet. /// If a path cannot be determined, then it is assumed to be a snippet the original text is returned /// with an invalid attempt, otherwise a valid attempt is returned with the resolved path /// @@ -197,7 +197,7 @@ namespace Umbraco.Core /// public static string CleanForXss(this string input, params char[] ignoreFromClean) { - //remove any html + //remove any HTML input = input.StripHtml(); //strip out any potential chars involved with XSS return input.ExceptChars(new HashSet(CleanForXssChars.Except(ignoreFromClean))); @@ -314,7 +314,7 @@ namespace Umbraco.Core return decryptedValue.ToString(); } - //this is from SqlMetal and just makes it a bit of fun to allow pluralisation + //this is from SqlMetal and just makes it a bit of fun to allow pluralization public static string MakePluralName(this string name) { if ((name.EndsWith("x", StringComparison.OrdinalIgnoreCase) || name.EndsWith("ch", StringComparison.OrdinalIgnoreCase)) || (name.EndsWith("s", StringComparison.OrdinalIgnoreCase) || name.EndsWith("sh", StringComparison.OrdinalIgnoreCase))) @@ -532,10 +532,10 @@ namespace Umbraco.Core } /// - /// Strips all html from a string. + /// Strips all HTML from a string. /// /// The text. - /// Returns the string without any html tags. + /// Returns the string without any HTML tags. public static string StripHtml(this string text) { const string pattern = @"<(.|\n)*?>"; @@ -723,7 +723,7 @@ namespace Umbraco.Core /// /// Generates a hash of a string based on the FIPS compliance setting. /// - /// Referrs to itself + /// Refers to itself /// The hashed string public static string GenerateHash(this string str) { @@ -735,7 +735,7 @@ namespace Umbraco.Core /// /// Converts the string to MD5 /// - /// Referrs to itself + /// Refers to itself /// The MD5 hashed string public static string ToMd5(this string stringToConvert) { @@ -745,7 +745,7 @@ namespace Umbraco.Core /// /// Converts the string to SHA1 /// - /// referrs to itself + /// refers to itself /// The SHA1 hashed string public static string ToSHA1(this string stringToConvert) { @@ -754,7 +754,7 @@ namespace Umbraco.Core /// Generate a hash of a string based on the hashType passed in /// - /// Referrs to itself + /// Refers to itself /// String with the hash type. See remarks section of the CryptoConfig Class in MSDN docs for a list of possible values. /// The hashed string private static string GenerateHash(this string str, string hashType) @@ -773,7 +773,7 @@ namespace Umbraco.Core //create a StringBuilder object var stringBuilder = new StringBuilder(); - //loop to each each byte + //loop to each byte foreach (var b in hashedByteArray) { //append it to our StringBuilder @@ -1034,7 +1034,7 @@ namespace Umbraco.Core } /// - /// Returns a new string in which all occurences of specified strings are replaced by other specified strings. + /// Returns a new string in which all occurrences of specified strings are replaced by other specified strings. /// /// The string to filter. /// The replacements definition. @@ -1052,7 +1052,7 @@ namespace Umbraco.Core } /// - /// Returns a new string in which all occurences of specified characters are replaced by a specified character. + /// Returns a new string in which all occurrences of specified characters are replaced by a specified character. /// /// The string to filter. /// The characters to replace. @@ -1219,7 +1219,7 @@ namespace Umbraco.Core /// Splits a Pascal cased string into a phrase separated by spaces. /// /// The text to split. - /// The splitted text. + /// The split text. public static string SplitPascalCasing(this string phrase) { return Current.ShortStringHelper.SplitPascalCasing(phrase, ' '); @@ -1270,7 +1270,7 @@ namespace Umbraco.Core /// Updated string public static string Replace(this string source, string oldString, string newString, StringComparison stringComparison) { - // This initialisation ensures the first check starts at index zero of the source. On successive checks for + // This initialization ensures the first check starts at index zero of the source. On successive checks for // a match, the source is skipped to immediately after the last replaced occurrence for efficiency // and to avoid infinite loops when oldString and newString compare equal. int index = -1 * newString.Length; @@ -1281,7 +1281,7 @@ namespace Umbraco.Core // Remove the old text. source = source.Remove(index, oldString.Length); - // Add the replacemenet text. + // Add the replacement text. source = source.Insert(index, newString); } @@ -1357,7 +1357,7 @@ namespace Umbraco.Core /// /// The string to check /// The collection of strings to check are contained within the first string - /// The type of comparision to perform - defaults to + /// The type of comparison to perform - defaults to /// True if any of the needles are contained with haystack; otherwise returns false /// Added fix to ensure the comparison is used - see http://issues.umbraco.org/issue/U4-11313 public static bool ContainsAny(this string haystack, IEnumerable needles, StringComparison comparison = StringComparison.CurrentCulture) diff --git a/src/Umbraco.Core/Strings/DefaultShortStringHelper.cs b/src/Umbraco.Core/Strings/DefaultShortStringHelper.cs index 84ab0de585..6361186604 100644 --- a/src/Umbraco.Core/Strings/DefaultShortStringHelper.cs +++ b/src/Umbraco.Core/Strings/DefaultShortStringHelper.cs @@ -47,7 +47,7 @@ namespace Umbraco.Core.Strings #region Filters - // ok to be static here because it's not configureable in any way + // ok to be static here because it's not configurable in any way private static readonly char[] InvalidFileNameChars = Path.GetInvalidFileNameChars() .Union("!*'();:@&=+$,/?%#[]-~{}\"<>\\^`| ".ToCharArray()) @@ -574,7 +574,7 @@ namespace Umbraco.Core.Strings /// /// The text to split. /// The separator, which defaults to a whitespace. - /// The splitted text. + /// The split text. /// Supports Utf8 and Ascii strings, not Unicode strings. // NOTE does not support surrogates pairs at the moment public virtual string SplitPascalCasing(string text, char separator) diff --git a/src/Umbraco.Core/Strings/DefaultShortStringHelperConfig.cs b/src/Umbraco.Core/Strings/DefaultShortStringHelperConfig.cs index 2bbade0fd8..f75b8e4d1f 100644 --- a/src/Umbraco.Core/Strings/DefaultShortStringHelperConfig.cs +++ b/src/Umbraco.Core/Strings/DefaultShortStringHelperConfig.cs @@ -188,7 +188,7 @@ namespace Umbraco.Core.Strings public bool GreedyAcronyms { get; set; } // the separator char - // but then how can we tell we dont want any? + // but then how can we tell we don't want any? public char Separator { get; set; } // extends the config diff --git a/src/Umbraco.Core/Strings/Diff.cs b/src/Umbraco.Core/Strings/Diff.cs index 1993b8f666..6cd4985ead 100644 --- a/src/Umbraco.Core/Strings/Diff.cs +++ b/src/Umbraco.Core/Strings/Diff.cs @@ -76,10 +76,10 @@ namespace Umbraco.Core.Strings } /// - /// Find the difference in 2 texts, comparing by textlines. + /// Find the difference in 2 texts, comparing by text lines. /// - /// A-version of the text (usualy the old one) - /// B-version of the text (usualy the new one) + /// A-version of the text (usually the old one) + /// B-version of the text (usually the new one) /// Returns a array of Items that describe the differences. public static Item[] DiffText(string textA, string textB) { @@ -87,12 +87,12 @@ namespace Umbraco.Core.Strings } // DiffText /// - /// Find the difference in 2 texts, comparing by textlines. + /// Find the difference in 2 texts, comparing by text lines. /// This method uses the DiffInt internally by 1st converting the string into char codes /// then uses the diff int method /// - /// A-version of the text (usualy the old one) - /// B-version of the text (usualy the new one) + /// A-version of the text (usually the old one) + /// B-version of the text (usually the new one) /// Returns a array of Items that describe the differences. public static Item[] DiffText1(string textA, string textB) { @@ -101,17 +101,17 @@ namespace Umbraco.Core.Strings /// - /// Find the difference in 2 text documents, comparing by textlines. + /// Find the difference in 2 text documents, comparing by text lines. /// The algorithm itself is comparing 2 arrays of numbers so when comparing 2 text documents /// each line is converted into a (hash) number. This hash-value is computed by storing all - /// textlines into a common hashtable so i can find dublicates in there, and generating a - /// new number each time a new textline is inserted. + /// text lines into a common Hashtable so i can find duplicates in there, and generating a + /// new number each time a new text line is inserted. /// - /// A-version of the text (usualy the old one) - /// B-version of the text (usualy the new one) - /// When set to true, all leading and trailing whitespace characters are stripped out before the comparation is done. - /// When set to true, all whitespace characters are converted to a single space character before the comparation is done. - /// When set to true, all characters are converted to their lowercase equivivalence before the comparation is done. + /// A-version of the text (usually the old one) + /// B-version of the text (usually the new one) + /// When set to true, all leading and trailing whitespace characters are stripped out before the comparison is done. + /// When set to true, all whitespace characters are converted to a single space character before the comparison is done. + /// When set to true, all characters are converted to their lowercase equivalence before the comparison is done. /// Returns a array of Items that describe the differences. public static Item[] DiffText(string textA, string textB, bool trimSpace, bool ignoreSpace, bool ignoreCase) { @@ -124,7 +124,7 @@ namespace Umbraco.Core.Strings // The B-Version of the data (modified data) to be compared. var dataB = new DiffData(DiffCodes(textB, h, trimSpace, ignoreSpace, ignoreCase)); - h = null; // free up hashtable memory (maybe) + h = null; // free up Hashtable memory (maybe) var max = dataA.Length + dataB.Length + 1; // vector for the (0,0) to (x,y) search @@ -193,8 +193,8 @@ namespace Umbraco.Core.Strings /// /// Find the difference in 2 arrays of integers. /// - /// A-version of the numbers (usualy the old one) - /// B-version of the numbers (usualy the new one) + /// A-version of the numbers (usually the old one) + /// B-version of the numbers (usually the new one) /// Returns a array of Items that describe the differences. public static Item[] DiffInt(int[] arrayA, int[] arrayB) { @@ -216,11 +216,11 @@ namespace Umbraco.Core.Strings /// - /// This function converts all textlines of the text into unique numbers for every unique textline + /// This function converts all text lines of the text into unique numbers for every unique text line /// so further work can work only with simple numbers. /// /// the input text - /// This extern initialized hashtable is used for storing all ever used textlines. + /// This extern initialized Hashtable is used for storing all ever used text lines. /// ignore leading and trailing space characters /// /// @@ -230,7 +230,7 @@ namespace Umbraco.Core.Strings // get all codes of the text var lastUsedCode = h.Count; - // strip off all cr, only use lf as textline separator. + // strip off all cr, only use lf as text line separator. aText = aText.Replace("\r", ""); var lines = aText.Split('\n'); @@ -393,7 +393,7 @@ namespace Umbraco.Core.Strings /// - /// This is the divide-and-conquer implementation of the longes common-subsequence (LCS) + /// This is the divide-and-conquer implementation of the longest common-subsequence (LCS) /// algorithm. /// The published algorithm passes recursively parts of the A and B sequences. /// To avoid copying these arrays the lower and upper bounds are passed while the sequences stay constant. @@ -408,15 +408,15 @@ namespace Umbraco.Core.Strings /// a vector for the (u,v) to (N,M) search. Passed as a parameter for speed reasons. private static void Lcs(DiffData dataA, int lowerA, int upperA, DiffData dataB, int lowerB, int upperB, int[] downVector, int[] upVector) { - // Debug.Write(2, "LCS", String.Format("Analyse the box: A[{0}-{1}] to B[{2}-{3}]", LowerA, UpperA, LowerB, UpperB)); + // Debug.Write(2, "LCS", String.Format("Analyze the box: A[{0}-{1}] to B[{2}-{3}]", LowerA, UpperA, LowerB, UpperB)); - // Fast walkthrough equal lines at the start + // Fast walk through equal lines at the start while (lowerA < upperA && lowerB < upperB && dataA.Data[lowerA] == dataB.Data[lowerB]) { lowerA++; lowerB++; } - // Fast walkthrough equal lines at the end + // Fast walk through equal lines at the end while (lowerA < upperA && lowerB < upperB && dataA.Data[upperA - 1] == dataB.Data[upperB - 1]) { --upperA; --upperB; @@ -438,7 +438,7 @@ namespace Umbraco.Core.Strings } else { - // Find the middle snakea and length of an optimal path for A and B + // Find the middle snake and length of an optimal path for A and B Smsrd smsrd = Sms(dataA, lowerA, upperA, dataB, lowerB, upperB, downVector, upVector); // Debug.Write(2, "MiddleSnakeData", String.Format("{0},{1}", smsrd.x, smsrd.y)); diff --git a/src/Umbraco.Core/Strings/IShortStringHelper.cs b/src/Umbraco.Core/Strings/IShortStringHelper.cs index 085b5adb7a..fecbeaaee9 100644 --- a/src/Umbraco.Core/Strings/IShortStringHelper.cs +++ b/src/Umbraco.Core/Strings/IShortStringHelper.cs @@ -65,7 +65,7 @@ /// /// The text to split. /// The separator. - /// The splitted string. + /// The split string. /// Supports Utf8 and Ascii strings, not Unicode strings. string SplitPascalCasing(string text, char separator); diff --git a/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs b/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs index 40c9b758d1..f5b4a1cff3 100644 --- a/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs +++ b/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs @@ -3322,7 +3322,7 @@ namespace Umbraco.Core.Strings // BEGIN CUSTOM TRANSLITERATION OF CYRILIC CHARS - #region Cyrilic chars + #region Cyrillic chars // russian uppercase "А Б В Г Д Е Ё Ж З И Й К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Ъ Ы Ь Э Ю Я" // russian lowercase "а б в г д е ё ж з и й к л м н о п р с т у ф х ц ч ш щ ъ ы ь э ю я" @@ -3340,7 +3340,7 @@ namespace Umbraco.Core.Strings // todo // transliterates Анастасия as Anastasiya, and not Anastasia // Ольга --> Ol'ga, Татьяна --> Tat'yana -- that's bad (?) - // Note: should ä (german umlaut) become a or ae ? + // Note: should ä (German umlaut) become a or ae ? case '\u0410': // А output[opos++] = 'A'; diff --git a/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs b/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs index fa59fe2e9c..a34644e6a1 100644 --- a/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs +++ b/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs @@ -153,7 +153,7 @@ namespace Umbraco.Core.Sync ReadLastSynced(); // get _lastId using (var scope = ScopeProvider.CreateScope()) { - EnsureInstructions(scope.Database); // reset _lastId if instrs are missing + EnsureInstructions(scope.Database); // reset _lastId if instructions are missing Initialize(scope.Database); // boot scope.Complete(); @@ -326,7 +326,7 @@ namespace Umbraco.Core.Sync var processed = new HashSet(); //It would have been nice to do this in a Query instead of Fetch using a data reader to save - // some memory however we cannot do thta because inside of this loop the cache refreshers are also + // some memory however we cannot do that because inside of this loop the cache refreshers are also // performing some lookups which cannot be done with an active reader open foreach (var dto in database.Fetch(topSql)) { @@ -405,7 +405,7 @@ namespace Umbraco.Core.Sync } //catch (ThreadAbortException ex) //{ - // //This will occur if the instructions processing is taking too long since this is occuring on a request thread. + // //This will occur if the instructions processing is taking too long since this is occurring on a request thread. // // Or possibly if IIS terminates the appdomain. In any case, we should deal with this differently perhaps... //} catch (Exception ex) @@ -624,7 +624,7 @@ namespace Umbraco.Core.Sync /// /// /// - /// Returns true if all instructions were processed, otherwise false if the processing was interupted (i.e. app shutdown) + /// Returns true if all instructions were processed, otherwise false if the processing was interrupted (i.e. app shutdown) /// private bool NotifyRefreshers(IEnumerable instructions, HashSet processed) { diff --git a/src/Umbraco.Core/Sync/IServerMessenger.cs b/src/Umbraco.Core/Sync/IServerMessenger.cs index 9005a89217..37d08723f4 100644 --- a/src/Umbraco.Core/Sync/IServerMessenger.cs +++ b/src/Umbraco.Core/Sync/IServerMessenger.cs @@ -25,7 +25,7 @@ namespace Umbraco.Core.Sync void PerformRefresh(ICacheRefresher refresher, string jsonPayload); /// - /// Notifies the distributed cache of specifieds item invalidation, for a specified . + /// Notifies the distributed cache of specified item invalidation, for a specified . /// /// The type of the invalidated items. /// The ICacheRefresher. @@ -34,7 +34,7 @@ namespace Umbraco.Core.Sync void PerformRefresh(ICacheRefresher refresher, Func getNumericId, params T[] instances); /// - /// Notifies the distributed cache of specifieds item invalidation, for a specified . + /// Notifies the distributed cache of specified item invalidation, for a specified . /// /// The type of the invalidated items. /// The ICacheRefresher. diff --git a/src/Umbraco.Core/Sync/ServerSyncWebServiceClient.cs b/src/Umbraco.Core/Sync/ServerSyncWebServiceClient.cs index 5ad9140811..38ba2ce189 100644 --- a/src/Umbraco.Core/Sync/ServerSyncWebServiceClient.cs +++ b/src/Umbraco.Core/Sync/ServerSyncWebServiceClient.cs @@ -6,7 +6,7 @@ using Umbraco.Core.IO; namespace Umbraco.Core.Sync { /// - /// The client Soap service for making distrubuted cache calls between servers + /// The client Soap service for making distributed cache calls between servers /// [WebServiceBinding(Name = "CacheRefresherSoap", Namespace = "http://umbraco.org/webservices/")] [Obsolete("Legacy load balancing is obsolete and should be removed")] diff --git a/src/Umbraco.Core/TypeExtensions.cs b/src/Umbraco.Core/TypeExtensions.cs index 6abc2bffc2..56b2026afb 100644 --- a/src/Umbraco.Core/TypeExtensions.cs +++ b/src/Umbraco.Core/TypeExtensions.cs @@ -22,7 +22,7 @@ namespace Umbraco.Core /// /// /// - /// Currenty this will only work for ProperCase and camelCase properties, see the TODO below to enable complete case insensitivity + /// Currently this will only work for ProperCase and camelCase properties, see the TODO below to enable complete case insensitivity /// internal static Attempt GetMemberIgnoreCase(this Type type, object target, string memberName) { @@ -410,7 +410,7 @@ namespace Umbraco.Core /// /// /// - /// This method is like an 'inbetween' of Type.FullName and Type.AssemblyQualifiedName which returns the type and the assembly separated + /// This method is like an 'in between' of Type.FullName and Type.AssemblyQualifiedName which returns the type and the assembly separated /// by a comma. /// /// diff --git a/src/Umbraco.Core/UriExtensions.cs b/src/Umbraco.Core/UriExtensions.cs index b99fc2695e..ba3e677219 100644 --- a/src/Umbraco.Core/UriExtensions.cs +++ b/src/Umbraco.Core/UriExtensions.cs @@ -66,7 +66,7 @@ namespace Umbraco.Core //has an extension, def back office if (extension.IsNullOrWhiteSpace() == false) return true; //check for special case asp.net calls like: - // /umbraco/webservices/legacyAjaxCalls.asmx/js which will return a null file extension but are still considered extension'd requests + // /umbraco/webservices/legacyAjaxCalls.asmx/js which will return a null file extension but are still considered requests with an extension if (urlPath.InvariantContains(".asmx/") || urlPath.InvariantContains(".aspx/") || urlPath.InvariantContains(".ashx/") diff --git a/src/Umbraco.Core/WriteLock.cs b/src/Umbraco.Core/WriteLock.cs index 67302c9d85..dfa170218b 100644 --- a/src/Umbraco.Core/WriteLock.cs +++ b/src/Umbraco.Core/WriteLock.cs @@ -11,7 +11,7 @@ namespace Umbraco.Core /// /// /// Intended as an infrastructure class. - /// This is a very unefficient way to lock as it allocates one object each time we lock, + /// This is a very inefficient way to lock as it allocates one object each time we lock, /// so it's OK to use this class for things that happen once, where it is convenient, but not /// for performance-critical code! /// diff --git a/src/Umbraco.Core/Xml/DynamicContext.cs b/src/Umbraco.Core/Xml/DynamicContext.cs index c1ac8ca1ba..d39c4e133b 100644 --- a/src/Umbraco.Core/Xml/DynamicContext.cs +++ b/src/Umbraco.Core/Xml/DynamicContext.cs @@ -258,7 +258,7 @@ namespace Umbraco.Core.Xml try { _value = Convert.ToDouble(value); - // We suceeded, so it's a number. + // We succeeded, so it's a number. _type = XPathResultType.Number; } catch (FormatException) diff --git a/src/Umbraco.Core/Xml/UmbracoXPathPathSyntaxParser.cs b/src/Umbraco.Core/Xml/UmbracoXPathPathSyntaxParser.cs index a702c50db2..afe9831b72 100644 --- a/src/Umbraco.Core/Xml/UmbracoXPathPathSyntaxParser.cs +++ b/src/Umbraco.Core/Xml/UmbracoXPathPathSyntaxParser.cs @@ -33,7 +33,7 @@ namespace Umbraco.Core.Xml //TODO: This should probably support some of the old syntax and token replacements, currently // it does not, there is a ticket raised here about it: http://issues.umbraco.org/issue/U4-6364 - // previous tokens were: "$currentPage", "$ancestorOrSelf", "$parentPage" and I beleive they were + // previous tokens were: "$currentPage", "$ancestorOrSelf", "$parentPage" and I believe they were // allowed 'inline', not just at the beginning... whether or not we want to support that is up // for discussion. diff --git a/src/Umbraco.Core/Xml/XPath/NavigableNavigator.cs b/src/Umbraco.Core/Xml/XPath/NavigableNavigator.cs index 4c15f1b9b0..dc89de8372 100644 --- a/src/Umbraco.Core/Xml/XPath/NavigableNavigator.cs +++ b/src/Umbraco.Core/Xml/XPath/NavigableNavigator.cs @@ -2,7 +2,7 @@ // We make sure that diagnostics code will not be compiled nor called into Release configuration. // In Debug configuration, diagnostics code can be enabled by defining DEBUGNAVIGATOR below, -// but by default nothing is writted, unless some lines are un-commented in Debug(...) below. +// but by default nothing is written, unless some lines are un-commented in Debug(...) below. // // Beware! Diagnostics are extremely verbose and can overflow logging pretty easily. diff --git a/src/Umbraco.Core/Xml/XPathNavigatorExtensions.cs b/src/Umbraco.Core/Xml/XPathNavigatorExtensions.cs index 3618d9dbab..b80836dde8 100644 --- a/src/Umbraco.Core/Xml/XPathNavigatorExtensions.cs +++ b/src/Umbraco.Core/Xml/XPathNavigatorExtensions.cs @@ -21,7 +21,7 @@ namespace Umbraco.Core.Xml // Reflector shows that the standard XPathNavigator.Compile method just does // return XPathExpression.Compile(xpath); - // only difference is, XPathNavigator.Compile is virtual so it could be overriden + // only difference is, XPathNavigator.Compile is virtual so it could be overridden // by a class inheriting from XPathNavigator... there does not seem to be any // doing it in the Framework, though... so we'll assume it's much cleaner to use // the static compile: diff --git a/src/Umbraco.Core/Xml/XmlHelper.cs b/src/Umbraco.Core/Xml/XmlHelper.cs index e058858799..a852f97002 100644 --- a/src/Umbraco.Core/Xml/XmlHelper.cs +++ b/src/Umbraco.Core/Xml/XmlHelper.cs @@ -206,7 +206,7 @@ namespace Umbraco.Core.Xml /// /// Opens a file as a XmlDocument. /// - /// The relative file path. ei. /config/umbraco.config + /// The relative file path. ie. /config/umbraco.config /// Returns a XmlDocument class public static XmlDocument OpenAsXmlDocument(string filePath) { diff --git a/src/Umbraco.Core/Xml/XmlNodeListFactory.cs b/src/Umbraco.Core/Xml/XmlNodeListFactory.cs index e190bcb771..bc8deaab2a 100644 --- a/src/Umbraco.Core/Xml/XmlNodeListFactory.cs +++ b/src/Umbraco.Core/Xml/XmlNodeListFactory.cs @@ -152,7 +152,7 @@ namespace Umbraco.Core.Xml _iterator.ReadTo(_position); // If we reached the end and our index is still - // bigger, there're no more items. + // bigger, there are no more items. if (_iterator.Done && _position >= _iterator.CurrentPosition) return false; diff --git a/src/Umbraco.Web/Models/Mapping/ActionButtonsResolver.cs b/src/Umbraco.Web/Models/Mapping/ActionButtonsResolver.cs index 59b594757f..6de0e704d5 100644 --- a/src/Umbraco.Web/Models/Mapping/ActionButtonsResolver.cs +++ b/src/Umbraco.Web/Models/Mapping/ActionButtonsResolver.cs @@ -37,7 +37,7 @@ namespace Umbraco.Web.Models.Mapping //TODO: This is certainly not ideal usage here - perhaps the best way to deal with this in the future is // with the IUmbracoContextAccessor. In the meantime, if used outside of a web app this will throw a null - // refrence exception :( + // reference exception :( return UserService.GetPermissionsForPath(UmbracoContext.Current.Security.CurrentUser, path).GetAllPermissions(); } } diff --git a/src/Umbraco.Web/Trees/ApplicationTreeController.cs b/src/Umbraco.Web/Trees/ApplicationTreeController.cs index 2541221537..c8b13562cd 100644 --- a/src/Umbraco.Web/Trees/ApplicationTreeController.cs +++ b/src/Umbraco.Web/Trees/ApplicationTreeController.cs @@ -109,7 +109,7 @@ namespace Umbraco.Web.Trees } //Otherwise its a application/section with no trees (aka a full screen app) - //For example we do not have a Forms tree definied in C# & can not attribute with [Tree(isSingleNodeTree:true0] + //For example we do not have a Forms tree defined in C# & can not attribute with [Tree(isSingleNodeTree:true0] var rootId = Constants.System.Root.ToString(CultureInfo.InvariantCulture); var section = Services.TextService.Localize("sections/" + application); diff --git a/src/Umbraco.Web/_Legacy/PackageActions/publishRootDocument.cs b/src/Umbraco.Web/_Legacy/PackageActions/publishRootDocument.cs index 94e1b6e923..f276afeca9 100644 --- a/src/Umbraco.Web/_Legacy/PackageActions/publishRootDocument.cs +++ b/src/Umbraco.Web/_Legacy/PackageActions/publishRootDocument.cs @@ -23,7 +23,7 @@ namespace Umbraco.Web._Legacy.PackageActions /// /// /// - /// True if executed succesfully + /// true if executed successfully public bool Execute(string packageName, XElement xmlData) { From 832ec68140026c8256af00ac5991a36356ba25aa Mon Sep 17 00:00:00 2001 From: Paul Seal Date: Mon, 21 Jan 2019 23:38:38 +0000 Subject: [PATCH 220/437] - tls check to check if the site is set up to use at least TLS 1.2 for outgoing connections. - added translations for all languages which have a healthcheck section in the language file. --- .../Umbraco/config/lang/zh_tw.xml | 5 +- src/Umbraco.Web.UI/umbraco/config/lang/en.xml | 3 ++ .../umbraco/config/lang/en_us.xml | 3 ++ src/Umbraco.Web.UI/umbraco/config/lang/es.xml | 3 ++ src/Umbraco.Web.UI/umbraco/config/lang/fr.xml | 3 ++ src/Umbraco.Web.UI/umbraco/config/lang/nl.xml | 3 ++ src/Umbraco.Web.UI/umbraco/config/lang/pl.xml | 3 ++ src/Umbraco.Web.UI/umbraco/config/lang/ru.xml | 3 ++ src/Umbraco.Web.UI/umbraco/config/lang/zh.xml | 3 ++ .../HealthCheck/Checks/Security/TlsCheck.cs | 51 +++++++++++++++++++ src/Umbraco.Web/Umbraco.Web.csproj | 1 + 11 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 src/Umbraco.Web/HealthCheck/Checks/Security/TlsCheck.cs 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 16387728b1..ba30581267 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/zh_tw.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/zh_tw.xml @@ -1331,6 +1331,9 @@ SMTP伺服器 %0% : %1% 無法連接。請確認在Web.config 檔案中 system.net/mailsettings 設定正確。 %0%。]]> %0%。]]> + + 您的網站設置為使用TLS 1.2或更高版本進行傳出連接。 + 來自您網站的傳出連接通過舊協議提供。您應該考慮將其更新為使用TLS 1.2或更高版本。 停止網址追蹤器 @@ -1350,4 +1353,4 @@ 轉址追蹤器已開啟。 啟動轉址追蹤器錯誤,更多資訊請參閱您的紀錄檔。 - \ No newline at end of file + diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml index 7d3bfa7c99..06a7fbb109 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml @@ -2206,6 +2206,9 @@ To manage your website, simply open the Umbraco back office and start adding con %0%.]]>

Results of the scheduled Umbraco Health Checks run on %0% at %1% are as follows:

%2%]]>
Umbraco Health Check Status: %0% + + Your website is set up to use TLS 1.2 or greater for outgoing connections. + Outgoing connections from your website are being served over an old protocol. You should consider updating it to use TLS 1.2 or higher. Disable URL tracker 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 0a1756038f..766d2eec9e 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml @@ -2199,6 +2199,9 @@ To manage your website, simply open the Umbraco back office and start adding con %0%.]]>

Results of the scheduled Umbraco Health Checks run on %0% at %1% are as follows:

%2%]]>
Umbraco Health Check Status: %0% + + Your website is set up to use TLS 1.2 or greater for outgoing connections. + Outgoing connections from your website are being served over an old protocol. You should consider updating it to use TLS 1.2 or higher. Disable URL tracker diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/es.xml b/src/Umbraco.Web.UI/umbraco/config/lang/es.xml index ba0027aef0..607050c235 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/es.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/es.xml @@ -1856,6 +1856,9 @@ %0%.]]>

Los resultados de los Chequeos de Salud de Umbraco programados para ejecutarse el %0% a las %1% son:

%2%]]>
Status de los Chequeos de Salud de Umbraco: %0% + + Su sitio web está configurado para usar TLS 1.2 o superior para las conexiones salientes. + Las conexiones salientes de su sitio web están siendo servidas a través de un protocolo antiguo. Deberías considerar actualizarlo para usar TLS 1.2 o superior. Desactivar URL tracker diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/fr.xml b/src/Umbraco.Web.UI/umbraco/config/lang/fr.xml index fd2b4c53a8..dab9f49120 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/fr.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/fr.xml @@ -2170,6 +2170,9 @@ Pour gérer votre site, ouvrez simplement le backoffice Umbraco et commencez à %0%.]]>

Les résultats de l'exécution du Umbraco Health Checks planifiée le %0% à %1% sont les suivants :

%2%]]>
Statut du Umbraco Health Check: %0% + + Votre site Web est configuré pour utiliser TLS version 1.2 ou supérieure pour les connexions sortantes. + Les connexions sortantes de votre site Web sont servies via un ancien protocole. Vous devriez envisager de le mettre à jour pour utiliser TLS 1.2 ou supérieur. Désactiver URL tracker diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml b/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml index 26b057e49f..4680d0dfc5 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml @@ -1623,6 +1623,9 @@ Om een vertalingstaak te sluiten, ga aub naar het detailoverzicht en klik op de %0%.]]> %0%.]]> + + Uw website is ingesteld om TLS 1.2 of hoger te gebruiken voor uitgaande verbindingen. + Uitgaande verbindingen van uw website worden via een oud protocol bediend. U zou moeten overwegen om het bij te werken om TLS 1.2 of hoger te gebruiken. URL tracker uitzetten diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml b/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml index 9affa43727..bb36628757 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml @@ -1674,6 +1674,9 @@ Naciśnij przycisk instaluj, aby zainstalować bazę danych Umb %0%.]]> %0%.]]> + + Twoja strona internetowa jest skonfigurowana do używania protokołu TLS 1.2 lub nowszego dla połączeń wychodzących. + Połączenia wychodzące z Twojej witryny są obsługiwane przez stary protokół. Należy rozważyć zaktualizowanie go do korzystania z TLS w wersji 1.2 lub nowszej. Wyłącz śledzenie URL diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml b/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml index fd33e647ad..37a4613d43 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml @@ -870,6 +870,9 @@ %0%.]]>

Зафиксированы следующие результаты автоматической проверки состояния Umbraco по расписанию, запущенной на %0% в %1%:

%2%]]>
Результат проверки состояния Umbraco: %0% + + Ваш веб-сайт настроен на использование TLS 1.2 или выше для исходящих соединений. + Исходящие соединения с вашего сайта обслуживаются по старому протоколу. Вы должны рассмотреть возможность его обновления для использования TLS 1.2 или выше. перейти к diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/zh.xml b/src/Umbraco.Web.UI/umbraco/config/lang/zh.xml index a918b78f95..471925ccd5 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/zh.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/zh.xml @@ -1598,6 +1598,9 @@ The SMTP server configured with host '%0%' and port '%1%' could not be reached. Please check to ensure the SMTP settings in the Web.config file system.net/mailsettings are correct. %0%.]]> %0%.]]> + + 您的网站设置为使用TLS 1.2或更高版本进行传出连接。 + 来自您网站的传出连接通过旧协议提供。您应该考虑将其更新为使用TLS 1.2或更高版本。 禁用 url 跟踪程序 diff --git a/src/Umbraco.Web/HealthCheck/Checks/Security/TlsCheck.cs b/src/Umbraco.Web/HealthCheck/Checks/Security/TlsCheck.cs new file mode 100644 index 0000000000..8d41965395 --- /dev/null +++ b/src/Umbraco.Web/HealthCheck/Checks/Security/TlsCheck.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Net; +using Umbraco.Core.Services; + +namespace Umbraco.Web.HealthCheck.Checks.Security +{ + [HealthCheck("6D7D4E11-758E-4697-BA72-7E02A530CBD4", + "TLS Check", + Description = "Checks that your site is set up to use at least TLS 1.2 for outgoing connections.", + Group = "Security")] + public class TlsCheck : HealthCheck + { + private readonly ILocalizedTextService _textService; + + public TlsCheck(HealthCheckContext healthCheckContext) : base(healthCheckContext) + { + _textService = healthCheckContext.ApplicationContext.Services.TextService; + } + + public override IEnumerable GetStatus() + { + return new[] { CheckTls() }; + } + + public override HealthCheckStatus ExecuteAction(HealthCheckAction action) + { + throw new InvalidOperationException("TlsCheck has no executable actions"); + } + + public HealthCheckStatus CheckTls() + { + bool success = (int)ServicePointManager.SecurityProtocol >= (int)SecurityProtocolType.Tls12; + + string message = success + ? _textService.Localize("healthcheck/tlsHealthCheckSuccess") + : _textService.Localize("healthcheck/tlsHealthCheckWarn"); + + var actions = new List(); + + return + new HealthCheckStatus(message) + { + ResultType = success + ? StatusResultType.Success + : StatusResultType.Warning, + Actions = actions + }; + } + } +} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 1b668b06c8..a66e960e97 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -338,6 +338,7 @@ + From 9eb2b28232772532cc74686cd4d01efdf13905f6 Mon Sep 17 00:00:00 2001 From: Alkaersig Date: Thu, 17 Jan 2019 12:08:53 +0100 Subject: [PATCH 221/437] Added (Doctype) Name and Description to PublishedContentType --- .../Models/PublishedContent/PublishedContentType.cs | 10 ++++++++-- src/Umbraco.Tests/CodeFirst/StronglyTypedMapperTest.cs | 4 ++-- src/Umbraco.Tests/LibraryTests.cs | 2 +- .../Membership/DynamicMemberContentTests.cs | 2 +- .../PublishedContent/DynamicDocumentTestsBase.cs | 4 ++-- .../PublishedContent/PublishedContentDataTableTests.cs | 4 ++-- .../PublishedContent/PublishedContentMoreTests.cs | 6 +++--- .../PublishedContent/PublishedContentTestBase.cs | 4 ++-- .../PublishedContent/PublishedContentTestElements.cs | 8 ++++---- .../PublishedContent/PublishedContentTests.cs | 2 +- src/Umbraco.Tests/TestHelpers/BaseWebTest.cs | 2 +- src/Umbraco.Tests/Views/site1/template2.cshtml | 4 ++++ 12 files changed, 31 insertions(+), 21 deletions(-) create mode 100644 src/Umbraco.Tests/Views/site1/template2.cshtml diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs index 63164cf271..4ca32bb718 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs @@ -25,6 +25,8 @@ namespace Umbraco.Core.Models.PublishedContent { Id = contentType.Id; Alias = contentType.Alias; + Name = contentType.Name; + Description = contentType.Description; _compositionAliases = new HashSet(contentType.CompositionAliases(), StringComparer.InvariantCultureIgnoreCase); _propertyTypes = contentType.CompositionPropertyTypes .Select(x => new PublishedPropertyType(this, x)) @@ -33,10 +35,12 @@ namespace Umbraco.Core.Models.PublishedContent } // internal so it can be used for unit tests - internal PublishedContentType(int id, string alias, IEnumerable compositionAliases, IEnumerable propertyTypes) + internal PublishedContentType(int id, string alias, string name, string description, IEnumerable compositionAliases, IEnumerable propertyTypes) { Id = id; Alias = alias; + Name = name; + Description = description; _compositionAliases = new HashSet(compositionAliases, StringComparer.InvariantCultureIgnoreCase); _propertyTypes = propertyTypes.ToArray(); foreach (var propertyType in _propertyTypes) @@ -46,7 +50,7 @@ namespace Umbraco.Core.Models.PublishedContent // create detached content type - ie does not match anything in the DB internal PublishedContentType(string alias, IEnumerable compositionAliases, IEnumerable propertyTypes) - : this(0, alias, compositionAliases, propertyTypes) + : this(0, alias, string.Empty, string.Empty, compositionAliases, propertyTypes) { } private void InitializeIndexes() @@ -63,6 +67,8 @@ namespace Umbraco.Core.Models.PublishedContent public int Id { get; private set; } public string Alias { get; private set; } + public string Name { get; private set; } + public string Description { get; private set; } public HashSet CompositionAliases { get { return _compositionAliases; } } #endregion diff --git a/src/Umbraco.Tests/CodeFirst/StronglyTypedMapperTest.cs b/src/Umbraco.Tests/CodeFirst/StronglyTypedMapperTest.cs index 5fe2efaa2c..6f64ef8b69 100644 --- a/src/Umbraco.Tests/CodeFirst/StronglyTypedMapperTest.cs +++ b/src/Umbraco.Tests/CodeFirst/StronglyTypedMapperTest.cs @@ -83,7 +83,7 @@ namespace Umbraco.Tests.CodeFirst new PublishedPropertyType("articleDate", 0, "?"), new PublishedPropertyType("pageTitle", 0, "?"), }; - var type = new AutoPublishedContentType(0, "anything", propertyTypes); + var type = new AutoPublishedContentType(0, "anything", "anything", "anything", propertyTypes); PublishedContentType.GetPublishedContentTypeCallback = (alias) => type; Debug.Print("INIT STRONG {0}", PublishedContentType.Get(PublishedItemType.Content, "anything") @@ -148,4 +148,4 @@ namespace Umbraco.Tests.CodeFirst } #endregion } -} \ No newline at end of file +} diff --git a/src/Umbraco.Tests/LibraryTests.cs b/src/Umbraco.Tests/LibraryTests.cs index 086395f456..42e218835c 100644 --- a/src/Umbraco.Tests/LibraryTests.cs +++ b/src/Umbraco.Tests/LibraryTests.cs @@ -43,7 +43,7 @@ namespace Umbraco.Tests // AutoPublishedContentType will auto-generate other properties new PublishedPropertyType("content", 0, "?"), }; - var type = new AutoPublishedContentType(0, "anything", propertyTypes); + var type = new AutoPublishedContentType(0, "anything", "anything", "anything", propertyTypes); PublishedContentType.GetPublishedContentTypeCallback = (alias) => type; Debug.Print("INIT LIB {0}", PublishedContentType.Get(PublishedItemType.Content, "anything") diff --git a/src/Umbraco.Tests/Membership/DynamicMemberContentTests.cs b/src/Umbraco.Tests/Membership/DynamicMemberContentTests.cs index 4c1272550d..7bfe75f9aa 100644 --- a/src/Umbraco.Tests/Membership/DynamicMemberContentTests.cs +++ b/src/Umbraco.Tests/Membership/DynamicMemberContentTests.cs @@ -41,7 +41,7 @@ namespace Umbraco.Tests.Membership new PublishedPropertyType("bodyText", 0, "?"), new PublishedPropertyType("author", 0, "?") }; - var type = new AutoPublishedContentType(0, "anything", propertyTypes); + var type = new AutoPublishedContentType(0, "anything", "anything", "anything", propertyTypes); PublishedContentType.GetPublishedContentTypeCallback = (alias) => type; } diff --git a/src/Umbraco.Tests/PublishedContent/DynamicDocumentTestsBase.cs b/src/Umbraco.Tests/PublishedContent/DynamicDocumentTestsBase.cs index 07787d8e2c..fd736f0700 100644 --- a/src/Umbraco.Tests/PublishedContent/DynamicDocumentTestsBase.cs +++ b/src/Umbraco.Tests/PublishedContent/DynamicDocumentTestsBase.cs @@ -50,7 +50,7 @@ namespace Umbraco.Tests.PublishedContent new PublishedPropertyType("creatorName", 0, "?"), new PublishedPropertyType("blah", 0, "?"), // ugly error when that one is missing... }; - var type = new AutoPublishedContentType(0, "anything", propertyTypes); + var type = new AutoPublishedContentType(0, "anything", "anything", "anything", propertyTypes); PublishedContentType.GetPublishedContentTypeCallback = (alias) => type; } @@ -729,4 +729,4 @@ namespace Umbraco.Tests.PublishedContent return s.Contains(val.ToString()); } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Tests/PublishedContent/PublishedContentDataTableTests.cs b/src/Umbraco.Tests/PublishedContent/PublishedContentDataTableTests.cs index 8efe6efd72..c57bacad29 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedContentDataTableTests.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedContentDataTableTests.cs @@ -24,7 +24,7 @@ namespace Umbraco.Tests.PublishedContent // need to specify a custom callback for unit tests // AutoPublishedContentTypes generates properties automatically - var type = new AutoPublishedContentType(0, "anything", new PublishedPropertyType[] {}); + var type = new AutoPublishedContentType(0, "anything", "anything", "anything", new PublishedPropertyType[] {}); PublishedContentType.GetPublishedContentTypeCallback = (alias) => type; // need to specify a different callback for testing @@ -251,4 +251,4 @@ namespace Umbraco.Tests.PublishedContent } } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Tests/PublishedContent/PublishedContentMoreTests.cs b/src/Umbraco.Tests/PublishedContent/PublishedContentMoreTests.cs index 1c83691d04..1f2f43de8b 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedContentMoreTests.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedContentMoreTests.cs @@ -234,9 +234,9 @@ namespace Umbraco.Tests.PublishedContent new PublishedPropertyType("prop1", 1, "?"), }; - var contentType1 = new PublishedContentType(1, "ContentType1", Enumerable.Empty(), props); - var contentType2 = new PublishedContentType(2, "ContentType2", Enumerable.Empty(), props); - var contentType2s = new PublishedContentType(3, "ContentType2Sub", Enumerable.Empty(), props); + var contentType1 = new PublishedContentType(1, "ContentType1", "ContentType1", "ContentType1", Enumerable.Empty(), props); + var contentType2 = new PublishedContentType(2, "ContentType2", "ContentType2", "ContentType2", Enumerable.Empty(), props); + var contentType2s = new PublishedContentType(3, "ContentType2Sub", "ContentType2Sub", "ContentType2Sub", Enumerable.Empty(), props); cache.Add(new SolidPublishedContent(contentType1) { diff --git a/src/Umbraco.Tests/PublishedContent/PublishedContentTestBase.cs b/src/Umbraco.Tests/PublishedContent/PublishedContentTestBase.cs index 789d9f7218..c0fff5f8da 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedContentTestBase.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedContentTestBase.cs @@ -29,7 +29,7 @@ namespace Umbraco.Tests.PublishedContent // AutoPublishedContentType will auto-generate other properties new PublishedPropertyType("content", 0, Constants.PropertyEditors.TinyMCEAlias), }; - var type = new AutoPublishedContentType(0, "anything", propertyTypes); + var type = new AutoPublishedContentType(0, "anything", "anything", "anything", propertyTypes); PublishedContentType.GetPublishedContentTypeCallback = (alias) => type; var rCtx = GetRoutingContext("/test", 1234); @@ -65,4 +65,4 @@ namespace Umbraco.Tests.PublishedContent UmbracoContext.Current = null; } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Tests/PublishedContent/PublishedContentTestElements.cs b/src/Umbraco.Tests/PublishedContent/PublishedContentTestElements.cs index 82115d670e..2ebc8c2e4b 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedContentTestElements.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedContentTestElements.cs @@ -354,12 +354,12 @@ namespace Umbraco.Tests.PublishedContent { private static readonly PublishedPropertyType Default = new PublishedPropertyType("*", 0, "?"); - public AutoPublishedContentType(int id, string alias, IEnumerable propertyTypes) - : base(id, alias, Enumerable.Empty(), propertyTypes) + public AutoPublishedContentType(int id, string alias, string name, string description, IEnumerable propertyTypes) + : base(id, alias, name, description, Enumerable.Empty(), propertyTypes) { } - public AutoPublishedContentType(int id, string alias, IEnumerable compositionAliases, IEnumerable propertyTypes) - : base(id, alias, compositionAliases, propertyTypes) + public AutoPublishedContentType(int id, string alias, string name, string description, IEnumerable compositionAliases, IEnumerable propertyTypes) + : base(id, alias, name, description, compositionAliases, propertyTypes) { } public override PublishedPropertyType GetPropertyType(string alias) diff --git a/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs b/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs index 5ec34ea781..4358f5de47 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs @@ -49,7 +49,7 @@ namespace Umbraco.Tests.PublishedContent new PublishedPropertyType("testRecursive", 0, "?"), }; var compositionAliases = new[] { "MyCompositionAlias" }; - var type = new AutoPublishedContentType(0, "anything", compositionAliases, propertyTypes); + var type = new AutoPublishedContentType(0, "anything", "anything", "anything", compositionAliases, propertyTypes); PublishedContentType.GetPublishedContentTypeCallback = (alias) => type; } diff --git a/src/Umbraco.Tests/TestHelpers/BaseWebTest.cs b/src/Umbraco.Tests/TestHelpers/BaseWebTest.cs index dfc6317d32..c7fe2d0168 100644 --- a/src/Umbraco.Tests/TestHelpers/BaseWebTest.cs +++ b/src/Umbraco.Tests/TestHelpers/BaseWebTest.cs @@ -15,7 +15,7 @@ namespace Umbraco.Tests.TestHelpers // need to specify a custom callback for unit tests // AutoPublishedContentTypes generates properties automatically - var type = new AutoPublishedContentType(0, "anything", new PublishedPropertyType[] {}); + var type = new AutoPublishedContentType(0, "anything", "anything", "anything", new PublishedPropertyType[] {}); PublishedContentType.GetPublishedContentTypeCallback = (alias) => type; } diff --git a/src/Umbraco.Tests/Views/site1/template2.cshtml b/src/Umbraco.Tests/Views/site1/template2.cshtml new file mode 100644 index 0000000000..3e82f2f0d2 --- /dev/null +++ b/src/Umbraco.Tests/Views/site1/template2.cshtml @@ -0,0 +1,4 @@ +@inherits Umbraco.Web.Mvc.UmbracoTemplatePage +@{ + Layout = null; +} \ No newline at end of file From 7acafe67a48f8b30cbeb75a965be616a1e228adf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Alk=C3=A6rsig?= Date: Thu, 17 Jan 2019 13:23:35 +0100 Subject: [PATCH 222/437] Delete template2.cshtml Auto-generated test file --- src/Umbraco.Tests/Views/site1/template2.cshtml | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 src/Umbraco.Tests/Views/site1/template2.cshtml diff --git a/src/Umbraco.Tests/Views/site1/template2.cshtml b/src/Umbraco.Tests/Views/site1/template2.cshtml deleted file mode 100644 index 3e82f2f0d2..0000000000 --- a/src/Umbraco.Tests/Views/site1/template2.cshtml +++ /dev/null @@ -1,4 +0,0 @@ -@inherits Umbraco.Web.Mvc.UmbracoTemplatePage -@{ - Layout = null; -} \ No newline at end of file From ddace54f45515bfec5f20b631ab2414632da0775 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 23 Jan 2019 07:51:43 +0100 Subject: [PATCH 223/437] Fixed wrong merge in Children() method --- src/Umbraco.Web/PublishedContentExtensions.cs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/Umbraco.Web/PublishedContentExtensions.cs b/src/Umbraco.Web/PublishedContentExtensions.cs index 530c9bd9b4..98a5a9a6f0 100644 --- a/src/Umbraco.Web/PublishedContentExtensions.cs +++ b/src/Umbraco.Web/PublishedContentExtensions.cs @@ -956,13 +956,6 @@ namespace Umbraco.Web { if (content == null) throw new ArgumentNullException(nameof(content)); // fixme/task wtf is this? - return content.Children.Where(x => - { - if (!x.ContentType.VariesByCulture()) return true; // invariant = always ok - return x.HasCulture(culture); - return false; - }); - return content.Children.WhereIsInvariantOrHasCulture(culture); } From dcb616157dbc7d4a11d17aaad176fbdc828553d6 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 23 Jan 2019 07:52:24 +0100 Subject: [PATCH 224/437] Removed unused IPreValueConnector --- src/Umbraco.Core/Deploy/IPreValueConnector.cs | 32 ------------------- src/Umbraco.Core/Umbraco.Core.csproj | 1 - 2 files changed, 33 deletions(-) delete mode 100644 src/Umbraco.Core/Deploy/IPreValueConnector.cs diff --git a/src/Umbraco.Core/Deploy/IPreValueConnector.cs b/src/Umbraco.Core/Deploy/IPreValueConnector.cs deleted file mode 100644 index 2a8f4e622d..0000000000 --- a/src/Umbraco.Core/Deploy/IPreValueConnector.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Collections.Generic; - -namespace Umbraco.Core.Deploy -{ - /// - /// Defines methods that can convert a preValue to / from an environment-agnostic string. - /// - /// PreValues may contain values such as content identifiers, that would be local - /// to one environment, and need to be converted in order to be deployed. - public interface IPreValueConnector // fixme/task: rename to IDataTypeConfigurationConnector + kill all "preValues" name usage - { - /// - /// Gets the property editor aliases that the value converter supports by default. - /// - IEnumerable PropertyEditorAliases { get; } - - /// - /// Gets the environment-agnostic preValues corresponding to environment-specific preValues. - /// - /// The environment-specific preValues. - /// The dependencies. - /// - IDictionary ConvertToDeploy(IDictionary preValues, ICollection dependencies); - - /// - /// Gets the environment-specific preValues corresponding to environment-agnostic preValues. - /// - /// The environment-agnostic preValues. - /// - IDictionary ConvertToLocalEnvironment(IDictionary preValues); - } -} diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 0ff88da2f3..e97fd0d8e0 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -564,7 +564,6 @@ - From e871392405acb1ca475819b22fa8a49bc3fa694d Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 23 Jan 2019 07:54:45 +0100 Subject: [PATCH 225/437] Added IsPublished(culture) to IPublishedContent --- .../PublishedContent/IPublishedContent.cs | 8 ++++++-- .../PublishedContentWrapped.cs | 4 ++++ .../XmlPublishedContentInitBenchmarks.cs | 20 ++++++++++--------- .../Published/NestedContentTests.cs | 1 + .../PublishedContentDataTableTests.cs | 1 + .../SolidPublishedSnapshot.cs | 1 + .../TestHelpers/Stubs/TestPublishedContent.cs | 1 + .../Models/PublishedContentBase.cs | 2 ++ .../NuCache/PublishedContent.cs | 17 ++++++++++++++++ .../PublishedCache/PublishedMember.cs | 2 ++ .../DictionaryPublishedContent.cs | 2 ++ .../XmlPublishedCache/XmlPublishedContent.cs | 12 +++++++++-- src/Umbraco.Web/umbraco.presentation/page.cs | 5 +++++ 13 files changed, 63 insertions(+), 13 deletions(-) diff --git a/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs b/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs index c5fa0330f2..e50fb2c396 100644 --- a/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs +++ b/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs @@ -153,8 +153,12 @@ namespace Umbraco.Core.Models.PublishedContent /// bool IsDraft(string culture = null); - // fixme/task - consider having an IsPublished flag too - // so that when IsDraft is true, we can check whether there is a published version? + /// + /// Gets a value indicating whether the content is published. + /// + /// + bool IsPublished(string culture = null); + #endregion diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedContentWrapped.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedContentWrapped.cs index 36755c8944..42ff16bae5 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedContentWrapped.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedContentWrapped.cs @@ -111,6 +111,10 @@ namespace Umbraco.Core.Models.PublishedContent /// public virtual bool IsDraft(string culture = null) => _content.IsDraft(culture); + /// + public virtual bool IsPublished(string culture = null) => _content.IsPublished(culture); + + #endregion #region Tree diff --git a/src/Umbraco.Tests.Benchmarks/XmlPublishedContentInitBenchmarks.cs b/src/Umbraco.Tests.Benchmarks/XmlPublishedContentInitBenchmarks.cs index 751767f8e7..860dc0ac4b 100644 --- a/src/Umbraco.Tests.Benchmarks/XmlPublishedContentInitBenchmarks.cs +++ b/src/Umbraco.Tests.Benchmarks/XmlPublishedContentInitBenchmarks.cs @@ -94,6 +94,7 @@ namespace Umbraco.Tests.Benchmarks Guid key, version; string name, urlName, writerName, creatorName, docTypeAlias, path; bool isDraft; + bool isPublished; DateTime createDate, updateDate; PublishedContentType publishedContentType; Dictionary properties; @@ -104,7 +105,7 @@ namespace Umbraco.Tests.Benchmarks OriginalInitializeNode(_xml10.DocumentElement, false, false, out id, out key, out template, out sortOrder, out name, out writerName, out urlName, out creatorName, out creatorId, out writerId, out docTypeAlias, out nodeType, out path, - out version, out createDate, out updateDate, out level, out isDraft, out publishedContentType, + out version, out createDate, out updateDate, out level, out isDraft, out isPublished, out publishedContentType, out properties); } @@ -114,7 +115,7 @@ namespace Umbraco.Tests.Benchmarks OriginalInitializeNode(_xml100.DocumentElement, false, false, out id, out key, out template, out sortOrder, out name, out writerName, out urlName, out creatorName, out creatorId, out writerId, out docTypeAlias, out nodeType, out path, - out version, out createDate, out updateDate, out level, out isDraft, out publishedContentType, + out version, out createDate, out updateDate, out level, out isDraft, out isPublished, out publishedContentType, out properties); } @@ -124,7 +125,7 @@ namespace Umbraco.Tests.Benchmarks OriginalInitializeNode(_xml1000.DocumentElement, false, false, out id, out key, out template, out sortOrder, out name, out writerName, out urlName, out creatorName, out creatorId, out writerId, out docTypeAlias, out nodeType, out path, - out version, out createDate, out updateDate, out level, out isDraft, out publishedContentType, + out version, out createDate, out updateDate, out level, out isDraft, out isPublished, out publishedContentType, out properties); } @@ -134,7 +135,7 @@ namespace Umbraco.Tests.Benchmarks OriginalInitializeNode(_xml10000.DocumentElement, false, false, out id, out key, out template, out sortOrder, out name, out writerName, out urlName, out creatorName, out creatorId, out writerId, out docTypeAlias, out nodeType, out path, - out version, out createDate, out updateDate, out level, out isDraft, out publishedContentType, + out version, out createDate, out updateDate, out level, out isDraft, out isPublished, out publishedContentType, out properties); } @@ -144,7 +145,7 @@ namespace Umbraco.Tests.Benchmarks XmlPublishedContent.InitializeNode(null, _xml10.DocumentElement, false, out id, out key, out template, out sortOrder, out name, out writerName, out urlName, out creatorName, out creatorId, out writerId, out docTypeAlias, out nodeType, out path, - out createDate, out updateDate, out level, out isDraft, out publishedContentType, + out createDate, out updateDate, out level, out isDraft, out isPublished, out publishedContentType, out properties, GetPublishedContentType); } @@ -154,7 +155,7 @@ namespace Umbraco.Tests.Benchmarks XmlPublishedContent.InitializeNode(null, _xml100.DocumentElement, false, out id, out key, out template, out sortOrder, out name, out writerName, out urlName, out creatorName, out creatorId, out writerId, out docTypeAlias, out nodeType, out path, - out createDate, out updateDate, out level, out isDraft, out publishedContentType, + out createDate, out updateDate, out level, out isDraft, out isPublished,out publishedContentType, out properties, GetPublishedContentType); } @@ -164,7 +165,7 @@ namespace Umbraco.Tests.Benchmarks XmlPublishedContent.InitializeNode(null, _xml1000.DocumentElement, false, out id, out key, out template, out sortOrder, out name, out writerName, out urlName, out creatorName, out creatorId, out writerId, out docTypeAlias, out nodeType, out path, - out createDate, out updateDate, out level, out isDraft, out publishedContentType, + out createDate, out updateDate, out level, out isDraft, out isPublished,out publishedContentType, out properties, GetPublishedContentType); } @@ -174,7 +175,7 @@ namespace Umbraco.Tests.Benchmarks XmlPublishedContent.InitializeNode(null, _xml10000.DocumentElement, false, out id, out key, out template, out sortOrder, out name, out writerName, out urlName, out creatorName, out creatorId, out writerId, out docTypeAlias, out nodeType, out path, - out createDate, out updateDate, out level, out isDraft, out publishedContentType, + out createDate, out updateDate, out level, out isDraft, out isPublished,out publishedContentType, out properties, GetPublishedContentType); } @@ -182,7 +183,7 @@ namespace Umbraco.Tests.Benchmarks internal static void OriginalInitializeNode(XmlNode xmlNode, bool legacy, bool isPreviewing, out int id, out Guid key, out int template, out int sortOrder, out string name, out string writerName, out string urlName, out string creatorName, out int creatorId, out int writerId, out string docTypeAlias, out int docTypeId, out string path, - out Guid version, out DateTime createDate, out DateTime updateDate, out int level, out bool isDraft, + out Guid version, out DateTime createDate, out DateTime updateDate, out int level, out bool isDraft, out bool isPublished, out PublishedContentType contentType, out Dictionary properties) { //initialize the out params with defaults: @@ -193,6 +194,7 @@ namespace Umbraco.Tests.Benchmarks name = writerName = urlName = creatorName = docTypeAlias = path = null; createDate = updateDate = default(DateTime); isDraft = false; + isPublished = true; contentType = null; properties = null; diff --git a/src/Umbraco.Tests/Published/NestedContentTests.cs b/src/Umbraco.Tests/Published/NestedContentTests.cs index b5d6182c28..91810d6de1 100644 --- a/src/Umbraco.Tests/Published/NestedContentTests.cs +++ b/src/Umbraco.Tests/Published/NestedContentTests.cs @@ -262,6 +262,7 @@ namespace Umbraco.Tests.Published // ReSharper disable UnassignedGetOnlyAutoProperty public override PublishedItemType ItemType { get; } public override bool IsDraft(string culture = null) => false; + public override bool IsPublished(string culture = null) => true; public override IPublishedContent Parent { get; } public override IEnumerable Children { get; } public override PublishedContentType ContentType { get; } diff --git a/src/Umbraco.Tests/PublishedContent/PublishedContentDataTableTests.cs b/src/Umbraco.Tests/PublishedContent/PublishedContentDataTableTests.cs index 73f3cd1537..283ed1edd9 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedContentDataTableTests.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedContentDataTableTests.cs @@ -217,6 +217,7 @@ namespace Umbraco.Tests.PublishedContent public Guid Version { get; set; } public int Level { get; set; } public bool IsDraft(string culture = null) => false; + public bool IsPublished(string culture = null) => true; public IEnumerable Properties { get; set; } diff --git a/src/Umbraco.Tests/PublishedContent/SolidPublishedSnapshot.cs b/src/Umbraco.Tests/PublishedContent/SolidPublishedSnapshot.cs index f7077ecb3a..a838e06a9a 100644 --- a/src/Umbraco.Tests/PublishedContent/SolidPublishedSnapshot.cs +++ b/src/Umbraco.Tests/PublishedContent/SolidPublishedSnapshot.cs @@ -192,6 +192,7 @@ namespace Umbraco.Tests.PublishedContent public PublishedItemType ItemType { get { return PublishedItemType.Content; } } public bool IsDraft(string culture = null) => false; + public bool IsPublished(string culture = null) => true; #endregion diff --git a/src/Umbraco.Tests/TestHelpers/Stubs/TestPublishedContent.cs b/src/Umbraco.Tests/TestHelpers/Stubs/TestPublishedContent.cs index 58c8e37cbf..a9abe96232 100644 --- a/src/Umbraco.Tests/TestHelpers/Stubs/TestPublishedContent.cs +++ b/src/Umbraco.Tests/TestHelpers/Stubs/TestPublishedContent.cs @@ -48,6 +48,7 @@ namespace Umbraco.Tests.TestHelpers.Stubs public string GetUrl(string culture = null) => throw new NotSupportedException(); public PublishedItemType ItemType => ContentType.ItemType; public bool IsDraft(string culture = null) => false; + public bool IsPublished(string culture = null) => true; public IPublishedContent Parent { get; set; } public IEnumerable Children { get; set; } diff --git a/src/Umbraco.Web/Models/PublishedContentBase.cs b/src/Umbraco.Web/Models/PublishedContentBase.cs index c772f6ca85..12acb6b0c8 100644 --- a/src/Umbraco.Web/Models/PublishedContentBase.cs +++ b/src/Umbraco.Web/Models/PublishedContentBase.cs @@ -144,6 +144,8 @@ namespace Umbraco.Web.Models /// public abstract bool IsDraft(string culture = null); + public abstract bool IsPublished(string culture = null); + #endregion #region Tree diff --git a/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs b/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs index d1e1d63630..69c672ab98 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs @@ -293,6 +293,23 @@ namespace Umbraco.Web.PublishedCache.NuCache return _contentData.CultureInfos.TryGetValue(culture, out var cvar) && cvar.IsDraft; } + public override bool IsPublished(string culture = null) + { + if (!ContentType.VariesByCulture()) + { + return _contentData.Published; + } + + // handle context culture + if (culture == null) + { + culture = VariationContextAccessor?.VariationContext?.Culture ?? ""; + } + + //If the current culture is not a draft, it must be the published version + return _contentData.CultureInfos.TryGetValue(culture, out var cvar) && !cvar.IsDraft; + } + #endregion #region Tree diff --git a/src/Umbraco.Web/PublishedCache/PublishedMember.cs b/src/Umbraco.Web/PublishedCache/PublishedMember.cs index ef95b2846c..cbe2250920 100644 --- a/src/Umbraco.Web/PublishedCache/PublishedMember.cs +++ b/src/Umbraco.Web/PublishedCache/PublishedMember.cs @@ -78,6 +78,8 @@ namespace Umbraco.Web.PublishedCache public override bool IsDraft(string culture = null) => false; + public override bool IsPublished(string culture = null) => true; + public override IPublishedContent Parent => null; public override IEnumerable Children => Enumerable.Empty(); diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DictionaryPublishedContent.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DictionaryPublishedContent.cs index 83bd84dab6..a395db1da5 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DictionaryPublishedContent.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DictionaryPublishedContent.cs @@ -179,6 +179,8 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache public override bool IsDraft(string culture = null) => false; + public override bool IsPublished(string culture = null) => true; + public override IEnumerable Properties => _properties; public override IEnumerable Children => _getChildren.Value; diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs index 2b3bc39452..c3cf22559d 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs @@ -63,6 +63,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache private int _sortOrder; private int _level; private bool _isDraft; + private bool _isPublished; public override IEnumerable Children { @@ -228,6 +229,12 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache return _isDraft; // bah } + public override bool IsPublished(string culture = null) + { + EnsureNodeInitialized(); + return _isPublished; + } + public override IEnumerable Properties { get @@ -280,7 +287,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache InitializeNode(this, _xmlNode, _isPreviewing, out _id, out _key, out _template, out _sortOrder, out _name, out _writerName, out _urlName, out _creatorName, out _creatorId, out _writerId, out _docTypeAlias, out _docTypeId, out _path, - out _createDate, out _updateDate, out _level, out _isDraft, out _contentType, out _properties, + out _createDate, out _updateDate, out _level, out _isDraft, out _isPublished, out _contentType, out _properties, _contentTypeCache.Get); _nodeInitialized = true; @@ -290,7 +297,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache internal static void InitializeNode(XmlPublishedContent node, XmlNode xmlNode, bool isPreviewing, out int id, out Guid key, out int template, out int sortOrder, out string name, out string writerName, out string urlName, out string creatorName, out int creatorId, out int writerId, out string docTypeAlias, out int docTypeId, out string path, - out DateTime createDate, out DateTime updateDate, out int level, out bool isDraft, + out DateTime createDate, out DateTime updateDate, out int level, out bool isDraft,out bool isPublished, out PublishedContentType contentType, out Dictionary properties, Func getPublishedContentType) { @@ -302,6 +309,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache name = writerName = urlName = creatorName = docTypeAlias = path = null; createDate = updateDate = default(DateTime); isDraft = false; + isPublished = false; contentType = null; properties = null; diff --git a/src/Umbraco.Web/umbraco.presentation/page.cs b/src/Umbraco.Web/umbraco.presentation/page.cs index 7b591640b5..0c9b0c6ff3 100644 --- a/src/Umbraco.Web/umbraco.presentation/page.cs +++ b/src/Umbraco.Web/umbraco.presentation/page.cs @@ -469,6 +469,11 @@ namespace umbraco throw new NotImplementedException(); } + public bool IsPublished(string culture = null) + { + throw new NotImplementedException(); + } + public IPublishedContent Parent { get { return _parent; } From 6f25bc7c37b3e16344e1b4956f97b979dad6439a Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 23 Jan 2019 08:17:39 +0100 Subject: [PATCH 226/437] Reintroduced a interface for deploy --- .../Deploy/IDataTypeConfigurationConnector.cs | 34 +++++++++++++++++++ src/Umbraco.Core/Umbraco.Core.csproj | 1 + 2 files changed, 35 insertions(+) create mode 100644 src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs diff --git a/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs b/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs new file mode 100644 index 0000000000..f2a08575b5 --- /dev/null +++ b/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs @@ -0,0 +1,34 @@ +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; + +namespace Umbraco.Core.Deploy +{ + /// + /// Defines methods that can convert a data type configurations to / from an environment-agnostic string. + /// + /// Configurations may contain values such as content identifiers, that would be local + /// to one environment, and need to be converted in order to be deployed. + [SuppressMessage("ReSharper", "UnusedMember.Global", Justification = "This is actual only used by Deploy, but we dont want third parties to have references on deploy, thats why this interface is part of core.")] + public interface IDataTypeConfigurationConnector + { + /// + /// Gets the property editor aliases that the value converter supports by default. + /// + IEnumerable PropertyEditorAliases { get; } + + /// + /// Gets the environment-agnostic data type configurations corresponding to environment-specific configurations. + /// + /// The environment-specific configuration. + /// The dependencies. + /// + IDictionary ConvertToDeploy(IDictionary configuration, ICollection dependencies); + + /// + /// Gets the environment-specific data type configurations corresponding to environment-agnostic configurations. + /// + /// The environment-agnostic configuration. + /// + IDictionary ConvertToLocalEnvironment(IDictionary configuration); + } +} diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index e97fd0d8e0..9a52cb8dc5 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -331,6 +331,7 @@ + From fedf0c78de6d2ad365db1c112c22af13abd7b9fb Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Wed, 23 Jan 2019 08:56:20 +0100 Subject: [PATCH 227/437] Remove obsoleted RelatedLinks picker (replaced by Multi URL Picker) --- src/Umbraco.Core/Constants-PropertyEditors.cs | 7 +- .../Migrations/Install/DatabaseDataCreator.cs | 4 +- .../V_8_0_0/PropertyEditorsMigration.cs | 1 - .../Composing/TypeLoaderTests.cs | 2 +- .../Services/ContentServiceTests.cs | 2 +- .../TestHelpers/Entities/MockedContent.cs | 2 +- .../Entities/MockedContentTypes.cs | 2 +- .../Mvc/HtmlHelperExtensionMethodsTests.cs | 25 --- src/Umbraco.Web/HtmlHelperRenderExtensions.cs | 34 ---- src/Umbraco.Web/Models/RelatedLink.cs | 11 -- src/Umbraco.Web/Models/RelatedLinkBase.cs | 18 -- src/Umbraco.Web/Models/RelatedLinkType.cs | 27 --- src/Umbraco.Web/Models/RelatedLinks.cs | 42 ----- .../RelatedLinksConfiguration.cs | 13 -- .../RelatedLinksConfigurationEditor.cs | 18 -- .../RelatedLinksPropertyEditor.cs | 16 -- .../RelatedLinksLegacyValueConverter.cs | 132 -------------- .../RelatedLinksValueConverter.cs | 169 ------------------ src/Umbraco.Web/RelatedLinksTypeConverter.cs | 98 ---------- src/Umbraco.Web/Umbraco.Web.csproj | 10 -- 20 files changed, 7 insertions(+), 626 deletions(-) delete mode 100644 src/Umbraco.Web/Models/RelatedLink.cs delete mode 100644 src/Umbraco.Web/Models/RelatedLinkBase.cs delete mode 100644 src/Umbraco.Web/Models/RelatedLinkType.cs delete mode 100644 src/Umbraco.Web/Models/RelatedLinks.cs delete mode 100644 src/Umbraco.Web/PropertyEditors/RelatedLinksConfiguration.cs delete mode 100644 src/Umbraco.Web/PropertyEditors/RelatedLinksConfigurationEditor.cs delete mode 100644 src/Umbraco.Web/PropertyEditors/RelatedLinksPropertyEditor.cs delete mode 100644 src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksLegacyValueConverter.cs delete mode 100644 src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksValueConverter.cs delete mode 100644 src/Umbraco.Web/RelatedLinksTypeConverter.cs diff --git a/src/Umbraco.Core/Constants-PropertyEditors.cs b/src/Umbraco.Core/Constants-PropertyEditors.cs index b9f20fb449..8b637fe90e 100644 --- a/src/Umbraco.Core/Constants-PropertyEditors.cs +++ b/src/Umbraco.Core/Constants-PropertyEditors.cs @@ -118,12 +118,7 @@ namespace Umbraco.Core /// RadioButton list. /// public const string RadioButtonList = "Umbraco.RadioButtonList"; - - /// - /// Related Links. - /// - public const string RelatedLinks = "Umbraco.RelatedLinks"; - + /// /// Slider. /// diff --git a/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs b/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs index f32ea1cb6f..4e0b5dfa0f 100644 --- a/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs +++ b/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs @@ -135,7 +135,7 @@ namespace Umbraco.Core.Migrations.Install _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1047, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1047", SortOrder = 2, UniqueId = new Guid("1EA2E01F-EBD8-4CE1-8D71-6B1149E63548"), Text = "Member Picker", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1048, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1048", SortOrder = 2, UniqueId = new Guid("135D60E0-64D9-49ED-AB08-893C9BA44AE5"), Text = "Media Picker", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1049, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1049", SortOrder = 2, UniqueId = new Guid("9DBBCBBB-2327-434A-B355-AF1B84E5010A"), Text = "Multiple Media Picker", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1050, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1050", SortOrder = 2, UniqueId = new Guid("B4E3535A-1753-47E2-8568-602CF8CFEE6F"), Text = "Related Links", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); + _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1050, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1050", SortOrder = 2, UniqueId = new Guid("B4E3535A-1753-47E2-8568-602CF8CFEE6F"), Text = "Multi URL Picker", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); } private void CreateLockData() @@ -301,7 +301,7 @@ namespace Umbraco.Core.Migrations.Install _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = 1048, EditorAlias = Constants.PropertyEditors.Aliases.MediaPicker, DbType = "Ntext" }); _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = 1049, EditorAlias = Constants.PropertyEditors.Aliases.MediaPicker, DbType = "Ntext", Configuration = "{\"multiPicker\":1}" }); - _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = 1050, EditorAlias = Constants.PropertyEditors.Aliases.RelatedLinks, DbType = "Ntext" }); + _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = 1050, EditorAlias = Constants.PropertyEditors.Aliases.MultiUrlPicker, DbType = "Ntext" }); } private void CreateRelationTypeData() diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigration.cs b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigration.cs index ee439088be..064ffc7228 100644 --- a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigration.cs +++ b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigration.cs @@ -16,7 +16,6 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 RenameDataType(Constants.PropertyEditors.Aliases.MediaPicker + "2", Constants.PropertyEditors.Aliases.MediaPicker); RenameDataType(Constants.PropertyEditors.Aliases.MemberPicker + "2", Constants.PropertyEditors.Aliases.MemberPicker); RenameDataType(Constants.PropertyEditors.Aliases.MultiNodeTreePicker + "2", Constants.PropertyEditors.Aliases.MultiNodeTreePicker); - RenameDataType(Constants.PropertyEditors.Aliases.RelatedLinks + "2", Constants.PropertyEditors.Aliases.RelatedLinks); RenameDataType("Umbraco.TextboxMultiple", Constants.PropertyEditors.Aliases.TextArea, false); RenameDataType("Umbraco.Textbox", Constants.PropertyEditors.Aliases.TextBox, false); } diff --git a/src/Umbraco.Tests/Composing/TypeLoaderTests.cs b/src/Umbraco.Tests/Composing/TypeLoaderTests.cs index 6b3ce3eb4e..add3424599 100644 --- a/src/Umbraco.Tests/Composing/TypeLoaderTests.cs +++ b/src/Umbraco.Tests/Composing/TypeLoaderTests.cs @@ -279,7 +279,7 @@ AnotherContentFinder public void GetDataEditors() { var types = _typeLoader.GetDataEditors(); - Assert.AreEqual(40, types.Count()); + Assert.AreEqual(39, types.Count()); } /// diff --git a/src/Umbraco.Tests/Services/ContentServiceTests.cs b/src/Umbraco.Tests/Services/ContentServiceTests.cs index 039bcaed24..9490213d62 100644 --- a/src/Umbraco.Tests/Services/ContentServiceTests.cs +++ b/src/Umbraco.Tests/Services/ContentServiceTests.cs @@ -2215,7 +2215,7 @@ namespace Umbraco.Tests.Services Assert.That(sut.GetValue("contentPicker"), Is.EqualTo(Udi.Create(Constants.UdiEntityType.Document, new Guid("74ECA1D4-934E-436A-A7C7-36CC16D4095C")))); Assert.That(sut.GetValue("mediaPicker"), Is.EqualTo(Udi.Create(Constants.UdiEntityType.Media, new Guid("44CB39C8-01E5-45EB-9CF8-E70AAF2D1691")))); Assert.That(sut.GetValue("memberPicker"), Is.EqualTo(Udi.Create(Constants.UdiEntityType.Member, new Guid("9A50A448-59C0-4D42-8F93-4F1D55B0F47D")))); - Assert.That(sut.GetValue("relatedLinks"), Is.EqualTo("")); + Assert.That(sut.GetValue("multiUrlPicker"), Is.EqualTo("[{\"name\":\"https://test.com\",\"url\":\"https://test.com\"}]")); Assert.That(sut.GetValue("tags"), Is.EqualTo("this,is,tags")); } diff --git a/src/Umbraco.Tests/TestHelpers/Entities/MockedContent.cs b/src/Umbraco.Tests/TestHelpers/Entities/MockedContent.cs index faf4acf8a4..19a57d7775 100644 --- a/src/Umbraco.Tests/TestHelpers/Entities/MockedContent.cs +++ b/src/Umbraco.Tests/TestHelpers/Entities/MockedContent.cs @@ -132,7 +132,7 @@ namespace Umbraco.Tests.TestHelpers.Entities content.SetValue("contentPicker", Udi.Create(Constants.UdiEntityType.Document, new Guid("74ECA1D4-934E-436A-A7C7-36CC16D4095C")).ToString()); content.SetValue("mediaPicker", Udi.Create(Constants.UdiEntityType.Media, new Guid("44CB39C8-01E5-45EB-9CF8-E70AAF2D1691")).ToString()); content.SetValue("memberPicker", Udi.Create(Constants.UdiEntityType.Member, new Guid("9A50A448-59C0-4D42-8F93-4F1D55B0F47D")).ToString()); - content.SetValue("relatedLinks", ""); + content.SetValue("multiUrlPicker", "[{\"name\":\"https://test.com\",\"url\":\"https://test.com\"}]"); content.SetValue("tags", "this,is,tags"); return content; diff --git a/src/Umbraco.Tests/TestHelpers/Entities/MockedContentTypes.cs b/src/Umbraco.Tests/TestHelpers/Entities/MockedContentTypes.cs index 14b967b1c9..d7dcf8e79a 100644 --- a/src/Umbraco.Tests/TestHelpers/Entities/MockedContentTypes.cs +++ b/src/Umbraco.Tests/TestHelpers/Entities/MockedContentTypes.cs @@ -370,7 +370,7 @@ namespace Umbraco.Tests.TestHelpers.Entities contentCollection.Add(new PropertyType(Constants.PropertyEditors.Aliases.ContentPicker, ValueStorageType.Integer) { Alias = "contentPicker", Name = "Content Picker", Mandatory = false, SortOrder = 16, DataTypeId = 1046 }); contentCollection.Add(new PropertyType(Constants.PropertyEditors.Aliases.MediaPicker, ValueStorageType.Integer) { Alias = "mediaPicker", Name = "Media Picker", Mandatory = false, SortOrder = 17, DataTypeId = 1048 }); contentCollection.Add(new PropertyType(Constants.PropertyEditors.Aliases.MemberPicker, ValueStorageType.Integer) { Alias = "memberPicker", Name = "Member Picker", Mandatory = false, SortOrder = 18, DataTypeId = 1047 }); - contentCollection.Add(new PropertyType(Constants.PropertyEditors.Aliases.RelatedLinks, ValueStorageType.Ntext) { Alias = "relatedLinks", Name = "Related Links", Mandatory = false, SortOrder = 21, DataTypeId = 1050 }); + contentCollection.Add(new PropertyType(Constants.PropertyEditors.Aliases.MultiUrlPicker, ValueStorageType.Nvarchar) { Alias = "multiUrlPicker", Name = "Multi URL Picker", Mandatory = false, SortOrder = 21, DataTypeId = 1050 }); contentCollection.Add(new PropertyType(Constants.PropertyEditors.Aliases.Tags, ValueStorageType.Ntext) { Alias = "tags", Name = "Tags", Mandatory = false, SortOrder = 22, DataTypeId = 1041 }); contentType.PropertyGroups.Add(new PropertyGroup(contentCollection) { Name = "Content", SortOrder = 1 }); diff --git a/src/Umbraco.Tests/Web/Mvc/HtmlHelperExtensionMethodsTests.cs b/src/Umbraco.Tests/Web/Mvc/HtmlHelperExtensionMethodsTests.cs index cc83dcb1c9..ba19f41e74 100644 --- a/src/Umbraco.Tests/Web/Mvc/HtmlHelperExtensionMethodsTests.cs +++ b/src/Umbraco.Tests/Web/Mvc/HtmlHelperExtensionMethodsTests.cs @@ -29,30 +29,5 @@ namespace Umbraco.Tests.Web.Mvc var output = _htmlHelper.Wrap("div", "hello world", new {style = "color:red;", onclick = "void();"}); Assert.AreEqual("
hello world
", output.ToHtmlString()); } - - [Test] - public void GetRelatedLinkHtml_Simple() - { - var relatedLink = new Umbraco.Web.Models.RelatedLink { - Caption = "Link Caption", - NewWindow = true, - Link = "https://www.google.com/" - }; - var output = _htmlHelper.GetRelatedLinkHtml(relatedLink); - Assert.AreEqual("Link Caption", output.ToHtmlString()); - } - - [Test] - public void GetRelatedLinkHtml_HtmlAttributes() - { - var relatedLink = new Umbraco.Web.Models.RelatedLink - { - Caption = "Link Caption", - NewWindow = true, - Link = "https://www.google.com/" - }; - var output = _htmlHelper.GetRelatedLinkHtml(relatedLink, new { @class = "test-class"}); - Assert.AreEqual("Link Caption", output.ToHtmlString()); - } } } diff --git a/src/Umbraco.Web/HtmlHelperRenderExtensions.cs b/src/Umbraco.Web/HtmlHelperRenderExtensions.cs index 626a19a369..1186102bc8 100644 --- a/src/Umbraco.Web/HtmlHelperRenderExtensions.cs +++ b/src/Umbraco.Web/HtmlHelperRenderExtensions.cs @@ -830,39 +830,5 @@ namespace Umbraco.Web } #endregion - - - #region RelatedLink - - /// - /// Renders an anchor element for a RelatedLink instance. - /// Format: <a href="relatedLink.Link" target="_blank/_self">relatedLink.Caption</a> - /// - /// The HTML helper instance that this method extends. - /// The RelatedLink instance - /// An anchor element - public static MvcHtmlString GetRelatedLinkHtml(this HtmlHelper htmlHelper, RelatedLink relatedLink) - { - return htmlHelper.GetRelatedLinkHtml(relatedLink, null); - } - - /// - /// Renders an anchor element for a RelatedLink instance, accepting htmlAttributes. - /// Format: <a href="relatedLink.Link" target="_blank/_self" htmlAttributes>relatedLink.Caption</a> - /// - /// The HTML helper instance that this method extends. - /// The RelatedLink instance - /// An object that contains the HTML attributes to set for the element. - /// - public static MvcHtmlString GetRelatedLinkHtml(this HtmlHelper htmlHelper, RelatedLink relatedLink, object htmlAttributes) - { - var tagBuilder = new TagBuilder("a"); - tagBuilder.MergeAttributes(HtmlHelper.AnonymousObjectToHtmlAttributes(htmlAttributes)); - tagBuilder.MergeAttribute("href", relatedLink.Link); - tagBuilder.MergeAttribute("target", relatedLink.NewWindow ? "_blank" : "_self"); - tagBuilder.InnerHtml = HttpUtility.HtmlEncode(relatedLink.Caption); - return MvcHtmlString.Create(tagBuilder.ToString(TagRenderMode.Normal)); - } - #endregion } } diff --git a/src/Umbraco.Web/Models/RelatedLink.cs b/src/Umbraco.Web/Models/RelatedLink.cs deleted file mode 100644 index 1e1d7636ad..0000000000 --- a/src/Umbraco.Web/Models/RelatedLink.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Umbraco.Core.Models.PublishedContent; - -namespace Umbraco.Web.Models -{ - public class RelatedLink : RelatedLinkBase - { - public int? Id { get; internal set; } - internal bool IsDeleted { get; set; } - public IPublishedContent Content { get; set; } - } -} diff --git a/src/Umbraco.Web/Models/RelatedLinkBase.cs b/src/Umbraco.Web/Models/RelatedLinkBase.cs deleted file mode 100644 index c2077ce4a9..0000000000 --- a/src/Umbraco.Web/Models/RelatedLinkBase.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Newtonsoft.Json; - -namespace Umbraco.Web.Models -{ - public abstract class RelatedLinkBase - { - [JsonProperty("caption")] - public string Caption { get; set; } - [JsonProperty("link")] - public string Link { get; set; } - [JsonProperty("newWindow")] - public bool NewWindow { get; set; } - [JsonProperty("isInternal")] - public bool IsInternal { get; set; } - [JsonProperty("type")] - public RelatedLinkType Type { get; set; } - } -} diff --git a/src/Umbraco.Web/Models/RelatedLinkType.cs b/src/Umbraco.Web/Models/RelatedLinkType.cs deleted file mode 100644 index eec7817ab6..0000000000 --- a/src/Umbraco.Web/Models/RelatedLinkType.cs +++ /dev/null @@ -1,27 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Umbraco -// -// -// Defines the RelatedLinkType type. -// -// -------------------------------------------------------------------------------------------------------------------- - -namespace Umbraco.Web.Models -{ - /// - /// The related link type. - /// - public enum RelatedLinkType - { - /// - /// Internal link type - /// - Internal, - - /// - /// External link type - /// - External - } -} diff --git a/src/Umbraco.Web/Models/RelatedLinks.cs b/src/Umbraco.Web/Models/RelatedLinks.cs deleted file mode 100644 index 22cdcd11b6..0000000000 --- a/src/Umbraco.Web/Models/RelatedLinks.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; - -namespace Umbraco.Web.Models -{ - [TypeConverter(typeof(RelatedLinksTypeConverter))] - public class RelatedLinks : IEnumerable - { - private readonly string _propertyData; - - private readonly IEnumerable _relatedLinks; - - public RelatedLinks(IEnumerable relatedLinks, string propertyData) - { - _relatedLinks = relatedLinks; - _propertyData = propertyData; - } - - /// - /// Gets the property data. - /// - internal string PropertyData - { - get - { - return this._propertyData; - } - } - - public IEnumerator GetEnumerator() - { - return _relatedLinks.GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return this.GetEnumerator(); - } - } -} diff --git a/src/Umbraco.Web/PropertyEditors/RelatedLinksConfiguration.cs b/src/Umbraco.Web/PropertyEditors/RelatedLinksConfiguration.cs deleted file mode 100644 index 5db14c6842..0000000000 --- a/src/Umbraco.Web/PropertyEditors/RelatedLinksConfiguration.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Umbraco.Core.PropertyEditors; - -namespace Umbraco.Web.PropertyEditors -{ - /// - /// Represents the configuration for the related links value editor. - /// - public class RelatedLinksConfiguration - { - [ConfigurationField("max", "Maximum number of links", "number", Description = "Enter the maximum amount of links to be added, enter 0 for unlimited")] - public int Maximum { get; set; } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/PropertyEditors/RelatedLinksConfigurationEditor.cs b/src/Umbraco.Web/PropertyEditors/RelatedLinksConfigurationEditor.cs deleted file mode 100644 index 07ff359a82..0000000000 --- a/src/Umbraco.Web/PropertyEditors/RelatedLinksConfigurationEditor.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Collections.Generic; -using Umbraco.Core.PropertyEditors; - -namespace Umbraco.Web.PropertyEditors -{ - /// - /// Represents the configuration editor for the related links value editor. - /// - public class RelatedLinksConfigurationEditor : ConfigurationEditor - { - public override IDictionary ToValueEditor(object configuration) - { - var d = base.ToValueEditor(configuration); - d["idType"] = "udi"; - return d; - } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/PropertyEditors/RelatedLinksPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/RelatedLinksPropertyEditor.cs deleted file mode 100644 index b450fcc67f..0000000000 --- a/src/Umbraco.Web/PropertyEditors/RelatedLinksPropertyEditor.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Umbraco.Core; -using Umbraco.Core.Logging; -using Umbraco.Core.PropertyEditors; - -namespace Umbraco.Web.PropertyEditors -{ - [DataEditor(Constants.PropertyEditors.Aliases.RelatedLinks, "Related links", "relatedlinks", ValueType = ValueTypes.Json, Icon = "icon-thumbnail-list", Group = "pickers")] - public class RelatedLinksPropertyEditor : DataEditor - { - public RelatedLinksPropertyEditor(ILogger logger) - : base(logger) - { } - - protected override IConfigurationEditor CreateConfigurationEditor() => new RelatedLinksConfigurationEditor(); - } -} diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksLegacyValueConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksLegacyValueConverter.cs deleted file mode 100644 index 6c2a4331d0..0000000000 --- a/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksLegacyValueConverter.cs +++ /dev/null @@ -1,132 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Xml; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Logging; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.PropertyEditors.ValueConverters; -using Umbraco.Core.Services; - -namespace Umbraco.Web.PropertyEditors.ValueConverters -{ - [DefaultPropertyValueConverter(typeof(JsonValueConverter))] //this shadows the JsonValueConverter - public class RelatedLinksLegacyValueConverter : PropertyValueConverterBase - { - private static readonly string[] MatchingEditors = { - Constants.PropertyEditors.Aliases.RelatedLinks - }; - - private readonly IUmbracoContextAccessor _umbracoContextAccessor; - private readonly ILogger _logger; - private readonly ServiceContext _services; - - public RelatedLinksLegacyValueConverter(IUmbracoContextAccessor umbracoContextAccessor, ServiceContext services, ILogger logger) - { - _umbracoContextAccessor = umbracoContextAccessor; - _services = services; - _logger = logger; - } - - public override bool IsConverter(PublishedPropertyType propertyType) - => MatchingEditors.Contains(propertyType.EditorAlias); - - public override Type GetPropertyValueType(PublishedPropertyType propertyType) - => typeof (JArray); - - public override PropertyCacheLevel GetPropertyCacheLevel(PublishedPropertyType propertyType) - => PropertyCacheLevel.Element; - - public override object ConvertSourceToIntermediate(IPublishedElement owner, PublishedPropertyType propertyType, object source, bool preview) - { - if (source == null) return null; - var sourceString = source.ToString(); - - if (sourceString.DetectIsJson()) - { - try - { - var obj = JsonConvert.DeserializeObject(sourceString); - //update the internal links if we have a context - if (UmbracoContext.Current != null) - { - var helper = new UmbracoHelper(_umbracoContextAccessor.UmbracoContext, _services); - foreach (var a in obj) - { - var type = a.Value("type"); - if (type.IsNullOrWhiteSpace() == false) - { - if (type == "internal") - { - switch (propertyType.EditorAlias) - { - case Constants.PropertyEditors.Aliases.RelatedLinks: - var strLinkId = a.Value("link"); - var udiAttempt = strLinkId.TryConvertTo(); - if (udiAttempt) - { - var content = helper.PublishedContent(udiAttempt.Result); - if (content == null) break; - a["link"] = helper.Url(content.Id); - } - break; - } - } - } - } - } - return obj; - } - catch (Exception ex) - { - _logger.Error(ex, "Could not parse the string '{Json}' to a json object", sourceString); - } - } - - //it's not json, just return the string - return sourceString; - } - - public override object ConvertIntermediateToXPath(IPublishedElement owner, PublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object source, bool preview) - { - if (source == null) return null; - var sourceString = source.ToString(); - - if (sourceString.DetectIsJson()) - { - try - { - var obj = JsonConvert.DeserializeObject(sourceString); - - var d = new XmlDocument(); - var e = d.CreateElement("links"); - d.AppendChild(e); - - foreach (dynamic link in obj) - { - var ee = d.CreateElement("link"); - ee.SetAttribute("title", link.title); - ee.SetAttribute("link", link.link); - ee.SetAttribute("type", link.type); - ee.SetAttribute("newwindow", link.newWindow); - - e.AppendChild(ee); - } - - return d.CreateNavigator(); - } - catch (Exception ex) - { - _logger.Error(ex, "Could not parse the string '{Json}' to a json object", sourceString); - } - } - - //it's not json, just return the string - return sourceString; - } - } -} diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksValueConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksValueConverter.cs deleted file mode 100644 index 983d122a83..0000000000 --- a/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksValueConverter.cs +++ /dev/null @@ -1,169 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Xml; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using Umbraco.Core; -using Umbraco.Core.Logging; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.PropertyEditors.ValueConverters; -using Umbraco.Web.Models; -using Umbraco.Web.PublishedCache; - -namespace Umbraco.Web.PropertyEditors.ValueConverters -{ - /// - /// The related links property value converter. - /// - [DefaultPropertyValueConverter(typeof(RelatedLinksLegacyValueConverter), typeof(JsonValueConverter))] - public class RelatedLinksValueConverter : PropertyValueConverterBase - { - private readonly IPublishedSnapshotAccessor _publishedSnapshotAccessor; - private readonly IUmbracoContextAccessor _umbracoContextAccessor; - private readonly ILogger _logger; - - public RelatedLinksValueConverter(IPublishedSnapshotAccessor publishedSnapshotAccessor, IUmbracoContextAccessor umbracoContextAccessor, ILogger logger) - { - _publishedSnapshotAccessor = publishedSnapshotAccessor; - _umbracoContextAccessor = umbracoContextAccessor; - _logger = logger; - } - - /// - /// Checks if this converter can convert the property editor and registers if it can. - /// - /// - /// The property type. - /// - /// - /// The . - /// - public override bool IsConverter(PublishedPropertyType propertyType) - => propertyType.EditorAlias.Equals(Constants.PropertyEditors.Aliases.RelatedLinks); - - public override Type GetPropertyValueType(PublishedPropertyType propertyType) - => typeof (JArray); - - public override PropertyCacheLevel GetPropertyCacheLevel(PublishedPropertyType propertyType) - => PropertyCacheLevel.Element; - - public override object ConvertSourceToIntermediate(IPublishedElement owner, PublishedPropertyType propertyType, object source, bool preview) - { - if (source == null) return null; - var sourceString = source.ToString(); - - var relatedLinksData = JsonConvert.DeserializeObject>(sourceString); - var relatedLinks = new List(); - - foreach (var linkData in relatedLinksData) - { - var relatedLink = new RelatedLink - { - Caption = linkData.Caption, - NewWindow = linkData.NewWindow, - IsInternal = linkData.IsInternal, - Type = linkData.Type, - Link = linkData.Link - }; - - int contentId; - if (int.TryParse(relatedLink.Link, out contentId)) - { - relatedLink.Id = contentId; - relatedLink = CreateLink(relatedLink); - } - else - { - var strLinkId = linkData.Link; - var udiAttempt = strLinkId.TryConvertTo(); - if (udiAttempt.Success && udiAttempt.Result != null) - { - var content = _publishedSnapshotAccessor.PublishedSnapshot.Content.GetById(udiAttempt.Result.Guid); - if (content != null) - { - relatedLink.Id = content.Id; - relatedLink = CreateLink(relatedLink); - relatedLink.Content = content; - } - } - } - - if (relatedLink.IsDeleted == false) - { - relatedLinks.Add(relatedLink); - } - else - { - _logger.Warn("Related Links value converter skipped a link as the node has been unpublished/deleted (Internal Link NodeId: {RelatedLinkNodeId}, Link Caption: '{RelatedLinkCaption}')", relatedLink.Link, relatedLink.Caption); - } - } - - return new RelatedLinks(relatedLinks, sourceString); - } - - private RelatedLink CreateLink(RelatedLink link) - { - var umbracoContext = _umbracoContextAccessor.UmbracoContext; - - if (link.IsInternal && link.Id != null) - { - if (umbracoContext == null) - return null; - - var urlProvider = umbracoContext.UrlProvider; - - link.Link = urlProvider.GetUrl((int)link.Id); - if (link.Link.Equals("#")) - { - link.IsDeleted = true; - link.Link = link.Id.ToString(); - } - else - { - link.IsDeleted = false; - } - } - - return link; - } - - public override object ConvertIntermediateToXPath(IPublishedElement owner, PublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object inter, bool preview) - { - if (inter == null) return null; - var sourceString = inter.ToString(); - - if (sourceString.DetectIsJson()) - { - try - { - var obj = JsonConvert.DeserializeObject(sourceString); - - var d = new XmlDocument(); - var e = d.CreateElement("links"); - d.AppendChild(e); - - foreach (dynamic link in obj) - { - var ee = d.CreateElement("link"); - ee.SetAttribute("title", link.title); - ee.SetAttribute("link", link.link); - ee.SetAttribute("type", link.type); - ee.SetAttribute("newwindow", link.newWindow); - - e.AppendChild(ee); - } - - return d.CreateNavigator(); - } - catch (Exception ex) - { - _logger.Error(ex, "Could not parse the string {Json} to a json object", sourceString); - } - } - - //it's not json, just return the string - return sourceString; - } - } -} diff --git a/src/Umbraco.Web/RelatedLinksTypeConverter.cs b/src/Umbraco.Web/RelatedLinksTypeConverter.cs deleted file mode 100644 index 647959b920..0000000000 --- a/src/Umbraco.Web/RelatedLinksTypeConverter.cs +++ /dev/null @@ -1,98 +0,0 @@ -using System; -using System.ComponentModel; -using System.Globalization; -using System.Linq; - -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; - -using Umbraco.Core; -using Umbraco.Core.Logging; -using Umbraco.Core.Composing; -using Umbraco.Web.Models; - -namespace Umbraco.Web -{ - public class RelatedLinksTypeConverter : TypeConverter - { - private readonly UmbracoHelper _umbracoHelper; - - public RelatedLinksTypeConverter(UmbracoHelper umbracoHelper) - { - _umbracoHelper = umbracoHelper; - } - - public RelatedLinksTypeConverter() - { - - } - - private static readonly Type[] ConvertableTypes = new[] - { - typeof(JArray) - }; - - public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) - { - return ConvertableTypes.Any(x => TypeHelper.IsTypeAssignableFrom(x, destinationType)) - || base.CanConvertFrom(context, destinationType); - } - - public override object ConvertTo( - ITypeDescriptorContext context, - CultureInfo culture, - object value, - Type destinationType) - { - var relatedLinks = value as RelatedLinks; - if (relatedLinks == null) - return null; - - if (TypeHelper.IsTypeAssignableFrom(destinationType)) - { - // Conversion to JArray taken from old value converter - - var obj = JsonConvert.DeserializeObject(relatedLinks.PropertyData); - - var umbracoHelper = GetUmbracoHelper(); - - //update the internal links if we have a context - if (umbracoHelper != null) - { - foreach (var a in obj) - { - var type = a.Value("type"); - if (type.IsNullOrWhiteSpace() == false) - { - if (type == "internal") - { - var linkId = a.Value("link"); - var link = umbracoHelper.Url(linkId); - a["link"] = link; - } - } - } - } - return obj; - - } - - return base.ConvertTo(context, culture, value, destinationType); - } - - private UmbracoHelper GetUmbracoHelper() - { - if (_umbracoHelper != null) - return _umbracoHelper; - - if (UmbracoContext.Current == null) - { - Current.Logger.Warn("Cannot create an UmbracoHelper the UmbracoContext is null"); - return null; - } - - //DO NOT assign to _umbracoHelper variable, this is a singleton class and we cannot assign this based on an UmbracoHelper which is request based - return new UmbracoHelper(UmbracoContext.Current, Current.Services); - } - } -} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 6736f7512b..64a60d824a 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -404,10 +404,6 @@ - - - - @@ -453,9 +449,6 @@ - - - @@ -471,7 +464,6 @@ - @@ -535,7 +527,6 @@ - @@ -860,7 +851,6 @@ - From f10b35780cdd1a15a0030786eee69353e9558a47 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 23 Jan 2019 10:22:29 +0100 Subject: [PATCH 228/437] - Removed PostFilterParams - Handling of PostFilter using Expression trees --- .../src/common/resources/entity.resource.js | 15 +- src/Umbraco.Web/Editors/EntityController.cs | 131 ++++++++++++++---- .../Editors/TemplateQueryController.cs | 2 +- .../Models/TemplateQuery/OperatorFactory.cs | 32 +++++ .../Models/TemplateQuery/QueryCondition.cs | 12 +- src/Umbraco.Web/Umbraco.Web.csproj | 1 + 6 files changed, 147 insertions(+), 46 deletions(-) create mode 100644 src/Umbraco.Web/Models/TemplateQuery/OperatorFactory.cs diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/entity.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/entity.resource.js index f864696873..753d180880 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/entity.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/entity.resource.js @@ -254,22 +254,13 @@ function entityResource($q, $http, umbRequestHelper) { * * @param {string} type Object type name * @param {string} postFilter optional filter expression which will execute a dynamic where clause on the server - * @param {string} postFilterParams optional parameters for the postFilter expression * @returns {Promise} resourcePromise object containing the entity. * */ - getAll: function (type, postFilter, postFilterParams) { - + getAll: function (type, postFilter) { //need to build the query string manually - var query = "type=" + type + "&postFilter=" + (postFilter ? postFilter : ""); - if (postFilter && postFilterParams) { - var counter = 0; - _.each(postFilterParams, function(val, key) { - query += "&postFilterParams[" + counter + "].key=" + key + "&postFilterParams[" + counter + "].value=" + val; - counter++; - }); - } - + var query = "type=" + type + "&postFilter=" + (postFilter ? encodeURIComponent(postFilter) : ""); + return umbRequestHelper.resourcePromise( $http.get( umbRequestHelper.getApiUrl( diff --git a/src/Umbraco.Web/Editors/EntityController.cs b/src/Umbraco.Web/Editors/EntityController.cs index b25f3f5af1..19f7158c5d 100644 --- a/src/Umbraco.Web/Editors/EntityController.cs +++ b/src/Umbraco.Web/Editors/EntityController.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.ComponentModel; using System.Net; using System.Web.Http; using AutoMapper; @@ -11,11 +10,10 @@ using Umbraco.Web.Mvc; using System.Linq; using System.Net.Http; using System.Net.Http.Formatting; +using System.Reflection; using Umbraco.Core.Models; -using Constants = Umbraco.Core.Constants; using Umbraco.Core.Persistence.DatabaseModelDefinitions; using System.Web.Http.Controllers; -using Examine; using Umbraco.Core.Cache; using Umbraco.Core.Configuration; using Umbraco.Core.Logging; @@ -24,12 +22,14 @@ using Umbraco.Core.Persistence; using Umbraco.Core.Services; using Umbraco.Core.Xml; using Umbraco.Web.Models.Mapping; +using Umbraco.Web.Models.TemplateQuery; using Umbraco.Web.Search; using Umbraco.Web.Services; using Umbraco.Web.Trees; using Umbraco.Web.WebApi; using Umbraco.Web.WebApi.Filters; +using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Editors { /// @@ -242,7 +242,7 @@ namespace Umbraco.Web.Editors }; } - + /// /// Gets an entity by a xpath query /// @@ -863,9 +863,15 @@ namespace Umbraco.Web.Editors } } - public IEnumerable GetAll(UmbracoEntityTypes type, string postFilter, [FromUri]IDictionary postFilterParams) + /// + /// + /// + /// The type of entity. + /// Optional filter - Format like: "BoolVariable==true&IntVariable>=6". Invalid filters are ignored. + /// + public IEnumerable GetAll(UmbracoEntityTypes type, string postFilter) { - return GetResultForAll(type, postFilter, postFilterParams); + return GetResultForAll(type, postFilter); } /// @@ -873,29 +879,28 @@ namespace Umbraco.Web.Editors /// /// /// A string where filter that will filter the results dynamically with linq - optional - /// the parameters to fill in the string where filter - optional /// - private IEnumerable GetResultForAll(UmbracoEntityTypes entityType, string postFilter = null, IDictionary postFilterParams = null) + private IEnumerable GetResultForAll(UmbracoEntityTypes entityType, string postFilter = null) { var objectType = ConvertToObjectType(entityType); if (objectType.HasValue) { //TODO: Should we order this by something ? var entities = Services.EntityService.GetAll(objectType.Value).WhereNotNull().Select(Mapper.Map); - return ExecutePostFilter(entities, postFilter, postFilterParams); + return ExecutePostFilter(entities, postFilter); } //now we need to convert the unknown ones switch (entityType) { case UmbracoEntityTypes.Template: var templates = Services.FileService.GetTemplates(); - var filteredTemplates = ExecutePostFilter(templates, postFilter, postFilterParams); + var filteredTemplates = ExecutePostFilter(templates, postFilter); return filteredTemplates.Select(Mapper.Map); case UmbracoEntityTypes.Macro: //Get all macros from the macro service var macros = Services.MacroService.GetAll().WhereNotNull().OrderBy(x => x.Name); - var filteredMacros = ExecutePostFilter(macros, postFilter, postFilterParams); + var filteredMacros = ExecutePostFilter(macros, postFilter); return filteredMacros.Select(Mapper.Map); case UmbracoEntityTypes.PropertyType: @@ -906,7 +911,7 @@ namespace Umbraco.Web.Editors .ToArray() .SelectMany(x => x.PropertyTypes) .DistinctBy(composition => composition.Alias); - var filteredPropertyTypes = ExecutePostFilter(propertyTypes, postFilter, postFilterParams); + var filteredPropertyTypes = ExecutePostFilter(propertyTypes, postFilter); return Mapper.Map, IEnumerable>(filteredPropertyTypes); case UmbracoEntityTypes.PropertyGroup: @@ -917,32 +922,32 @@ namespace Umbraco.Web.Editors .ToArray() .SelectMany(x => x.PropertyGroups) .DistinctBy(composition => composition.Name); - var filteredpropertyGroups = ExecutePostFilter(propertyGroups, postFilter, postFilterParams); + var filteredpropertyGroups = ExecutePostFilter(propertyGroups, postFilter); return Mapper.Map, IEnumerable>(filteredpropertyGroups); case UmbracoEntityTypes.User: var users = Services.UserService.GetAll(0, int.MaxValue, out _); - var filteredUsers = ExecutePostFilter(users, postFilter, postFilterParams); + var filteredUsers = ExecutePostFilter(users, postFilter); return Mapper.Map, IEnumerable>(filteredUsers); case UmbracoEntityTypes.Stylesheet: - if (!postFilter.IsNullOrWhiteSpace() || (postFilterParams != null && postFilterParams.Count > 0)) + if (!postFilter.IsNullOrWhiteSpace()) throw new NotSupportedException("Filtering on stylesheets is not currently supported"); return Services.FileService.GetStylesheets().Select(Mapper.Map); - + case UmbracoEntityTypes.Language: - if (!postFilter.IsNullOrWhiteSpace() || (postFilterParams != null && postFilterParams.Count > 0)) + if (!postFilter.IsNullOrWhiteSpace() ) throw new NotSupportedException("Filtering on languages is not currently supported"); return Services.LocalizationService.GetAllLanguages().Select(Mapper.Map); case UmbracoEntityTypes.DictionaryItem: - if (!postFilter.IsNullOrWhiteSpace() || (postFilterParams != null && postFilterParams.Count > 0)) - throw new NotSupportedException("Filtering on languages is not currently supported"); + if (!postFilter.IsNullOrWhiteSpace()) + throw new NotSupportedException("Filtering on dictionary items is not currently supported"); return GetAllDictionaryItems(); @@ -952,20 +957,90 @@ namespace Umbraco.Web.Editors } } - private IEnumerable ExecutePostFilter(IEnumerable entities, string postFilter, IDictionary postFilterParams) + private IEnumerable ExecutePostFilter(IEnumerable entities, string postFilter) { - // if a post filter is assigned then try to execute it - if (postFilter.IsNullOrWhiteSpace() == false) + if (postFilter.IsNullOrWhiteSpace()) return entities; + + var postFilterConditions = postFilter.Split('&'); + + foreach (var postFilterCondition in postFilterConditions) { - // fixme/task/critical - trouble is, we've killed the dynamic Where thing! - throw new NotImplementedException("oops"); - //return postFilterParams == null - // ? entities.AsQueryable().Where(postFilter).ToArray() - // : entities.AsQueryable().Where(postFilter, postFilterParams).ToArray(); + var queryCondition = BuildQueryCondition(postFilterCondition); + + if (queryCondition != null) + { + var whereClauseExpression = queryCondition.BuildCondition("x"); + + entities = entities.Where(whereClauseExpression.Compile()); + } + } return entities; } + private static QueryCondition BuildQueryCondition(string postFilter) + { + var postFilterParts = postFilter.Split(new[] + { + "=", + "==", + "!=", + "<>", + ">", + "<", + ">=", + "<=" + }, 2, StringSplitOptions.RemoveEmptyEntries); + + if (postFilterParts.Length != 2) + { + return null; + } + + var propertyName = postFilterParts[0]; + var constraintValue = postFilterParts[1]; + var stringOperator = postFilter.Substring(propertyName.Length, + postFilter.Length - propertyName.Length - constraintValue.Length); + Operator binaryOperator; + + try + { + binaryOperator = OperatorFactory.FromString(stringOperator); + } + catch (ArgumentException) + { + // unsupported operators are ignored + return null; + } + + var type = typeof(T); + var property = type.GetProperty(propertyName, BindingFlags.Public | BindingFlags.Instance); + + if (property == null) + { + return null; + } + + var queryCondition = new QueryCondition() + { + Term = new OperatorTerm() + { + Operator = binaryOperator + }, + ConstraintValue = constraintValue, + Property = new PropertyModel() + { + Alias = propertyName, + Name = propertyName, + Type = property.PropertyType.Name + } + }; + + return queryCondition; + } + + + #region Methods to get all dictionary items private IEnumerable GetAllDictionaryItems() @@ -993,7 +1068,7 @@ namespace Umbraco.Web.Editors GetChildItemsForList(childItem, list); } - } + } #endregion } diff --git a/src/Umbraco.Web/Editors/TemplateQueryController.cs b/src/Umbraco.Web/Editors/TemplateQueryController.cs index 73ebdf3bc5..2483446ec2 100644 --- a/src/Umbraco.Web/Editors/TemplateQueryController.cs +++ b/src/Umbraco.Web/Editors/TemplateQueryController.cs @@ -118,7 +118,7 @@ namespace Umbraco.Web.Editors foreach (var condition in model.Filters.Where(x => !x.ConstraintValue.IsNullOrWhiteSpace())) { //x is passed in as the parameter alias for the linq where statement clause - var operation = condition.BuildCondition("x", contents, Properties); + var operation = condition.BuildCondition("x"); contents = contents.Where(operation.Compile()); queryExpression.Append(indent); diff --git a/src/Umbraco.Web/Models/TemplateQuery/OperatorFactory.cs b/src/Umbraco.Web/Models/TemplateQuery/OperatorFactory.cs new file mode 100644 index 0000000000..0b595723f1 --- /dev/null +++ b/src/Umbraco.Web/Models/TemplateQuery/OperatorFactory.cs @@ -0,0 +1,32 @@ +using System; + +namespace Umbraco.Web.Models.TemplateQuery +{ + public static class OperatorFactory + { + public static Operator FromString(string stringOperator) + { + if (stringOperator == null) throw new ArgumentNullException(nameof(stringOperator)); + + switch (stringOperator) + { + case "=": + case "==": + return Operator.Equals; + case "!=": + case "<>": + return Operator.NotEquals; + case "<": + return Operator.LessThan; + case "<=": + return Operator.LessThanEqualTo; + case ">": + return Operator.GreaterThan; + case ">=": + return Operator.GreaterThanEqualTo; + default: + throw new ArgumentException($"A operator cannot be created from the specified string '{stringOperator}'", nameof(stringOperator)); + } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/TemplateQuery/QueryCondition.cs b/src/Umbraco.Web/Models/TemplateQuery/QueryCondition.cs index 009b568556..a58badcf2c 100644 --- a/src/Umbraco.Web/Models/TemplateQuery/QueryCondition.cs +++ b/src/Umbraco.Web/Models/TemplateQuery/QueryCondition.cs @@ -18,11 +18,10 @@ namespace Umbraco.Web.Models.TemplateQuery private static Lazy StringContainsMethodInfo => new Lazy(() => typeof(string).GetMethod("Contains", new[] {typeof(string)})); - public static Expression> BuildCondition(this QueryCondition condition, - string parameterAlias, IEnumerable contents, IEnumerable properties) + public static Expression> BuildCondition(this QueryCondition condition, string parameterAlias) { object constraintValue; - switch (condition.Property.Type) + switch (condition.Property.Type.ToLowerInvariant()) { case "string": constraintValue = condition.ConstraintValue; @@ -30,12 +29,15 @@ namespace Umbraco.Web.Models.TemplateQuery case "datetime": constraintValue = DateTime.Parse(condition.ConstraintValue); break; + case "boolean": + constraintValue = Boolean.Parse(condition.ConstraintValue); + break; default: constraintValue = Convert.ChangeType(condition.ConstraintValue, typeof(int)); break; } - var parameterExpression = Expression.Parameter(typeof(IPublishedContent), parameterAlias); + var parameterExpression = Expression.Parameter(typeof(T), parameterAlias); var propertyExpression = Expression.Property(parameterExpression, condition.Property.Alias); var valueExpression = Expression.Constant(constraintValue); @@ -73,7 +75,7 @@ namespace Umbraco.Web.Models.TemplateQuery } var predicate = - Expression.Lambda>(bodyExpression.Reduce(), parameterExpression); + Expression.Lambda>(bodyExpression.Reduce(), parameterExpression); return predicate; } diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 6736f7512b..d2913dd228 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -172,6 +172,7 @@ + From d2d852f0f3583f89336a3db4b53ad68d12303d45 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 23 Jan 2019 10:39:51 +0100 Subject: [PATCH 229/437] Handled "Method with optional parameter is hidden by overload" issues --- src/Umbraco.Web/PublishedContentExtensions.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Web/PublishedContentExtensions.cs b/src/Umbraco.Web/PublishedContentExtensions.cs index 530c9bd9b4..f1e9e66e70 100644 --- a/src/Umbraco.Web/PublishedContentExtensions.cs +++ b/src/Umbraco.Web/PublishedContentExtensions.cs @@ -799,7 +799,7 @@ namespace Umbraco.Web return content.DescendantsOrSelf(false, p => p.Level >= level, culture); } - public static IEnumerable Descendants(this IPublishedContent content, string contentTypeAlias, string culture = null) + public static IEnumerable Descendants(this IPublishedContent content, string contentTypeAlias, string culture) { return content.DescendantsOrSelf(false, p => p.ContentType.Alias == contentTypeAlias, culture); } @@ -826,7 +826,7 @@ namespace Umbraco.Web return content.DescendantsOrSelf(true, p => p.Level >= level, culture); } - public static IEnumerable DescendantsOrSelf(this IPublishedContent content, string contentTypeAlias, string culture = null) + public static IEnumerable DescendantsOrSelf(this IPublishedContent content, string contentTypeAlias, string culture) { return content.DescendantsOrSelf(true, p => p.ContentType.Alias == contentTypeAlias, culture); } @@ -853,7 +853,7 @@ namespace Umbraco.Web return content.EnumerateDescendants(false, culture).FirstOrDefault(x => x.Level == level); } - public static IPublishedContent Descendant(this IPublishedContent content, string contentTypeAlias, string culture = null) + public static IPublishedContent Descendant(this IPublishedContent content, string contentTypeAlias, string culture) { return content.EnumerateDescendants(false, culture).FirstOrDefault(x => x.ContentType.Alias == contentTypeAlias); } @@ -880,7 +880,7 @@ namespace Umbraco.Web return content.EnumerateDescendants(true, culture).FirstOrDefault(x => x.Level == level); } - public static IPublishedContent DescendantOrSelf(this IPublishedContent content, string contentTypeAlias, string culture = null) + public static IPublishedContent DescendantOrSelf(this IPublishedContent content, string contentTypeAlias, string culture) { return content.EnumerateDescendants(true, culture).FirstOrDefault(x => x.ContentType.Alias == contentTypeAlias); } @@ -1017,7 +1017,7 @@ namespace Umbraco.Web /// /// Gets the first child of the content, of a given content type. /// - public static IPublishedContent FirstChild(this IPublishedContent content, string alias, string culture = null) // fixme/task oops + public static IPublishedContent FirstChild(this IPublishedContent content, string alias, string culture) { return content.Children(culture,alias).FirstOrDefault(); } From ca76a5424a0c88c1ed997925e5d3105e772b5ecc Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 23 Jan 2019 12:34:41 +0100 Subject: [PATCH 230/437] Only allow local KeepAlive Pings requests --- .../Editors/KeepAliveController.cs | 7 ++----- .../Mvc/OnlyLocalRequestsAttribute.cs | 20 +++++++++++++++++++ src/Umbraco.Web/Umbraco.Web.csproj | 1 + 3 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 src/Umbraco.Web/Mvc/OnlyLocalRequestsAttribute.cs diff --git a/src/Umbraco.Web/Editors/KeepAliveController.cs b/src/Umbraco.Web/Editors/KeepAliveController.cs index fa33abea44..b15621ee23 100644 --- a/src/Umbraco.Web/Editors/KeepAliveController.cs +++ b/src/Umbraco.Web/Editors/KeepAliveController.cs @@ -1,16 +1,13 @@ using System.Runtime.Serialization; using System.Web.Http; +using Umbraco.Web.Mvc; using Umbraco.Web.WebApi; namespace Umbraco.Web.Editors { - // fixme/task - deal with this - // this is not authenticated, and therefore public, and therefore reveals we - // are running Umbraco - but, all requests should come from localhost really, - // so there should be a way to 404 when the request comes from the outside. - public class KeepAliveController : UmbracoApiController { + [OnlyLocalRequests] [HttpGet] public KeepAlivePingResult Ping() { diff --git a/src/Umbraco.Web/Mvc/OnlyLocalRequestsAttribute.cs b/src/Umbraco.Web/Mvc/OnlyLocalRequestsAttribute.cs new file mode 100644 index 0000000000..ed36e6e3df --- /dev/null +++ b/src/Umbraco.Web/Mvc/OnlyLocalRequestsAttribute.cs @@ -0,0 +1,20 @@ + +using System.Net; +using System.Net.Http; +using System.Web.Http; +using System.Web.Http.Controllers; +using System.Web.Http.Filters; + +namespace Umbraco.Web.Mvc +{ + public class OnlyLocalRequestsAttribute : ActionFilterAttribute + { + public override void OnActionExecuting(HttpActionContext actionContext) + { + if (!actionContext.Request.IsLocal()) + { + throw new HttpResponseException(HttpStatusCode.NotFound); + } + } + } +} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 64a60d824a..7211ec8af9 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -172,6 +172,7 @@ + From f8b52a57c3cbdf99ab497b9018fb5c34073e085a Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 23 Jan 2019 14:16:42 +0100 Subject: [PATCH 231/437] Injecting Umbraco Context Accessor and not saving the url on the class --- .../PublishedContentCacheTests.cs | 7 ++-- .../PublishedMediaCacheTests.cs | 18 ++++++---- .../Published/NestedContentTests.cs | 7 ++-- .../PublishedContent/NuCacheTests.cs | 1 + .../PublishedContent/PublishedMediaTests.cs | 6 ++-- .../Scoping/ScopedNuCacheTests.cs | 1 + .../ContentTypeServiceVariantsTests.cs | 2 ++ .../TestHelpers/TestWithDatabaseBase.cs | 1 + .../Web/Mvc/UmbracoViewPageTests.cs | 8 +++-- .../Models/PublishedContentBase.cs | 34 +++++++++---------- .../PublishedCache/NuCache/ContentNode.cs | 29 +++++++++------- .../PublishedCache/NuCache/ContentNodeKit.cs | 9 +++-- .../PublishedCache/NuCache/ContentStore.cs | 19 +++++++---- .../PublishedCache/NuCache/MemberCache.cs | 14 +++++--- .../NuCache/PublishedContent.cs | 22 +++++++++--- .../PublishedCache/NuCache/PublishedMember.cs | 21 +++++++++--- .../NuCache/PublishedSnapshotService.cs | 14 ++++---- .../PublishedCache/PublishedMember.cs | 6 +++- .../DictionaryPublishedContent.cs | 4 ++- .../PublishedContentCache.cs | 7 ++-- .../XmlPublishedCache/PublishedMediaCache.cs | 9 +++-- .../XmlPublishedCache/PublishedMemberCache.cs | 15 ++++---- .../PublishedSnapshotService.cs | 18 ++++++---- .../XmlPublishedCache/XmlPublishedContent.cs | 22 ++++++++---- 24 files changed, 194 insertions(+), 100 deletions(-) diff --git a/src/Umbraco.Tests/Cache/PublishedCache/PublishedContentCacheTests.cs b/src/Umbraco.Tests/Cache/PublishedCache/PublishedContentCacheTests.cs index 147a159d5f..e868e32b07 100644 --- a/src/Umbraco.Tests/Cache/PublishedCache/PublishedContentCacheTests.cs +++ b/src/Umbraco.Tests/Cache/PublishedCache/PublishedContentCacheTests.cs @@ -59,6 +59,7 @@ namespace Umbraco.Tests.Cache.PublishedCache var umbracoSettings = Factory.GetInstance(); var globalSettings = Factory.GetInstance(); + var umbracoContextAccessor = Factory.GetInstance(); _xml = new XmlDocument(); _xml.LoadXml(GetXml()); @@ -66,9 +67,9 @@ namespace Umbraco.Tests.Cache.PublishedCache var appCache = new DictionaryAppCache(); var domainCache = new DomainCache(ServiceContext.DomainService, DefaultCultureAccessor); var publishedShapshot = new Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedSnapshot( - new PublishedContentCache(xmlStore, domainCache, appCache, globalSettings, new SiteDomainHelper(), ContentTypesCache, null, null), - new PublishedMediaCache(xmlStore, ServiceContext.MediaService, ServiceContext.UserService, appCache, ContentTypesCache, Factory.GetInstance()), - new PublishedMemberCache(null, appCache, Current.Services.MemberService, ContentTypesCache), + new PublishedContentCache(xmlStore, domainCache, appCache, globalSettings, new SiteDomainHelper(), umbracoContextAccessor, ContentTypesCache, null, null), + new PublishedMediaCache(xmlStore, ServiceContext.MediaService, ServiceContext.UserService, appCache, ContentTypesCache, Factory.GetInstance(), umbracoContextAccessor), + new PublishedMemberCache(null, appCache, Current.Services.MemberService, ContentTypesCache, umbracoContextAccessor), domainCache); var publishedSnapshotService = new Mock(); publishedSnapshotService.Setup(x => x.CreatePublishedSnapshot(It.IsAny())).Returns(publishedShapshot); diff --git a/src/Umbraco.Tests/Cache/PublishedCache/PublishedMediaCacheTests.cs b/src/Umbraco.Tests/Cache/PublishedCache/PublishedMediaCacheTests.cs index bd4f1610cd..07a6a6ee82 100644 --- a/src/Umbraco.Tests/Cache/PublishedCache/PublishedMediaCacheTests.cs +++ b/src/Umbraco.Tests/Cache/PublishedCache/PublishedMediaCacheTests.cs @@ -17,6 +17,7 @@ using Umbraco.Core.Models; using Umbraco.Core.Models.Membership; using Umbraco.Core.Services; using Umbraco.Tests.PublishedContent; +using Umbraco.Web; namespace Umbraco.Tests.Cache.PublishedCache { @@ -26,6 +27,7 @@ namespace Umbraco.Tests.Cache.PublishedCache { private Dictionary _mediaTypes; + private IUmbracoContextAccessor _umbracoContextAccessor; protected override void Compose() { base.Compose(); @@ -33,6 +35,8 @@ namespace Umbraco.Tests.Cache.PublishedCache Composition.WithCollectionBuilder() .Clear() .Append(); + + _umbracoContextAccessor = Current.UmbracoContextAccessor; } protected override void Initialize() @@ -75,7 +79,7 @@ namespace Umbraco.Tests.Cache.PublishedCache var mChild2 = MakeNewMedia("Child2", mType, user, mRoot2.Id); var ctx = GetUmbracoContext("/test"); - var cache = new PublishedMediaCache(new XmlStore((XmlDocument) null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance()); + var cache = new PublishedMediaCache(new XmlStore((XmlDocument) null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance(), Factory.GetInstance()); var roots = cache.GetAtRoot(); Assert.AreEqual(2, roots.Count()); Assert.IsTrue(roots.Select(x => x.Id).ContainsAll(new[] {mRoot1.Id, mRoot2.Id})); @@ -93,7 +97,7 @@ namespace Umbraco.Tests.Cache.PublishedCache //var publishedMedia = PublishedMediaTests.GetNode(mRoot.Id, GetUmbracoContext("/test", 1234)); var umbracoContext = GetUmbracoContext("/test"); - var cache = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), Current.Services.MediaService, Current.Services.UserService, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance()); + var cache = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), Current.Services.MediaService, Current.Services.UserService, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance(), Factory.GetInstance()); var publishedMedia = cache.GetById(mRoot.Id); Assert.IsNotNull(publishedMedia); @@ -204,7 +208,7 @@ namespace Umbraco.Tests.Cache.PublishedCache var result = new SearchResult("1234", 1, () => fields.ToDictionary(x => x.Key, x => new List { x.Value })); - var store = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance()); + var store = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance(), Factory.GetInstance()); var doc = store.CreateFromCacheValues(store.ConvertFromSearchResult(result)); DoAssert(doc, 1234, key, null, 0, "/media/test.jpg", "Image", 23, "Shannon", "Shannon", 0, 0, "-1,1234", DateTime.Parse("2012-07-17T10:34:09"), DateTime.Parse("2012-07-16T10:34:09"), 2); @@ -220,7 +224,7 @@ namespace Umbraco.Tests.Cache.PublishedCache var xmlDoc = GetMediaXml(); ((XmlElement)xmlDoc.DocumentElement.FirstChild).SetAttribute("key", key.ToString()); var navigator = xmlDoc.SelectSingleNode("/root/Image").CreateNavigator(); - var cache = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance()); + var cache = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance(), Factory.GetInstance()); var doc = cache.CreateFromCacheValues(cache.ConvertFromXPathNavigator(navigator, true)); DoAssert(doc, 2000, key, null, 2, "image1", "Image", 23, "Shannon", "Shannon", 33, 33, "-1,2000", DateTime.Parse("2012-06-12T14:13:17"), DateTime.Parse("2012-07-20T18:50:43"), 1); @@ -319,7 +323,8 @@ namespace Umbraco.Tests.Cache.PublishedCache // no xpath null, // not from examine - false), + false, + _umbracoContextAccessor), //callback to get the children (dd, n) => children, // callback to get a property @@ -329,7 +334,8 @@ namespace Umbraco.Tests.Cache.PublishedCache // no xpath null, // not from examine - false); + false, + _umbracoContextAccessor); return dicDoc; } diff --git a/src/Umbraco.Tests/Published/NestedContentTests.cs b/src/Umbraco.Tests/Published/NestedContentTests.cs index b5d6182c28..375fb5ee0f 100644 --- a/src/Umbraco.Tests/Published/NestedContentTests.cs +++ b/src/Umbraco.Tests/Published/NestedContentTests.cs @@ -161,7 +161,7 @@ namespace Umbraco.Tests.Published new TestPublishedProperty(contentType1.GetPropertyType("property1"), $@"[ {{ ""key"": ""{keyA}"", ""propertyN1"": ""foo"", ""ncContentTypeAlias"": ""contentN1"" }} ]") - }); + }, Mock.Of()); var value = content.Value("property1"); // nested single converter returns proper TestModel value @@ -189,7 +189,8 @@ namespace Umbraco.Tests.Published {{ ""key"": ""{keyA}"", ""propertyN1"": ""foo"", ""ncContentTypeAlias"": ""contentN1"" }}, {{ ""key"": ""{keyB}"", ""propertyN1"": ""bar"", ""ncContentTypeAlias"": ""contentN1"" }} ]") - }); + }, + Mock.Of()); var value = content.Value("property2"); // nested many converter returns proper IEnumerable value @@ -249,7 +250,7 @@ namespace Umbraco.Tests.Published class TestPublishedContent : PublishedContentBase { - public TestPublishedContent(PublishedContentType contentType, Guid key, IEnumerable properties) + public TestPublishedContent(PublishedContentType contentType, Guid key, IEnumerable properties, IUmbracoContextAccessor umbracoContextAccessor): base(umbracoContextAccessor) { ContentType = contentType; Key = key; diff --git a/src/Umbraco.Tests/PublishedContent/NuCacheTests.cs b/src/Umbraco.Tests/PublishedContent/NuCacheTests.cs index ef37a822c1..9130161d3a 100644 --- a/src/Umbraco.Tests/PublishedContent/NuCacheTests.cs +++ b/src/Umbraco.Tests/PublishedContent/NuCacheTests.cs @@ -144,6 +144,7 @@ namespace Umbraco.Tests.PublishedContent null, new TestPublishedSnapshotAccessor(), variationAccessor, + Mock.Of(), Mock.Of(), scopeProvider, Mock.Of(), diff --git a/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs b/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs index dfb51e83fb..bc1d8c2b70 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs @@ -69,7 +69,7 @@ namespace Umbraco.Tests.PublishedContent { var cache = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryAppCache(), ContentTypesCache, - Factory.GetInstance()); + Factory.GetInstance(), Factory.GetInstance()); var doc = cache.GetById(id); Assert.IsNotNull(doc); return doc; @@ -482,7 +482,7 @@ namespace Umbraco.Tests.PublishedContent "); var node = xml.DescendantsAndSelf("Image").Single(x => (int)x.Attribute("id") == nodeId); - var publishedMedia = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance()); + var publishedMedia = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance(), Factory.GetInstance()); var nav = node.CreateNavigator(); @@ -502,7 +502,7 @@ namespace Umbraco.Tests.PublishedContent var errorXml = new XElement("error", string.Format("No media is maching '{0}'", 1234)); var nav = errorXml.CreateNavigator(); - var publishedMedia = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance()); + var publishedMedia = new PublishedMediaCache(new XmlStore((XmlDocument)null, null, null, null), ServiceContext.MediaService, ServiceContext.UserService, new DictionaryAppCache(), ContentTypesCache, Factory.GetInstance(), Factory.GetInstance()); var converted = publishedMedia.ConvertFromXPathNodeIterator(nav.Select("/"), 1234); Assert.IsNull(converted); diff --git a/src/Umbraco.Tests/Scoping/ScopedNuCacheTests.cs b/src/Umbraco.Tests/Scoping/ScopedNuCacheTests.cs index e8f3463ca7..eb545fdb4f 100644 --- a/src/Umbraco.Tests/Scoping/ScopedNuCacheTests.cs +++ b/src/Umbraco.Tests/Scoping/ScopedNuCacheTests.cs @@ -90,6 +90,7 @@ namespace Umbraco.Tests.Scoping null, publishedSnapshotAccessor, Mock.Of(), + Mock.Of(), Logger, ScopeProvider, documentRepository, mediaRepository, memberRepository, diff --git a/src/Umbraco.Tests/Services/ContentTypeServiceVariantsTests.cs b/src/Umbraco.Tests/Services/ContentTypeServiceVariantsTests.cs index d0c0b93b48..3d9a36ca80 100644 --- a/src/Umbraco.Tests/Services/ContentTypeServiceVariantsTests.cs +++ b/src/Umbraco.Tests/Services/ContentTypeServiceVariantsTests.cs @@ -17,6 +17,7 @@ using Umbraco.Core.PropertyEditors; using Umbraco.Core.Services; using Umbraco.Core.Sync; using Umbraco.Tests.Testing; +using Umbraco.Web; using Umbraco.Web.PublishedCache; using Umbraco.Web.PublishedCache.NuCache; using Umbraco.Web.PublishedCache.NuCache.DataSource; @@ -62,6 +63,7 @@ namespace Umbraco.Tests.Services null, publishedSnapshotAccessor, Mock.Of(), + Mock.Of(), Logger, ScopeProvider, documentRepository, mediaRepository, memberRepository, diff --git a/src/Umbraco.Tests/TestHelpers/TestWithDatabaseBase.cs b/src/Umbraco.Tests/TestHelpers/TestWithDatabaseBase.cs index 2deb30bbdd..b312bc1607 100644 --- a/src/Umbraco.Tests/TestHelpers/TestWithDatabaseBase.cs +++ b/src/Umbraco.Tests/TestHelpers/TestWithDatabaseBase.cs @@ -264,6 +264,7 @@ namespace Umbraco.Tests.TestHelpers Factory.GetInstance(), ScopeProvider, cache, publishedSnapshotAccessor, variationContextAccessor, + Factory.GetInstance(), Factory.GetInstance(), Factory.GetInstance(), Factory.GetInstance(), DefaultCultureAccessor, Logger, diff --git a/src/Umbraco.Tests/Web/Mvc/UmbracoViewPageTests.cs b/src/Umbraco.Tests/Web/Mvc/UmbracoViewPageTests.cs index 133cbb2ee7..fee18cb382 100644 --- a/src/Umbraco.Tests/Web/Mvc/UmbracoViewPageTests.cs +++ b/src/Umbraco.Tests/Web/Mvc/UmbracoViewPageTests.cs @@ -419,13 +419,15 @@ namespace Umbraco.Tests.Web.Mvc //var provider = new ScopeUnitOfWorkProvider(databaseFactory, new RepositoryFactory(Mock.Of())); var scopeProvider = TestObjects.GetScopeProvider(Mock.Of()); var factory = Mock.Of(); - _service = new PublishedSnapshotService(svcCtx, factory, scopeProvider, cache, + var umbracoContextAccessor = Mock.Of(); + _service = new PublishedSnapshotService(svcCtx, factory, scopeProvider, cache, null, null, - null, null, null, + umbracoContextAccessor, null, null, null, new TestDefaultCultureAccessor(), Current.Logger, TestObjects.GetGlobalSettings(), new SiteDomainHelper(), Factory.GetInstance(), - null, true, false); // no events + null, true, false + ); // no events var http = GetHttpContextFactory(url, routeData).HttpContext; diff --git a/src/Umbraco.Web/Models/PublishedContentBase.cs b/src/Umbraco.Web/Models/PublishedContentBase.cs index c772f6ca85..d165209f0d 100644 --- a/src/Umbraco.Web/Models/PublishedContentBase.cs +++ b/src/Umbraco.Web/Models/PublishedContentBase.cs @@ -15,7 +15,12 @@ namespace Umbraco.Web.Models [DebuggerDisplay("Content Id: {Id}, Name: {Name}")] public abstract class PublishedContentBase : IPublishedContent { - private string _url; // fixme/task - cannot cache urls, they depends on the current request + private readonly IUmbracoContextAccessor _umbracoContextAccessor; + + protected PublishedContentBase(IUmbracoContextAccessor umbracoContextAccessor) + { + _umbracoContextAccessor = umbracoContextAccessor; + } #region ContentType @@ -81,24 +86,21 @@ namespace Umbraco.Web.Models /// public virtual string GetUrl(string culture = null) // todo - consider .GetCulture("fr-FR").Url { + var umbracoContext = _umbracoContextAccessor.UmbracoContext; switch (ItemType) { case PublishedItemType.Content: - // todo - consider injecting an umbraco context accessor - if (UmbracoContext.Current == null) - throw new InvalidOperationException("Cannot compute Url for a content item when UmbracoContext.Current is null."); - if (UmbracoContext.Current.UrlProvider == null) - throw new InvalidOperationException("Cannot compute Url for a content item when UmbracoContext.Current.UrlProvider is null."); - return UmbracoContext.Current.UrlProvider.GetUrl(this, culture); + if (umbracoContext == null) + throw new InvalidOperationException("Cannot compute Url for a content item when UmbracoContext is null."); + if (umbracoContext.UrlProvider == null) + throw new InvalidOperationException("Cannot compute Url for a content item when UmbracoContext.UrlProvider is null."); + return umbracoContext.UrlProvider.GetUrl(this, culture); case PublishedItemType.Media: - if (_url != null) return _url; // assume it will not depend on current uri/culture - var prop = GetProperty(Constants.Conventions.Media.File); if (prop?.GetValue() == null) { - _url = string.Empty; - return _url; + return string.Empty; } var propType = ContentType.GetPropertyType(Constants.Conventions.Media.File); @@ -110,7 +112,7 @@ namespace Umbraco.Web.Models switch (propType.EditorAlias) { case Constants.PropertyEditors.Aliases.UploadField: - _url = prop.GetValue().ToString(); + return prop.GetValue().ToString(); break; case Constants.PropertyEditors.Aliases.ImageCropper: //get the url from the json format @@ -118,14 +120,12 @@ namespace Umbraco.Web.Models var stronglyTyped = prop.GetValue() as ImageCropperValue; if (stronglyTyped != null) { - _url = stronglyTyped.Src; - break; + return stronglyTyped.Src; } - _url = prop.GetValue()?.ToString(); - break; + return prop.GetValue()?.ToString(); } - return _url; + return string.Empty; default: throw new NotSupportedException(); diff --git a/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs b/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs index 647adaad91..d6e72b03d5 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs @@ -34,10 +34,11 @@ namespace Umbraco.Web.PublishedCache.NuCache DateTime createDate, int creatorId, ContentData draftData, ContentData publishedData, IPublishedSnapshotAccessor publishedSnapshotAccessor, - IVariationContextAccessor variationContextAccessor) + IVariationContextAccessor variationContextAccessor, + IUmbracoContextAccessor umbracoContextAccessor) : this(id, uid, level, path, sortOrder, parentContentId, createDate, creatorId) { - SetContentTypeAndData(contentType, draftData, publishedData, publishedSnapshotAccessor, variationContextAccessor); + SetContentTypeAndData(contentType, draftData, publishedData, publishedSnapshotAccessor, variationContextAccessor, umbracoContextAccessor); } // 2-phases ctor, phase 1 @@ -59,7 +60,7 @@ namespace Umbraco.Web.PublishedCache.NuCache } // two-phase ctor, phase 2 - public void SetContentTypeAndData(PublishedContentType contentType, ContentData draftData, ContentData publishedData, IPublishedSnapshotAccessor publishedSnapshotAccessor, IVariationContextAccessor variationContextAccessor) + public void SetContentTypeAndData(PublishedContentType contentType, ContentData draftData, ContentData publishedData, IPublishedSnapshotAccessor publishedSnapshotAccessor, IVariationContextAccessor variationContextAccessor, IUmbracoContextAccessor umbracoContextAccessor) { ContentType = contentType; @@ -67,13 +68,13 @@ namespace Umbraco.Web.PublishedCache.NuCache throw new ArgumentException("Both draftData and publishedData cannot be null at the same time."); if (draftData != null) - Draft = new PublishedContent(this, draftData, publishedSnapshotAccessor, variationContextAccessor).CreateModel(); + Draft = new PublishedContent(this, draftData, publishedSnapshotAccessor, variationContextAccessor, umbracoContextAccessor).CreateModel(); if (publishedData != null) - Published = new PublishedContent(this, publishedData, publishedSnapshotAccessor, variationContextAccessor).CreateModel(); + Published = new PublishedContent(this, publishedData, publishedSnapshotAccessor, variationContextAccessor, umbracoContextAccessor).CreateModel(); } // clone parent - private ContentNode(ContentNode origin) + private ContentNode(ContentNode origin, IUmbracoContextAccessor umbracoContextAccessor) { // everything is the same, except for the child items // list which is a clone of the original list @@ -91,14 +92,14 @@ namespace Umbraco.Web.PublishedCache.NuCache var originDraft = origin.Draft == null ? null : PublishedContent.UnwrapIPublishedContent(origin.Draft); var originPublished = origin.Published == null ? null : PublishedContent.UnwrapIPublishedContent(origin.Published); - Draft = originDraft == null ? null : new PublishedContent(this, originDraft).CreateModel(); - Published = originPublished == null ? null : new PublishedContent(this, originPublished).CreateModel(); + Draft = originDraft == null ? null : new PublishedContent(this, originDraft, umbracoContextAccessor).CreateModel(); + Published = originPublished == null ? null : new PublishedContent(this, originPublished, umbracoContextAccessor).CreateModel(); ChildContentIds = new List(origin.ChildContentIds); // needs to be *another* list } // clone with new content type - public ContentNode(ContentNode origin, PublishedContentType contentType, IPublishedSnapshotAccessor publishedSnapshotAccessor, IVariationContextAccessor variationContextAccessor) + public ContentNode(ContentNode origin, PublishedContentType contentType, IPublishedSnapshotAccessor publishedSnapshotAccessor, IVariationContextAccessor variationContextAccessor, IUmbracoContextAccessor umbracoContextAccessor) { Id = origin.Id; Uid = origin.Uid; @@ -113,8 +114,8 @@ namespace Umbraco.Web.PublishedCache.NuCache var originDraft = origin.Draft == null ? null : PublishedContent.UnwrapIPublishedContent(origin.Draft); var originPublished = origin.Published == null ? null : PublishedContent.UnwrapIPublishedContent(origin.Published); - Draft = originDraft == null ? null : new PublishedContent(this, originDraft._contentData, publishedSnapshotAccessor, variationContextAccessor).CreateModel(); - Published = originPublished == null ? null : new PublishedContent(this, originPublished._contentData, publishedSnapshotAccessor, variationContextAccessor).CreateModel(); + Draft = originDraft == null ? null : new PublishedContent(this, originDraft._contentData, publishedSnapshotAccessor, variationContextAccessor, umbracoContextAccessor).CreateModel(); + Published = originPublished == null ? null : new PublishedContent(this, originPublished._contentData, publishedSnapshotAccessor, variationContextAccessor, umbracoContextAccessor).CreateModel(); ChildContentIds = origin.ChildContentIds; // can be the *same* list } @@ -137,9 +138,11 @@ namespace Umbraco.Web.PublishedCache.NuCache public IPublishedContent Draft; public IPublishedContent Published; - public ContentNode CloneParent(IPublishedSnapshotAccessor publishedSnapshotAccessor) + public ContentNode CloneParent( + IPublishedSnapshotAccessor publishedSnapshotAccessor, + IUmbracoContextAccessor umbracoContextAccessor) { - return new ContentNode(this); + return new ContentNode(this, umbracoContextAccessor); } public ContentNodeKit ToKit() diff --git a/src/Umbraco.Web/PublishedCache/NuCache/ContentNodeKit.cs b/src/Umbraco.Web/PublishedCache/NuCache/ContentNodeKit.cs index 5a47b99382..739a6141be 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/ContentNodeKit.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/ContentNodeKit.cs @@ -17,9 +17,14 @@ namespace Umbraco.Web.PublishedCache.NuCache public static ContentNodeKit Null { get; } = new ContentNodeKit { ContentTypeId = -1 }; - public void Build(PublishedContentType contentType, IPublishedSnapshotAccessor publishedSnapshotAccessor, IVariationContextAccessor variationContextAccessor, bool canBePublished) + public void Build( + PublishedContentType contentType, + IPublishedSnapshotAccessor publishedSnapshotAccessor, + IVariationContextAccessor variationContextAccessor, + bool canBePublished, + IUmbracoContextAccessor umbracoContextAccessor) { - Node.SetContentTypeAndData(contentType, DraftData, canBePublished ? PublishedData : null, publishedSnapshotAccessor, variationContextAccessor); + Node.SetContentTypeAndData(contentType, DraftData, canBePublished ? PublishedData : null, publishedSnapshotAccessor, variationContextAccessor,umbracoContextAccessor); } } } diff --git a/src/Umbraco.Web/PublishedCache/NuCache/ContentStore.cs b/src/Umbraco.Web/PublishedCache/NuCache/ContentStore.cs index 0cf2c231b5..aaf1ce29a3 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/ContentStore.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/ContentStore.cs @@ -20,6 +20,7 @@ namespace Umbraco.Web.PublishedCache.NuCache private readonly IPublishedSnapshotAccessor _publishedSnapshotAccessor; private readonly IVariationContextAccessor _variationContextAccessor; + private readonly IUmbracoContextAccessor _umbracoContextAccessor; private readonly ConcurrentDictionary> _contentNodes; private readonly ConcurrentDictionary> _contentRootNodes; private readonly ConcurrentDictionary> _contentTypesById; @@ -44,10 +45,16 @@ namespace Umbraco.Web.PublishedCache.NuCache #region Ctor - public ContentStore(IPublishedSnapshotAccessor publishedSnapshotAccessor, IVariationContextAccessor variationContextAccessor, ILogger logger, BPlusTree localDb = null) + public ContentStore( + IPublishedSnapshotAccessor publishedSnapshotAccessor, + IVariationContextAccessor variationContextAccessor, + IUmbracoContextAccessor umbracoContextAccessor, + ILogger logger, + BPlusTree localDb = null) { _publishedSnapshotAccessor = publishedSnapshotAccessor; _variationContextAccessor = variationContextAccessor; + _umbracoContextAccessor = umbracoContextAccessor; _logger = logger; _localDb = localDb; @@ -279,7 +286,7 @@ namespace Umbraco.Web.PublishedCache.NuCache if (node == null) continue; var contentTypeId = node.ContentType.Id; if (index.TryGetValue(contentTypeId, out PublishedContentType contentType) == false) continue; - SetValueLocked(_contentNodes, node.Id, new ContentNode(node, contentType, _publishedSnapshotAccessor, _variationContextAccessor)); + SetValueLocked(_contentNodes, node.Id, new ContentNode(node, contentType, _publishedSnapshotAccessor, _variationContextAccessor, _umbracoContextAccessor)); } } finally @@ -393,7 +400,7 @@ namespace Umbraco.Web.PublishedCache.NuCache _contentNodes.TryGetValue(id, out LinkedNode link); if (link?.Value == null) continue; - var node = new ContentNode(link.Value, contentType, _publishedSnapshotAccessor, _variationContextAccessor); + var node = new ContentNode(link.Value, contentType, _publishedSnapshotAccessor, _variationContextAccessor, _umbracoContextAccessor); SetValueLocked(_contentNodes, id, node); if (_localDb != null) RegisterChange(id, node.ToKit()); } @@ -419,7 +426,7 @@ namespace Umbraco.Web.PublishedCache.NuCache var canBePublished = ParentPublishedLocked(kit); // and use - kit.Build(link.Value, _publishedSnapshotAccessor, _variationContextAccessor, canBePublished); + kit.Build(link.Value, _publishedSnapshotAccessor, _variationContextAccessor, canBePublished, _umbracoContextAccessor); return true; } @@ -631,7 +638,7 @@ namespace Umbraco.Web.PublishedCache.NuCache var link = GetParentLink(content); var parent = link.Value; if (link.Gen < _liveGen) - parent = parent.CloneParent(_publishedSnapshotAccessor); + parent = parent.CloneParent(_publishedSnapshotAccessor, _umbracoContextAccessor); parent.ChildContentIds.Remove(content.Id); if (link.Gen < _liveGen) SetValueLocked(_contentNodes, parent.Id, parent); @@ -670,7 +677,7 @@ namespace Umbraco.Web.PublishedCache.NuCache var link = GetParentLink(content); var parent = link.Value; if (link.Gen < _liveGen) - parent = parent.CloneParent(_publishedSnapshotAccessor); + parent = parent.CloneParent(_publishedSnapshotAccessor, _umbracoContextAccessor); parent.ChildContentIds.Add(content.Id); if (link.Gen < _liveGen) SetValueLocked(_contentNodes, parent.Id, parent); diff --git a/src/Umbraco.Web/PublishedCache/NuCache/MemberCache.cs b/src/Umbraco.Web/PublishedCache/NuCache/MemberCache.cs index ecf099f90b..f7ffe73109 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/MemberCache.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/MemberCache.cs @@ -17,18 +17,22 @@ namespace Umbraco.Web.PublishedCache.NuCache internal class MemberCache : IPublishedMemberCache, INavigableData { private readonly IPublishedSnapshotAccessor _publishedSnapshotAccessor; + public readonly IVariationContextAccessor VariationContextAccessor; + private readonly IUmbracoContextAccessor _umbracoContextAccessor; private readonly IEntityXmlSerializer _entitySerializer; private readonly IAppCache _snapshotCache; private readonly IMemberService _memberService; private readonly PublishedContentTypeCache _contentTypeCache; private readonly bool _previewDefault; - public MemberCache(bool previewDefault, IAppCache snapshotCache, IMemberService memberService, PublishedContentTypeCache contentTypeCache, IPublishedSnapshotAccessor publishedSnapshotAccessor, IVariationContextAccessor variationContextAccessor, IEntityXmlSerializer entitySerializer) + public MemberCache(bool previewDefault, IAppCache snapshotCache, IMemberService memberService, PublishedContentTypeCache contentTypeCache, + IPublishedSnapshotAccessor publishedSnapshotAccessor, IVariationContextAccessor variationContextAccessor, IUmbracoContextAccessor umbracoContextAccessor, IEntityXmlSerializer entitySerializer) { _snapshotCache = snapshotCache; _publishedSnapshotAccessor = publishedSnapshotAccessor; VariationContextAccessor = variationContextAccessor; + _umbracoContextAccessor = umbracoContextAccessor; _entitySerializer = entitySerializer; _memberService = memberService; _previewDefault = previewDefault; @@ -64,14 +68,14 @@ namespace Umbraco.Web.PublishedCache.NuCache var member = _memberService.GetById(memberId); return member == null ? null - : PublishedMember.Create(member, GetContentType(member.ContentTypeId), _previewDefault, _publishedSnapshotAccessor, VariationContextAccessor); + : PublishedMember.Create(member, GetContentType(member.ContentTypeId), _previewDefault, _publishedSnapshotAccessor, VariationContextAccessor, _umbracoContextAccessor); }); } private IPublishedContent /*IPublishedMember*/ GetById(IMember member, bool previewing) { return GetCacheItem(CacheKeys.MemberCacheMember("ById", _previewDefault, member.Id), () => - PublishedMember.Create(member, GetContentType(member.ContentTypeId), previewing, _publishedSnapshotAccessor, VariationContextAccessor)); + PublishedMember.Create(member, GetContentType(member.ContentTypeId), previewing, _publishedSnapshotAccessor, VariationContextAccessor, _umbracoContextAccessor)); } public IPublishedContent /*IPublishedMember*/ GetByProviderKey(object key) @@ -106,7 +110,7 @@ namespace Umbraco.Web.PublishedCache.NuCache public IPublishedContent /*IPublishedMember*/ GetByMember(IMember member) { - return PublishedMember.Create(member, GetContentType(member.ContentTypeId), _previewDefault, _publishedSnapshotAccessor, VariationContextAccessor); + return PublishedMember.Create(member, GetContentType(member.ContentTypeId), _previewDefault, _publishedSnapshotAccessor, VariationContextAccessor, _umbracoContextAccessor); } public IEnumerable GetAtRoot(bool preview) @@ -114,7 +118,7 @@ namespace Umbraco.Web.PublishedCache.NuCache // because members are flat (not a tree) everything is at root // because we're loading everything... let's just not cache? var members = _memberService.GetAllMembers(); - return members.Select(m => PublishedMember.Create(m, GetContentType(m.ContentTypeId), preview, _publishedSnapshotAccessor, VariationContextAccessor)); + return members.Select(m => PublishedMember.Create(m, GetContentType(m.ContentTypeId), preview, _publishedSnapshotAccessor, VariationContextAccessor, _umbracoContextAccessor)); } public XPathNavigator CreateNavigator() diff --git a/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs b/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs index d1e1d63630..5228c3f876 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs @@ -14,6 +14,7 @@ namespace Umbraco.Web.PublishedCache.NuCache internal class PublishedContent : PublishedContentBase { private readonly IPublishedSnapshotAccessor _publishedSnapshotAccessor; + private readonly IUmbracoContextAccessor _umbracoContextAccessor; private readonly ContentNode _contentNode; // ReSharper disable once InconsistentNaming internal readonly ContentData _contentData; // internal for ContentNode cloning @@ -22,11 +23,17 @@ namespace Umbraco.Web.PublishedCache.NuCache #region Constructors - public PublishedContent(ContentNode contentNode, ContentData contentData, IPublishedSnapshotAccessor publishedSnapshotAccessor, IVariationContextAccessor variationContextAccessor) + public PublishedContent( + ContentNode contentNode, + ContentData contentData, + IPublishedSnapshotAccessor publishedSnapshotAccessor, + IVariationContextAccessor variationContextAccessor, + IUmbracoContextAccessor umbracoContextAccessor) :base(umbracoContextAccessor) { _contentNode = contentNode; _contentData = contentData; _publishedSnapshotAccessor = publishedSnapshotAccessor; + _umbracoContextAccessor = umbracoContextAccessor; VariationContextAccessor = variationContextAccessor; _urlSegment = _contentData.Name.ToUrlSegment(); @@ -66,7 +73,10 @@ namespace Umbraco.Web.PublishedCache.NuCache } // (see ContentNode.CloneParent) - public PublishedContent(ContentNode contentNode, PublishedContent origin) + public PublishedContent( + ContentNode contentNode, + PublishedContent origin, + IUmbracoContextAccessor umbracoContextAccessor) :base(umbracoContextAccessor) { _contentNode = contentNode; _publishedSnapshotAccessor = origin._publishedSnapshotAccessor; @@ -83,7 +93,9 @@ namespace Umbraco.Web.PublishedCache.NuCache } // clone for previewing as draft a published content that is published and has no draft - private PublishedContent(PublishedContent origin) + private PublishedContent( + PublishedContent origin, + IUmbracoContextAccessor umbracoContextAccessor) :base(umbracoContextAccessor) { _publishedSnapshotAccessor = origin._publishedSnapshotAccessor; VariationContextAccessor = origin.VariationContextAccessor; @@ -433,8 +445,8 @@ namespace Umbraco.Web.PublishedCache.NuCache return this; var cache = GetAppropriateCache(); - if (cache == null) return new PublishedContent(this).CreateModel(); - return (IPublishedContent)cache.Get(AsPreviewingCacheKey, () => new PublishedContent(this).CreateModel()); + if (cache == null) return new PublishedContent(this, _umbracoContextAccessor).CreateModel(); + return (IPublishedContent)cache.Get(AsPreviewingCacheKey, () => new PublishedContent(this, _umbracoContextAccessor).CreateModel()); } // used by Navigable.Source,... diff --git a/src/Umbraco.Web/PublishedCache/NuCache/PublishedMember.cs b/src/Umbraco.Web/PublishedCache/NuCache/PublishedMember.cs index 47c8d738f1..db50fc3fe6 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/PublishedMember.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/PublishedMember.cs @@ -15,13 +15,26 @@ namespace Umbraco.Web.PublishedCache.NuCache { private readonly IMember _member; - private PublishedMember(IMember member, ContentNode contentNode, ContentData contentData, IPublishedSnapshotAccessor publishedSnapshotAccessor, IVariationContextAccessor variationContextAccessor) - : base(contentNode, contentData, publishedSnapshotAccessor, variationContextAccessor) + private PublishedMember( + IMember member, + ContentNode contentNode, + ContentData contentData, + IPublishedSnapshotAccessor publishedSnapshotAccessor, + IVariationContextAccessor variationContextAccessor, + IUmbracoContextAccessor umbracoContextAccessor + ) + : base(contentNode, contentData, publishedSnapshotAccessor, variationContextAccessor, umbracoContextAccessor) { _member = member; } - public static IPublishedContent Create(IMember member, PublishedContentType contentType, bool previewing, IPublishedSnapshotAccessor publishedSnapshotAccessor, IVariationContextAccessor variationContextAccessor) + public static IPublishedContent Create( + IMember member, + PublishedContentType contentType, + bool previewing, + IPublishedSnapshotAccessor publishedSnapshotAccessor, + IVariationContextAccessor variationContextAccessor, + IUmbracoContextAccessor umbracoContextAccessor) { var d = new ContentData { @@ -37,7 +50,7 @@ namespace Umbraco.Web.PublishedCache.NuCache member.Level, member.Path, member.SortOrder, member.ParentId, member.CreateDate, member.CreatorId); - return new PublishedMember(member, n, d, publishedSnapshotAccessor, variationContextAccessor).CreateModel(); + return new PublishedMember(member, n, d, publishedSnapshotAccessor, variationContextAccessor, umbracoContextAccessor).CreateModel(); } private static Dictionary GetPropertyValues(PublishedContentType contentType, IMember member) diff --git a/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs b/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs index 8675aefd1a..34c495ece9 100755 --- a/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs @@ -32,6 +32,7 @@ namespace Umbraco.Web.PublishedCache.NuCache { private readonly ServiceContext _serviceContext; private readonly IPublishedContentTypeFactory _publishedContentTypeFactory; + private readonly IUmbracoContextAccessor _umbracoContextAccessor; private readonly IScopeProvider _scopeProvider; private readonly IDataSource _dataSource; private readonly ILogger _logger; @@ -80,7 +81,7 @@ namespace Umbraco.Web.PublishedCache.NuCache public PublishedSnapshotService(Options options, IMainDom mainDom, IRuntimeState runtime, ServiceContext serviceContext, IPublishedContentTypeFactory publishedContentTypeFactory, IdkMap idkMap, IPublishedSnapshotAccessor publishedSnapshotAccessor, IVariationContextAccessor variationContextAccessor, - ILogger logger, IScopeProvider scopeProvider, + IUmbracoContextAccessor umbracoContextAccessor, ILogger logger, IScopeProvider scopeProvider, IDocumentRepository documentRepository, IMediaRepository mediaRepository, IMemberRepository memberRepository, IDefaultCultureAccessor defaultCultureAccessor, IDataSource dataSource, IGlobalSettings globalSettings, ISiteDomainHelper siteDomainHelper, @@ -92,6 +93,7 @@ namespace Umbraco.Web.PublishedCache.NuCache _serviceContext = serviceContext; _publishedContentTypeFactory = publishedContentTypeFactory; + _umbracoContextAccessor = umbracoContextAccessor; _dataSource = dataSource; _logger = logger; _scopeProvider = scopeProvider; @@ -148,13 +150,13 @@ namespace Umbraco.Web.PublishedCache.NuCache // stores are created with a db so they can write to it, but they do not read from it, // stores need to be populated, happens in OnResolutionFrozen which uses _localDbExists to // figure out whether it can read the dbs or it should populate them from sql - _contentStore = new ContentStore(publishedSnapshotAccessor, variationContextAccessor, logger, _localContentDb); - _mediaStore = new ContentStore(publishedSnapshotAccessor, variationContextAccessor, logger, _localMediaDb); + _contentStore = new ContentStore(publishedSnapshotAccessor, variationContextAccessor, _umbracoContextAccessor, logger, _localContentDb); + _mediaStore = new ContentStore(publishedSnapshotAccessor, variationContextAccessor, _umbracoContextAccessor, logger, _localMediaDb); } else { - _contentStore = new ContentStore(publishedSnapshotAccessor, variationContextAccessor, logger); - _mediaStore = new ContentStore(publishedSnapshotAccessor, variationContextAccessor, logger); + _contentStore = new ContentStore(publishedSnapshotAccessor, variationContextAccessor, _umbracoContextAccessor, logger); + _mediaStore = new ContentStore(publishedSnapshotAccessor, variationContextAccessor, _umbracoContextAccessor, logger); } _domainStore = new SnapDictionary(); @@ -1015,7 +1017,7 @@ namespace Umbraco.Web.PublishedCache.NuCache { ContentCache = new ContentCache(previewDefault, contentSnap, snapshotCache, elementsCache, domainHelper, _globalSettings, _serviceContext.LocalizationService), MediaCache = new MediaCache(previewDefault, mediaSnap, snapshotCache, elementsCache), - MemberCache = new MemberCache(previewDefault, snapshotCache, _serviceContext.MemberService, memberTypeCache, PublishedSnapshotAccessor, VariationContextAccessor, _entitySerializer), + MemberCache = new MemberCache(previewDefault, snapshotCache, _serviceContext.MemberService, memberTypeCache, PublishedSnapshotAccessor, VariationContextAccessor, _umbracoContextAccessor, _entitySerializer), DomainCache = domainCache, SnapshotCache = snapshotCache, ElementsCache = elementsCache diff --git a/src/Umbraco.Web/PublishedCache/PublishedMember.cs b/src/Umbraco.Web/PublishedCache/PublishedMember.cs index ef95b2846c..56a0110f45 100644 --- a/src/Umbraco.Web/PublishedCache/PublishedMember.cs +++ b/src/Umbraco.Web/PublishedCache/PublishedMember.cs @@ -19,7 +19,11 @@ namespace Umbraco.Web.PublishedCache private readonly IPublishedProperty[] _properties; private readonly PublishedContentType _publishedMemberType; - public PublishedMember(IMember member, PublishedContentType publishedMemberType) + public PublishedMember( + IMember member, + PublishedContentType publishedMemberType, + IUmbracoContextAccessor umbracoContextAccessor) + :base(umbracoContextAccessor) { _member = member ?? throw new ArgumentNullException(nameof(member)); _membershipUser = member; diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DictionaryPublishedContent.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DictionaryPublishedContent.cs index 83bd84dab6..24b3ed6ab5 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DictionaryPublishedContent.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DictionaryPublishedContent.cs @@ -38,7 +38,9 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache IAppCache appCache, PublishedContentTypeCache contentTypeCache, XPathNavigator nav, - bool fromExamine) + bool fromExamine, + IUmbracoContextAccessor umbracoContextAccessor) + :base(umbracoContextAccessor) { if (valueDictionary == null) throw new ArgumentNullException(nameof(valueDictionary)); if (getParent == null) throw new ArgumentNullException(nameof(getParent)); diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs index d8c7c41ea1..6fd9f1da2b 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs @@ -17,6 +17,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache { private readonly IAppCache _appCache; private readonly IGlobalSettings _globalSettings; + private readonly IUmbracoContextAccessor _umbracoContextAccessor; private readonly RoutesCache _routesCache; private readonly IDomainCache _domainCache; private readonly DomainHelper _domainHelper; @@ -33,6 +34,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache IAppCache appCache, // an IAppCache that should be at request-level IGlobalSettings globalSettings, ISiteDomainHelper siteDomainHelper, + IUmbracoContextAccessor umbracoContextAccessor, PublishedContentTypeCache contentTypeCache, // a PublishedContentType cache RoutesCache routesCache, // a RoutesCache string previewToken) // a preview token string (or null if not previewing) @@ -40,6 +42,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache { _appCache = appCache; _globalSettings = globalSettings; + _umbracoContextAccessor = umbracoContextAccessor; _routesCache = routesCache; // may be null for unit-testing _contentTypeCache = contentTypeCache; _domainCache = domainCache; @@ -315,13 +318,13 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache private IPublishedContent ConvertToDocument(XmlNode xmlNode, bool isPreviewing) { - return xmlNode == null ? null : XmlPublishedContent.Get(xmlNode, isPreviewing, _appCache, _contentTypeCache); + return xmlNode == null ? null : XmlPublishedContent.Get(xmlNode, isPreviewing, _appCache, _contentTypeCache,_umbracoContextAccessor); } private IEnumerable ConvertToDocuments(XmlNodeList xmlNodes, bool isPreviewing) { return xmlNodes.Cast() - .Select(xmlNode => XmlPublishedContent.Get(xmlNode, isPreviewing, _appCache, _contentTypeCache)); + .Select(xmlNode => XmlPublishedContent.Get(xmlNode, isPreviewing, _appCache, _contentTypeCache, _umbracoContextAccessor)); } #endregion diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs index dadf40a33b..85a9725f17 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs @@ -41,11 +41,14 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache private readonly XmlStore _xmlStore; private readonly PublishedContentTypeCache _contentTypeCache; private readonly IEntityXmlSerializer _entitySerializer; + private readonly IUmbracoContextAccessor _umbracoContextAccessor; // must be specified by the ctor private readonly IAppCache _appCache; - public PublishedMediaCache(XmlStore xmlStore, IMediaService mediaService, IUserService userService, IAppCache appCache, PublishedContentTypeCache contentTypeCache, IEntityXmlSerializer entitySerializer) + public PublishedMediaCache(XmlStore xmlStore, IMediaService mediaService, IUserService userService, + IAppCache appCache, PublishedContentTypeCache contentTypeCache, IEntityXmlSerializer entitySerializer, + IUmbracoContextAccessor umbracoContextAccessor) : base(false) { _mediaService = mediaService ?? throw new ArgumentNullException(nameof(mediaService)); @@ -55,6 +58,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache _xmlStore = xmlStore; _contentTypeCache = contentTypeCache; _entitySerializer = entitySerializer; + _umbracoContextAccessor = umbracoContextAccessor; } /// @@ -666,7 +670,8 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache _appCache, _contentTypeCache, cacheValues.XPath, // though, outside of tests, that should be null - cacheValues.FromExamine + cacheValues.FromExamine, + _umbracoContextAccessor ); return content.CreateModel(); } diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMemberCache.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMemberCache.cs index 816eb3c545..db6d85fb2d 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMemberCache.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMemberCache.cs @@ -16,13 +16,16 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache private readonly IAppCache _requestCache; private readonly XmlStore _xmlStore; private readonly PublishedContentTypeCache _contentTypeCache; + private readonly IUmbracoContextAccessor _umbracoContextAccessor; - public PublishedMemberCache(XmlStore xmlStore, IAppCache requestCache, IMemberService memberService, PublishedContentTypeCache contentTypeCache) + public PublishedMemberCache(XmlStore xmlStore, IAppCache requestCache, IMemberService memberService, + PublishedContentTypeCache contentTypeCache, IUmbracoContextAccessor umbracoContextAccessor) { _requestCache = requestCache; _memberService = memberService; _xmlStore = xmlStore; _contentTypeCache = contentTypeCache; + _umbracoContextAccessor = umbracoContextAccessor; } public IPublishedContent GetByProviderKey(object key) @@ -39,7 +42,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache var result = _memberService.GetByProviderKey(key); if (result == null) return null; var type = _contentTypeCache.Get(PublishedItemType.Member, result.ContentTypeId); - return new PublishedMember(result, type).CreateModel(); + return new PublishedMember(result, type, _umbracoContextAccessor).CreateModel(); }); } @@ -57,7 +60,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache var result = _memberService.GetById(memberId); if (result == null) return null; var type = _contentTypeCache.Get(PublishedItemType.Member, result.ContentTypeId); - return new PublishedMember(result, type).CreateModel(); + return new PublishedMember(result, type, _umbracoContextAccessor).CreateModel(); }); } @@ -75,7 +78,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache var result = _memberService.GetByUsername(username); if (result == null) return null; var type = _contentTypeCache.Get(PublishedItemType.Member, result.ContentTypeId); - return new PublishedMember(result, type).CreateModel(); + return new PublishedMember(result, type, _umbracoContextAccessor).CreateModel(); }); } @@ -93,14 +96,14 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache var result = _memberService.GetByEmail(email); if (result == null) return null; var type = _contentTypeCache.Get(PublishedItemType.Member, result.ContentTypeId); - return new PublishedMember(result, type).CreateModel(); + return new PublishedMember(result, type, _umbracoContextAccessor).CreateModel(); }); } public IPublishedContent GetByMember(IMember member) { var type = _contentTypeCache.Get(PublishedItemType.Member, member.ContentTypeId); - return new PublishedMember(member, type).CreateModel(); + return new PublishedMember(member, type, _umbracoContextAccessor).CreateModel(); } public XPathNavigator CreateNavigator() diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedSnapshotService.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedSnapshotService.cs index c4ce05c9a9..d96bfd8a0a 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedSnapshotService.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedSnapshotService.cs @@ -35,6 +35,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache private readonly IDefaultCultureAccessor _defaultCultureAccessor; private readonly ISiteDomainHelper _siteDomainHelper; private readonly IEntityXmlSerializer _entitySerializer; + private readonly IUmbracoContextAccessor _umbracoContextAccessor; #region Constructors @@ -44,6 +45,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache IScopeProvider scopeProvider, IAppCache requestCache, IPublishedSnapshotAccessor publishedSnapshotAccessor, IVariationContextAccessor variationContextAccessor, + IUmbracoContextAccessor umbracoContextAccessor, IDocumentRepository documentRepository, IMediaRepository mediaRepository, IMemberRepository memberRepository, IDefaultCultureAccessor defaultCultureAccessor, ILogger logger, @@ -52,12 +54,14 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache IEntityXmlSerializer entitySerializer, MainDom mainDom, bool testing = false, bool enableRepositoryEvents = true) - : this(serviceContext, publishedContentTypeFactory, scopeProvider, requestCache, - publishedSnapshotAccessor, variationContextAccessor, + : this(serviceContext, publishedContentTypeFactory, scopeProvider, requestCache, + publishedSnapshotAccessor, variationContextAccessor, umbracoContextAccessor, documentRepository, mediaRepository, memberRepository, defaultCultureAccessor, logger, globalSettings, siteDomainHelper, entitySerializer, null, mainDom, testing, enableRepositoryEvents) - { } + { + _umbracoContextAccessor = umbracoContextAccessor; + } // used in some tests internal PublishedSnapshotService(ServiceContext serviceContext, @@ -65,6 +69,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache IScopeProvider scopeProvider, IAppCache requestCache, IPublishedSnapshotAccessor publishedSnapshotAccessor, IVariationContextAccessor variationContextAccessor, + IUmbracoContextAccessor umbracoContextAccessor, IDocumentRepository documentRepository, IMediaRepository mediaRepository, IMemberRepository memberRepository, IDefaultCultureAccessor defaultCultureAccessor, ILogger logger, @@ -92,6 +97,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache _defaultCultureAccessor = defaultCultureAccessor; _requestCache = requestCache; + _umbracoContextAccessor = umbracoContextAccessor; _globalSettings = globalSettings; _siteDomainHelper = siteDomainHelper; _entitySerializer = entitySerializer; @@ -138,9 +144,9 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache var domainCache = new DomainCache(_domainService, _defaultCultureAccessor); return new PublishedSnapshot( - new PublishedContentCache(_xmlStore, domainCache, _requestCache, _globalSettings, _siteDomainHelper, _contentTypeCache, _routesCache, previewToken), - new PublishedMediaCache(_xmlStore, _mediaService, _userService, _requestCache, _contentTypeCache, _entitySerializer), - new PublishedMemberCache(_xmlStore, _requestCache, _memberService, _contentTypeCache), + new PublishedContentCache(_xmlStore, domainCache, _requestCache, _globalSettings, _siteDomainHelper,_umbracoContextAccessor, _contentTypeCache, _routesCache, previewToken), + new PublishedMediaCache(_xmlStore, _mediaService, _userService, _requestCache, _contentTypeCache, _entitySerializer, _umbracoContextAccessor), + new PublishedMemberCache(_xmlStore, _requestCache, _memberService, _contentTypeCache, _umbracoContextAccessor), domainCache); } diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs index 2b3bc39452..00919e6a87 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs @@ -20,21 +20,29 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache [XmlType(Namespace = "http://umbraco.org/webservices/")] internal class XmlPublishedContent : PublishedContentBase { - private XmlPublishedContent(XmlNode xmlNode, bool isPreviewing, IAppCache appCache, PublishedContentTypeCache contentTypeCache) + private XmlPublishedContent( + XmlNode xmlNode, + bool isPreviewing, + IAppCache appCache, + PublishedContentTypeCache contentTypeCache, + IUmbracoContextAccessor umbracoContextAccessor) + :base(umbracoContextAccessor) { _xmlNode = xmlNode; _isPreviewing = isPreviewing; _appCache = appCache; _contentTypeCache = contentTypeCache; + _umbracoContextAccessor = umbracoContextAccessor; } private readonly XmlNode _xmlNode; private readonly bool _isPreviewing; private readonly IAppCache _appCache; // at snapshot/request level (see PublishedContentCache) private readonly PublishedContentTypeCache _contentTypeCache; + private readonly IUmbracoContextAccessor _umbracoContextAccessor; - private readonly object _initializeLock = new object(); + private readonly object _initializeLock = new object(); private bool _nodeInitialized; private bool _parentInitialized; @@ -252,7 +260,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache if (parent == null) return; if (parent.Attributes?.GetNamedItem("isDoc") != null) - _parent = Get(parent, _isPreviewing, _appCache, _contentTypeCache); + _parent = Get(parent, _isPreviewing, _appCache, _contentTypeCache, _umbracoContextAccessor); _parentInitialized = true; } @@ -409,7 +417,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache var iterator = nav.Select(expr); _children = iterator.Cast() - .Select(n => Get(((IHasXmlNode) n).GetNode(), _isPreviewing, _appCache, _contentTypeCache)) + .Select(n => Get(((IHasXmlNode) n).GetNode(), _isPreviewing, _appCache, _contentTypeCache, _umbracoContextAccessor)) .OrderBy(x => x.SortOrder) .ToList(); @@ -423,11 +431,13 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache /// A value indicating whether we are previewing or not. /// A cache. /// A content type cache. + /// A umbraco context accessor /// The IPublishedContent corresponding to the Xml cache node. /// Maintains a per-request cache of IPublishedContent items in order to make /// sure that we create only one instance of each for the duration of a request. The /// returned IPublishedContent is a model, if models are enabled. - public static IPublishedContent Get(XmlNode node, bool isPreviewing, IAppCache appCache, PublishedContentTypeCache contentTypeCache) + public static IPublishedContent Get(XmlNode node, bool isPreviewing, IAppCache appCache, + PublishedContentTypeCache contentTypeCache, IUmbracoContextAccessor umbracoContextAccessor) { // only 1 per request @@ -435,7 +445,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache var id = attrs?.GetNamedItem("id").Value; if (id.IsNullOrWhiteSpace()) throw new InvalidOperationException("Node has no ID attribute."); var key = CacheKeyPrefix + id; // dont bother with preview, wont change during request in Xml cache - return (IPublishedContent) appCache.Get(key, () => (new XmlPublishedContent(node, isPreviewing, appCache, contentTypeCache)).CreateModel()); + return (IPublishedContent) appCache.Get(key, () => (new XmlPublishedContent(node, isPreviewing, appCache, contentTypeCache, umbracoContextAccessor)).CreateModel()); } public static void ClearRequest() From d16aa91a5e364f986ba48a1394e145f0d0721cd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Wed, 23 Jan 2019 15:13:42 +0100 Subject: [PATCH 232/437] remove extra border from MCE-edit-area --- src/Umbraco.Web.UI.Client/src/less/rte.less | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/rte.less b/src/Umbraco.Web.UI.Client/src/less/rte.less index 4d3a680523..9aae9840d1 100644 --- a/src/Umbraco.Web.UI.Client/src/less/rte.less +++ b/src/Umbraco.Web.UI.Client/src/less/rte.less @@ -42,7 +42,6 @@ } .umb-rte .mce-tinymce .mce-edit-area { - border: 1px solid @gray-8 !important; border-radius: 0px !important; } From f8b9fb039f1538156d6adf041c4fe2fad03fe536 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 23 Jan 2019 15:35:20 +0100 Subject: [PATCH 233/437] Handle culture not set in HasCulture. --- src/Umbraco.Web/PublishedContentExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/PublishedContentExtensions.cs b/src/Umbraco.Web/PublishedContentExtensions.cs index 530c9bd9b4..7b0b7e44a3 100644 --- a/src/Umbraco.Web/PublishedContentExtensions.cs +++ b/src/Umbraco.Web/PublishedContentExtensions.cs @@ -228,7 +228,7 @@ namespace Umbraco.Web /// /// Culture is case-insensitive. public static bool HasCulture(this IPublishedContent content, string culture) - => content.Cultures.ContainsKey(culture); + => content.Cultures.ContainsKey(culture ?? string.Empty); /// /// Filters a sequence of to return invariant items, and items that are published for the specified culture. From 69a3c85bbc07ed4697dd484b37433b8fd6940822 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 23 Jan 2019 14:37:33 +0000 Subject: [PATCH 234/437] Refactor of dashboards * Remove dashboards from Configs().Dashboards * Remove dashboard.config XML file & associated code reading from XML * Load Dashboards from TypeLoader into a CollectionBuilder * Load merge/concat C# Dashboard Types with package.manifest * Add buildercolletion to an extension method on Composition --- src/Umbraco.Core/ConfigsExtensions.cs | 5 - .../Configuration/Dashboard/AccessElement.cs | 30 --- .../Configuration/Dashboard/AreaCollection.cs | 32 --- .../Configuration/Dashboard/AreaElement.cs | 12 -- .../Configuration/Dashboard/AreasElement.cs | 15 -- .../Dashboard/ControlCollection.cs | 37 ---- .../Configuration/Dashboard/ControlElement.cs | 44 ---- .../Dashboard/DashboardSection.cs | 24 --- .../Configuration/Dashboard/IAccess.cs | 9 - .../Configuration/Dashboard/IArea.cs | 7 - .../Dashboard/IDashboardControl.cs | 11 - .../Dashboard/IDashboardSection.cs | 9 - .../Configuration/Dashboard/IDashboardTab.cs | 13 -- .../Configuration/Dashboard/ISection.cs | 15 -- .../Dashboard/SectionCollection.cs | 37 ---- .../Configuration/Dashboard/SectionElement.cs | 50 ----- .../Configuration/Dashboard/TabCollection.cs | 37 ---- .../Configuration/Dashboard/TabElement.cs | 38 ---- .../Dashboard => Dashboards}/AccessRule.cs | 2 +- .../AccessRuleType.cs | 2 +- .../Dashboard => Dashboards}/IAccessRule.cs | 2 +- .../Dashboards/IDashboardSection.cs | 30 +++ .../Manifest/DashboardAccessRuleConverter.cs | 2 +- .../Manifest/ManifestDashboardDefinition.cs | 5 +- src/Umbraco.Core/Umbraco.Core.csproj | 24 +-- .../DashboardSettingsTests.cs | 189 +++++++++--------- .../Manifest/ManifestParserTests.cs | 2 +- src/Umbraco.Web.UI.Client/package-lock.json | 96 ++++----- .../src/views/common/dashboard.html | 13 +- src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 2 + src/Umbraco.Web.UI/config/Dashboard.config | 1 + src/Umbraco.Web/CompositionExtensions.cs | 8 + .../Dashboards/ContentDashboard.cs | 38 ++++ .../Dashboards/DashboardCollection.cs | 13 ++ .../Dashboards/DashboardCollectionBuilder.cs | 24 +++ .../Dashboards/ExamineDashboard.cs | 29 +++ src/Umbraco.Web/Dashboards/FormsDashboard.cs | 27 +++ .../Dashboards/HealthCheckDashboard.cs | 29 +++ src/Umbraco.Web/Dashboards/MediaDashboard.cs | 27 +++ .../Dashboards/MembersDashboard.cs | 27 +++ .../Dashboards/ModelsBuilderDashboard.cs | 29 +++ .../Dashboards/PublishedStatusDashboard.cs | 29 +++ .../Dashboards/RedirectUrlDashboard.cs | 27 +++ .../Dashboards/SettingsDashboards.cs | 27 +++ .../Editors/DashboardController.cs | 16 +- src/Umbraco.Web/Editors/Dashboards.cs | 160 --------------- .../Editors/EditorModelEventManager.cs | 9 +- src/Umbraco.Web/Editors/SectionController.cs | 8 +- .../Models/ContentEditing/DashboardControl.cs | 19 -- src/Umbraco.Web/Runtime/WebRuntimeComposer.cs | 28 ++- .../DashboardService.cs} | 109 ++++++---- src/Umbraco.Web/Services/IDashboardService.cs | 27 +++ src/Umbraco.Web/Umbraco.Web.csproj | 17 +- 53 files changed, 678 insertions(+), 844 deletions(-) delete mode 100644 src/Umbraco.Core/Configuration/Dashboard/AccessElement.cs delete mode 100644 src/Umbraco.Core/Configuration/Dashboard/AreaCollection.cs delete mode 100644 src/Umbraco.Core/Configuration/Dashboard/AreaElement.cs delete mode 100644 src/Umbraco.Core/Configuration/Dashboard/AreasElement.cs delete mode 100644 src/Umbraco.Core/Configuration/Dashboard/ControlCollection.cs delete mode 100644 src/Umbraco.Core/Configuration/Dashboard/ControlElement.cs delete mode 100644 src/Umbraco.Core/Configuration/Dashboard/DashboardSection.cs delete mode 100644 src/Umbraco.Core/Configuration/Dashboard/IAccess.cs delete mode 100644 src/Umbraco.Core/Configuration/Dashboard/IArea.cs delete mode 100644 src/Umbraco.Core/Configuration/Dashboard/IDashboardControl.cs delete mode 100644 src/Umbraco.Core/Configuration/Dashboard/IDashboardSection.cs delete mode 100644 src/Umbraco.Core/Configuration/Dashboard/IDashboardTab.cs delete mode 100644 src/Umbraco.Core/Configuration/Dashboard/ISection.cs delete mode 100644 src/Umbraco.Core/Configuration/Dashboard/SectionCollection.cs delete mode 100644 src/Umbraco.Core/Configuration/Dashboard/SectionElement.cs delete mode 100644 src/Umbraco.Core/Configuration/Dashboard/TabCollection.cs delete mode 100644 src/Umbraco.Core/Configuration/Dashboard/TabElement.cs rename src/Umbraco.Core/{Configuration/Dashboard => Dashboards}/AccessRule.cs (85%) rename src/Umbraco.Core/{Configuration/Dashboard => Dashboards}/AccessRuleType.cs (93%) rename src/Umbraco.Core/{Configuration/Dashboard => Dashboards}/IAccessRule.cs (88%) create mode 100644 src/Umbraco.Core/Dashboards/IDashboardSection.cs create mode 100644 src/Umbraco.Web/Dashboards/ContentDashboard.cs create mode 100644 src/Umbraco.Web/Dashboards/DashboardCollection.cs create mode 100644 src/Umbraco.Web/Dashboards/DashboardCollectionBuilder.cs create mode 100644 src/Umbraco.Web/Dashboards/ExamineDashboard.cs create mode 100644 src/Umbraco.Web/Dashboards/FormsDashboard.cs create mode 100644 src/Umbraco.Web/Dashboards/HealthCheckDashboard.cs create mode 100644 src/Umbraco.Web/Dashboards/MediaDashboard.cs create mode 100644 src/Umbraco.Web/Dashboards/MembersDashboard.cs create mode 100644 src/Umbraco.Web/Dashboards/ModelsBuilderDashboard.cs create mode 100644 src/Umbraco.Web/Dashboards/PublishedStatusDashboard.cs create mode 100644 src/Umbraco.Web/Dashboards/RedirectUrlDashboard.cs create mode 100644 src/Umbraco.Web/Dashboards/SettingsDashboards.cs delete mode 100644 src/Umbraco.Web/Editors/Dashboards.cs delete mode 100644 src/Umbraco.Web/Models/ContentEditing/DashboardControl.cs rename src/Umbraco.Web/{Editors/DashboardSecurity.cs => Services/DashboardService.cs} (62%) create mode 100644 src/Umbraco.Web/Services/IDashboardService.cs diff --git a/src/Umbraco.Core/ConfigsExtensions.cs b/src/Umbraco.Core/ConfigsExtensions.cs index 0fcea5f430..6fdf7ea3b9 100644 --- a/src/Umbraco.Core/ConfigsExtensions.cs +++ b/src/Umbraco.Core/ConfigsExtensions.cs @@ -2,7 +2,6 @@ using Umbraco.Core.Cache; using Umbraco.Core.Composing; using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Dashboard; using Umbraco.Core.Configuration.Grid; using Umbraco.Core.Configuration.HealthChecks; using Umbraco.Core.Configuration.UmbracoSettings; @@ -22,9 +21,6 @@ namespace Umbraco.Core public static IUmbracoSettingsSection Settings(this Configs configs) => configs.GetConfig(); - public static IDashboardSection Dashboards(this Configs configs) - => configs.GetConfig(); - public static IHealthChecks HealthChecks(this Configs configs) => configs.GetConfig(); @@ -40,7 +36,6 @@ namespace Umbraco.Core configs.Add(() => new GlobalSettings()); configs.Add("umbracoConfiguration/settings"); - configs.Add("umbracoConfiguration/dashBoard"); configs.Add("umbracoConfiguration/HealthChecks"); configs.Add(() => new CoreDebug()); diff --git a/src/Umbraco.Core/Configuration/Dashboard/AccessElement.cs b/src/Umbraco.Core/Configuration/Dashboard/AccessElement.cs deleted file mode 100644 index 01538c8e0b..0000000000 --- a/src/Umbraco.Core/Configuration/Dashboard/AccessElement.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using System.Xml.Linq; - -namespace Umbraco.Core.Configuration.Dashboard -{ - internal class AccessElement : RawXmlConfigurationElement, IAccess - { - public AccessElement() - { } - - public AccessElement(XElement rawXml) - : base(rawXml) - { } - - public IEnumerable Rules - { - get - { - var result = new List(); - if (RawXml == null) return result; - - result.AddRange(RawXml.Elements("deny").Select(x => new AccessRule {Type = AccessRuleType.Deny, Value = x.Value })); - result.AddRange(RawXml.Elements("grant").Select(x => new AccessRule { Type = AccessRuleType.Grant, Value = x.Value })); - result.AddRange(RawXml.Elements("grantBySection").Select(x => new AccessRule { Type = AccessRuleType.GrantBySection, Value = x.Value })); - return result; - } - } - } -} diff --git a/src/Umbraco.Core/Configuration/Dashboard/AreaCollection.cs b/src/Umbraco.Core/Configuration/Dashboard/AreaCollection.cs deleted file mode 100644 index 31cc3eaec8..0000000000 --- a/src/Umbraco.Core/Configuration/Dashboard/AreaCollection.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Configuration; - -namespace Umbraco.Core.Configuration.Dashboard -{ - internal class AreaCollection : ConfigurationElementCollection, IEnumerable - { - protected override ConfigurationElement CreateNewElement() - { - return new AreaElement(); - } - - protected override object GetElementKey(ConfigurationElement element) - { - return ((AreaElement) element).Value; - } - - IEnumerator IEnumerable.GetEnumerator() - { - for (var i = 0; i < Count; i++) - { - yield return BaseGet(i) as IArea; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - } -} diff --git a/src/Umbraco.Core/Configuration/Dashboard/AreaElement.cs b/src/Umbraco.Core/Configuration/Dashboard/AreaElement.cs deleted file mode 100644 index 20393f89d8..0000000000 --- a/src/Umbraco.Core/Configuration/Dashboard/AreaElement.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Configuration; - -namespace Umbraco.Core.Configuration.Dashboard -{ - internal class AreaElement : InnerTextConfigurationElement, IArea - { - string IArea.AreaName - { - get { return Value; } - } - } -} diff --git a/src/Umbraco.Core/Configuration/Dashboard/AreasElement.cs b/src/Umbraco.Core/Configuration/Dashboard/AreasElement.cs deleted file mode 100644 index 92e51c9b73..0000000000 --- a/src/Umbraco.Core/Configuration/Dashboard/AreasElement.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Configuration; - -namespace Umbraco.Core.Configuration.Dashboard -{ - internal class AreasElement : ConfigurationElement - { - [ConfigurationCollection(typeof(SectionCollection), AddItemName = "area")] - [ConfigurationProperty("", IsDefaultCollection = true)] - public AreaCollection AreaCollection - { - get { return (AreaCollection)base[""]; } - set { base[""] = value; } - } - } -} diff --git a/src/Umbraco.Core/Configuration/Dashboard/ControlCollection.cs b/src/Umbraco.Core/Configuration/Dashboard/ControlCollection.cs deleted file mode 100644 index b8aa40da7f..0000000000 --- a/src/Umbraco.Core/Configuration/Dashboard/ControlCollection.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Configuration; - -namespace Umbraco.Core.Configuration.Dashboard -{ - internal class ControlCollection : ConfigurationElementCollection, IEnumerable - { - internal void Add(ControlElement c) - { - BaseAdd(c); - } - - protected override ConfigurationElement CreateNewElement() - { - return new ControlElement(); - } - - protected override object GetElementKey(ConfigurationElement element) - { - return ((ControlElement)element).ControlPath; - } - - IEnumerator IEnumerable.GetEnumerator() - { - for (var i = 0; i < Count; i++) - { - yield return BaseGet(i) as IDashboardControl; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - } -} diff --git a/src/Umbraco.Core/Configuration/Dashboard/ControlElement.cs b/src/Umbraco.Core/Configuration/Dashboard/ControlElement.cs deleted file mode 100644 index 20dac7460e..0000000000 --- a/src/Umbraco.Core/Configuration/Dashboard/ControlElement.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System.Configuration; -using System.Linq; -using System.Xml.Linq; - -namespace Umbraco.Core.Configuration.Dashboard -{ - - internal class ControlElement : RawXmlConfigurationElement, IDashboardControl - { - public string PanelCaption - { - get - { - var panelCaption = RawXml.Attribute("panelCaption"); - return panelCaption == null ? "" : panelCaption.Value; - } - } - - public AccessElement Access - { - get - { - var access = RawXml.Element("access"); - return access == null ? new AccessElement() : new AccessElement(access); - } - } - - public string ControlPath - { - get - { - //we need to return the first (and only) text element of the children (wtf... who designed this configuration ! :P ) - var txt = RawXml.Nodes().OfType().FirstOrDefault(); - if (txt == null) - { - throw new ConfigurationErrorsException("The control element must contain a text node indicating the control path"); - } - return txt.Value.Trim(); - } - } - - IAccess IDashboardControl.AccessRights => Access; - } -} diff --git a/src/Umbraco.Core/Configuration/Dashboard/DashboardSection.cs b/src/Umbraco.Core/Configuration/Dashboard/DashboardSection.cs deleted file mode 100644 index 12bf0522e0..0000000000 --- a/src/Umbraco.Core/Configuration/Dashboard/DashboardSection.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Text; -using System.Threading.Tasks; - -namespace Umbraco.Core.Configuration.Dashboard -{ - internal class DashboardSection : ConfigurationSection, IDashboardSection - { - [ConfigurationCollection(typeof(SectionCollection), AddItemName = "section")] - [ConfigurationProperty("", IsDefaultCollection = true)] - public SectionCollection SectionCollection - { - get { return (SectionCollection)base[""]; } - set { base[""] = value; } - } - - IEnumerable IDashboardSection.Sections - { - get { return SectionCollection; } - } - } -} diff --git a/src/Umbraco.Core/Configuration/Dashboard/IAccess.cs b/src/Umbraco.Core/Configuration/Dashboard/IAccess.cs deleted file mode 100644 index 8ac1b18cca..0000000000 --- a/src/Umbraco.Core/Configuration/Dashboard/IAccess.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Collections.Generic; - -namespace Umbraco.Core.Configuration.Dashboard -{ - public interface IAccess - { - IEnumerable Rules { get; } - } -} diff --git a/src/Umbraco.Core/Configuration/Dashboard/IArea.cs b/src/Umbraco.Core/Configuration/Dashboard/IArea.cs deleted file mode 100644 index 25401db408..0000000000 --- a/src/Umbraco.Core/Configuration/Dashboard/IArea.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Umbraco.Core.Configuration.Dashboard -{ - public interface IArea - { - string AreaName { get; } - } -} diff --git a/src/Umbraco.Core/Configuration/Dashboard/IDashboardControl.cs b/src/Umbraco.Core/Configuration/Dashboard/IDashboardControl.cs deleted file mode 100644 index cdf05af1ec..0000000000 --- a/src/Umbraco.Core/Configuration/Dashboard/IDashboardControl.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Umbraco.Core.Configuration.Dashboard -{ - public interface IDashboardControl - { - string PanelCaption { get; } - - string ControlPath { get; } - - IAccess AccessRights { get; } - } -} diff --git a/src/Umbraco.Core/Configuration/Dashboard/IDashboardSection.cs b/src/Umbraco.Core/Configuration/Dashboard/IDashboardSection.cs deleted file mode 100644 index 32dfc6653d..0000000000 --- a/src/Umbraco.Core/Configuration/Dashboard/IDashboardSection.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Collections.Generic; - -namespace Umbraco.Core.Configuration.Dashboard -{ - public interface IDashboardSection - { - IEnumerable Sections { get; } - } -} diff --git a/src/Umbraco.Core/Configuration/Dashboard/IDashboardTab.cs b/src/Umbraco.Core/Configuration/Dashboard/IDashboardTab.cs deleted file mode 100644 index 914b226265..0000000000 --- a/src/Umbraco.Core/Configuration/Dashboard/IDashboardTab.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Collections.Generic; - -namespace Umbraco.Core.Configuration.Dashboard -{ - public interface IDashboardTab - { - string Caption { get; } - - IEnumerable Controls { get; } - - IAccess AccessRights { get; } - } -} diff --git a/src/Umbraco.Core/Configuration/Dashboard/ISection.cs b/src/Umbraco.Core/Configuration/Dashboard/ISection.cs deleted file mode 100644 index 1005c0750d..0000000000 --- a/src/Umbraco.Core/Configuration/Dashboard/ISection.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Collections.Generic; - -namespace Umbraco.Core.Configuration.Dashboard -{ - public interface ISection - { - string Alias { get; } - - IEnumerable Areas { get; } - - IEnumerable Tabs { get; } - - IAccess AccessRights { get; } - } -} diff --git a/src/Umbraco.Core/Configuration/Dashboard/SectionCollection.cs b/src/Umbraco.Core/Configuration/Dashboard/SectionCollection.cs deleted file mode 100644 index 5717bd28c3..0000000000 --- a/src/Umbraco.Core/Configuration/Dashboard/SectionCollection.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Configuration; - -namespace Umbraco.Core.Configuration.Dashboard -{ - internal class SectionCollection : ConfigurationElementCollection, IEnumerable - { - internal void Add(SectionElement c) - { - BaseAdd(c); - } - - protected override ConfigurationElement CreateNewElement() - { - return new SectionElement(); - } - - protected override object GetElementKey(ConfigurationElement element) - { - return ((SectionElement)element).Alias; - } - - IEnumerator IEnumerable.GetEnumerator() - { - for (var i = 0; i < Count; i++) - { - yield return BaseGet(i) as ISection; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - } -} diff --git a/src/Umbraco.Core/Configuration/Dashboard/SectionElement.cs b/src/Umbraco.Core/Configuration/Dashboard/SectionElement.cs deleted file mode 100644 index 09049c13db..0000000000 --- a/src/Umbraco.Core/Configuration/Dashboard/SectionElement.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System.Collections.Generic; -using System.Configuration; -using System.Linq; - -namespace Umbraco.Core.Configuration.Dashboard -{ - internal class SectionElement : ConfigurationElement, ISection - { - [ConfigurationProperty("alias", IsRequired = true)] - public string Alias - { - get { return (string) this["alias"]; } - } - - [ConfigurationProperty("areas", IsRequired = true)] - public AreasElement Areas - { - get { return (AreasElement)this["areas"]; } - } - - [ConfigurationProperty("access")] - public AccessElement Access - { - get { return (AccessElement)this["access"]; } - } - - [ConfigurationCollection(typeof(SectionCollection), AddItemName = "tab")] - [ConfigurationProperty("", IsDefaultCollection = true)] - public TabCollection TabCollection - { - get { return (TabCollection)base[""]; } - set { base[""] = value; } - } - - IEnumerable ISection.Tabs - { - get { return TabCollection; } - } - - IEnumerable ISection.Areas - { - get { return Areas.AreaCollection.Cast().Select(x => x.Value); } - } - - IAccess ISection.AccessRights - { - get { return Access; } - } - } -} diff --git a/src/Umbraco.Core/Configuration/Dashboard/TabCollection.cs b/src/Umbraco.Core/Configuration/Dashboard/TabCollection.cs deleted file mode 100644 index 1b77ffd3fb..0000000000 --- a/src/Umbraco.Core/Configuration/Dashboard/TabCollection.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Configuration; - -namespace Umbraco.Core.Configuration.Dashboard -{ - internal class TabCollection : ConfigurationElementCollection, IEnumerable - { - internal void Add(TabElement c) - { - BaseAdd(c); - } - - protected override ConfigurationElement CreateNewElement() - { - return new TabElement(); - } - - protected override object GetElementKey(ConfigurationElement element) - { - return ((TabElement)element).Caption; - } - - IEnumerator IEnumerable.GetEnumerator() - { - for (var i = 0; i < Count; i++) - { - yield return BaseGet(i) as IDashboardTab; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - } -} diff --git a/src/Umbraco.Core/Configuration/Dashboard/TabElement.cs b/src/Umbraco.Core/Configuration/Dashboard/TabElement.cs deleted file mode 100644 index b92394596e..0000000000 --- a/src/Umbraco.Core/Configuration/Dashboard/TabElement.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System.Collections.Generic; -using System.Configuration; - -namespace Umbraco.Core.Configuration.Dashboard -{ - internal class TabElement : ConfigurationElement, IDashboardTab - { - [ConfigurationProperty("caption", IsRequired = true)] - public string Caption - { - get { return (string)this["caption"]; } - } - - [ConfigurationProperty("access")] - public AccessElement Access - { - get { return (AccessElement)this["access"]; } - } - - [ConfigurationCollection(typeof(ControlCollection), AddItemName = "control")] - [ConfigurationProperty("", IsDefaultCollection = true)] - public ControlCollection ControlCollection - { - get { return (ControlCollection)base[""]; } - set { base[""] = value; } - } - - IEnumerable IDashboardTab.Controls - { - get { return ControlCollection; } - } - - IAccess IDashboardTab.AccessRights - { - get { return Access; } - } - } -} diff --git a/src/Umbraco.Core/Configuration/Dashboard/AccessRule.cs b/src/Umbraco.Core/Dashboards/AccessRule.cs similarity index 85% rename from src/Umbraco.Core/Configuration/Dashboard/AccessRule.cs rename to src/Umbraco.Core/Dashboards/AccessRule.cs index fe6840ff64..70f9da8fa9 100644 --- a/src/Umbraco.Core/Configuration/Dashboard/AccessRule.cs +++ b/src/Umbraco.Core/Dashboards/AccessRule.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Configuration.Dashboard +namespace Umbraco.Core.Dashboards { /// /// Implements . diff --git a/src/Umbraco.Core/Configuration/Dashboard/AccessRuleType.cs b/src/Umbraco.Core/Dashboards/AccessRuleType.cs similarity index 93% rename from src/Umbraco.Core/Configuration/Dashboard/AccessRuleType.cs rename to src/Umbraco.Core/Dashboards/AccessRuleType.cs index cb9ce983fe..efed361f6c 100644 --- a/src/Umbraco.Core/Configuration/Dashboard/AccessRuleType.cs +++ b/src/Umbraco.Core/Dashboards/AccessRuleType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Configuration.Dashboard +namespace Umbraco.Core.Dashboards { /// /// Defines dashboard access rules type. diff --git a/src/Umbraco.Core/Configuration/Dashboard/IAccessRule.cs b/src/Umbraco.Core/Dashboards/IAccessRule.cs similarity index 88% rename from src/Umbraco.Core/Configuration/Dashboard/IAccessRule.cs rename to src/Umbraco.Core/Dashboards/IAccessRule.cs index 8b51b1b73a..f44a846248 100644 --- a/src/Umbraco.Core/Configuration/Dashboard/IAccessRule.cs +++ b/src/Umbraco.Core/Dashboards/IAccessRule.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Configuration.Dashboard +namespace Umbraco.Core.Dashboards { /// /// Represents an access rule. diff --git a/src/Umbraco.Core/Dashboards/IDashboardSection.cs b/src/Umbraco.Core/Dashboards/IDashboardSection.cs new file mode 100644 index 0000000000..90d351bcd2 --- /dev/null +++ b/src/Umbraco.Core/Dashboards/IDashboardSection.cs @@ -0,0 +1,30 @@ +namespace Umbraco.Core.Dashboards +{ + public interface IDashboardSection + { + /// + /// Display name of the dashboard tab + /// + string Name { get; } + + /// + /// Alias to refer to this dashboard via code + /// + string Alias { get; } + + /// + /// A collection of sections/application aliases that this dashboard will appear on + /// + string[] Sections { get; } + + /// + /// The HTML view to load for the dashboard + /// + string View { get; } + + /// + /// Dashboards can be shown/hidden based on access rights + /// + IAccessRule[] AccessRules { get; } + } +} diff --git a/src/Umbraco.Core/Manifest/DashboardAccessRuleConverter.cs b/src/Umbraco.Core/Manifest/DashboardAccessRuleConverter.cs index c627728a32..67c5a5824e 100644 --- a/src/Umbraco.Core/Manifest/DashboardAccessRuleConverter.cs +++ b/src/Umbraco.Core/Manifest/DashboardAccessRuleConverter.cs @@ -1,7 +1,7 @@ using System; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using Umbraco.Core.Configuration.Dashboard; +using Umbraco.Core.Dashboards; using Umbraco.Core.Serialization; namespace Umbraco.Core.Manifest diff --git a/src/Umbraco.Core/Manifest/ManifestDashboardDefinition.cs b/src/Umbraco.Core/Manifest/ManifestDashboardDefinition.cs index 83f047b264..b2b3fd5dfb 100644 --- a/src/Umbraco.Core/Manifest/ManifestDashboardDefinition.cs +++ b/src/Umbraco.Core/Manifest/ManifestDashboardDefinition.cs @@ -1,12 +1,12 @@ using System; using System.ComponentModel; using Newtonsoft.Json; -using Umbraco.Core.Configuration.Dashboard; +using Umbraco.Core.Dashboards; using Umbraco.Core.IO; namespace Umbraco.Core.Manifest { - public class ManifestDashboardDefinition + public class ManifestDashboardDefinition : IDashboardSection { private string _view; @@ -32,5 +32,6 @@ namespace Umbraco.Core.Manifest [JsonProperty("access")] public IAccessRule[] AccessRules { get; set; } = Array.Empty(); + } } diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 0ff88da2f3..993797392f 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -211,26 +211,6 @@ - - - - - - - - - - - - - - - - - - - - @@ -331,6 +311,10 @@ + + + + diff --git a/src/Umbraco.Tests/Configurations/DashboardSettings/DashboardSettingsTests.cs b/src/Umbraco.Tests/Configurations/DashboardSettings/DashboardSettingsTests.cs index 920de683b4..219e6092d2 100644 --- a/src/Umbraco.Tests/Configurations/DashboardSettings/DashboardSettingsTests.cs +++ b/src/Umbraco.Tests/Configurations/DashboardSettings/DashboardSettingsTests.cs @@ -1,123 +1,124 @@ -using System.Configuration; +using System; +using System.Configuration; using System.IO; using System.Linq; using NUnit.Framework; -using Umbraco.Core.Configuration.Dashboard; -using Umbraco.Core.Configuration.UmbracoSettings; +using Umbraco.Core.Dashboards; using Umbraco.Tests.TestHelpers; namespace Umbraco.Tests.Configurations.DashboardSettings { - [TestFixture] - public class DashboardSettingsTests - { - [SetUp] - public void Init() - { - var config = new FileInfo(TestHelper.MapPathForTest("~/Configurations/DashboardSettings/web.config")); + //[Obsolete("Dashboard tests not in config/XML", true)] + //[TestFixture] + //public class DashboardSettingsTests + //{ + // [SetUp] + // public void Init() + // { + // var config = new FileInfo(TestHelper.MapPathForTest("~/Configurations/DashboardSettings/web.config")); - var fileMap = new ExeConfigurationFileMap() { ExeConfigFilename = config.FullName }; - var configuration = ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None); + // var fileMap = new ExeConfigurationFileMap() { ExeConfigFilename = config.FullName }; + // var configuration = ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None); - SettingsSection = configuration.GetSection("umbracoConfiguration/dashBoard") as DashboardSection; + // SettingsSection = configuration.GetSection("umbracoConfiguration/dashBoard") as DashboardSection; - Assert.IsNotNull(SettingsSection); - } + // Assert.IsNotNull(SettingsSection); + // } - protected IDashboardSection SettingsSection { get; private set; } + // protected IDashboardSection SettingsSection { get; private set; } - [Test] - public void Test_Sections() - { - Assert.AreEqual(5, SettingsSection.Sections.Count()); + // [Test] + // public void Test_Sections() + // { + // Assert.AreEqual(5, SettingsSection.Sections.Count()); - Assert.AreEqual("StartupSettingsDashboardSection", SettingsSection.Sections.ElementAt(0).Alias); - Assert.AreEqual("StartupDeveloperDashboardSection", SettingsSection.Sections.ElementAt(1).Alias); - Assert.AreEqual("StartupMediaDashboardSection", SettingsSection.Sections.ElementAt(2).Alias); - Assert.AreEqual("StartupDashboardSection", SettingsSection.Sections.ElementAt(3).Alias); - Assert.AreEqual("StartupMemberDashboardSection", SettingsSection.Sections.ElementAt(4).Alias); - } + // Assert.AreEqual("StartupSettingsDashboardSection", SettingsSection.Sections.ElementAt(0).Alias); + // Assert.AreEqual("StartupDeveloperDashboardSection", SettingsSection.Sections.ElementAt(1).Alias); + // Assert.AreEqual("StartupMediaDashboardSection", SettingsSection.Sections.ElementAt(2).Alias); + // Assert.AreEqual("StartupDashboardSection", SettingsSection.Sections.ElementAt(3).Alias); + // Assert.AreEqual("StartupMemberDashboardSection", SettingsSection.Sections.ElementAt(4).Alias); + // } - [Test] - public void Test_Section_Area() - { - Assert.AreEqual("settings", SettingsSection.Sections.ElementAt(0).Areas.First()); - Assert.AreEqual("developer", SettingsSection.Sections.ElementAt(1).Areas.First()); - Assert.AreEqual("media", SettingsSection.Sections.ElementAt(2).Areas.First()); - Assert.AreEqual("content", SettingsSection.Sections.ElementAt(3).Areas.First()); - Assert.AreEqual("default", SettingsSection.Sections.ElementAt(4).Areas.First()); - Assert.AreEqual("member", SettingsSection.Sections.ElementAt(4).Areas.Last()); - } + // [Test] + // public void Test_Section_Area() + // { + // Assert.AreEqual("settings", SettingsSection.Sections.ElementAt(0).Areas.First()); + // Assert.AreEqual("developer", SettingsSection.Sections.ElementAt(1).Areas.First()); + // Assert.AreEqual("media", SettingsSection.Sections.ElementAt(2).Areas.First()); + // Assert.AreEqual("content", SettingsSection.Sections.ElementAt(3).Areas.First()); + // Assert.AreEqual("default", SettingsSection.Sections.ElementAt(4).Areas.First()); + // Assert.AreEqual("member", SettingsSection.Sections.ElementAt(4).Areas.Last()); + // } - [Test] - public void Test_Section_Access() - { + // [Test] + // public void Test_Section_Access() + // { - Assert.AreEqual(3, SettingsSection.Sections.ElementAt(3).AccessRights.Rules.Count()); + // Assert.AreEqual(3, SettingsSection.Sections.ElementAt(3).AccessRights.Rules.Count()); - Assert.AreEqual("translator", SettingsSection.Sections.ElementAt(3).AccessRights.Rules.ElementAt(0).Value); - Assert.AreEqual(AccessRuleType.Deny, SettingsSection.Sections.ElementAt(3).AccessRights.Rules.ElementAt(0).Type); - Assert.AreEqual("hello", SettingsSection.Sections.ElementAt(3).AccessRights.Rules.ElementAt(1).Value); - Assert.AreEqual(AccessRuleType.Grant, SettingsSection.Sections.ElementAt(3).AccessRights.Rules.ElementAt(1).Type); - Assert.AreEqual("world", SettingsSection.Sections.ElementAt(3).AccessRights.Rules.ElementAt(2).Value); - Assert.AreEqual(AccessRuleType.GrantBySection, SettingsSection.Sections.ElementAt(3).AccessRights.Rules.ElementAt(2).Type); - } + // Assert.AreEqual("translator", SettingsSection.Sections.ElementAt(3).AccessRights.Rules.ElementAt(0).Value); + // Assert.AreEqual(AccessRuleType.Deny, SettingsSection.Sections.ElementAt(3).AccessRights.Rules.ElementAt(0).Type); + // Assert.AreEqual("hello", SettingsSection.Sections.ElementAt(3).AccessRights.Rules.ElementAt(1).Value); + // Assert.AreEqual(AccessRuleType.Grant, SettingsSection.Sections.ElementAt(3).AccessRights.Rules.ElementAt(1).Type); + // Assert.AreEqual("world", SettingsSection.Sections.ElementAt(3).AccessRights.Rules.ElementAt(2).Value); + // Assert.AreEqual(AccessRuleType.GrantBySection, SettingsSection.Sections.ElementAt(3).AccessRights.Rules.ElementAt(2).Type); + // } - [Test] - public void Test_Section_Tabs() - { - //Element 0 Alias "StartupSettingsDashboardSection" - Assert.AreEqual(2, SettingsSection.Sections.ElementAt(0).Tabs.Count()); + // [Test] + // public void Test_Section_Tabs() + // { + // //Element 0 Alias "StartupSettingsDashboardSection" + // Assert.AreEqual(2, SettingsSection.Sections.ElementAt(0).Tabs.Count()); - //Element 1 Alias "StartupDeveloperDashboardSection" - Assert.AreEqual(1, SettingsSection.Sections.ElementAt(1).Tabs.Count()); + // //Element 1 Alias "StartupDeveloperDashboardSection" + // Assert.AreEqual(1, SettingsSection.Sections.ElementAt(1).Tabs.Count()); - //Element 2 Alias "StartupMediaDashboardSection" - Assert.AreEqual(2, SettingsSection.Sections.ElementAt(2).Tabs.Count()); + // //Element 2 Alias "StartupMediaDashboardSection" + // Assert.AreEqual(2, SettingsSection.Sections.ElementAt(2).Tabs.Count()); - //Element 3 Alias "StartupDashboardSection" - Assert.AreEqual(3, SettingsSection.Sections.ElementAt(3).Tabs.Count()); + // //Element 3 Alias "StartupDashboardSection" + // Assert.AreEqual(3, SettingsSection.Sections.ElementAt(3).Tabs.Count()); - //Element 4 Alias "StartupMemberDashboardSection" - Assert.AreEqual(1, SettingsSection.Sections.ElementAt(4).Tabs.Count()); + // //Element 4 Alias "StartupMemberDashboardSection" + // Assert.AreEqual(1, SettingsSection.Sections.ElementAt(4).Tabs.Count()); - } + // } - [Test] - public void Test_Tab() - { - Assert.AreEqual("Get Started", SettingsSection.Sections.ElementAt(0).Tabs.ElementAt(0).Caption); - Assert.AreEqual(2, SettingsSection.Sections.ElementAt(0).Tabs.ElementAt(0).Controls.Count()); - } + // [Test] + // public void Test_Tab() + // { + // Assert.AreEqual("Get Started", SettingsSection.Sections.ElementAt(0).Tabs.ElementAt(0).Caption); + // Assert.AreEqual(2, SettingsSection.Sections.ElementAt(0).Tabs.ElementAt(0).Controls.Count()); + // } - [Test] - public void Test_Tab_Access() - { - Assert.AreEqual(1, SettingsSection.Sections.ElementAt(2).Tabs.ElementAt(1).AccessRights.Rules.Count()); - Assert.AreEqual(AccessRuleType.Grant, SettingsSection.Sections.ElementAt(2).Tabs.ElementAt(1).AccessRights.Rules.ElementAt(0).Type); - Assert.AreEqual("admin", SettingsSection.Sections.ElementAt(2).Tabs.ElementAt(1).AccessRights.Rules.ElementAt(0).Value); - } + // [Test] + // public void Test_Tab_Access() + // { + // Assert.AreEqual(1, SettingsSection.Sections.ElementAt(2).Tabs.ElementAt(1).AccessRights.Rules.Count()); + // Assert.AreEqual(AccessRuleType.Grant, SettingsSection.Sections.ElementAt(2).Tabs.ElementAt(1).AccessRights.Rules.ElementAt(0).Type); + // Assert.AreEqual("admin", SettingsSection.Sections.ElementAt(2).Tabs.ElementAt(1).AccessRights.Rules.ElementAt(0).Value); + // } - [Test] - public void Test_Control() - { - Assert.AreEqual("hello", SettingsSection.Sections.ElementAt(0).Tabs.ElementAt(0).Controls.ElementAt(0).PanelCaption); - Assert.AreEqual("views/dashboard/settings/settingsdashboardintro.html", - SettingsSection.Sections.ElementAt(0).Tabs.ElementAt(0).Controls.ElementAt(0).ControlPath); + // [Test] + // public void Test_Control() + // { + // Assert.AreEqual("hello", SettingsSection.Sections.ElementAt(0).Tabs.ElementAt(0).Controls.ElementAt(0).PanelCaption); + // Assert.AreEqual("views/dashboard/settings/settingsdashboardintro.html", + // SettingsSection.Sections.ElementAt(0).Tabs.ElementAt(0).Controls.ElementAt(0).ControlPath); - Assert.AreEqual("", SettingsSection.Sections.ElementAt(0).Tabs.ElementAt(0).Controls.ElementAt(1).PanelCaption); - Assert.AreEqual("views/dashboard/settings/settingsdashboardvideos.html", - SettingsSection.Sections.ElementAt(0).Tabs.ElementAt(0).Controls.ElementAt(1).ControlPath); - } + // Assert.AreEqual("", SettingsSection.Sections.ElementAt(0).Tabs.ElementAt(0).Controls.ElementAt(1).PanelCaption); + // Assert.AreEqual("views/dashboard/settings/settingsdashboardvideos.html", + // SettingsSection.Sections.ElementAt(0).Tabs.ElementAt(0).Controls.ElementAt(1).ControlPath); + // } - [Test] - public void Test_Control_Access() - { - Assert.AreEqual(2, SettingsSection.Sections.ElementAt(3).Tabs.ElementAt(0).Controls.ElementAt(1).AccessRights.Rules.Count()); - Assert.AreEqual(AccessRuleType.Deny, SettingsSection.Sections.ElementAt(3).Tabs.ElementAt(0).Controls.ElementAt(1).AccessRights.Rules.ElementAt(0).Type); - Assert.AreEqual("editor", SettingsSection.Sections.ElementAt(3).Tabs.ElementAt(0).Controls.ElementAt(1).AccessRights.Rules.ElementAt(0).Value); - Assert.AreEqual(AccessRuleType.Deny, SettingsSection.Sections.ElementAt(3).Tabs.ElementAt(0).Controls.ElementAt(1).AccessRights.Rules.ElementAt(1).Type); - Assert.AreEqual("writer", SettingsSection.Sections.ElementAt(3).Tabs.ElementAt(0).Controls.ElementAt(1).AccessRights.Rules.ElementAt(1).Value); - } - } + // [Test] + // public void Test_Control_Access() + // { + // Assert.AreEqual(2, SettingsSection.Sections.ElementAt(3).Tabs.ElementAt(0).Controls.ElementAt(1).AccessRights.Rules.Count()); + // Assert.AreEqual(AccessRuleType.Deny, SettingsSection.Sections.ElementAt(3).Tabs.ElementAt(0).Controls.ElementAt(1).AccessRights.Rules.ElementAt(0).Type); + // Assert.AreEqual("editor", SettingsSection.Sections.ElementAt(3).Tabs.ElementAt(0).Controls.ElementAt(1).AccessRights.Rules.ElementAt(0).Value); + // Assert.AreEqual(AccessRuleType.Deny, SettingsSection.Sections.ElementAt(3).Tabs.ElementAt(0).Controls.ElementAt(1).AccessRights.Rules.ElementAt(1).Type); + // Assert.AreEqual("writer", SettingsSection.Sections.ElementAt(3).Tabs.ElementAt(0).Controls.ElementAt(1).AccessRights.Rules.ElementAt(1).Value); + // } + //} } diff --git a/src/Umbraco.Tests/Manifest/ManifestParserTests.cs b/src/Umbraco.Tests/Manifest/ManifestParserTests.cs index 4e791c0169..a12f90c4eb 100644 --- a/src/Umbraco.Tests/Manifest/ManifestParserTests.cs +++ b/src/Umbraco.Tests/Manifest/ManifestParserTests.cs @@ -7,12 +7,12 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Umbraco.Core.Cache; using Umbraco.Core.Composing; -using Umbraco.Core.Configuration.Dashboard; using Umbraco.Core.Logging; using Umbraco.Core.Manifest; using Umbraco.Core.PropertyEditors; using Umbraco.Core.PropertyEditors.Validators; using Umbraco.Core.Services; +using Umbraco.Core.Dashboards; namespace Umbraco.Tests.Manifest { diff --git a/src/Umbraco.Web.UI.Client/package-lock.json b/src/Umbraco.Web.UI.Client/package-lock.json index ed28a93caf..fe657ae470 100644 --- a/src/Umbraco.Web.UI.Client/package-lock.json +++ b/src/Umbraco.Web.UI.Client/package-lock.json @@ -937,7 +937,7 @@ }, "ansi-colors": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", "dev": true, "requires": { @@ -955,7 +955,7 @@ }, "ansi-escapes": { "version": "3.1.0", - "resolved": "http://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", "dev": true }, @@ -1170,7 +1170,7 @@ "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": { @@ -1216,7 +1216,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": { @@ -1269,7 +1269,7 @@ "async-limiter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", - "integrity": "sha1-ePrtjD0HSrgfIrTphdeehzj3IPg=", + "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==", "dev": true }, "asynckit": { @@ -2379,7 +2379,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { @@ -2459,7 +2459,7 @@ "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 }, "continuable-cache": { @@ -2502,7 +2502,7 @@ "core-js": { "version": "2.5.7", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", - "integrity": "sha1-+XJgj/DOrWi4QaFqky0LGDeRgU4=", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true }, "core-util-is": { @@ -3425,7 +3425,7 @@ "doctrine": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha1-XNAfwQFiG0LEzX9dGmYkNxbT850=", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "requires": { "esutils": "^2.0.2" @@ -3953,7 +3953,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" @@ -3989,7 +3989,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" @@ -4153,7 +4153,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 } @@ -4248,7 +4248,7 @@ "eslint-scope": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", - "integrity": "sha1-UL8wcekzi83EMzF5Sgy1M/ATYXI=", + "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", "dev": true, "requires": { "esrecurse": "^4.1.0", @@ -4258,13 +4258,13 @@ "eslint-utils": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", - "integrity": "sha1-moUbqJ7nxGA0b5fPiTnHKYgn5RI=", + "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", "dev": true }, "eslint-visitor-keys": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha1-PzGA+y4pEBdxastMnW1bXDSmqB0=", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", "dev": true }, "espree": { @@ -4287,7 +4287,7 @@ "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" @@ -4296,7 +4296,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" @@ -4356,7 +4356,7 @@ "eventemitter3": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz", - "integrity": "sha1-CQtNbNvWRe0Qv3UNS1QHlC17oWM=", + "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==", "dev": true }, "exec-buffer": { @@ -4571,7 +4571,7 @@ "fill-range": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", - "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", + "integrity": "sha1-6x53OrsFbc2N8r/favWbizqTZWU=", "dev": true, "requires": { "is-number": "^2.1.0", @@ -5891,7 +5891,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", @@ -6461,7 +6461,7 @@ "gulp-eslint": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/gulp-eslint/-/gulp-eslint-5.0.0.tgz", - "integrity": "sha1-KiaECV93Syz3kxAmIHjFbMehK1I=", + "integrity": "sha512-9GUqCqh85C7rP9120cpxXuZz2ayq3BZc85pCTuPJS03VQYxne0aWPIXWx6LSvsGPa3uRqtSO537vaugOh+5cXg==", "dev": true, "requires": { "eslint": "^5.0.1", @@ -7415,7 +7415,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" @@ -7566,7 +7566,7 @@ "http-proxy": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz", - "integrity": "sha1-etOElGWPhGBeL220Q230EPTlvpo=", + "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==", "dev": true, "requires": { "eventemitter3": "^3.0.0", @@ -7860,7 +7860,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", @@ -8155,7 +8155,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" @@ -8164,7 +8164,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": { @@ -8212,7 +8212,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" @@ -8369,7 +8369,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": { @@ -8496,7 +8496,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 } } @@ -9146,7 +9146,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" @@ -9327,7 +9327,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 }, "minimatch": { @@ -12855,7 +12855,7 @@ "pluralize": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", - "integrity": "sha1-KYuJ34uTsCIdv0Ia0rGx6iP8Z3c=", + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", "dev": true }, "posix-character-classes": { @@ -13345,7 +13345,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": { @@ -13541,7 +13541,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { @@ -14039,7 +14039,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": { @@ -14226,7 +14226,7 @@ "setprototypeof": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha1-0L2FU2iHtv58DYGMuWLZ2RxU5lY=", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", "dev": true }, "shebang-command": { @@ -14516,7 +14516,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" @@ -14796,7 +14796,7 @@ "stream-consume": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.1.tgz", - "integrity": "sha1-0721mMK9CugrjKx6xQsRB6eZbEg=", + "integrity": "sha512-tNa3hzgkjEP7XbCkbRXe1jpg+ievoa0O4SCFlMOYEscGSS4JJsckGL8swUyAa/ApGU3Ae4t6Honor4HhL+tRyg==", "dev": true }, "stream-shift": { @@ -14808,7 +14808,7 @@ "streamroller": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-0.7.0.tgz", - "integrity": "sha1-odG3z4PTmvsNYwSaWsv5NJO99ks=", + "integrity": "sha512-WREzfy0r0zUqp3lGO096wRuUp7ho1X6uo/7DJfTlEi0Iv/4gT7YHqXDjKC2ioVGBZtE8QzsQD9nx1nIuoZ57jQ==", "dev": true, "requires": { "date-format": "^1.2.0", @@ -14835,7 +14835,7 @@ "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { "core-util-is": "~1.0.0", @@ -14850,7 +14850,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" @@ -14867,7 +14867,7 @@ "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { "is-fullwidth-code-point": "^2.0.0", @@ -15409,7 +15409,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" @@ -15573,7 +15573,7 @@ "type-is": { "version": "1.6.16", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", - "integrity": "sha1-+JzjQVQcZysl7nrjxz3uOyvlAZQ=", + "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", "dev": true, "requires": { "media-typer": "0.3.0", @@ -15615,7 +15615,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 }, "unc-path-regex": { @@ -15777,13 +15777,13 @@ "upath": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", - "integrity": "sha1-NSVll+RqWB20eT0M5H+prr/J+r0=", + "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", "dev": true }, "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" @@ -16218,7 +16218,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/views/common/dashboard.html b/src/Umbraco.Web.UI.Client/src/views/common/dashboard.html index 6453963670..c3b60e2f0a 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/dashboard.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/dashboard.html @@ -17,16 +17,15 @@
- +
- +
-

{{property.caption}}

-
+
- +
- +
@@ -34,5 +33,5 @@ - + diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index 0ff158dadb..c7b6540b3d 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -178,6 +178,7 @@ + @@ -205,6 +206,7 @@ + 404handlers.config diff --git a/src/Umbraco.Web.UI/config/Dashboard.config b/src/Umbraco.Web.UI/config/Dashboard.config index fec6ab34ae..94325913df 100644 --- a/src/Umbraco.Web.UI/config/Dashboard.config +++ b/src/Umbraco.Web.UI/config/Dashboard.config @@ -94,6 +94,7 @@ +
content diff --git a/src/Umbraco.Web/CompositionExtensions.cs b/src/Umbraco.Web/CompositionExtensions.cs index 246127b312..783c991ab4 100644 --- a/src/Umbraco.Web/CompositionExtensions.cs +++ b/src/Umbraco.Web/CompositionExtensions.cs @@ -10,6 +10,7 @@ using Umbraco.Web.Routing; using Umbraco.Web.ContentApps; using Umbraco.Web.Tour; using Umbraco.Web.Trees; +using Umbraco.Web.Dashboards; // the namespace here is intentional - although defined in Umbraco.Web assembly, // this class should be visible when using Umbraco.Core.Components, alongside @@ -92,6 +93,13 @@ namespace Umbraco.Core.Components public static BackOfficeSectionCollectionBuilder Sections(this Composition composition) => composition.WithCollectionBuilder(); + /// + /// Gets the backoffice dashboards collection builder. + /// + /// The composition. + public static DashboardCollectionBuilder Dashboards(this Composition composition) + => composition.WithCollectionBuilder(); + #endregion #region Uniques diff --git a/src/Umbraco.Web/Dashboards/ContentDashboard.cs b/src/Umbraco.Web/Dashboards/ContentDashboard.cs new file mode 100644 index 0000000000..c184e593aa --- /dev/null +++ b/src/Umbraco.Web/Dashboards/ContentDashboard.cs @@ -0,0 +1,38 @@ +using System.Collections.Generic; +using System.Runtime.Serialization; +using Umbraco.Core.Composing; +using Umbraco.Core.Dashboards; + +namespace Umbraco.Web.Dashboards +{ + [Weight(10)] + //[HideFromTypeFinder] + [DataContract] + public class ContentDashboard : IDashboardSection + { + [DataMember(Name = "name")] + public string Name => "Get Started"; + + [DataMember(Name = "alias")] + public string Alias => "contentIntro"; + + [IgnoreDataMember] + public string[] Sections => new string[] { "content" }; + + [DataMember(Name = "view")] + public string View => "views/dashboard/default/startupdashboardintro.html"; + + [IgnoreDataMember] + public IAccessRule[] AccessRules + { + get + { + //TODO: WB Not convinced these rules work correctly?! + var rules = new List(); + rules.Add(new AccessRule { Type = AccessRuleType.Deny, Value = "translator" }); + rules.Add(new AccessRule { Type = AccessRuleType.Grant, Value = "admin" }); + return rules.ToArray(); + } + } + } +} diff --git a/src/Umbraco.Web/Dashboards/DashboardCollection.cs b/src/Umbraco.Web/Dashboards/DashboardCollection.cs new file mode 100644 index 0000000000..8d3bde622e --- /dev/null +++ b/src/Umbraco.Web/Dashboards/DashboardCollection.cs @@ -0,0 +1,13 @@ +using System.Collections.Generic; +using Umbraco.Core.Composing; +using Umbraco.Core.Dashboards; + +namespace Umbraco.Web.Dashboards +{ + public class DashboardCollection : BuilderCollectionBase + { + public DashboardCollection(IEnumerable items) + : base(items) + { } + } +} diff --git a/src/Umbraco.Web/Dashboards/DashboardCollectionBuilder.cs b/src/Umbraco.Web/Dashboards/DashboardCollectionBuilder.cs new file mode 100644 index 0000000000..d4a89a61b2 --- /dev/null +++ b/src/Umbraco.Web/Dashboards/DashboardCollectionBuilder.cs @@ -0,0 +1,24 @@ +using System.Collections.Generic; +using System.Linq; +using Umbraco.Core.Composing; +using Umbraco.Core.Dashboards; +using Umbraco.Core.Manifest; + +namespace Umbraco.Web.Dashboards +{ + public class DashboardCollectionBuilder : WeightedCollectionBuilderBase + { + protected override DashboardCollectionBuilder This => this; + + protected override IEnumerable CreateItems(IFactory factory) + { + // get the manifest parser just-in-time - injecting it in the ctor would mean that + // simply getting the builder in order to configure the collection, would require + // its dependencies too, and that can create cycles or other oddities + var manifestParser = factory.GetInstance(); + + //TODO WB: We will need to re-sort items from package manifest with the C# Types + return base.CreateItems(factory).Concat(manifestParser.Manifest.Dashboards); + } + } +} diff --git a/src/Umbraco.Web/Dashboards/ExamineDashboard.cs b/src/Umbraco.Web/Dashboards/ExamineDashboard.cs new file mode 100644 index 0000000000..5f04a4b78d --- /dev/null +++ b/src/Umbraco.Web/Dashboards/ExamineDashboard.cs @@ -0,0 +1,29 @@ +using System; +using System.Runtime.Serialization; +using Umbraco.Core.Composing; +using Umbraco.Core.Dashboards; + +namespace Umbraco.Web.Dashboards +{ + [Weight(20)] + [DataContract] + public class ExamineDashboard : IDashboardSection + { + [DataMember(Name = "name")] + public string Name => "Examine Management"; + + [DataMember(Name = "alias")] + public string Alias => "settingsExamine"; + + [IgnoreDataMember] + public string[] Sections => new string[] { "settings" }; + + [DataMember(Name = "view")] + public string View => "views/dashboard/settings/examinemanagement.html"; + + [IgnoreDataMember] + public IAccessRule[] AccessRules => Array.Empty(); + } + + +} diff --git a/src/Umbraco.Web/Dashboards/FormsDashboard.cs b/src/Umbraco.Web/Dashboards/FormsDashboard.cs new file mode 100644 index 0000000000..c9e8e06b7d --- /dev/null +++ b/src/Umbraco.Web/Dashboards/FormsDashboard.cs @@ -0,0 +1,27 @@ +using System; +using System.Runtime.Serialization; +using Umbraco.Core.Composing; +using Umbraco.Core.Dashboards; + +namespace Umbraco.Web.Dashboards +{ + [Weight(10)] + [DataContract] + public class FormsDashboard : IDashboardSection + { + [DataMember(Name = "name")] + public string Name => "Install Umbraco Forms"; + + [DataMember(Name = "alias")] + public string Alias => "formsInstall"; + + [IgnoreDataMember] + public string[] Sections => new string[] { "forms" }; + + [DataMember(Name = "view")] + public string View => "views/dashboard/forms/formsdashboardintro.html"; + + [IgnoreDataMember] + public IAccessRule[] AccessRules => Array.Empty(); + } +} diff --git a/src/Umbraco.Web/Dashboards/HealthCheckDashboard.cs b/src/Umbraco.Web/Dashboards/HealthCheckDashboard.cs new file mode 100644 index 0000000000..808dc099e8 --- /dev/null +++ b/src/Umbraco.Web/Dashboards/HealthCheckDashboard.cs @@ -0,0 +1,29 @@ +using System; +using System.Runtime.Serialization; +using Umbraco.Core.Composing; +using Umbraco.Core.Dashboards; + +namespace Umbraco.Web.Dashboards +{ + [Weight(50)] + [DataContract] + public class HealthCheckDashboard : IDashboardSection + { + [DataMember(Name="name")] + public string Name => "Health Check"; + + [DataMember(Name = "alias")] + public string Alias => "settingsHealthCheck"; + + [IgnoreDataMember] + public string[] Sections => new string[] { "settings" }; + + [DataMember(Name = "view")] + public string View => "views/dashboard/settings/healthcheck.html"; + + [IgnoreDataMember] + public IAccessRule[] AccessRules => Array.Empty(); + } + + +} diff --git a/src/Umbraco.Web/Dashboards/MediaDashboard.cs b/src/Umbraco.Web/Dashboards/MediaDashboard.cs new file mode 100644 index 0000000000..c122ba1f7f --- /dev/null +++ b/src/Umbraco.Web/Dashboards/MediaDashboard.cs @@ -0,0 +1,27 @@ +using System; +using System.Runtime.Serialization; +using Umbraco.Core.Composing; +using Umbraco.Core.Dashboards; + +namespace Umbraco.Web.Dashboards +{ + [Weight(10)] + [DataContract] + public class MediaDashboard : IDashboardSection + { + [DataMember(Name = "name")] + public string Name => "Content"; + + [DataMember(Name = "alias")] + public string Alias => "mediaFolderBrowser"; + + [IgnoreDataMember] + public string[] Sections => new string[] { "media" }; + + [DataMember(Name = "view")] + public string View => "views/dashboard/media/mediafolderbrowser.html"; + + [IgnoreDataMember] + public IAccessRule[] AccessRules => Array.Empty(); + } +} diff --git a/src/Umbraco.Web/Dashboards/MembersDashboard.cs b/src/Umbraco.Web/Dashboards/MembersDashboard.cs new file mode 100644 index 0000000000..9da6f59108 --- /dev/null +++ b/src/Umbraco.Web/Dashboards/MembersDashboard.cs @@ -0,0 +1,27 @@ +using System; +using System.Runtime.Serialization; +using Umbraco.Core.Composing; +using Umbraco.Core.Dashboards; + +namespace Umbraco.Web.Dashboards +{ + [Weight(10)] + [DataContract] + public class MembersDashboard : IDashboardSection + { + [DataMember(Name = "name")] + public string Name => "Get Started"; + + [DataMember(Name = "alias")] + public string Alias => "memberIntro"; + + [IgnoreDataMember] + public string[] Sections => new string[] { "member" }; + + [DataMember(Name = "view")] + public string View => "views/dashboard/members/membersdashboardvideos.html"; + + [IgnoreDataMember] + public IAccessRule[] AccessRules => Array.Empty(); + } +} diff --git a/src/Umbraco.Web/Dashboards/ModelsBuilderDashboard.cs b/src/Umbraco.Web/Dashboards/ModelsBuilderDashboard.cs new file mode 100644 index 0000000000..f25a9f7ea0 --- /dev/null +++ b/src/Umbraco.Web/Dashboards/ModelsBuilderDashboard.cs @@ -0,0 +1,29 @@ +using System; +using System.Runtime.Serialization; +using Umbraco.Core.Composing; +using Umbraco.Core.Dashboards; + +namespace Umbraco.Web.Dashboards +{ + [Weight(40)] + [DataContract] + public class ModelsBuilderDashboard : IDashboardSection + { + [DataMember(Name = "name")] + public string Name => "Models Builder"; + + [DataMember(Name = "alias")] + public string Alias => "settingsModelsBuilder"; + + [IgnoreDataMember] + public string[] Sections => new string[] { "settings" }; + + [DataMember(Name = "view")] + public string View => "/App_Plugins/ModelsBuilder/modelsbuilder.htm"; + + [IgnoreDataMember] + public IAccessRule[] AccessRules => Array.Empty(); + } + + +} diff --git a/src/Umbraco.Web/Dashboards/PublishedStatusDashboard.cs b/src/Umbraco.Web/Dashboards/PublishedStatusDashboard.cs new file mode 100644 index 0000000000..d2fa5b217b --- /dev/null +++ b/src/Umbraco.Web/Dashboards/PublishedStatusDashboard.cs @@ -0,0 +1,29 @@ +using System; +using System.Runtime.Serialization; +using Umbraco.Core.Composing; +using Umbraco.Core.Dashboards; + +namespace Umbraco.Web.Dashboards +{ + [Weight(30)] + [DataContract] + public class PublishedStatusDashboard : IDashboardSection + { + [DataMember(Name = "name")] + public string Name => "Published Status"; + + [DataMember(Name = "alias")] + public string Alias => "settingsPublishedStatus"; + + [IgnoreDataMember] + public string[] Sections => new string[] { "settings" }; + + [DataMember(Name = "view")] + public string View => "views/dashboard/settings/publishedstatus.html"; + + [IgnoreDataMember] + public IAccessRule[] AccessRules => Array.Empty(); + } + + +} diff --git a/src/Umbraco.Web/Dashboards/RedirectUrlDashboard.cs b/src/Umbraco.Web/Dashboards/RedirectUrlDashboard.cs new file mode 100644 index 0000000000..731d259d39 --- /dev/null +++ b/src/Umbraco.Web/Dashboards/RedirectUrlDashboard.cs @@ -0,0 +1,27 @@ +using System; +using System.Runtime.Serialization; +using Umbraco.Core.Composing; +using Umbraco.Core.Dashboards; + +namespace Umbraco.Web.Dashboards +{ + [Weight(20)] + [DataContract] + public class RedirectUrlDashboard : IDashboardSection + { + [DataMember(Name = "name")] + public string Name => "Redirect URL Management"; + + [DataMember(Name = "alias")] + public string Alias => "contentRedirectManager"; + + [IgnoreDataMember] + public string[] Sections => new string[] { "content" }; + + [DataMember(Name = "view")] + public string View => "views/dashboard/content/redirecturls.html"; + + [IgnoreDataMember] + public IAccessRule[] AccessRules => Array.Empty(); + } +} diff --git a/src/Umbraco.Web/Dashboards/SettingsDashboards.cs b/src/Umbraco.Web/Dashboards/SettingsDashboards.cs new file mode 100644 index 0000000000..47c1723075 --- /dev/null +++ b/src/Umbraco.Web/Dashboards/SettingsDashboards.cs @@ -0,0 +1,27 @@ +using System; +using System.Runtime.Serialization; +using Umbraco.Core.Composing; +using Umbraco.Core.Dashboards; + +namespace Umbraco.Web.Dashboards +{ + [Weight(10)] + [DataContract] + public class SettingsDashboard : IDashboardSection + { + [DataMember(Name = "name")] + public string Name => "Welcome"; + + [DataMember(Name = "alias")] + public string Alias => "settingsWelcome"; + + [IgnoreDataMember] + public string[] Sections => new string[] { "settings" }; + + [DataMember(Name = "view")] + public string View => "views/dashboard/settings/settingsdashboardintro.html"; + + [IgnoreDataMember] + public IAccessRule[] AccessRules => Array.Empty(); + } +} diff --git a/src/Umbraco.Web/Editors/DashboardController.cs b/src/Umbraco.Web/Editors/DashboardController.cs index c6e0049865..11d31a86b4 100644 --- a/src/Umbraco.Web/Editors/DashboardController.cs +++ b/src/Umbraco.Web/Editors/DashboardController.cs @@ -16,6 +16,8 @@ using Umbraco.Web.WebApi.Filters; using Umbraco.Core.Logging; using Umbraco.Core.Persistence; using Umbraco.Core.Services; +using Umbraco.Core.Dashboards; +using Umbraco.Web.Services; namespace Umbraco.Web.Editors { @@ -27,7 +29,7 @@ namespace Umbraco.Web.Editors [WebApi.UmbracoAuthorize] public class DashboardController : UmbracoApiController { - private readonly Dashboards _dashboards; + private readonly IDashboardService _dashboardService; /// /// Initializes a new instance of the with auto dependencies. @@ -38,10 +40,10 @@ namespace Umbraco.Web.Editors /// /// Initializes a new instance of the with all its dependencies. /// - public DashboardController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, Dashboards dashboards) + public DashboardController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, IDashboardService dashboardService) : base(globalSettings, umbracoContext, sqlContext, services, appCaches, logger, runtimeState) { - _dashboards = dashboards; + _dashboardService = dashboardService; } //we have just one instance of HttpClient shared for the entire application @@ -79,7 +81,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)); @@ -117,7 +119,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)); @@ -132,9 +134,9 @@ namespace Umbraco.Web.Editors [ValidateAngularAntiForgeryToken] [OutgoingEditorModelEvent] - public IEnumerable> GetDashboard(string section) + public IEnumerable> GetDashboard(string section) { - return _dashboards.GetDashboards(section, Security.CurrentUser); + return _dashboardService.GetDashboards(section, Security.CurrentUser); } } } diff --git a/src/Umbraco.Web/Editors/Dashboards.cs b/src/Umbraco.Web/Editors/Dashboards.cs deleted file mode 100644 index c837cbbf33..0000000000 --- a/src/Umbraco.Web/Editors/Dashboards.cs +++ /dev/null @@ -1,160 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Configuration.Dashboard; -using Umbraco.Core.IO; -using Umbraco.Core.Manifest; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Services; -using Umbraco.Web.Models.ContentEditing; -using Umbraco.Web.Services; - -namespace Umbraco.Web.Editors -{ - public class Dashboards - { - private readonly ISectionService _sectionService; - private readonly IDashboardSection _dashboardSection; - private readonly ManifestParser _manifestParser; - - public Dashboards(ISectionService sectionService, IDashboardSection dashboardSection, ManifestParser manifestParser) - { - _sectionService = sectionService ?? throw new ArgumentNullException(nameof(sectionService)); - _dashboardSection = dashboardSection; - _manifestParser = manifestParser; - } - - /// - /// Gets all dashboards, organized by section, for a user. - /// - public IDictionary>> GetDashboards(IUser currentUser) - { - return _sectionService.GetSections().ToDictionary(x => x.Alias, x => GetDashboards(x.Alias, currentUser)); - } - - /// - /// Returns dashboards for a specific section, for a user. - /// - public IEnumerable> GetDashboards(string section, IUser currentUser) - { - var tabId = 1; - var configDashboards = GetDashboardsFromConfig(ref tabId, section, currentUser); - var pluginDashboards = GetDashboardsFromPlugins(ref tabId, section, currentUser); - - // merge dashboards - // both collections contain tab.alias -> controls - var dashboards = configDashboards; - - // until now, it was fine to have duplicate tab.aliases in configDashboard - // so... the rule should be - just merge whatever we get, don't be clever - dashboards.AddRange(pluginDashboards); - - // re-sort by id - dashboards.Sort((tab1, tab2) => tab1.Id > tab2.Id ? 1 : 0); - - // re-assign ids (why?) - var i = 1; - foreach (var tab in dashboards) - { - tab.Id = i++; - tab.IsActive = tab.Id == 1; - } - - return configDashboards; - } - - // note: - // in dashboard.config we have 'sections' which define 'tabs' for 'areas' - // and 'areas' are the true UI sections - and each tab can have more than - // one control - // in a manifest, we directly have 'dashboards' which map to a unique - // control in a tab - - // gets all tabs & controls from the config file - private List> GetDashboardsFromConfig(ref int tabId, string section, IUser currentUser) - { - var tabs = new List>(); - - // disable packages section dashboard - if (section == "packages") return tabs; - - foreach (var dashboardSection in _dashboardSection.Sections.Where(x => x.Areas.InvariantContains(section))) - { - // validate access to this section - if (!DashboardSecurity.AuthorizeAccess(dashboardSection, currentUser, _sectionService)) - continue; - - foreach (var tab in dashboardSection.Tabs) - { - // validate access to this tab - if (!DashboardSecurity.AuthorizeAccess(tab, currentUser, _sectionService)) - continue; - - var dashboardControls = new List(); - - foreach (var control in tab.Controls) - { - // validate access to this control - if (!DashboardSecurity.AuthorizeAccess(control, currentUser, _sectionService)) - continue; - - // create and add control - var dashboardControl = new DashboardControl - { - Caption = control.PanelCaption, - Path = IOHelper.FindFile(control.ControlPath.Trim()) - }; - - if (dashboardControl.Path.InvariantEndsWith(".ascx")) - throw new NotSupportedException("Legacy UserControl (.ascx) dashboards are no longer supported."); - - dashboardControls.Add(dashboardControl); - } - - // create and add tab - tabs.Add(new Tab - { - Id = tabId++, - Alias = tab.Caption.ToSafeAlias(), - Label = tab.Caption, - Properties = dashboardControls - }); - } - } - - return tabs; - } - - private List> GetDashboardsFromPlugins(ref int tabId, string section, IUser currentUser) - { - var tabs = new List>(); - - foreach (var dashboard in _manifestParser.Manifest.Dashboards.Where(x => x.Sections.InvariantContains(section)).OrderBy(x => x.Weight)) - { - // validate access - if (!DashboardSecurity.CheckUserAccessByRules(currentUser, _sectionService, dashboard.AccessRules)) - continue; - - var dashboardControl = new DashboardControl - { - Caption = "", - Path = IOHelper.FindFile(dashboard.View.Trim()) - }; - - if (dashboardControl.Path.InvariantEndsWith(".ascx")) - throw new NotSupportedException("Legacy UserControl (.ascx) dashboards are no longer supported."); - - tabs.Add(new Tab - { - Id = tabId++, - Alias = dashboard.Alias.ToSafeAlias(), - Label = dashboard.Name, - Properties = new[] { dashboardControl } - }); - } - - return tabs; - } - } -} diff --git a/src/Umbraco.Web/Editors/EditorModelEventManager.cs b/src/Umbraco.Web/Editors/EditorModelEventManager.cs index 2225f5c577..dd5282d724 100644 --- a/src/Umbraco.Web/Editors/EditorModelEventManager.cs +++ b/src/Umbraco.Web/Editors/EditorModelEventManager.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Web.Http.Filters; +using Umbraco.Core.Dashboards; using Umbraco.Core.Events; using Umbraco.Web.Models.ContentEditing; @@ -14,9 +15,9 @@ namespace Umbraco.Web.Editors public static event TypedEventHandler> SendingMediaModel; public static event TypedEventHandler> SendingMemberModel; public static event TypedEventHandler> SendingUserModel; - public static event TypedEventHandler>>> SendingDashboardModel; + public static event TypedEventHandler>>> SendingDashboardModel; - private static void OnSendingDashboardModel(HttpActionExecutedContext sender, EditorModelEventArgs>> e) + private static void OnSendingDashboardModel(HttpActionExecutedContext sender, EditorModelEventArgs>> e) { var handler = SendingDashboardModel; handler?.Invoke(sender, e); @@ -65,8 +66,8 @@ namespace Umbraco.Web.Editors if (e.Model is UserDisplay) OnSendingUserModel(sender, new EditorModelEventArgs(e)); - if (e.Model is IEnumerable>) - OnSendingDashboardModel(sender, new EditorModelEventArgs>>(e)); + if (e.Model is IEnumerable) + OnSendingDashboardModel(sender, new EditorModelEventArgs>>(e)); } } } diff --git a/src/Umbraco.Web/Editors/SectionController.cs b/src/Umbraco.Web/Editors/SectionController.cs index 74a06d7149..f6973fcbb9 100644 --- a/src/Umbraco.Web/Editors/SectionController.cs +++ b/src/Umbraco.Web/Editors/SectionController.cs @@ -22,15 +22,15 @@ namespace Umbraco.Web.Editors [PluginController("UmbracoApi")] public class SectionController : UmbracoAuthorizedJsonController { - private readonly Dashboards _dashboards; + private readonly IDashboardService _dashboardService; private readonly ISectionService _sectionService; private readonly ITreeService _treeService; public SectionController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, - Dashboards dashboards, ISectionService sectionService, ITreeService treeService) + IDashboardService dashboardService, ISectionService sectionService, ITreeService treeService) : base(globalSettings, umbracoContext, sqlContext, services, appCaches, logger, runtimeState) { - _dashboards = dashboards; + _dashboardService = dashboardService; _sectionService = sectionService; _treeService = treeService; } @@ -48,7 +48,7 @@ namespace Umbraco.Web.Editors ControllerContext = ControllerContext }; - var dashboards = _dashboards.GetDashboards(Security.CurrentUser); + var dashboards = _dashboardService.GetDashboards(Security.CurrentUser); //now we can add metadata for each section so that the UI knows if there's actually anything at all to render for //a dashboard for a given section, then the UI can deal with it accordingly (i.e. redirect to the first tree) diff --git a/src/Umbraco.Web/Models/ContentEditing/DashboardControl.cs b/src/Umbraco.Web/Models/ContentEditing/DashboardControl.cs deleted file mode 100644 index aad6bf2d64..0000000000 --- a/src/Umbraco.Web/Models/ContentEditing/DashboardControl.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.Serialization; -using System.Text; -using System.Threading.Tasks; - -namespace Umbraco.Web.Models.ContentEditing -{ - [DataContract(Name = "control", Namespace = "")] - public class DashboardControl - { - [DataMember(Name = "path")] - public string Path { get; set; } - - [DataMember(Name = "caption")] - public string Caption { get; set; } - } -} diff --git a/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs b/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs index 832699b5d7..d165559024 100644 --- a/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs +++ b/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs @@ -6,6 +6,7 @@ using Microsoft.AspNet.SignalR; using Umbraco.Core; using Umbraco.Core.Components; using Umbraco.Core.Composing; +using Umbraco.Core.Dashboards; using Umbraco.Core.Dictionary; using Umbraco.Core.Events; using Umbraco.Core.Models.PublishedContent; @@ -17,6 +18,7 @@ using Umbraco.Web.Actions; using Umbraco.Web.Cache; using Umbraco.Web.Composing.Composers; using Umbraco.Web.ContentApps; +using Umbraco.Web.Dashboards; using Umbraco.Web.Dictionary; using Umbraco.Web.Editors; using Umbraco.Web.Features; @@ -95,14 +97,13 @@ namespace Umbraco.Web.Runtime composition.RegisterUnique(); composition.RegisterUnique(); + composition.RegisterUnique(); + composition.RegisterUnique(factory => ExamineManager.Instance); // configure the container for web composition.ConfigureForWeb(); - - - composition.RegisterUnique(); - + composition .ComposeUmbracoControllers(GetType().Assembly) .SetDefaultRenderMvcController(); // default controller for template views @@ -202,6 +203,25 @@ namespace Umbraco.Web.Runtime .Append() .Append(); + + // register core CMS dashboards as types - will be ordered by weight attribute & merged with package.manifest dashboards + // TODO WB Maybe use typeloader?! + + composition.WithCollectionBuilder() + .Add(composition.TypeLoader.GetTypes()); + + //.Add() + //.Add() + //.Add() + //.Add() + //.Add() + //.Add() + //.Add() + //.Add() + //.Add() + //.Add(); + + // register back office trees foreach (var treeControllerType in umbracoApiControllerTypes .Where(x => typeof(TreeControllerBase).IsAssignableFrom(x))) diff --git a/src/Umbraco.Web/Editors/DashboardSecurity.cs b/src/Umbraco.Web/Services/DashboardService.cs similarity index 62% rename from src/Umbraco.Web/Editors/DashboardSecurity.cs rename to src/Umbraco.Web/Services/DashboardService.cs index fdbf5af7d9..9f70f876a3 100644 --- a/src/Umbraco.Web/Editors/DashboardSecurity.cs +++ b/src/Umbraco.Web/Services/DashboardService.cs @@ -1,65 +1,63 @@ using System; using System.Collections.Generic; -using System.Globalization; using System.Linq; using Umbraco.Core; -using Umbraco.Core.Configuration.Dashboard; +using Umbraco.Core.Dashboards; using Umbraco.Core.Models.Membership; -using Umbraco.Core.Services; -using Umbraco.Web.Services; +using Umbraco.Web.Dashboards; +using Umbraco.Web.Models.ContentEditing; -namespace Umbraco.Web.Editors +namespace Umbraco.Web.Services { - /// - /// A utility class for determine dashboard security - /// - internal class DashboardSecurity + internal class DashboardService : IDashboardService { - //TODO: Unit test all this!!! :/ + private readonly ISectionService _sectionService; + private readonly DashboardCollection _dashboardCollection; - public static bool AuthorizeAccess(ISection dashboardSection, IUser user, ISectionService sectionService) + public DashboardService(ISectionService sectionService, DashboardCollection dashboardCollection) { - return CheckUserAccessByRules(user, sectionService, dashboardSection.AccessRights.Rules); + _sectionService = sectionService ?? throw new ArgumentNullException(nameof(sectionService)); + _dashboardCollection = dashboardCollection ?? throw new ArgumentNullException(nameof(dashboardCollection)); } - public static bool AuthorizeAccess(IDashboardTab dashboardTab, IUser user, ISectionService sectionService) + + /// + public IEnumerable> GetDashboards(string section, IUser currentUser) { - return CheckUserAccessByRules(user, sectionService, dashboardTab.AccessRights.Rules); - } + var tabs = new List>(); + var tabId = 0; - public static bool AuthorizeAccess(IDashboardControl dashboardControl, IUser user, ISectionService sectionService) - { - return CheckUserAccessByRules(user, sectionService, dashboardControl.AccessRights.Rules); - } - - private static (IAccessRule[], IAccessRule[], IAccessRule[]) GroupRules(IEnumerable rules) - { - IAccessRule[] denyRules = null, grantRules = null, grantBySectionRules = null; - - var groupedRules = rules.GroupBy(x => x.Type); - foreach (var group in groupedRules) + foreach (var dashboard in _dashboardCollection.Where(x => x.Sections.InvariantContains(section))) { - var a = group.ToArray(); - switch (group.Key) + // validate access + if (!CheckUserAccessByRules(currentUser, _sectionService, dashboard.AccessRules)) + continue; + + if (dashboard.View.InvariantEndsWith(".ascx")) + throw new NotSupportedException("Legacy UserControl (.ascx) dashboards are no longer supported."); + + var dashboards = new List(); + dashboards.Add(dashboard); + + tabs.Add(new Tab() { - case AccessRuleType.Deny: - denyRules = a; - break; - case AccessRuleType.Grant: - grantRules = a; - break; - case AccessRuleType.GrantBySection: - grantBySectionRules = a; - break; - default: - throw new Exception("panic"); - } + Id = tabId++, + Label = dashboard.Name, + Alias = dashboard.Alias, + Properties = dashboards + }); } - return (denyRules ?? Array.Empty(), grantRules ?? Array.Empty(), grantBySectionRules ?? Array.Empty()); + return tabs; } - public static bool CheckUserAccessByRules(IUser user, ISectionService sectionService, IEnumerable rules) + /// + public IDictionary>> GetDashboards(IUser currentUser) + { + return _sectionService.GetSections().ToDictionary(x => x.Alias, x => GetDashboards(x.Alias, currentUser)); + } + + private bool CheckUserAccessByRules(IUser user, ISectionService sectionService, IEnumerable rules) { if (user.Id == Constants.Security.SuperUserId) return true; @@ -111,5 +109,32 @@ namespace Umbraco.Web.Editors return hasAccess; } + + private (IAccessRule[], IAccessRule[], IAccessRule[]) GroupRules(IEnumerable rules) + { + IAccessRule[] denyRules = null, grantRules = null, grantBySectionRules = null; + + var groupedRules = rules.GroupBy(x => x.Type); + foreach (var group in groupedRules) + { + var a = group.ToArray(); + switch (group.Key) + { + case AccessRuleType.Deny: + denyRules = a; + break; + case AccessRuleType.Grant: + grantRules = a; + break; + case AccessRuleType.GrantBySection: + grantBySectionRules = a; + break; + default: + throw new Exception("panic"); + } + } + + return (denyRules ?? Array.Empty(), grantRules ?? Array.Empty(), grantBySectionRules ?? Array.Empty()); + } } } diff --git a/src/Umbraco.Web/Services/IDashboardService.cs b/src/Umbraco.Web/Services/IDashboardService.cs new file mode 100644 index 0000000000..a86715c83d --- /dev/null +++ b/src/Umbraco.Web/Services/IDashboardService.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using Umbraco.Core.Dashboards; +using Umbraco.Core.Models.Membership; +using Umbraco.Web.Models.ContentEditing; + +namespace Umbraco.Web.Services +{ + public interface IDashboardService + { + /// + /// Gets dashboard for a specific section/application + /// For a specific backoffice user + /// + /// + /// + /// + IEnumerable> GetDashboards(string section, IUser currentUser); + + /// + /// Gets all dashboards, organized by section, for a user. + /// + /// + /// + IDictionary>> GetDashboards(IUser currentUser); + + } +} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index a6f380b0dd..bd3ff8910b 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -122,6 +122,18 @@ + + + + + + + + + + + + @@ -169,6 +181,8 @@ + + @@ -244,7 +258,6 @@ - @@ -705,7 +718,6 @@ - @@ -826,7 +838,6 @@ - From 5d34ee271cc6ee57568db49fe0d379e95c885e52 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 23 Jan 2019 14:42:49 +0000 Subject: [PATCH 235/437] Forgot to remove my test App_Plugin Dashboard --- src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index c7b6540b3d..0ff158dadb 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -178,7 +178,6 @@ - @@ -206,7 +205,6 @@ - 404handlers.config From f2cc0eebf5a79f0b9283e6e64d512810174788be Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 23 Jan 2019 14:43:05 +0000 Subject: [PATCH 236/437] Remove the dashboard XML config file --- src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 7 -- .../config/Dashboard.Release.config | 107 ----------------- src/Umbraco.Web.UI/config/Dashboard.config | 108 ------------------ 3 files changed, 222 deletions(-) delete mode 100644 src/Umbraco.Web.UI/config/Dashboard.Release.config delete mode 100644 src/Umbraco.Web.UI/config/Dashboard.config diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index 0ff158dadb..65b5691241 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -251,10 +251,6 @@ feedProxy.config - - Dashboard.config - Designer - @@ -361,9 +357,6 @@ Designer - - Designer - Designer diff --git a/src/Umbraco.Web.UI/config/Dashboard.Release.config b/src/Umbraco.Web.UI/config/Dashboard.Release.config deleted file mode 100644 index fec6ab34ae..0000000000 --- a/src/Umbraco.Web.UI/config/Dashboard.Release.config +++ /dev/null @@ -1,107 +0,0 @@ - - - -
- - settings - - - - views/dashboard/settings/settingsdashboardintro.html - - - - - views/dashboard/settings/examinemanagement.html - - - - - views/dashboard/settings/publishedstatus.html - - -
- -
- - forms - - - - views/dashboard/forms/formsdashboardintro.html - - -
- -
- - media - - - - views/dashboard/media/mediafolderbrowser.html - - -
- -
- - translator - - - content - - - - admin - - - - views/dashboard/default/startupdashboardintro.html - - -
- -
- - member - - - - views/dashboard/members/membersdashboardvideos.html - - -
- -
- - settings - - - - /App_Plugins/ModelsBuilder/modelsbuilder.htm - - -
- -
- - settings - - - - views/dashboard/settings/healthcheck.html - - -
-
- - content - - - - views/dashboard/content/redirecturls.html - - -
-
diff --git a/src/Umbraco.Web.UI/config/Dashboard.config b/src/Umbraco.Web.UI/config/Dashboard.config deleted file mode 100644 index 94325913df..0000000000 --- a/src/Umbraco.Web.UI/config/Dashboard.config +++ /dev/null @@ -1,108 +0,0 @@ - - - -
- - settings - - - - views/dashboard/settings/settingsdashboardintro.html - - - - - views/dashboard/settings/examinemanagement.html - - - - - views/dashboard/settings/publishedstatus.html - - -
- -
- - forms - - - - views/dashboard/forms/formsdashboardintro.html - - -
- -
- - media - - - - views/dashboard/media/mediafolderbrowser.html - - -
- -
- - translator - - - content - - - - admin - - - - views/dashboard/default/startupdashboardintro.html - - -
- -
- - member - - - - views/dashboard/members/membersdashboardvideos.html - - -
- -
- - settings - - - - /App_Plugins/ModelsBuilder/modelsbuilder.htm - - -
- -
- - settings - - - - views/dashboard/settings/healthcheck.html - - -
- -
- - content - - - - views/dashboard/content/redirecturls.html - - -
-
From 5e9f8619912d6edffe2d1274836e6e2cc287593d Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 23 Jan 2019 15:09:31 +0000 Subject: [PATCH 237/437] Cleanup of WebRuntimeComposer --- src/Umbraco.Web/Runtime/WebRuntimeComposer.cs | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs b/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs index d165559024..22595d795c 100644 --- a/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs +++ b/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs @@ -204,23 +204,9 @@ namespace Umbraco.Web.Runtime .Append(); - // register core CMS dashboards as types - will be ordered by weight attribute & merged with package.manifest dashboards - // TODO WB Maybe use typeloader?! - + // register core CMS dashboards and 3rd party types - will be ordered by weight attribute & merged with package.manifest dashboards composition.WithCollectionBuilder() - .Add(composition.TypeLoader.GetTypes()); - - //.Add() - //.Add() - //.Add() - //.Add() - //.Add() - //.Add() - //.Add() - //.Add() - //.Add() - //.Add(); - + .Add(composition.TypeLoader.GetTypes()); // register back office trees foreach (var treeControllerType in umbracoApiControllerTypes From 03498b3c616851e53ccbb785b63bba8e47f06186 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 23 Jan 2019 17:56:44 +0000 Subject: [PATCH 238/437] Update comment about this Interface usage - maybe we can remove this later on --- src/Umbraco.Web/UI/IAssignedApp.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/UI/IAssignedApp.cs b/src/Umbraco.Web/UI/IAssignedApp.cs index ef8c0fabcb..b70dafa50e 100644 --- a/src/Umbraco.Web/UI/IAssignedApp.cs +++ b/src/Umbraco.Web/UI/IAssignedApp.cs @@ -5,7 +5,7 @@ ///
/// /// Currently things that need to be assigned to an app in order for user security to work are: - /// dialogs, ITasks, editors + /// LegacyDialogTask /// public interface IAssignedApp { From fcb3f8e791e18c9dfc5fb672ef3c0d9c4fbd67cb Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 23 Jan 2019 17:57:20 +0000 Subject: [PATCH 239/437] Remove Umbraco.Web.UI.Controls folder & classes - Controis reek of WebForms era --- src/Umbraco.Web/UI/Controls/ProgressBar.cs | 17 --- src/Umbraco.Web/UI/Controls/UmbracoControl.cs | 67 ------------ .../UI/Controls/UmbracoUserControl.cs | 103 ------------------ src/Umbraco.Web/Umbraco.Web.csproj | 5 - 4 files changed, 192 deletions(-) delete mode 100644 src/Umbraco.Web/UI/Controls/ProgressBar.cs delete mode 100644 src/Umbraco.Web/UI/Controls/UmbracoControl.cs delete mode 100644 src/Umbraco.Web/UI/Controls/UmbracoUserControl.cs diff --git a/src/Umbraco.Web/UI/Controls/ProgressBar.cs b/src/Umbraco.Web/UI/Controls/ProgressBar.cs deleted file mode 100644 index 3e87da1d6f..0000000000 --- a/src/Umbraco.Web/UI/Controls/ProgressBar.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Umbraco.Core.IO; - -namespace Umbraco.Web.UI.Controls -{ - public class ProgressBar : System.Web.UI.WebControls.Image - { - public string Title { get; set; } - - protected override void Render(System.Web.UI.HtmlTextWriter writer) - { - base.ImageUrl = "/images/progressBar.gif"; - base.AlternateText = Title; - - base.Render(writer); - } - } -} diff --git a/src/Umbraco.Web/UI/Controls/UmbracoControl.cs b/src/Umbraco.Web/UI/Controls/UmbracoControl.cs deleted file mode 100644 index c56e4fe07f..0000000000 --- a/src/Umbraco.Web/UI/Controls/UmbracoControl.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Web.Mvc; -using System.Web.UI; -using Umbraco.Core.Cache; -using Umbraco.Core.Logging; -using Umbraco.Core.Services; -using Umbraco.Web.Composing; - -namespace Umbraco.Web.UI.Controls -{ - /// - /// A control that exposes the helpful Umbraco context objects - /// - public abstract class UmbracoControl : Control - { - private UrlHelper _url; - - protected UmbracoControl(UmbracoContext umbracoContext, ServiceContext services) - { - UmbracoContext = umbracoContext ?? throw new ArgumentNullException(nameof(umbracoContext)); - Umbraco = new UmbracoHelper(umbracoContext, services); - - // todo inject somehow - Logger = Current.Logger; - ProfilingLogger = Current.ProfilingLogger; - Services = Current.Services; - } - - /// - /// Empty constructor, uses Singleton to resolve the UmbracoContext. - /// - protected UmbracoControl() - : this(Current.UmbracoContext, Current.Services) - { } - - /// - /// Returns an UmbracoHelper object - /// - public UmbracoHelper Umbraco { get; } - - /// - /// Gets the logger. - /// - public ILogger Logger { get; } - - /// - /// Gets the profiling logger. - /// - public IProfilingLogger ProfilingLogger { get; } - - /// - /// Gets the Umbraco context. - /// - public UmbracoContext UmbracoContext { get; } - - /// - /// Gets the services context. - /// - protected ServiceContext Services { get; } - - /// - /// Gets a Url helper. - /// - /// This URL helper is created without any route data and an empty request context. - public UrlHelper Url => _url ?? (_url = new UrlHelper(Context.Request.RequestContext)); - } -} diff --git a/src/Umbraco.Web/UI/Controls/UmbracoUserControl.cs b/src/Umbraco.Web/UI/Controls/UmbracoUserControl.cs deleted file mode 100644 index f4cd7f1b50..0000000000 --- a/src/Umbraco.Web/UI/Controls/UmbracoUserControl.cs +++ /dev/null @@ -1,103 +0,0 @@ -using System; -using System.Web.Mvc; -using System.Web.UI; -using Umbraco.Core.Cache; -using Umbraco.Core.Composing; -using Umbraco.Core.Logging; -using Umbraco.Core.Services; -using Umbraco.Web.Security; -using Umbraco.Web.UI.Pages; -using Current = Umbraco.Web.Composing.Current; - -namespace Umbraco.Web.UI.Controls -{ - /// - /// A base class for all Presentation UserControls to inherit from - /// - public abstract class UmbracoUserControl : UserControl - { - private ClientTools _clientTools; - private UrlHelper _url; - - /// - /// Default constructor - /// - /// - /// - protected UmbracoUserControl(UmbracoContext umbracoContext, ServiceContext services) - { - if (umbracoContext == null) throw new ArgumentNullException(nameof(umbracoContext)); - UmbracoContext = umbracoContext; - Umbraco = new UmbracoHelper(umbracoContext, services); - Members = Current.Factory.GetInstance(); - - // todo inject somehow - Logger = Current.Logger; - ProfilingLogger = Current.ProfilingLogger; - Services = Current.Services; - } - - /// - /// Empty constructor, uses Singleton to resolve the UmbracoContext - /// - protected UmbracoUserControl() - : this(Current.UmbracoContext, Current.Services) - { } - - // for debugging purposes - internal Guid InstanceId { get; } = Guid.NewGuid(); - - /// - /// Gets the Umbraco helper. - /// - public UmbracoHelper Umbraco { get; } - - /// - /// Gets the membership helper; - /// - public MembershipHelper Members { get; } - - /// - /// Gets the web security helper. - /// - public WebSecurity Security => UmbracoContext.Security; - - /// - /// Gets the logger. - /// - public ILogger Logger { get; } - - /// - /// Gets the ProfilingLogger. - /// - public IProfilingLogger ProfilingLogger { get; } - - /// - /// Gets the Umbraco context. - /// - public UmbracoContext UmbracoContext { get; } - - /// - /// Gets the services context. - /// - public ServiceContext Services { get; } - - /// - /// Gets an instance of ClientTools for access to the pages client API. - /// - public ClientTools ClientTools - { - get - { - var page = Page as BasePage; - return _clientTools ?? (_clientTools = page != null ? page.ClientTools : new ClientTools(Page)); - } - } - - /// - /// Gets a Url helper. - /// - /// This URL helper is created without any route data and an empty request context. - public UrlHelper Url => _url ?? (_url = new UrlHelper(Context.Request.RequestContext)); - } -} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 64a60d824a..bf91933745 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -1145,11 +1145,6 @@ - - - - ASPXCodeBehind - ASPXCodeBehind From 31509beb1cb500c77e91650f3d6ddb6525f4e0cb Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 23 Jan 2019 18:17:10 +0000 Subject: [PATCH 240/437] =?UTF-8?q?=F0=9F=99=88=20WOW=20this=20was=20super?= =?UTF-8?q?=20old=20Umbraco=20V3=20days=20of=20=20WebForms=20days?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../umbraco/templateControls/ContentType.cs | 31 -- .../DisableEventValidation.cs | 27 -- .../umbraco/templateControls/Item.cs | 314 ------------------ .../umbraco/templateControls/ItemRenderer.cs | 226 ------------- .../umbraco/templateControls/Macro.cs | 223 ------------- 5 files changed, 821 deletions(-) delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/ContentType.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/DisableEventValidation.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/Item.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/ItemRenderer.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/Macro.cs diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/ContentType.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/ContentType.cs deleted file mode 100644 index cfccac7f39..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/ContentType.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Web; -using System.ComponentModel; -using System.Web.UI; -using System.Web.UI.WebControls; - -namespace umbraco.presentation.templateControls -{ - [DefaultProperty("MimeType")] - [ToolboxData("<{0}:ContentType runat=server>")] - public class ContentType : WebControl - { - [Category("Umbraco")] - [DefaultValue("")] - public string MimeType { get; set; } - - protected override void OnPreRender(EventArgs e) - { - if (!String.IsNullOrEmpty(MimeType)) - { - Page.Response.ContentType = MimeType; - } - } - - protected override void Render(HtmlTextWriter writer) - { - - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/DisableEventValidation.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/DisableEventValidation.cs deleted file mode 100644 index 1672053023..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/DisableEventValidation.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.ComponentModel; - -namespace umbraco.presentation.templateControls -{ - /// - /// This control disables request validation (equalevant of setting validateRequest to false in page directive) - /// - [ToolboxData("<{0}:DisableRequestValidation runat=\"server\">")] - [Designer("umbraco.presentation.templateControls.ItemDesigner, Umbraco.Web")] - public class DisableRequestValidation : System.Web.UI.WebControls.WebControl - { - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - ((UmbracoDefault)base.Page).ValidateRequest = false; - } - - protected override void Render(System.Web.UI.HtmlTextWriter writer) - { - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/Item.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/Item.cs deleted file mode 100644 index 8473341ca8..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/Item.cs +++ /dev/null @@ -1,314 +0,0 @@ -using System; -using System.Collections; -using System.ComponentModel; -using System.Globalization; -using System.Web; -using System.Linq; -using System.Web.UI; -using System.Web.UI.WebControls; -using Umbraco.Core; -using Umbraco.Core.Services; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Web; -using Umbraco.Web.Actions; -using Umbraco.Web.Composing; -using Umbraco.Web.Macros; - - -namespace umbraco.presentation.templateControls -{ - /// - /// Control that renders an Umbraco item on a page. - /// - [DefaultProperty("Field")] - [ToolboxData("<{0}:Item runat=\"server\">")] - [Designer("umbraco.presentation.templateControls.ItemDesigner, Umbraco.Web")] - public class Item : CompositeControl - { - - #region Private Fields - - /// The item's unique ID on the page. - private readonly int m_ItemId; - public AttributeCollectionAdapter LegacyAttributes; - #endregion - - /// - /// Used by the UmbracoHelper to assign an IPublishedContent to the Item which allows us to pass this in - /// to the 'item' ctor so that it renders with the new API instead of the old one. - /// - internal IPublishedContent ContentItem { get; private set; } - - #region Public Control Properties - - /// - /// Gets or sets the field name. - /// - /// The field name. - [Bindable(true)] - [Category("Umbraco")] - [DefaultValue("")] - [Localizable(true)] - public string Field - { - get { return (string)ViewState["Field"] ?? String.Empty; } - set { ViewState["Field"] = value; } - } - - /// - /// Gets or sets the node id expression. - /// - /// The node id expression. - [Bindable(true)] - [Category("Umbraco")] - [DefaultValue("")] - [Localizable(true)] - public string NodeId - { - get { return (string)ViewState["NodeId"] ?? String.Empty; } - set { ViewState["NodeId"] = value; } - } - - /// - /// Gets or sets the text to display if the control is empty. - /// - /// The text to display if the control is empty. - [Bindable(true)] - [Category("Umbraco")] - [DefaultValue("")] - [Localizable(true)] - public string TextIfEmpty - { - get { return (string)ViewState["TextIfEmpty"] ?? String.Empty; } - set { ViewState["TextIfEmpty"] = value; } - } - - [Bindable(true)] - [Category("Umbraco")] - [DefaultValue("")] - [Localizable(true)] - public bool DebugMode - { - get { return ((ViewState["DebugMode"] == null) ? false : (bool)ViewState["DebugMode"]); } - set { ViewState["DebugMode"] = value; } - } - - public ItemRenderer Renderer { get; set; } - - #endregion - - #region Public Readonly Properties - - /// - /// Gets the item's unique ID on the page. - /// - /// The item id. - public int ItemId - { - get { return m_ItemId; } - } - - /// - /// Gets the Umbraco page elements. - /// - /// The Umbraco page elements. - public Hashtable PageElements - { - get - { - return Context.Items["pageElements"] as Hashtable; - } - } - - #endregion - - #region Public Constructors - - /// - /// Initializes a new instance of the class. - /// - public Item() - { - Renderer = ItemRenderer.Instance; - } - - /// - /// Internal ctor used to assign an IPublishedContent object. - /// - /// - internal Item(IPublishedContent contentItem) - :this() - { - ContentItem = contentItem; - } - - #endregion - - #region Overriden Control Methods - - /// - /// Raises the event. - /// - /// An object that contains the event data. - protected override void OnInit(EventArgs e) - { - Attributes.Add("field", Field); - LegacyAttributes = new AttributeCollectionAdapter(Attributes); - Renderer.Init(this); - - base.OnInit(e); - } - - /// - /// Raises the event. - /// - /// The object that contains the event data. - protected override void OnLoad(EventArgs e) - { - Renderer.Load(this); - - base.OnLoad(e); - } - - /// - /// Writes the content - /// to the specified object, for display on the client. - /// - /// - /// An that represents - /// the output stream to render HTML content on the client. - /// - protected override void Render(HtmlTextWriter writer) - { - Renderer.Render(this, writer); - } - - #endregion - - #region Helper Functions - - /// - /// Gets the parsed node id. As a nodeid on a item element can be null, an integer or even a squarebracket syntax, this helper method - /// is handy for getting the exact parsed nodeid back. - /// - /// The parsed nodeid, the id of the current page OR null if it's not specified - public int? GetParsedNodeId() - { - if (!String.IsNullOrEmpty(NodeId)) - { - string tempNodeId = MacroRenderer.ParseAttribute(PageElements, NodeId); - int nodeIdInt = 0; - if (int.TryParse(tempNodeId, out nodeIdInt)) - { - return nodeIdInt; - } - } - else if (UmbracoContext.Current.PageId != null) - { - return UmbracoContext.Current.PageId.Value; - } - return null; - } - - - /// - /// Gets a value indicating whether this control is inside the form tag. - /// - /// true if this control is inside the form tag; otherwise, false. - protected virtual bool IsInsideFormTag() - { - // check if this control has an ancestor that is the page form - for (Control parent = this.Parent; parent != null; parent = parent.Parent) - if (parent == Page.Form) - return true; - - return false; - } - - /// - /// Returns a that represents the current . - /// - /// - /// A that represents the current . - /// - public override string ToString() - { - return String.Format("Item {0} (NodeId '{1}' : {2})", ItemId, NodeId, Field); - } - - #endregion - - #region Field Information Functions - - static string FindAttribute(IDictionary attributes, string key) - { - key = key.ToLowerInvariant(); - var attributeValue = attributes.Contains(key) ? attributes[key].ToString() : string.Empty; - return MacroRenderer.ParseAttribute(null, attributeValue); - } - - /// - /// Determines whether the field is a dictionary item. - /// - /// true if the field is a dictionary item; otherwise, false. - protected virtual bool FieldIsDictionaryItem() - { - return FindAttribute(new AttributeCollectionAdapter(Attributes), "field").StartsWith("#"); - } - - /// - /// Determines whether the field is recursive. - /// - /// true if the field is recursive; otherwise, false. - protected virtual bool FieldIsRercursive() - { - return FindAttribute(new AttributeCollectionAdapter(Attributes), "recursive") == "true"; - } - - - /// - /// Gets a value indicating whether the current item is editable by the current user. - /// - /// true if the current item is editable by the current user; otherwise, false. - protected virtual bool FieldEditableWithUserPermissions() - { - var u = UmbracoContext.Current.Security.CurrentUser; - if (u == null) return false; - var permission = Current.Services.UserService.GetPermissions(u, PageElements["path"].ToString()); - - return permission.AssignedPermissions.Contains(ActionUpdate.ActionLetter.ToString(CultureInfo.InvariantCulture), StringComparer.Ordinal); - } - - #endregion - } - - public class ItemDesigner : System.Web.UI.Design.ControlDesigner { - - private Item m_control; - - public override string GetDesignTimeHtml() - { - m_control = this.Component as Item; - return returnMarkup(String.Format("Getting '{0}'", m_control.Field)); - } - - private string returnMarkup(string message) - { - return "" + message + ""; - } - - protected override string GetErrorDesignTimeHtml(Exception e) - { - if (this.Component != null) { - m_control = this.Component as Item; - } - - if (m_control != null && !String.IsNullOrEmpty(m_control.Field)) - { - return returnMarkup(String.Format("Getting '{0}'", m_control.Field)); - } - else { return returnMarkup("Please add a Field property"); } - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/ItemRenderer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/ItemRenderer.cs deleted file mode 100644 index 67e82b3822..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/ItemRenderer.cs +++ /dev/null @@ -1,226 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Web; -using System.Web.UI; -using System.Xml; -using Umbraco.Core.Macros; -using Umbraco.Web.Templates; -using Umbraco.Web.Composing; -using Umbraco.Web.Macros; - -namespace umbraco.presentation.templateControls -{ - public class ItemRenderer - { - public readonly static ItemRenderer Instance = new ItemRenderer(); - /// - /// Initializes a new instance of the class. - /// - protected ItemRenderer() - { } - - /// - /// Renders the specified item. - /// - /// The item. - /// The writer. - public virtual void Render(Item item, HtmlTextWriter writer) - { - if (item.DebugMode) - { - writer.AddAttribute(HtmlTextWriterAttribute.Title, string.Format("Field Tag: '{0}'", item.Field)); - writer.AddAttribute("style", "border: 1px solid #fc6;"); - writer.RenderBeginTag(HtmlTextWriterTag.Div); - } - - try - { - StringWriter renderOutputWriter = new StringWriter(); - HtmlTextWriter htmlWriter = new HtmlTextWriter(renderOutputWriter); - foreach (Control control in item.Controls) - { - try - { - control.RenderControl(htmlWriter); - } - catch (Exception renderException) - { - // TODO: Validate that the current control is within the scope of a form control - // Even controls that are inside this scope, can produce this error in async postback. - HttpContext.Current.Trace.Warn("ItemRenderer", - String.Format("Error rendering control {0} of {1}.", control.ClientID, item), renderException); - } - } - - // parse macros and execute the XSLT transformation on the result if not empty - string renderOutput = renderOutputWriter.ToString(); - renderOutput = renderOutput.Trim().Length == 0 ? string.Empty : renderOutput; - // handle text before/after - renderOutput = AddBeforeAfterText(renderOutput, FindAttribute(item.LegacyAttributes, "insertTextBefore"), FindAttribute(item.LegacyAttributes, "insertTextAfter")); - string finalResult = renderOutput.Trim().Length > 0 ? renderOutput : GetEmptyText(item); - - //Don't parse urls if a content item is assigned since that is taken care - // of with the value converters - if (item.ContentItem == null) - { - writer.Write(TemplateUtilities.ResolveUrlsFromTextString(finalResult)); - } - else - { - writer.Write(finalResult); - } - - } - catch (Exception renderException) - { - HttpContext.Current.Trace.Warn("ItemRenderer", String.Format("Error rendering {0}.", item), renderException); - } - finally - { - if (item.DebugMode) - { - writer.RenderEndTag(); - } - } - } - - static string FindAttribute(IDictionary attributes, string key) - { - key = key.ToLowerInvariant(); - var attributeValue = attributes.Contains(key) ? attributes[key].ToString() : string.Empty; - return MacroRenderer.ParseAttribute(null, attributeValue); - } - - /// - /// Renders the field contents. - /// Checks via the NodeId attribute whether to fetch data from another page than the current one. - /// - /// A string of field contents (macros not parsed) - protected virtual string GetFieldContents(Item item) - { - var tempElementContent = string.Empty; - - // if a nodeId is specified we should get the data from another page than the current one - if (string.IsNullOrEmpty(item.NodeId) == false) - { - var tempNodeId = item.GetParsedNodeId(); - if (tempNodeId != null && tempNodeId.Value != 0) - { - //moved the following from the catch block up as this will allow fallback options alt text etc to work - // stop using GetXml - //var cache = Umbraco.Web.UmbracoContext.Current.ContentCache.InnerCache as PublishedContentCache; - //if (cache == null) throw new InvalidOperationException("Unsupported IPublishedContentCache, only the Xml one is supported."); - //var xml = cache.GetXml(Umbraco.Web.UmbracoContext.Current, Umbraco.Web.UmbracoContext.Current.InPreviewMode); - //var itemPage = new page(xml.GetElementById(tempNodeId.ToString())); - var c = Umbraco.Web.UmbracoContext.Current.ContentCache.GetById(tempNodeId.Value); - var itemPage = new page(c); - - tempElementContent = - new item(item.ContentItem, itemPage.Elements, item.LegacyAttributes).FieldContent; - } - } - else - { - // gets the field content from the current page (via the PageElements collection) - tempElementContent = - new item(item.ContentItem, item.PageElements, item.LegacyAttributes).FieldContent; - } - - return tempElementContent; - } - - /// - /// Inits the specified item. To be called from the OnInit method of Item. - /// - /// The item. - public virtual void Init(Item item) - { } - - /// - /// Loads the specified item. To be called from the OnLoad method of Item. - /// - /// The item. - public virtual void Load(Item item) - { - using (Current.ProfilingLogger.DebugDuration(string.Format("Item: {0}", item.Field))) - { - ParseMacros(item); - } - } - - /// - /// Parses the macros inside the text, by creating child elements for each item. - /// - /// The item. - protected virtual void ParseMacros(Item item) - { - // do nothing if the macros have already been rendered - if (item.Controls.Count > 0) - return; - - var elementText = GetFieldContents(item); - - //Don't parse macros if there's a content item assigned since the content value - // converters take care of that, just add the already parsed text - if (item.ContentItem != null) - { - item.Controls.Add(new LiteralControl(elementText)); - } - else - { - using (Current.ProfilingLogger.DebugDuration("Parsing Macros")) - { - - MacroTagParser.ParseMacros( - elementText, - - //callback for when a text block is parsed - textBlock => item.Controls.Add(new LiteralControl(textBlock)), - - //callback for when a macro is parsed: - (macroAlias, attributes) => - { - var macroControl = new Macro - { - Alias = macroAlias - }; - foreach (var i in attributes.Where(i => macroControl.Attributes[i.Key] == null)) - { - macroControl.Attributes.Add(i.Key, i.Value); - } - item.Controls.Add(macroControl); - }); - } - } - - } - - protected string AddBeforeAfterText(string text, string before, string after) - { - if (!String.IsNullOrEmpty(text)) - { - if (!String.IsNullOrEmpty(before)) - text = String.Format("{0}{1}", HttpContext.Current.Server.HtmlDecode(before), text); - if (!String.IsNullOrEmpty(after)) - text = String.Format("{0}{1}", text, HttpContext.Current.Server.HtmlDecode(after)); - } - - return text; - } - - /// - /// Gets the text to display if the field contents are empty. - /// - /// The item. - /// The text to display. - protected virtual string GetEmptyText(Item item) - { - return item.TextIfEmpty; - } - - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/Macro.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/Macro.cs deleted file mode 100644 index 0d54ce2a02..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/Macro.cs +++ /dev/null @@ -1,223 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Collections; -using System.Web; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Core.Models; -using Umbraco.Web; -using Umbraco.Web.Composing; -using Umbraco.Web.Macros; - -namespace umbraco.presentation.templateControls -{ - - [DefaultProperty("Alias")] - [ToolboxData("<{0}:Macro runat=server>")] - [PersistChildren(false)] - [ParseChildren(true, "Text")] - public class Macro : WebControl, ITextControl - { - public Hashtable MacroAttributes { get; set; } = new Hashtable(); - - [Bindable(true)] - [Category("Umbraco")] - [DefaultValue("")] - [Localizable(true)] - public string Alias - { - get - { - var s = (string)ViewState["Alias"]; - return s ?? string.Empty; - } - - set - { - ViewState["Alias"] = value; - } - } - - [Bindable(true)] - [Category("Umbraco")] - [DefaultValue("")] - [Localizable(true)] - public string Language { - get { - var s = (string)ViewState["Language"]; - return s ?? string.Empty; - } - set { - ViewState["Language"] = value.ToLower(); - } - } - - [Bindable(true)] - [Category("Umbraco")] - [DefaultValue("")] - [Localizable(true)] - public string FileLocation { - get { - var s = (string)ViewState["FileLocation"]; - return s ?? string.Empty; - } - set { - ViewState["FileLocation"] = value.ToLower(); - } - } - [Bindable(true)] - [Category("Umbraco")] - [DefaultValue(RenderEvents.Init)] - [Localizable(true)] - public RenderEvents RenderEvent - { - get - { - var renderEvent = RenderEvents.Init; - if (ViewState["RenderEvent"] != null) - renderEvent = (RenderEvents)ViewState["RenderEvent"]; - return renderEvent; - } - set - { - ViewState["RenderEvent"] = value; - } - } - - // Indicates where to run EnsureChildControls and effectively render the macro - public enum RenderEvents - { - Init, - PreRender, - Render - } - - public IList Exceptions = new List(); - - /// - /// Raises the event. - /// - /// An object that contains the event data. - protected override void OnInit(EventArgs e) { - base.OnInit(e); - - // Create child controls when told to - this is the default - if (RenderEvent == RenderEvents.Init) - EnsureChildControls(); - } - - // Create child controls when told to - new option to render at PreRender - protected override void OnPreRender(EventArgs e) - { - base.OnPreRender(e); - - if (RenderEvent == RenderEvents.PreRender) - EnsureChildControls(); - } - - /// - /// Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering. - /// - protected override void CreateChildControls() { - // collect all attributes set on the control - var keys = Attributes.Keys; - foreach (string key in keys) - MacroAttributes.Add(key.ToLower(), HttpUtility.HtmlDecode(Attributes[key])); - - if (MacroAttributes.ContainsKey("macroalias") == false && MacroAttributes.ContainsKey("macroAlias") == false) - MacroAttributes.Add("macroalias", Alias); - - // set pageId to int.MinValue if no pageID was found, - // e.g. if the macro was rendered on a custom (non-Umbraco) page - var pageId = UmbracoContext.Current.PageId == null ? int.MinValue : UmbracoContext.Current.PageId.Value; - - if ((string.IsNullOrEmpty(Language) == false && Text != "") || string.IsNullOrEmpty(FileLocation) == false) { - var tempMacro = new MacroModel(); - MacroRenderer.GenerateMacroModelPropertiesFromAttributes(tempMacro, MacroAttributes); - - // executing an inline macro? - // ie the code of the macro is in the control's text body - // ok, this is not supported in v8 anymore - if (string.IsNullOrEmpty(FileLocation)) - throw new NotSupportedException("Inline macros are not supported anymore."); - - // executing an on-disk macro - // it has to be a partial (cshtml or vbhtml) macro in v8 - var extension = System.IO.Path.GetExtension(FileLocation); - if (extension.InvariantEndsWith(".cshtml") == false && extension.InvariantEndsWith(".vbhtml") == false) - throw new NotSupportedException(""); - - tempMacro.MacroSource = FileLocation; - tempMacro.MacroType = MacroTypes.PartialView; - - if (string.IsNullOrEmpty(Attributes["Cache"]) == false) - { - int cacheDuration; - if (int.TryParse(Attributes["Cache"], out cacheDuration)) - tempMacro.CacheDuration = cacheDuration; - else - Context.Trace.Warn("Template", "Cache attribute is in incorect format (should be an integer)."); - } - - var renderer = new MacroRenderer(Current.ProfilingLogger); - var c = renderer.Render(tempMacro, (Hashtable) Context.Items["pageElements"], pageId).GetAsControl(); - if (c != null) - { - Exceptions = renderer.Exceptions; - Controls.Add(c); - } - else - { - Context.Trace.Warn("Template", "Result of inline macro scripting is null"); - } - } - else - { - var m = Current.Services.MacroService.GetByAlias(Alias); - if (m == null) return; - - var tempMacro = new MacroModel(m); - try - { - var renderer = new MacroRenderer(Current.ProfilingLogger); - var c = renderer.Render(tempMacro, (Hashtable)Context.Items["pageElements"], pageId, MacroAttributes).GetAsControl(); - if (c != null) - Controls.Add(c); - else - Context.Trace.Warn("Template", "Result of macro " + tempMacro.Name + " is null"); - } - catch (Exception ee) - { - Context.Trace.Warn("Template", "Error adding macro " + tempMacro.Name, ee); - throw; - } - } - } - - /// - /// Renders the control to the specified HTML writer. - /// - /// The object that receives the control content. - protected override void Render(HtmlTextWriter writer) - { - // Create child controls when told to - do it here anyway as it has to be done - EnsureChildControls(); - - var isDebug = GlobalSettings.DebugMode && (Context.Request.GetItemAsString("umbdebugshowtrace") != "" || Context.Request.GetItemAsString("umbdebug") != ""); - if (isDebug) - { - writer.Write("
", Alias); - } - RenderChildren(writer); - if (isDebug) - { - writer.Write("
"); - } - } - - public string Text { get; set; } = string.Empty; - } -} From 0480242532498af5f7f79d0e028ff5f1ff4f91b7 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 23 Jan 2019 18:56:33 +0000 Subject: [PATCH 241/437] =?UTF-8?q?Some=20sneaky=20MasterPages=20kill=20th?= =?UTF-8?q?e=20last=20of=20them=20off=20with=20fire=20=F0=9F=94=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Umbraco/masterpages/Default.Master.cs | 11 - .../masterpages/Default.Master.designer.cs | 15 -- .../masterpages/UmbracoDialog.master.cs | 11 - .../UmbracoDialog.master.designer.cs | 24 -- .../Umbraco/masterpages/UmbracoPage.master.cs | 11 - .../UmbracoPage.master.designer.cs | 24 -- .../Umbraco/masterpages/umbracoDialog.Master | 35 --- .../Umbraco/masterpages/umbracoPage.Master | 40 --- .../umbraco/masterpages/default.Master.cs | 35 --- .../masterpages/umbracoDialog.Master.cs | 161 ------------ .../umbraco/masterpages/umbracoPage.Master.cs | 239 ------------------ 11 files changed, 606 deletions(-) delete mode 100644 src/Umbraco.Web.UI/Umbraco/masterpages/Default.Master.cs delete mode 100644 src/Umbraco.Web.UI/Umbraco/masterpages/Default.Master.designer.cs delete mode 100644 src/Umbraco.Web.UI/Umbraco/masterpages/UmbracoDialog.master.cs delete mode 100644 src/Umbraco.Web.UI/Umbraco/masterpages/UmbracoDialog.master.designer.cs delete mode 100644 src/Umbraco.Web.UI/Umbraco/masterpages/UmbracoPage.master.cs delete mode 100644 src/Umbraco.Web.UI/Umbraco/masterpages/UmbracoPage.master.designer.cs delete mode 100644 src/Umbraco.Web.UI/Umbraco/masterpages/umbracoDialog.Master delete mode 100644 src/Umbraco.Web.UI/Umbraco/masterpages/umbracoPage.Master delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/masterpages/default.Master.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/masterpages/umbracoDialog.Master.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/masterpages/umbracoPage.Master.cs diff --git a/src/Umbraco.Web.UI/Umbraco/masterpages/Default.Master.cs b/src/Umbraco.Web.UI/Umbraco/masterpages/Default.Master.cs deleted file mode 100644 index 33daac7b32..0000000000 --- a/src/Umbraco.Web.UI/Umbraco/masterpages/Default.Master.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; - -namespace Umbraco.Web.UI.Umbraco.Masterpages -{ - public partial class Default : global::umbraco.presentation.masterpages._default - { - } -} diff --git a/src/Umbraco.Web.UI/Umbraco/masterpages/Default.Master.designer.cs b/src/Umbraco.Web.UI/Umbraco/masterpages/Default.Master.designer.cs deleted file mode 100644 index 68f54a4fab..0000000000 --- a/src/Umbraco.Web.UI/Umbraco/masterpages/Default.Master.designer.cs +++ /dev/null @@ -1,15 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Umbraco.Web.UI.Umbraco.Masterpages { - - - public partial class Default { - } -} diff --git a/src/Umbraco.Web.UI/Umbraco/masterpages/UmbracoDialog.master.cs b/src/Umbraco.Web.UI/Umbraco/masterpages/UmbracoDialog.master.cs deleted file mode 100644 index 33d1c9f79b..0000000000 --- a/src/Umbraco.Web.UI/Umbraco/masterpages/UmbracoDialog.master.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; - -namespace Umbraco.Web.UI.Umbraco.Masterpages -{ - public partial class UmbracoDialog : global::umbraco.presentation.masterpages.umbracoDialog - { - } -} diff --git a/src/Umbraco.Web.UI/Umbraco/masterpages/UmbracoDialog.master.designer.cs b/src/Umbraco.Web.UI/Umbraco/masterpages/UmbracoDialog.master.designer.cs deleted file mode 100644 index 38f9e1f6bc..0000000000 --- a/src/Umbraco.Web.UI/Umbraco/masterpages/UmbracoDialog.master.designer.cs +++ /dev/null @@ -1,24 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Umbraco.Web.UI.Umbraco.Masterpages { - - - public partial class UmbracoDialog { - - /// - /// DocType control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.ContentPlaceHolder DocType; - } -} diff --git a/src/Umbraco.Web.UI/Umbraco/masterpages/UmbracoPage.master.cs b/src/Umbraco.Web.UI/Umbraco/masterpages/UmbracoPage.master.cs deleted file mode 100644 index e45cf3e68b..0000000000 --- a/src/Umbraco.Web.UI/Umbraco/masterpages/UmbracoPage.master.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; - -namespace Umbraco.Web.UI.Umbraco.Masterpages -{ - public partial class UmbracoPage : global::umbraco.presentation.masterpages.umbracoPage - { - } -} diff --git a/src/Umbraco.Web.UI/Umbraco/masterpages/UmbracoPage.master.designer.cs b/src/Umbraco.Web.UI/Umbraco/masterpages/UmbracoPage.master.designer.cs deleted file mode 100644 index 7a24953c3f..0000000000 --- a/src/Umbraco.Web.UI/Umbraco/masterpages/UmbracoPage.master.designer.cs +++ /dev/null @@ -1,24 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Umbraco.Web.UI.Umbraco.Masterpages { - - - public partial class UmbracoPage { - - /// - /// DocType control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.ContentPlaceHolder DocType; - } -} diff --git a/src/Umbraco.Web.UI/Umbraco/masterpages/umbracoDialog.Master b/src/Umbraco.Web.UI/Umbraco/masterpages/umbracoDialog.Master deleted file mode 100644 index d74a41d637..0000000000 --- a/src/Umbraco.Web.UI/Umbraco/masterpages/umbracoDialog.Master +++ /dev/null @@ -1,35 +0,0 @@ -<%@ Master Language="C#" AutoEventWireup="True" CodeBehind="UmbracoDialog.master.cs" Inherits="Umbraco.Web.UI.Umbraco.Masterpages.UmbracoDialog" %> - - - - - -<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> -<%@ Register TagPrefix="umbClient" Namespace="Umbraco.Web.UI.Bundles" Assembly="Umbraco.Web" %> -<%@ Register TagPrefix="cc1" Namespace="Umbraco.Web.UI.JavaScript" Assembly="Umbraco.Web" %> - - - - - - - - - - - - - - - - - - -
- - - - - - - diff --git a/src/Umbraco.Web.UI/Umbraco/masterpages/umbracoPage.Master b/src/Umbraco.Web.UI/Umbraco/masterpages/umbracoPage.Master deleted file mode 100644 index 380ed3d898..0000000000 --- a/src/Umbraco.Web.UI/Umbraco/masterpages/umbracoPage.Master +++ /dev/null @@ -1,40 +0,0 @@ -<%@ Master Language="C#" AutoEventWireup="True" CodeBehind="UmbracoPage.master.cs" Inherits="Umbraco.Web.UI.Umbraco.Masterpages.UmbracoPage" %> - - - - - -<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> -<%@ Register TagPrefix="umbClient" Namespace="Umbraco.Web.UI.Bundles" Assembly="Umbraco.Web" %> -<%@ Register TagPrefix="cc1" Namespace="Umbraco.Web.UI.JavaScript" Assembly="Umbraco.Web" %> - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/masterpages/default.Master.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/masterpages/default.Master.cs deleted file mode 100644 index c28a218246..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/masterpages/default.Master.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Web.Mvc; -using System.Web.UI; -using Umbraco.Web; -using System.IO; - -namespace umbraco.presentation.masterpages -{ - public partial class _default : MasterPage - { - - protected override void Render(HtmlTextWriter writer) - { - // get base output - StringWriter baseWriter = new StringWriter(); - base.Render(new HtmlTextWriter(baseWriter)); - string baseOutput = baseWriter.ToString(); - - // add custom umbraco namespace (required for events on custom tags in IE) - baseOutput = baseOutput.Replace(" - /// ContentPlaceHolderDefault control. - ///
- /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.ContentPlaceHolder ContentPlaceHolderDefault; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/masterpages/umbracoDialog.Master.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/masterpages/umbracoDialog.Master.cs deleted file mode 100644 index b7ec63576b..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/masterpages/umbracoDialog.Master.cs +++ /dev/null @@ -1,161 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using Umbraco.Core.IO; -using Umbraco.Web.UI.JavaScript; - -namespace umbraco.presentation.masterpages -{ - public partial class umbracoDialog : System.Web.UI.MasterPage - { - - public bool reportModalSize { get; set; } - public static new event MasterPageLoadHandler Load; - public new static event MasterPageLoadHandler Init; - - protected void Page_Load(object sender, EventArgs e) - { - ClientLoader.DataBind(); - ScriptManager.RegisterStartupScript(Page, Page.GetType(), "setRoot", "UmbClientMgr.setUmbracoPath(\"" + IOHelper.ResolveUrl(SystemDirectories.Umbraco) + "\");", true); - FireOnLoad(e); - } - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - - if (Init != null) - { - Init(this, e); - } - } - - - protected virtual void FireOnLoad(EventArgs e) - { - if (Load != null) - { - Load(this, e); - } - } - - /// - /// Head1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlHead Head1; - - /// - /// ClientLoader control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected UmbracoClientDependencyLoader ClientLoader; - - /// - /// CssInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.CssInclude CssInclude1; - - /// - /// JsInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude1; - - /// - /// JsInclude3 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude3; - - /// - /// JsInclude6 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude6; - - /// - /// JsInclude4 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude4; - - /// - /// JsInclude2 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude2; - - /// - /// head control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.ContentPlaceHolder head; - - /// - /// form1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlForm form1; - - /// - /// ScriptManager1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.ScriptManager ScriptManager1; - - /// - /// body control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.ContentPlaceHolder body; - - /// - /// footer control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.ContentPlaceHolder footer; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/masterpages/umbracoPage.Master.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/masterpages/umbracoPage.Master.cs deleted file mode 100644 index 584ad4ca7f..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/masterpages/umbracoPage.Master.cs +++ /dev/null @@ -1,239 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Web; -using System.Web.Mvc; -using System.Web.UI; -using System.Web.UI.WebControls; - -//This is only in case an upgrade goes wrong and the the /masterpages/ files are not copied over -//which would result in an error. so we have kept the old namespaces intact with references to new ones -using StackExchange.Profiling; -using Umbraco.Core.Configuration; -using Umbraco.Core.Profiling; -using Umbraco.Web; -using Umbraco.Web.UI.JavaScript; -using mp = umbraco.presentation.masterpages; -namespace umbraco.presentation.umbraco.masterpages -{ - public class umbracoPage : mp.umbracoPage { } - public class umbracoDialog : mp.umbracoDialog { } -} - -namespace umbraco.presentation.masterpages -{ - public delegate void MasterPageLoadHandler(object sender, System.EventArgs e); - - public partial class umbracoPage : System.Web.UI.MasterPage - { - - public new static event MasterPageLoadHandler Load; - public new static event MasterPageLoadHandler Init; - - protected void Page_Load(object sender, EventArgs e) - { - ClientLoader.DataBind(); - FireOnLoad(e); - } - - - protected override void Render(HtmlTextWriter writer) - { - // get base output - var baseWriter = new StringWriter(); - base.Render(new HtmlTextWriter(baseWriter)); - var baseOutput = baseWriter.ToString(); - - // profiling - if (string.IsNullOrEmpty(Request.QueryString["umbDebug"]) == false && GlobalSettings.DebugMode) - { - var htmlHelper = new HtmlHelper(new ViewContext(), new ViewPage()); - baseOutput = baseOutput.Replace("", htmlHelper.RenderProfiler() + ""); - } - - // write modified output - writer.Write(baseOutput); - } - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - - if (Init != null) - { - Init(this, e); - } - } - - - protected virtual void FireOnLoad(EventArgs e) - { - if (Load != null) - { - Load(this, e); - } - } - - /// - /// ClientLoader control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected UmbracoClientDependencyLoader ClientLoader; - - /// - /// CssInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.CssInclude CssInclude1; - - /// - /// CssInclude2 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.CssInclude CssInclude2; - - /// - /// JsInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude1; - - /// - /// JsInclude2 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude2; - - /// - /// JsInclude8 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude8; - - /// - /// JsInclude9 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude9; - - /// - /// JsInclude4 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude4; - - /// - /// JsInclude5 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude5; - - /// - /// JsInclude6 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude6; - - /// - /// JsInclude7 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude7; - - /// - /// JsInclude3 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude3; - - /// - /// JsIncludeHotkeys control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsIncludeHotkeys; - - /// - /// head control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.ContentPlaceHolder head; - - /// - /// form1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlForm form1; - - /// - /// ScriptManager1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.ScriptManager ScriptManager1; - - /// - /// body control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.ContentPlaceHolder body; - - /// - /// footer control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.ContentPlaceHolder footer; - } -} From b389e6c07feb13de540762e87265fa5808056400 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Thu, 24 Jan 2019 08:16:55 +0100 Subject: [PATCH 242/437] 3396 - don't let user determine whether to publish mandatory languages on first publish. All mandatory languages with data is saved. If a mandatory language does not have data we cannot publish anything. --- .../src/views/content/overlays/publish.controller.js | 3 ++- .../src/views/content/overlays/publish.html | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.controller.js index 9074834ee6..74d80b6ab9 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.controller.js @@ -109,8 +109,9 @@ if (!vm.hasPristineVariants) { vm.hasPristineVariants = pristineVariantFilter(variant); } - + if(vm.isNew && hasAnyData(variant)){ + variant.publish = true; variant.save = true; } }); diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.html b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.html index b33b7ccbfc..3fd3015de2 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.html @@ -18,6 +18,7 @@ type="checkbox" ng-model="variant.publish" ng-change="vm.changeSelection(variant)" + ng-disabled="vm.isNew && variant.language.isMandatory" style="margin-right: 8px;" val-server-field="{{variant.htmlId}}" />
From cc897285c9a9a4786108930b6df8ea378c8357f6 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Thu, 24 Jan 2019 08:31:42 +0100 Subject: [PATCH 243/437] 3396 - Force publish for all mandatory langauges that has not yet beed published --- .../src/views/content/overlays/publish.controller.js | 12 +++++++++--- .../src/views/content/overlays/publish.html | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.controller.js index 74d80b6ab9..a86a636e9e 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.controller.js @@ -110,9 +110,15 @@ vm.hasPristineVariants = pristineVariantFilter(variant); } - if(vm.isNew && hasAnyData(variant)){ - variant.publish = true; - variant.save = true; + if(hasAnyData(variant)){ + if(vm.isNew || variant.publishDate == null){ + variant.publish = true; + variant.save = true; + } + }else{ + variant.publish = false; + variant.save = false; + variant.canSave = false; } }); diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.html b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.html index 3fd3015de2..364ed47361 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.html @@ -18,7 +18,7 @@ type="checkbox" ng-model="variant.publish" ng-change="vm.changeSelection(variant)" - ng-disabled="vm.isNew && variant.language.isMandatory" + ng-disabled="(vm.isNew && variant.language.isMandatory) || !variant.canSave" style="margin-right: 8px;" val-server-field="{{variant.htmlId}}" />
From 5842337d02385ce07c958f827f93c538a587e420 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Thu, 24 Jan 2019 09:42:49 +0100 Subject: [PATCH 244/437] 3396 - Fix for when clearing the name again --- .../src/views/content/overlays/publish.controller.js | 8 ++++++-- .../src/views/content/overlays/save.controller.js | 5 ++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.controller.js index a86a636e9e..1c8b302e52 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.controller.js @@ -55,7 +55,11 @@ } function hasAnyData(variant) { - var result = variant.isDirty != null || (variant.name != null && variant.name.length > 0); + + if(variant.name == null || variant.name.length === 0) { + return false; + } + var result = variant.isDirty != null; if(result) return true; @@ -109,7 +113,7 @@ if (!vm.hasPristineVariants) { vm.hasPristineVariants = pristineVariantFilter(variant); } - + if(hasAnyData(variant)){ if(vm.isNew || variant.publishDate == null){ variant.publish = true; diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/save.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/overlays/save.controller.js index 8d21234aee..9d3a8a87e5 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/save.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/save.controller.js @@ -32,7 +32,10 @@ } function hasAnyData(variant) { - var result = variant.isDirty != null || (variant.name != null && variant.name.length > 0); + if(variant.name == null || variant.name.length === 0) { + return false; + } + var result = variant.isDirty != null; if(result) return true; From ec8c455635e410203f7149bfe56f6df8467bbcf8 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Thu, 24 Jan 2019 11:28:27 +0100 Subject: [PATCH 245/437] Fixes for search of members + Removed fixme in member that apparently are not necessary after tags refactoring --- .../MemberValueSetValidator.cs | 4 ++-- src/Umbraco.Web/Editors/EntityController.cs | 21 +++++++------------ src/Umbraco.Web/Editors/MemberController.cs | 5 ----- 3 files changed, 10 insertions(+), 20 deletions(-) diff --git a/src/Umbraco.Examine/MemberValueSetValidator.cs b/src/Umbraco.Examine/MemberValueSetValidator.cs index 71de6001ce..0c585854e9 100644 --- a/src/Umbraco.Examine/MemberValueSetValidator.cs +++ b/src/Umbraco.Examine/MemberValueSetValidator.cs @@ -23,10 +23,10 @@ namespace Umbraco.Examine /// /// By default these are the member fields we index /// - public static readonly string[] DefaultMemberIndexFields = { "id", "nodeName", "updateDate", "loginName", "email" }; + public static readonly string[] DefaultMemberIndexFields = { "id", "nodeName", "updateDate", "loginName", "email", UmbracoExamineIndex.NodeKeyFieldName }; private static readonly IEnumerable ValidCategories = new[] { IndexTypes.Member }; protected override IEnumerable ValidIndexCategories => ValidCategories; - + } } diff --git a/src/Umbraco.Web/Editors/EntityController.cs b/src/Umbraco.Web/Editors/EntityController.cs index b25f3f5af1..392ad7a8df 100644 --- a/src/Umbraco.Web/Editors/EntityController.cs +++ b/src/Umbraco.Web/Editors/EntityController.cs @@ -43,12 +43,16 @@ namespace Umbraco.Web.Editors public class EntityController : UmbracoAuthorizedJsonController { private readonly ITreeService _treeService; + private readonly UmbracoTreeSearcher _treeSearcher; + private readonly SearchableTreeCollection _searchableTreeCollection; public EntityController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, - ITreeService treeService) + ITreeService treeService, SearchableTreeCollection searchableTreeCollection, UmbracoTreeSearcher treeSearcher) : base(globalSettings, umbracoContext, sqlContext, services, appCaches, logger, runtimeState) { _treeService = treeService; + _searchableTreeCollection = searchableTreeCollection; + _treeSearcher = treeSearcher; } /// @@ -69,15 +73,6 @@ namespace Umbraco.Web.Editors } } - private readonly UmbracoTreeSearcher _treeSearcher; - private readonly SearchableTreeCollection _searchableTreeCollection; - - public EntityController(SearchableTreeCollection searchableTreeCollection, UmbracoTreeSearcher treeSearcher) - { - _searchableTreeCollection = searchableTreeCollection; - _treeSearcher = treeSearcher; - } - /// /// Returns an Umbraco alias given a string /// @@ -242,7 +237,7 @@ namespace Umbraco.Web.Editors }; } - + /// /// Gets an entity by a xpath query /// @@ -932,7 +927,7 @@ namespace Umbraco.Web.Editors throw new NotSupportedException("Filtering on stylesheets is not currently supported"); return Services.FileService.GetStylesheets().Select(Mapper.Map); - + case UmbracoEntityTypes.Language: if (!postFilter.IsNullOrWhiteSpace() || (postFilterParams != null && postFilterParams.Count > 0)) @@ -993,7 +988,7 @@ namespace Umbraco.Web.Editors GetChildItemsForList(childItem, list); } - } + } #endregion } diff --git a/src/Umbraco.Web/Editors/MemberController.cs b/src/Umbraco.Web/Editors/MemberController.cs index 92ca648c3f..399cb13360 100644 --- a/src/Umbraco.Web/Editors/MemberController.cs +++ b/src/Umbraco.Web/Editors/MemberController.cs @@ -592,11 +592,6 @@ namespace Umbraco.Web.Editors if (builtInAliases.Contains(p.Alias) == false && valueMapped != null) { p.SetValue(valueMapped.GetValue()); - - // fixme/task - ok, I give up, at that point tags are dead here, until we figure it out - //p.TagChanges.Behavior = valueMapped.TagChanges.Behavior; - //p.TagChanges.Enable = valueMapped.TagChanges.Enable; - //p.TagChanges.Tags = valueMapped.TagChanges.Tags; } } } From 9e0d2e58732c4ac00baa369451da5e855c39cc08 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Thu, 24 Jan 2019 11:37:28 +0100 Subject: [PATCH 246/437] Revert "Remove obsoleted RelatedLinks picker (replaced by Multi URL Picker)" This reverts commit fedf0c78de6d2ad365db1c112c22af13abd7b9fb. --- src/Umbraco.Core/Constants-PropertyEditors.cs | 7 +- .../Migrations/Install/DatabaseDataCreator.cs | 4 +- .../V_8_0_0/PropertyEditorsMigration.cs | 1 + .../Composing/TypeLoaderTests.cs | 2 +- .../Services/ContentServiceTests.cs | 2 +- .../TestHelpers/Entities/MockedContent.cs | 2 +- .../Entities/MockedContentTypes.cs | 2 +- .../Mvc/HtmlHelperExtensionMethodsTests.cs | 25 +++ src/Umbraco.Web/HtmlHelperRenderExtensions.cs | 34 ++++ src/Umbraco.Web/Models/RelatedLink.cs | 11 ++ src/Umbraco.Web/Models/RelatedLinkBase.cs | 18 ++ src/Umbraco.Web/Models/RelatedLinkType.cs | 27 +++ src/Umbraco.Web/Models/RelatedLinks.cs | 42 +++++ .../RelatedLinksConfiguration.cs | 13 ++ .../RelatedLinksConfigurationEditor.cs | 18 ++ .../RelatedLinksPropertyEditor.cs | 16 ++ .../RelatedLinksLegacyValueConverter.cs | 132 ++++++++++++++ .../RelatedLinksValueConverter.cs | 169 ++++++++++++++++++ src/Umbraco.Web/RelatedLinksTypeConverter.cs | 98 ++++++++++ src/Umbraco.Web/Umbraco.Web.csproj | 10 ++ 20 files changed, 626 insertions(+), 7 deletions(-) create mode 100644 src/Umbraco.Web/Models/RelatedLink.cs create mode 100644 src/Umbraco.Web/Models/RelatedLinkBase.cs create mode 100644 src/Umbraco.Web/Models/RelatedLinkType.cs create mode 100644 src/Umbraco.Web/Models/RelatedLinks.cs create mode 100644 src/Umbraco.Web/PropertyEditors/RelatedLinksConfiguration.cs create mode 100644 src/Umbraco.Web/PropertyEditors/RelatedLinksConfigurationEditor.cs create mode 100644 src/Umbraco.Web/PropertyEditors/RelatedLinksPropertyEditor.cs create mode 100644 src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksLegacyValueConverter.cs create mode 100644 src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksValueConverter.cs create mode 100644 src/Umbraco.Web/RelatedLinksTypeConverter.cs diff --git a/src/Umbraco.Core/Constants-PropertyEditors.cs b/src/Umbraco.Core/Constants-PropertyEditors.cs index 8b637fe90e..b9f20fb449 100644 --- a/src/Umbraco.Core/Constants-PropertyEditors.cs +++ b/src/Umbraco.Core/Constants-PropertyEditors.cs @@ -118,7 +118,12 @@ namespace Umbraco.Core /// RadioButton list. /// public const string RadioButtonList = "Umbraco.RadioButtonList"; - + + /// + /// Related Links. + /// + public const string RelatedLinks = "Umbraco.RelatedLinks"; + /// /// Slider. /// diff --git a/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs b/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs index 4e0b5dfa0f..f32ea1cb6f 100644 --- a/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs +++ b/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs @@ -135,7 +135,7 @@ namespace Umbraco.Core.Migrations.Install _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1047, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1047", SortOrder = 2, UniqueId = new Guid("1EA2E01F-EBD8-4CE1-8D71-6B1149E63548"), Text = "Member Picker", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1048, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1048", SortOrder = 2, UniqueId = new Guid("135D60E0-64D9-49ED-AB08-893C9BA44AE5"), Text = "Media Picker", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1049, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1049", SortOrder = 2, UniqueId = new Guid("9DBBCBBB-2327-434A-B355-AF1B84E5010A"), Text = "Multiple Media Picker", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1050, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1050", SortOrder = 2, UniqueId = new Guid("B4E3535A-1753-47E2-8568-602CF8CFEE6F"), Text = "Multi URL Picker", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); + _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1050, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1050", SortOrder = 2, UniqueId = new Guid("B4E3535A-1753-47E2-8568-602CF8CFEE6F"), Text = "Related Links", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); } private void CreateLockData() @@ -301,7 +301,7 @@ namespace Umbraco.Core.Migrations.Install _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = 1048, EditorAlias = Constants.PropertyEditors.Aliases.MediaPicker, DbType = "Ntext" }); _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = 1049, EditorAlias = Constants.PropertyEditors.Aliases.MediaPicker, DbType = "Ntext", Configuration = "{\"multiPicker\":1}" }); - _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = 1050, EditorAlias = Constants.PropertyEditors.Aliases.MultiUrlPicker, DbType = "Ntext" }); + _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = 1050, EditorAlias = Constants.PropertyEditors.Aliases.RelatedLinks, DbType = "Ntext" }); } private void CreateRelationTypeData() diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigration.cs b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigration.cs index 064ffc7228..ee439088be 100644 --- a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigration.cs +++ b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigration.cs @@ -16,6 +16,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 RenameDataType(Constants.PropertyEditors.Aliases.MediaPicker + "2", Constants.PropertyEditors.Aliases.MediaPicker); RenameDataType(Constants.PropertyEditors.Aliases.MemberPicker + "2", Constants.PropertyEditors.Aliases.MemberPicker); RenameDataType(Constants.PropertyEditors.Aliases.MultiNodeTreePicker + "2", Constants.PropertyEditors.Aliases.MultiNodeTreePicker); + RenameDataType(Constants.PropertyEditors.Aliases.RelatedLinks + "2", Constants.PropertyEditors.Aliases.RelatedLinks); RenameDataType("Umbraco.TextboxMultiple", Constants.PropertyEditors.Aliases.TextArea, false); RenameDataType("Umbraco.Textbox", Constants.PropertyEditors.Aliases.TextBox, false); } diff --git a/src/Umbraco.Tests/Composing/TypeLoaderTests.cs b/src/Umbraco.Tests/Composing/TypeLoaderTests.cs index add3424599..6b3ce3eb4e 100644 --- a/src/Umbraco.Tests/Composing/TypeLoaderTests.cs +++ b/src/Umbraco.Tests/Composing/TypeLoaderTests.cs @@ -279,7 +279,7 @@ AnotherContentFinder public void GetDataEditors() { var types = _typeLoader.GetDataEditors(); - Assert.AreEqual(39, types.Count()); + Assert.AreEqual(40, types.Count()); } /// diff --git a/src/Umbraco.Tests/Services/ContentServiceTests.cs b/src/Umbraco.Tests/Services/ContentServiceTests.cs index 9490213d62..039bcaed24 100644 --- a/src/Umbraco.Tests/Services/ContentServiceTests.cs +++ b/src/Umbraco.Tests/Services/ContentServiceTests.cs @@ -2215,7 +2215,7 @@ namespace Umbraco.Tests.Services Assert.That(sut.GetValue("contentPicker"), Is.EqualTo(Udi.Create(Constants.UdiEntityType.Document, new Guid("74ECA1D4-934E-436A-A7C7-36CC16D4095C")))); Assert.That(sut.GetValue("mediaPicker"), Is.EqualTo(Udi.Create(Constants.UdiEntityType.Media, new Guid("44CB39C8-01E5-45EB-9CF8-E70AAF2D1691")))); Assert.That(sut.GetValue("memberPicker"), Is.EqualTo(Udi.Create(Constants.UdiEntityType.Member, new Guid("9A50A448-59C0-4D42-8F93-4F1D55B0F47D")))); - Assert.That(sut.GetValue("multiUrlPicker"), Is.EqualTo("[{\"name\":\"https://test.com\",\"url\":\"https://test.com\"}]")); + Assert.That(sut.GetValue("relatedLinks"), Is.EqualTo("")); Assert.That(sut.GetValue("tags"), Is.EqualTo("this,is,tags")); } diff --git a/src/Umbraco.Tests/TestHelpers/Entities/MockedContent.cs b/src/Umbraco.Tests/TestHelpers/Entities/MockedContent.cs index 19a57d7775..faf4acf8a4 100644 --- a/src/Umbraco.Tests/TestHelpers/Entities/MockedContent.cs +++ b/src/Umbraco.Tests/TestHelpers/Entities/MockedContent.cs @@ -132,7 +132,7 @@ namespace Umbraco.Tests.TestHelpers.Entities content.SetValue("contentPicker", Udi.Create(Constants.UdiEntityType.Document, new Guid("74ECA1D4-934E-436A-A7C7-36CC16D4095C")).ToString()); content.SetValue("mediaPicker", Udi.Create(Constants.UdiEntityType.Media, new Guid("44CB39C8-01E5-45EB-9CF8-E70AAF2D1691")).ToString()); content.SetValue("memberPicker", Udi.Create(Constants.UdiEntityType.Member, new Guid("9A50A448-59C0-4D42-8F93-4F1D55B0F47D")).ToString()); - content.SetValue("multiUrlPicker", "[{\"name\":\"https://test.com\",\"url\":\"https://test.com\"}]"); + content.SetValue("relatedLinks", ""); content.SetValue("tags", "this,is,tags"); return content; diff --git a/src/Umbraco.Tests/TestHelpers/Entities/MockedContentTypes.cs b/src/Umbraco.Tests/TestHelpers/Entities/MockedContentTypes.cs index d7dcf8e79a..14b967b1c9 100644 --- a/src/Umbraco.Tests/TestHelpers/Entities/MockedContentTypes.cs +++ b/src/Umbraco.Tests/TestHelpers/Entities/MockedContentTypes.cs @@ -370,7 +370,7 @@ namespace Umbraco.Tests.TestHelpers.Entities contentCollection.Add(new PropertyType(Constants.PropertyEditors.Aliases.ContentPicker, ValueStorageType.Integer) { Alias = "contentPicker", Name = "Content Picker", Mandatory = false, SortOrder = 16, DataTypeId = 1046 }); contentCollection.Add(new PropertyType(Constants.PropertyEditors.Aliases.MediaPicker, ValueStorageType.Integer) { Alias = "mediaPicker", Name = "Media Picker", Mandatory = false, SortOrder = 17, DataTypeId = 1048 }); contentCollection.Add(new PropertyType(Constants.PropertyEditors.Aliases.MemberPicker, ValueStorageType.Integer) { Alias = "memberPicker", Name = "Member Picker", Mandatory = false, SortOrder = 18, DataTypeId = 1047 }); - contentCollection.Add(new PropertyType(Constants.PropertyEditors.Aliases.MultiUrlPicker, ValueStorageType.Nvarchar) { Alias = "multiUrlPicker", Name = "Multi URL Picker", Mandatory = false, SortOrder = 21, DataTypeId = 1050 }); + contentCollection.Add(new PropertyType(Constants.PropertyEditors.Aliases.RelatedLinks, ValueStorageType.Ntext) { Alias = "relatedLinks", Name = "Related Links", Mandatory = false, SortOrder = 21, DataTypeId = 1050 }); contentCollection.Add(new PropertyType(Constants.PropertyEditors.Aliases.Tags, ValueStorageType.Ntext) { Alias = "tags", Name = "Tags", Mandatory = false, SortOrder = 22, DataTypeId = 1041 }); contentType.PropertyGroups.Add(new PropertyGroup(contentCollection) { Name = "Content", SortOrder = 1 }); diff --git a/src/Umbraco.Tests/Web/Mvc/HtmlHelperExtensionMethodsTests.cs b/src/Umbraco.Tests/Web/Mvc/HtmlHelperExtensionMethodsTests.cs index ba19f41e74..cc83dcb1c9 100644 --- a/src/Umbraco.Tests/Web/Mvc/HtmlHelperExtensionMethodsTests.cs +++ b/src/Umbraco.Tests/Web/Mvc/HtmlHelperExtensionMethodsTests.cs @@ -29,5 +29,30 @@ namespace Umbraco.Tests.Web.Mvc var output = _htmlHelper.Wrap("div", "hello world", new {style = "color:red;", onclick = "void();"}); Assert.AreEqual("
hello world
", output.ToHtmlString()); } + + [Test] + public void GetRelatedLinkHtml_Simple() + { + var relatedLink = new Umbraco.Web.Models.RelatedLink { + Caption = "Link Caption", + NewWindow = true, + Link = "https://www.google.com/" + }; + var output = _htmlHelper.GetRelatedLinkHtml(relatedLink); + Assert.AreEqual("Link Caption", output.ToHtmlString()); + } + + [Test] + public void GetRelatedLinkHtml_HtmlAttributes() + { + var relatedLink = new Umbraco.Web.Models.RelatedLink + { + Caption = "Link Caption", + NewWindow = true, + Link = "https://www.google.com/" + }; + var output = _htmlHelper.GetRelatedLinkHtml(relatedLink, new { @class = "test-class"}); + Assert.AreEqual("Link Caption", output.ToHtmlString()); + } } } diff --git a/src/Umbraco.Web/HtmlHelperRenderExtensions.cs b/src/Umbraco.Web/HtmlHelperRenderExtensions.cs index 1186102bc8..626a19a369 100644 --- a/src/Umbraco.Web/HtmlHelperRenderExtensions.cs +++ b/src/Umbraco.Web/HtmlHelperRenderExtensions.cs @@ -830,5 +830,39 @@ namespace Umbraco.Web } #endregion + + + #region RelatedLink + + /// + /// Renders an anchor element for a RelatedLink instance. + /// Format: <a href="relatedLink.Link" target="_blank/_self">relatedLink.Caption</a> + /// + /// The HTML helper instance that this method extends. + /// The RelatedLink instance + /// An anchor element + public static MvcHtmlString GetRelatedLinkHtml(this HtmlHelper htmlHelper, RelatedLink relatedLink) + { + return htmlHelper.GetRelatedLinkHtml(relatedLink, null); + } + + /// + /// Renders an anchor element for a RelatedLink instance, accepting htmlAttributes. + /// Format: <a href="relatedLink.Link" target="_blank/_self" htmlAttributes>relatedLink.Caption</a> + /// + /// The HTML helper instance that this method extends. + /// The RelatedLink instance + /// An object that contains the HTML attributes to set for the element. + /// + public static MvcHtmlString GetRelatedLinkHtml(this HtmlHelper htmlHelper, RelatedLink relatedLink, object htmlAttributes) + { + var tagBuilder = new TagBuilder("a"); + tagBuilder.MergeAttributes(HtmlHelper.AnonymousObjectToHtmlAttributes(htmlAttributes)); + tagBuilder.MergeAttribute("href", relatedLink.Link); + tagBuilder.MergeAttribute("target", relatedLink.NewWindow ? "_blank" : "_self"); + tagBuilder.InnerHtml = HttpUtility.HtmlEncode(relatedLink.Caption); + return MvcHtmlString.Create(tagBuilder.ToString(TagRenderMode.Normal)); + } + #endregion } } diff --git a/src/Umbraco.Web/Models/RelatedLink.cs b/src/Umbraco.Web/Models/RelatedLink.cs new file mode 100644 index 0000000000..1e1d7636ad --- /dev/null +++ b/src/Umbraco.Web/Models/RelatedLink.cs @@ -0,0 +1,11 @@ +using Umbraco.Core.Models.PublishedContent; + +namespace Umbraco.Web.Models +{ + public class RelatedLink : RelatedLinkBase + { + public int? Id { get; internal set; } + internal bool IsDeleted { get; set; } + public IPublishedContent Content { get; set; } + } +} diff --git a/src/Umbraco.Web/Models/RelatedLinkBase.cs b/src/Umbraco.Web/Models/RelatedLinkBase.cs new file mode 100644 index 0000000000..c2077ce4a9 --- /dev/null +++ b/src/Umbraco.Web/Models/RelatedLinkBase.cs @@ -0,0 +1,18 @@ +using Newtonsoft.Json; + +namespace Umbraco.Web.Models +{ + public abstract class RelatedLinkBase + { + [JsonProperty("caption")] + public string Caption { get; set; } + [JsonProperty("link")] + public string Link { get; set; } + [JsonProperty("newWindow")] + public bool NewWindow { get; set; } + [JsonProperty("isInternal")] + public bool IsInternal { get; set; } + [JsonProperty("type")] + public RelatedLinkType Type { get; set; } + } +} diff --git a/src/Umbraco.Web/Models/RelatedLinkType.cs b/src/Umbraco.Web/Models/RelatedLinkType.cs new file mode 100644 index 0000000000..eec7817ab6 --- /dev/null +++ b/src/Umbraco.Web/Models/RelatedLinkType.cs @@ -0,0 +1,27 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Umbraco +// +// +// Defines the RelatedLinkType type. +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace Umbraco.Web.Models +{ + /// + /// The related link type. + /// + public enum RelatedLinkType + { + /// + /// Internal link type + /// + Internal, + + /// + /// External link type + /// + External + } +} diff --git a/src/Umbraco.Web/Models/RelatedLinks.cs b/src/Umbraco.Web/Models/RelatedLinks.cs new file mode 100644 index 0000000000..22cdcd11b6 --- /dev/null +++ b/src/Umbraco.Web/Models/RelatedLinks.cs @@ -0,0 +1,42 @@ +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; + +namespace Umbraco.Web.Models +{ + [TypeConverter(typeof(RelatedLinksTypeConverter))] + public class RelatedLinks : IEnumerable + { + private readonly string _propertyData; + + private readonly IEnumerable _relatedLinks; + + public RelatedLinks(IEnumerable relatedLinks, string propertyData) + { + _relatedLinks = relatedLinks; + _propertyData = propertyData; + } + + /// + /// Gets the property data. + /// + internal string PropertyData + { + get + { + return this._propertyData; + } + } + + public IEnumerator GetEnumerator() + { + return _relatedLinks.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return this.GetEnumerator(); + } + } +} diff --git a/src/Umbraco.Web/PropertyEditors/RelatedLinksConfiguration.cs b/src/Umbraco.Web/PropertyEditors/RelatedLinksConfiguration.cs new file mode 100644 index 0000000000..5db14c6842 --- /dev/null +++ b/src/Umbraco.Web/PropertyEditors/RelatedLinksConfiguration.cs @@ -0,0 +1,13 @@ +using Umbraco.Core.PropertyEditors; + +namespace Umbraco.Web.PropertyEditors +{ + /// + /// Represents the configuration for the related links value editor. + /// + public class RelatedLinksConfiguration + { + [ConfigurationField("max", "Maximum number of links", "number", Description = "Enter the maximum amount of links to be added, enter 0 for unlimited")] + public int Maximum { get; set; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/PropertyEditors/RelatedLinksConfigurationEditor.cs b/src/Umbraco.Web/PropertyEditors/RelatedLinksConfigurationEditor.cs new file mode 100644 index 0000000000..07ff359a82 --- /dev/null +++ b/src/Umbraco.Web/PropertyEditors/RelatedLinksConfigurationEditor.cs @@ -0,0 +1,18 @@ +using System.Collections.Generic; +using Umbraco.Core.PropertyEditors; + +namespace Umbraco.Web.PropertyEditors +{ + /// + /// Represents the configuration editor for the related links value editor. + /// + public class RelatedLinksConfigurationEditor : ConfigurationEditor + { + public override IDictionary ToValueEditor(object configuration) + { + var d = base.ToValueEditor(configuration); + d["idType"] = "udi"; + return d; + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/PropertyEditors/RelatedLinksPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/RelatedLinksPropertyEditor.cs new file mode 100644 index 0000000000..b450fcc67f --- /dev/null +++ b/src/Umbraco.Web/PropertyEditors/RelatedLinksPropertyEditor.cs @@ -0,0 +1,16 @@ +using Umbraco.Core; +using Umbraco.Core.Logging; +using Umbraco.Core.PropertyEditors; + +namespace Umbraco.Web.PropertyEditors +{ + [DataEditor(Constants.PropertyEditors.Aliases.RelatedLinks, "Related links", "relatedlinks", ValueType = ValueTypes.Json, Icon = "icon-thumbnail-list", Group = "pickers")] + public class RelatedLinksPropertyEditor : DataEditor + { + public RelatedLinksPropertyEditor(ILogger logger) + : base(logger) + { } + + protected override IConfigurationEditor CreateConfigurationEditor() => new RelatedLinksConfigurationEditor(); + } +} diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksLegacyValueConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksLegacyValueConverter.cs new file mode 100644 index 0000000000..6c2a4331d0 --- /dev/null +++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksLegacyValueConverter.cs @@ -0,0 +1,132 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Xml; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Umbraco.Core; +using Umbraco.Core.Cache; +using Umbraco.Core.Logging; +using Umbraco.Core.Models.PublishedContent; +using Umbraco.Core.PropertyEditors; +using Umbraco.Core.PropertyEditors.ValueConverters; +using Umbraco.Core.Services; + +namespace Umbraco.Web.PropertyEditors.ValueConverters +{ + [DefaultPropertyValueConverter(typeof(JsonValueConverter))] //this shadows the JsonValueConverter + public class RelatedLinksLegacyValueConverter : PropertyValueConverterBase + { + private static readonly string[] MatchingEditors = { + Constants.PropertyEditors.Aliases.RelatedLinks + }; + + private readonly IUmbracoContextAccessor _umbracoContextAccessor; + private readonly ILogger _logger; + private readonly ServiceContext _services; + + public RelatedLinksLegacyValueConverter(IUmbracoContextAccessor umbracoContextAccessor, ServiceContext services, ILogger logger) + { + _umbracoContextAccessor = umbracoContextAccessor; + _services = services; + _logger = logger; + } + + public override bool IsConverter(PublishedPropertyType propertyType) + => MatchingEditors.Contains(propertyType.EditorAlias); + + public override Type GetPropertyValueType(PublishedPropertyType propertyType) + => typeof (JArray); + + public override PropertyCacheLevel GetPropertyCacheLevel(PublishedPropertyType propertyType) + => PropertyCacheLevel.Element; + + public override object ConvertSourceToIntermediate(IPublishedElement owner, PublishedPropertyType propertyType, object source, bool preview) + { + if (source == null) return null; + var sourceString = source.ToString(); + + if (sourceString.DetectIsJson()) + { + try + { + var obj = JsonConvert.DeserializeObject(sourceString); + //update the internal links if we have a context + if (UmbracoContext.Current != null) + { + var helper = new UmbracoHelper(_umbracoContextAccessor.UmbracoContext, _services); + foreach (var a in obj) + { + var type = a.Value("type"); + if (type.IsNullOrWhiteSpace() == false) + { + if (type == "internal") + { + switch (propertyType.EditorAlias) + { + case Constants.PropertyEditors.Aliases.RelatedLinks: + var strLinkId = a.Value("link"); + var udiAttempt = strLinkId.TryConvertTo(); + if (udiAttempt) + { + var content = helper.PublishedContent(udiAttempt.Result); + if (content == null) break; + a["link"] = helper.Url(content.Id); + } + break; + } + } + } + } + } + return obj; + } + catch (Exception ex) + { + _logger.Error(ex, "Could not parse the string '{Json}' to a json object", sourceString); + } + } + + //it's not json, just return the string + return sourceString; + } + + public override object ConvertIntermediateToXPath(IPublishedElement owner, PublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object source, bool preview) + { + if (source == null) return null; + var sourceString = source.ToString(); + + if (sourceString.DetectIsJson()) + { + try + { + var obj = JsonConvert.DeserializeObject(sourceString); + + var d = new XmlDocument(); + var e = d.CreateElement("links"); + d.AppendChild(e); + + foreach (dynamic link in obj) + { + var ee = d.CreateElement("link"); + ee.SetAttribute("title", link.title); + ee.SetAttribute("link", link.link); + ee.SetAttribute("type", link.type); + ee.SetAttribute("newwindow", link.newWindow); + + e.AppendChild(ee); + } + + return d.CreateNavigator(); + } + catch (Exception ex) + { + _logger.Error(ex, "Could not parse the string '{Json}' to a json object", sourceString); + } + } + + //it's not json, just return the string + return sourceString; + } + } +} diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksValueConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksValueConverter.cs new file mode 100644 index 0000000000..983d122a83 --- /dev/null +++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksValueConverter.cs @@ -0,0 +1,169 @@ +using System; +using System.Collections.Generic; +using System.Xml; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Umbraco.Core; +using Umbraco.Core.Logging; +using Umbraco.Core.Models.PublishedContent; +using Umbraco.Core.PropertyEditors; +using Umbraco.Core.PropertyEditors.ValueConverters; +using Umbraco.Web.Models; +using Umbraco.Web.PublishedCache; + +namespace Umbraco.Web.PropertyEditors.ValueConverters +{ + /// + /// The related links property value converter. + /// + [DefaultPropertyValueConverter(typeof(RelatedLinksLegacyValueConverter), typeof(JsonValueConverter))] + public class RelatedLinksValueConverter : PropertyValueConverterBase + { + private readonly IPublishedSnapshotAccessor _publishedSnapshotAccessor; + private readonly IUmbracoContextAccessor _umbracoContextAccessor; + private readonly ILogger _logger; + + public RelatedLinksValueConverter(IPublishedSnapshotAccessor publishedSnapshotAccessor, IUmbracoContextAccessor umbracoContextAccessor, ILogger logger) + { + _publishedSnapshotAccessor = publishedSnapshotAccessor; + _umbracoContextAccessor = umbracoContextAccessor; + _logger = logger; + } + + /// + /// Checks if this converter can convert the property editor and registers if it can. + /// + /// + /// The property type. + /// + /// + /// The . + /// + public override bool IsConverter(PublishedPropertyType propertyType) + => propertyType.EditorAlias.Equals(Constants.PropertyEditors.Aliases.RelatedLinks); + + public override Type GetPropertyValueType(PublishedPropertyType propertyType) + => typeof (JArray); + + public override PropertyCacheLevel GetPropertyCacheLevel(PublishedPropertyType propertyType) + => PropertyCacheLevel.Element; + + public override object ConvertSourceToIntermediate(IPublishedElement owner, PublishedPropertyType propertyType, object source, bool preview) + { + if (source == null) return null; + var sourceString = source.ToString(); + + var relatedLinksData = JsonConvert.DeserializeObject>(sourceString); + var relatedLinks = new List(); + + foreach (var linkData in relatedLinksData) + { + var relatedLink = new RelatedLink + { + Caption = linkData.Caption, + NewWindow = linkData.NewWindow, + IsInternal = linkData.IsInternal, + Type = linkData.Type, + Link = linkData.Link + }; + + int contentId; + if (int.TryParse(relatedLink.Link, out contentId)) + { + relatedLink.Id = contentId; + relatedLink = CreateLink(relatedLink); + } + else + { + var strLinkId = linkData.Link; + var udiAttempt = strLinkId.TryConvertTo(); + if (udiAttempt.Success && udiAttempt.Result != null) + { + var content = _publishedSnapshotAccessor.PublishedSnapshot.Content.GetById(udiAttempt.Result.Guid); + if (content != null) + { + relatedLink.Id = content.Id; + relatedLink = CreateLink(relatedLink); + relatedLink.Content = content; + } + } + } + + if (relatedLink.IsDeleted == false) + { + relatedLinks.Add(relatedLink); + } + else + { + _logger.Warn("Related Links value converter skipped a link as the node has been unpublished/deleted (Internal Link NodeId: {RelatedLinkNodeId}, Link Caption: '{RelatedLinkCaption}')", relatedLink.Link, relatedLink.Caption); + } + } + + return new RelatedLinks(relatedLinks, sourceString); + } + + private RelatedLink CreateLink(RelatedLink link) + { + var umbracoContext = _umbracoContextAccessor.UmbracoContext; + + if (link.IsInternal && link.Id != null) + { + if (umbracoContext == null) + return null; + + var urlProvider = umbracoContext.UrlProvider; + + link.Link = urlProvider.GetUrl((int)link.Id); + if (link.Link.Equals("#")) + { + link.IsDeleted = true; + link.Link = link.Id.ToString(); + } + else + { + link.IsDeleted = false; + } + } + + return link; + } + + public override object ConvertIntermediateToXPath(IPublishedElement owner, PublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object inter, bool preview) + { + if (inter == null) return null; + var sourceString = inter.ToString(); + + if (sourceString.DetectIsJson()) + { + try + { + var obj = JsonConvert.DeserializeObject(sourceString); + + var d = new XmlDocument(); + var e = d.CreateElement("links"); + d.AppendChild(e); + + foreach (dynamic link in obj) + { + var ee = d.CreateElement("link"); + ee.SetAttribute("title", link.title); + ee.SetAttribute("link", link.link); + ee.SetAttribute("type", link.type); + ee.SetAttribute("newwindow", link.newWindow); + + e.AppendChild(ee); + } + + return d.CreateNavigator(); + } + catch (Exception ex) + { + _logger.Error(ex, "Could not parse the string {Json} to a json object", sourceString); + } + } + + //it's not json, just return the string + return sourceString; + } + } +} diff --git a/src/Umbraco.Web/RelatedLinksTypeConverter.cs b/src/Umbraco.Web/RelatedLinksTypeConverter.cs new file mode 100644 index 0000000000..647959b920 --- /dev/null +++ b/src/Umbraco.Web/RelatedLinksTypeConverter.cs @@ -0,0 +1,98 @@ +using System; +using System.ComponentModel; +using System.Globalization; +using System.Linq; + +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; + +using Umbraco.Core; +using Umbraco.Core.Logging; +using Umbraco.Core.Composing; +using Umbraco.Web.Models; + +namespace Umbraco.Web +{ + public class RelatedLinksTypeConverter : TypeConverter + { + private readonly UmbracoHelper _umbracoHelper; + + public RelatedLinksTypeConverter(UmbracoHelper umbracoHelper) + { + _umbracoHelper = umbracoHelper; + } + + public RelatedLinksTypeConverter() + { + + } + + private static readonly Type[] ConvertableTypes = new[] + { + typeof(JArray) + }; + + public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) + { + return ConvertableTypes.Any(x => TypeHelper.IsTypeAssignableFrom(x, destinationType)) + || base.CanConvertFrom(context, destinationType); + } + + public override object ConvertTo( + ITypeDescriptorContext context, + CultureInfo culture, + object value, + Type destinationType) + { + var relatedLinks = value as RelatedLinks; + if (relatedLinks == null) + return null; + + if (TypeHelper.IsTypeAssignableFrom(destinationType)) + { + // Conversion to JArray taken from old value converter + + var obj = JsonConvert.DeserializeObject(relatedLinks.PropertyData); + + var umbracoHelper = GetUmbracoHelper(); + + //update the internal links if we have a context + if (umbracoHelper != null) + { + foreach (var a in obj) + { + var type = a.Value("type"); + if (type.IsNullOrWhiteSpace() == false) + { + if (type == "internal") + { + var linkId = a.Value("link"); + var link = umbracoHelper.Url(linkId); + a["link"] = link; + } + } + } + } + return obj; + + } + + return base.ConvertTo(context, culture, value, destinationType); + } + + private UmbracoHelper GetUmbracoHelper() + { + if (_umbracoHelper != null) + return _umbracoHelper; + + if (UmbracoContext.Current == null) + { + Current.Logger.Warn("Cannot create an UmbracoHelper the UmbracoContext is null"); + return null; + } + + //DO NOT assign to _umbracoHelper variable, this is a singleton class and we cannot assign this based on an UmbracoHelper which is request based + return new UmbracoHelper(UmbracoContext.Current, Current.Services); + } + } +} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 64a60d824a..6736f7512b 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -404,6 +404,10 @@ + + + + @@ -449,6 +453,9 @@ + + + @@ -464,6 +471,7 @@ + @@ -527,6 +535,7 @@ + @@ -851,6 +860,7 @@ + From eef6c783eafb358a5d29eae59021efe6b284190b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Thu, 24 Jan 2019 11:59:33 +0100 Subject: [PATCH 247/437] updated package-lock.json --- src/Umbraco.Web.UI.Client/package-lock.json | 96 ++++++++++----------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/package-lock.json b/src/Umbraco.Web.UI.Client/package-lock.json index ed28a93caf..fe657ae470 100644 --- a/src/Umbraco.Web.UI.Client/package-lock.json +++ b/src/Umbraco.Web.UI.Client/package-lock.json @@ -937,7 +937,7 @@ }, "ansi-colors": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", "dev": true, "requires": { @@ -955,7 +955,7 @@ }, "ansi-escapes": { "version": "3.1.0", - "resolved": "http://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", "dev": true }, @@ -1170,7 +1170,7 @@ "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": { @@ -1216,7 +1216,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": { @@ -1269,7 +1269,7 @@ "async-limiter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", - "integrity": "sha1-ePrtjD0HSrgfIrTphdeehzj3IPg=", + "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==", "dev": true }, "asynckit": { @@ -2379,7 +2379,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { @@ -2459,7 +2459,7 @@ "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 }, "continuable-cache": { @@ -2502,7 +2502,7 @@ "core-js": { "version": "2.5.7", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", - "integrity": "sha1-+XJgj/DOrWi4QaFqky0LGDeRgU4=", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true }, "core-util-is": { @@ -3425,7 +3425,7 @@ "doctrine": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha1-XNAfwQFiG0LEzX9dGmYkNxbT850=", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "requires": { "esutils": "^2.0.2" @@ -3953,7 +3953,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" @@ -3989,7 +3989,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" @@ -4153,7 +4153,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 } @@ -4248,7 +4248,7 @@ "eslint-scope": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", - "integrity": "sha1-UL8wcekzi83EMzF5Sgy1M/ATYXI=", + "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", "dev": true, "requires": { "esrecurse": "^4.1.0", @@ -4258,13 +4258,13 @@ "eslint-utils": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", - "integrity": "sha1-moUbqJ7nxGA0b5fPiTnHKYgn5RI=", + "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", "dev": true }, "eslint-visitor-keys": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha1-PzGA+y4pEBdxastMnW1bXDSmqB0=", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", "dev": true }, "espree": { @@ -4287,7 +4287,7 @@ "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" @@ -4296,7 +4296,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" @@ -4356,7 +4356,7 @@ "eventemitter3": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz", - "integrity": "sha1-CQtNbNvWRe0Qv3UNS1QHlC17oWM=", + "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==", "dev": true }, "exec-buffer": { @@ -4571,7 +4571,7 @@ "fill-range": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", - "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", + "integrity": "sha1-6x53OrsFbc2N8r/favWbizqTZWU=", "dev": true, "requires": { "is-number": "^2.1.0", @@ -5891,7 +5891,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", @@ -6461,7 +6461,7 @@ "gulp-eslint": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/gulp-eslint/-/gulp-eslint-5.0.0.tgz", - "integrity": "sha1-KiaECV93Syz3kxAmIHjFbMehK1I=", + "integrity": "sha512-9GUqCqh85C7rP9120cpxXuZz2ayq3BZc85pCTuPJS03VQYxne0aWPIXWx6LSvsGPa3uRqtSO537vaugOh+5cXg==", "dev": true, "requires": { "eslint": "^5.0.1", @@ -7415,7 +7415,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" @@ -7566,7 +7566,7 @@ "http-proxy": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz", - "integrity": "sha1-etOElGWPhGBeL220Q230EPTlvpo=", + "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==", "dev": true, "requires": { "eventemitter3": "^3.0.0", @@ -7860,7 +7860,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", @@ -8155,7 +8155,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" @@ -8164,7 +8164,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": { @@ -8212,7 +8212,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" @@ -8369,7 +8369,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": { @@ -8496,7 +8496,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 } } @@ -9146,7 +9146,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" @@ -9327,7 +9327,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 }, "minimatch": { @@ -12855,7 +12855,7 @@ "pluralize": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", - "integrity": "sha1-KYuJ34uTsCIdv0Ia0rGx6iP8Z3c=", + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", "dev": true }, "posix-character-classes": { @@ -13345,7 +13345,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": { @@ -13541,7 +13541,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { @@ -14039,7 +14039,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": { @@ -14226,7 +14226,7 @@ "setprototypeof": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha1-0L2FU2iHtv58DYGMuWLZ2RxU5lY=", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", "dev": true }, "shebang-command": { @@ -14516,7 +14516,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" @@ -14796,7 +14796,7 @@ "stream-consume": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.1.tgz", - "integrity": "sha1-0721mMK9CugrjKx6xQsRB6eZbEg=", + "integrity": "sha512-tNa3hzgkjEP7XbCkbRXe1jpg+ievoa0O4SCFlMOYEscGSS4JJsckGL8swUyAa/ApGU3Ae4t6Honor4HhL+tRyg==", "dev": true }, "stream-shift": { @@ -14808,7 +14808,7 @@ "streamroller": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-0.7.0.tgz", - "integrity": "sha1-odG3z4PTmvsNYwSaWsv5NJO99ks=", + "integrity": "sha512-WREzfy0r0zUqp3lGO096wRuUp7ho1X6uo/7DJfTlEi0Iv/4gT7YHqXDjKC2ioVGBZtE8QzsQD9nx1nIuoZ57jQ==", "dev": true, "requires": { "date-format": "^1.2.0", @@ -14835,7 +14835,7 @@ "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { "core-util-is": "~1.0.0", @@ -14850,7 +14850,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" @@ -14867,7 +14867,7 @@ "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { "is-fullwidth-code-point": "^2.0.0", @@ -15409,7 +15409,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" @@ -15573,7 +15573,7 @@ "type-is": { "version": "1.6.16", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", - "integrity": "sha1-+JzjQVQcZysl7nrjxz3uOyvlAZQ=", + "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", "dev": true, "requires": { "media-typer": "0.3.0", @@ -15615,7 +15615,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 }, "unc-path-regex": { @@ -15777,13 +15777,13 @@ "upath": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", - "integrity": "sha1-NSVll+RqWB20eT0M5H+prr/J+r0=", + "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", "dev": true }, "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" @@ -16218,7 +16218,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", From 49b2a9a080a390bf07a4c69e51b7cafffac2b176 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Thu, 24 Jan 2019 12:17:30 +0100 Subject: [PATCH 248/437] Fixes for search of members + Removed fixme in member that apparently are not necessary after tags refactoring --- src/Umbraco.Core/Cache/HttpRequestAppCache.cs | 2 +- src/Umbraco.Core/Configuration/UmbracoVersion.cs | 2 +- .../Persistence/Repositories/Implement/DataTypeRepository.cs | 2 +- .../Persistence/Repositories/Implement/DocumentRepository.cs | 2 +- src/Umbraco.Web/PublishedContentExtensions.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Core/Cache/HttpRequestAppCache.cs b/src/Umbraco.Core/Cache/HttpRequestAppCache.cs index a255fea133..0fdf70ac27 100644 --- a/src/Umbraco.Core/Cache/HttpRequestAppCache.cs +++ b/src/Umbraco.Core/Cache/HttpRequestAppCache.cs @@ -31,7 +31,7 @@ namespace Umbraco.Core.Cache ///
/// /// Will use HttpContext.Current. - /// fixme/task: use IHttpContextAccessor NOT HttpContext.Current + /// TODO - https://github.com/umbraco/Umbraco-CMS/issues/4239 - use IHttpContextAccessor NOT HttpContext.Current /// public HttpRequestAppCache() { } diff --git a/src/Umbraco.Core/Configuration/UmbracoVersion.cs b/src/Umbraco.Core/Configuration/UmbracoVersion.cs index 7cb1a61cf1..bc5b6993e3 100644 --- a/src/Umbraco.Core/Configuration/UmbracoVersion.cs +++ b/src/Umbraco.Core/Configuration/UmbracoVersion.cs @@ -81,7 +81,7 @@ namespace Umbraco.Core.Configuration { try { - // fixme/task - stop having version in web.config appSettings + // TODO - https://github.com/umbraco/Umbraco-CMS/issues/4238 - stop having version in web.config appSettings var value = ConfigurationManager.AppSettings["umbracoConfigurationStatus"]; return value.IsNullOrWhiteSpace() ? null : SemVersion.TryParse(value, out var semver) ? semver : null; } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs index f4f0da8bee..0e6ff0310d 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs @@ -26,7 +26,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { private readonly Lazy _editors; - // fixme/task - get rid of Lazy injection and fix circular dependencies + // TODO - https://github.com/umbraco/Umbraco-CMS/issues/4237 - get rid of Lazy injection and fix circular dependencies public DataTypeRepository(IScopeAccessor scopeAccessor, AppCaches cache, Lazy editors, ILogger logger) : base(scopeAccessor, cache, logger) { diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs index 344c0b9489..8bee55060b 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs @@ -260,7 +260,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement protected override void PersistNewItem(IContent entity) { - // fixme/task - sort out IContent vs Content + // TODO: https://github.com/umbraco/Umbraco-CMS/issues/4234 - sort out IContent vs Content // however, it's not just so we have access to AddingEntity // there are tons of things at the end of the methods, that can only work with a true Content // and basically, the repository requires a Content, not an IContent diff --git a/src/Umbraco.Web/PublishedContentExtensions.cs b/src/Umbraco.Web/PublishedContentExtensions.cs index 231aa2a307..1284cf513d 100644 --- a/src/Umbraco.Web/PublishedContentExtensions.cs +++ b/src/Umbraco.Web/PublishedContentExtensions.cs @@ -954,7 +954,7 @@ namespace Umbraco.Web /// public static IEnumerable Children(this IPublishedContent content, string culture = null) { - if (content == null) throw new ArgumentNullException(nameof(content)); // fixme/task wtf is this? + if (content == null) throw new ArgumentNullException(nameof(content)); return content.Children.WhereIsInvariantOrHasCulture(culture); } From 31a6f2d67c40f78e6f65ff905f7a7b35d5ad4bd4 Mon Sep 17 00:00:00 2001 From: Stephan Date: Wed, 23 Jan 2019 21:22:49 +0100 Subject: [PATCH 249/437] Add runtime hooks for Deploy --- .../Migrations/Install/DatabaseBuilder.cs | 64 ++++++---- .../Persistence/UmbracoDatabaseFactory.cs | 8 +- src/Umbraco.Core/Runtime/CoreRuntime.cs | 10 +- src/Umbraco.Core/RuntimeOptions.cs | 114 ++++++++++++++++++ src/Umbraco.Core/RuntimeState.cs | 8 +- src/Umbraco.Core/RuntimeStateOptions.cs | 40 ------ src/Umbraco.Core/Umbraco.Core.csproj | 2 +- 7 files changed, 172 insertions(+), 74 deletions(-) create mode 100644 src/Umbraco.Core/RuntimeOptions.cs delete mode 100644 src/Umbraco.Core/RuntimeStateOptions.cs diff --git a/src/Umbraco.Core/Migrations/Install/DatabaseBuilder.cs b/src/Umbraco.Core/Migrations/Install/DatabaseBuilder.cs index 4104ce947c..e73fc7453f 100644 --- a/src/Umbraco.Core/Migrations/Install/DatabaseBuilder.cs +++ b/src/Umbraco.Core/Migrations/Install/DatabaseBuilder.cs @@ -283,48 +283,60 @@ namespace Umbraco.Core.Migrations.Install if (string.IsNullOrWhiteSpace(connectionString)) throw new ArgumentNullOrEmptyException(nameof(connectionString)); if (string.IsNullOrWhiteSpace(providerName)) throw new ArgumentNullOrEmptyException(nameof(providerName)); - // set the connection string for the new datalayer - var connectionStringSettings = new ConnectionStringSettings(Constants.System.UmbracoConnectionName, connectionString, providerName); + var fileSource = "web.config"; + var fileName = IOHelper.MapPath(Path.Combine(SystemDirectories.Root, fileSource)); - var fileName = IOHelper.MapPath($"{SystemDirectories.Root}/web.config"); var xml = XDocument.Load(fileName, LoadOptions.PreserveWhitespace); - if (xml.Root == null) throw new Exception("Invalid web.config file."); - var connectionStrings = xml.Root.DescendantsAndSelf("connectionStrings").FirstOrDefault(); - if (connectionStrings == null) throw new Exception("Invalid web.config file."); + if (xml.Root == null) throw new Exception($"Invalid {fileSource} file (no root)."); - // honour configSource, if its set, change the xml file we are saving the configuration - // to the one set in the configSource attribute - if (connectionStrings.Attribute("configSource") != null) + var connectionStrings = xml.Root.DescendantsAndSelf("connectionStrings").FirstOrDefault(); + if (connectionStrings == null) throw new Exception($"Invalid {fileSource} file (no connection strings)."); + + // handle configSource + var configSourceAttribute = connectionStrings.Attribute("configSource"); + if (configSourceAttribute != null) { - var source = connectionStrings.Attribute("configSource").Value; - var configFile = IOHelper.MapPath($"{SystemDirectories.Root}/{source}"); - logger.Info("Storing ConnectionString in {ConfigFile}", configFile); - if (File.Exists(configFile)) - { - xml = XDocument.Load(fileName, LoadOptions.PreserveWhitespace); - fileName = configFile; - } + fileSource = configSourceAttribute.Value; + fileName = IOHelper.MapPath(Path.Combine(SystemDirectories.Root, fileSource)); + + if (!File.Exists(fileName)) + throw new Exception($"Invalid configSource \"{fileSource}\" (no such file)."); + + xml = XDocument.Load(fileName, LoadOptions.PreserveWhitespace); + if (xml.Root == null) throw new Exception($"Invalid {fileSource} file (no root)."); + connectionStrings = xml.Root.DescendantsAndSelf("connectionStrings").FirstOrDefault(); - if (connectionStrings == null) throw new Exception("Invalid web.config file."); + if (connectionStrings == null) throw new Exception($"Invalid {fileSource} file (no connection strings)."); } - // update connectionString if it exists, or else create a new connectionString - var setting = connectionStrings.Descendants("add").FirstOrDefault(s => s.Attribute("name").Value == Constants.System.UmbracoConnectionName); + // create or update connection string + var setting = connectionStrings.Descendants("add").FirstOrDefault(s => s.Attribute("name")?.Value == Constants.System.UmbracoConnectionName); if (setting == null) { connectionStrings.Add(new XElement("add", new XAttribute("name", Constants.System.UmbracoConnectionName), - new XAttribute("connectionString", connectionStringSettings), + new XAttribute("connectionString", connectionString), new XAttribute("providerName", providerName))); } else { - setting.Attribute("connectionString").Value = connectionString; - setting.Attribute("providerName").Value = providerName; + AddOrUpdateAttribute(setting, "connectionString", connectionString); + AddOrUpdateAttribute(setting, "providerName", providerName); } + // save + logger.Info("Saving connection string to {ConfigFile}.", fileSource); xml.Save(fileName, SaveOptions.DisableFormatting); - logger.Info("Configured a new ConnectionString using the '{ProviderName}' provider.", providerName); + logger.Info("Saved connection string to {ConfigFile}.", fileSource); + } + + private static void AddOrUpdateAttribute(XElement element, string name, string value) + { + var attribute = element.Attribute(name); + if (attribute == null) + element.Add(new XAttribute(name, value)); + else + attribute.Value = value; } internal bool IsConnectionStringConfigured(ConnectionStringSettings databaseSettings) @@ -422,7 +434,7 @@ namespace Umbraco.Core.Migrations.Install _logger.Info("Database configuration status: Started"); var database = scope.Database; - + var message = string.Empty; var schemaResult = ValidateSchema(); @@ -482,7 +494,7 @@ namespace Umbraco.Core.Migrations.Install } _logger.Info("Database upgrade started"); - + // upgrade var upgrader = new UmbracoUpgrader(); upgrader.Execute(_scopeProvider, _migrationBuilder, _keyValueService, _logger, _postMigrations); diff --git a/src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs b/src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs index cd6da569c5..aec49b8eb5 100644 --- a/src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs +++ b/src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs @@ -59,14 +59,18 @@ namespace Umbraco.Core.Persistence /// Used by the other ctor and in tests. public UmbracoDatabaseFactory(string connectionStringName, ILogger logger, Lazy mappers) { - if (string.IsNullOrWhiteSpace(connectionStringName)) throw new ArgumentNullOrEmptyException(nameof(connectionStringName)); + if (string.IsNullOrWhiteSpace(connectionStringName)) + throw new ArgumentNullOrEmptyException(nameof(connectionStringName)); _mappers = mappers ?? throw new ArgumentNullException(nameof(mappers)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); var settings = ConfigurationManager.ConnectionStrings[connectionStringName]; if (settings == null) + { + logger.Debug("Missing connection string, defer configuration."); return; // not configured + } // could as well be // so need to test the values too @@ -74,7 +78,7 @@ namespace Umbraco.Core.Persistence var providerName = settings.ProviderName; if (string.IsNullOrWhiteSpace(connectionString) || string.IsNullOrWhiteSpace(providerName)) { - logger.Debug("Missing connection string or provider name, defer configuration."); + logger.Debug("Empty connection string or provider name, defer configuration."); return; // not configured } diff --git a/src/Umbraco.Core/Runtime/CoreRuntime.cs b/src/Umbraco.Core/Runtime/CoreRuntime.cs index 13e6aae149..793eb751dd 100644 --- a/src/Umbraco.Core/Runtime/CoreRuntime.cs +++ b/src/Umbraco.Core/Runtime/CoreRuntime.cs @@ -100,6 +100,9 @@ namespace Umbraco.Core.Runtime // throws if not full-trust new AspNetHostingPermission(AspNetHostingPermissionLevel.Unrestricted).Demand(); + // run handlers + RuntimeOptions.DoRuntimeBoot(ProfilingLogger); + // application caches var appCaches = GetAppCaches(); @@ -131,12 +134,17 @@ namespace Umbraco.Core.Runtime composition = new Composition(register, typeLoader, ProfilingLogger, _state, configs); composition.RegisterEssentials(Logger, Profiler, ProfilingLogger, mainDom, appCaches, databaseFactory, typeLoader, _state); + // run handlers + RuntimeOptions.DoRuntimeEssentials(composition, appCaches, typeLoader, databaseFactory); + // register runtime-level services // there should be none, really - this is here "just in case" Compose(composition); - // acquire the main domain, determine our runtime level + // acquire the main domain AcquireMainDom(mainDom); + + // determine our runtime level DetermineRuntimeLevel(databaseFactory, ProfilingLogger); // get composers, and compose diff --git a/src/Umbraco.Core/RuntimeOptions.cs b/src/Umbraco.Core/RuntimeOptions.cs new file mode 100644 index 0000000000..1f89ee6314 --- /dev/null +++ b/src/Umbraco.Core/RuntimeOptions.cs @@ -0,0 +1,114 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Runtime.CompilerServices; +using Umbraco.Core.Cache; +using Umbraco.Core.Components; +using Umbraco.Core.Composing; +using Umbraco.Core.Logging; +using Umbraco.Core.Persistence; + +namespace Umbraco.Core +{ + /// + /// Provides static options for the runtime. + /// + /// + /// These options can be configured in PreApplicationStart or via appSettings. + /// + public static class RuntimeOptions + { + private static List> _onBoot; + private static List> _onEssentials; + private static bool? _installMissingDatabase; + private static bool? _installEmptyDatabase; + + // reads a boolean appSetting + private static bool BoolSetting(string key, bool missing) => ConfigurationManager.AppSettings[key]?.InvariantEquals("true") ?? missing; + + /// + /// Gets a value indicating whether the runtime should enter Install level when the database is missing. + /// + /// + /// By default, when a database connection string is configured but it is not possible to + /// connect to the database, the runtime enters the BootFailed level. If this options is set to true, + /// it enters the Install level instead. + /// It is then up to the implementor, that is setting this value, to take over the installation + /// sequence. + /// + public static bool InstallMissingDatabase + { + get => _installEmptyDatabase ?? BoolSetting("Umbraco.Core.RuntimeState.InstallMissingDatabase", false); + set => _installEmptyDatabase = value; + } + + /// + /// Gets a value indicating whether the runtime should enter Install level when the database is empty. + /// + /// + /// By default, when a database connection string is configured and it is possible to connect to + /// the database, but the database is empty, the runtime enters the BootFailed level. If this options + /// is set to true, it enters the Install level instead. + /// It is then up to the implementor, that is setting this value, to take over the installation + /// sequence. + /// + public static bool InstallEmptyDatabase + { + get => _installMissingDatabase ?? BoolSetting("Umbraco.Core.RuntimeState.InstallEmptyDatabase", false); + set => _installMissingDatabase = value; + } + + /// + /// Executes the RuntimeBoot handlers. + /// + internal static void DoRuntimeBoot(IProfilingLogger logger) + { + if (_onBoot == null) + return; + + foreach (var action in _onBoot) + action(logger); + } + + /// + /// Executes the RuntimeEssentials handlers. + /// + internal static void DoRuntimeEssentials(Composition composition, AppCaches appCaches, TypeLoader typeLoader, IUmbracoDatabaseFactory databaseFactory) + { + if (_onEssentials== null) + return; + + foreach (var action in _onEssentials) + action(composition, appCaches, typeLoader, databaseFactory); + } + + /// + /// Registers a RuntimeBoot handler. + /// + /// + /// A RuntimeBoot handler runs when the runtime boots, right after the + /// loggers have been created, but before anything else. + /// + public static void OnRuntimeBoot(Action action) + { + if (_onBoot == null) + _onBoot = new List>(); + _onBoot.Add(action); + } + + /// + /// Registers a RuntimeEssentials handler. + /// + /// + /// A RuntimeEssentials handler runs after the runtime has created a few + /// essential things (AppCaches, a TypeLoader, and a database factory) but + /// before anything else. + /// + public static void OnRuntimeEssentials(Action action) + { + if (_onEssentials == null) + _onEssentials = new List>(); + _onEssentials.Add(action); + } + } +} diff --git a/src/Umbraco.Core/RuntimeState.cs b/src/Umbraco.Core/RuntimeState.cs index 85e8c7370d..b21c02fdb9 100644 --- a/src/Umbraco.Core/RuntimeState.cs +++ b/src/Umbraco.Core/RuntimeState.cs @@ -169,7 +169,7 @@ namespace Umbraco.Core else if (databaseFactory.Configured == false) { // local version *does* match code version, but the database is not configured - // install (again? this is a weird situation...) + // install - may happen with Deploy/Cloud/etc logger.Debug("Database is not configured, need to install Umbraco."); Level = RuntimeLevel.Install; Reason = RuntimeLevelReason.InstallNoDatabase; @@ -179,7 +179,7 @@ namespace Umbraco.Core // else, keep going, // anything other than install wants a database - see if we can connect // (since this is an already existing database, assume localdb is ready) - var tries = RuntimeStateOptions.InstallMissingDatabase ? 2 : 5; + var tries = RuntimeOptions.InstallMissingDatabase ? 2 : 5; for (var i = 0;;) { connect = databaseFactory.CanConnect; @@ -193,7 +193,7 @@ namespace Umbraco.Core // cannot connect to configured database, this is bad, fail logger.Debug("Could not connect to database."); - if (RuntimeStateOptions.InstallMissingDatabase) + if (RuntimeOptions.InstallMissingDatabase) { // ok to install on a configured but missing database Level = RuntimeLevel.Install; @@ -222,7 +222,7 @@ namespace Umbraco.Core // can connect to the database but cannot check the upgrade state... oops logger.Warn(e, "Could not check the upgrade state."); - if (RuntimeStateOptions.InstallEmptyDatabase) + if (RuntimeOptions.InstallEmptyDatabase) { // ok to install on an empty database Level = RuntimeLevel.Install; diff --git a/src/Umbraco.Core/RuntimeStateOptions.cs b/src/Umbraco.Core/RuntimeStateOptions.cs deleted file mode 100644 index 9262a8a990..0000000000 --- a/src/Umbraco.Core/RuntimeStateOptions.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System.Configuration; - -namespace Umbraco.Core -{ - /// - /// Allows configuration of the in PreApplicationStart or in appSettings - /// - public static class RuntimeStateOptions - { - // configured statically or via app settings - private static bool BoolSetting(string key, bool missing) => ConfigurationManager.AppSettings[key]?.InvariantEquals("true") ?? missing; - - /// - /// If true the RuntimeState will continue the installation sequence when a database is missing - /// - /// - /// In this case it will be up to the implementor that is setting this value to true to take over the bootup/installation sequence - /// - public static bool InstallMissingDatabase - { - get => _installEmptyDatabase ?? BoolSetting("Umbraco.Core.RuntimeState.InstallMissingDatabase", false); - set => _installEmptyDatabase = value; - } - - /// - /// If true the RuntimeState will continue the installation sequence when a database is available but is empty - /// - /// - /// In this case it will be up to the implementor that is setting this value to true to take over the bootup/installation sequence - /// - public static bool InstallEmptyDatabase - { - get => _installMissingDatabase ?? BoolSetting("Umbraco.Core.RuntimeState.InstallEmptyDatabase", false); - set => _installMissingDatabase = value; - } - - private static bool? _installMissingDatabase; - private static bool? _installEmptyDatabase; - } -} \ No newline at end of file diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 9a52cb8dc5..1a978650f0 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -530,7 +530,7 @@ - + From a6d3078638972f1a175bb14af8c5b9e117b7b387 Mon Sep 17 00:00:00 2001 From: Stephan Date: Thu, 24 Jan 2019 13:54:54 +0100 Subject: [PATCH 250/437] Improve CoreRuntime handling of boot fails --- src/Umbraco.Core/Runtime/CoreRuntime.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Runtime/CoreRuntime.cs b/src/Umbraco.Core/Runtime/CoreRuntime.cs index 793eb751dd..9c18b3d8c3 100644 --- a/src/Umbraco.Core/Runtime/CoreRuntime.cs +++ b/src/Umbraco.Core/Runtime/CoreRuntime.cs @@ -296,7 +296,7 @@ namespace Umbraco.Core.Runtime /// public virtual void Terminate() { - _components.Terminate(); + _components?.Terminate(); } /// From c7bbad3c0ce208eeddf43ea7fff04d19ee5455a6 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Thu, 24 Jan 2019 13:58:16 +0000 Subject: [PATCH 251/437] Lots or removal & tidy up - still WIP & may break build --- .../Services/MemberTypeServiceTests.cs | 3 - src/Umbraco.Tests/UI/LegacyDialogTests.cs | 12 +- src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 51 +-- src/Umbraco.Web.UI/Umbraco/Create.aspx.cs | 34 -- .../Umbraco/Create.aspx.designer.cs | 25 -- .../Umbraco/config/create/UI.Release.xml | 18 - .../Umbraco/config/create/UI.xml | 18 - src/Umbraco.Web.UI/Umbraco/create.aspx | 43 --- src/Umbraco.Web.UI/Umbraco/create/simple.ascx | 22 -- .../developer/Macros/EditMacro.aspx.cs | 363 ------------------ .../Macros/EditMacro.aspx.designer.cs | 222 ----------- .../Umbraco/developer/Macros/editMacro.aspx | 190 --------- .../Umbraco/masterpages/default.Master | 3 - src/Umbraco.Web.UI/default.aspx | 2 - .../Actions/ActionChangeDocType.cs | 7 +- src/Umbraco.Web/Actions/ActionCopy.cs | 3 - src/Umbraco.Web/Actions/ActionDelete.cs | 3 - src/Umbraco.Web/Actions/ActionMove.cs | 3 - src/Umbraco.Web/Actions/ActionNew.cs | 3 - src/Umbraco.Web/Actions/ActionProtect.cs | 3 - src/Umbraco.Web/Actions/ActionRights.cs | 3 - src/Umbraco.Web/Actions/ActionRollback.cs | 3 - src/Umbraco.Web/Actions/ActionToPublish.cs | 3 - src/Umbraco.Web/Actions/ActionUpdate.cs | 3 - src/Umbraco.Web/Cache/MacroCacheRefresher.cs | 2 + src/Umbraco.Web/Mvc/RenderRouteHandler.cs | 22 +- src/Umbraco.Web/Mvc/UmbracoPageResult.cs | 10 +- src/Umbraco.Web/Mvc/UrlHelperExtensions.cs | 9 +- src/Umbraco.Web/Templates/TemplateRenderer.cs | 7 +- src/Umbraco.Web/UI/Pages/BasePage.cs | 82 ---- src/Umbraco.Web/UI/Pages/ClientTools.cs | 347 ----------------- .../UI/Pages/UmbracoEnsuredPage.cs | 151 -------- src/Umbraco.Web/Umbraco.Web.csproj | 41 +- .../AttributeCollectionAdapter.cs | 312 --------------- .../umbraco.presentation/MacroCacheContent.cs | 4 +- .../umbraco.presentation/default.aspx.cs | 183 --------- src/Umbraco.Web/umbraco.presentation/item.cs | 237 ------------ src/Umbraco.Web/umbraco.presentation/page.cs | 1 + .../umbraco/create.aspx.cs | 49 --- .../umbraco/create/macroTasks.cs | 36 -- .../umbraco/create/simple.ascx.cs | 100 ----- .../umbraco.presentation/umbracoPageHolder.cs | 114 ------ 42 files changed, 20 insertions(+), 2727 deletions(-) delete mode 100644 src/Umbraco.Web.UI/Umbraco/Create.aspx.cs delete mode 100644 src/Umbraco.Web.UI/Umbraco/Create.aspx.designer.cs delete mode 100644 src/Umbraco.Web.UI/Umbraco/config/create/UI.Release.xml delete mode 100644 src/Umbraco.Web.UI/Umbraco/config/create/UI.xml delete mode 100644 src/Umbraco.Web.UI/Umbraco/create.aspx delete mode 100644 src/Umbraco.Web.UI/Umbraco/create/simple.ascx delete mode 100644 src/Umbraco.Web.UI/Umbraco/developer/Macros/EditMacro.aspx.cs delete mode 100644 src/Umbraco.Web.UI/Umbraco/developer/Macros/EditMacro.aspx.designer.cs delete mode 100644 src/Umbraco.Web.UI/Umbraco/developer/Macros/editMacro.aspx delete mode 100644 src/Umbraco.Web.UI/Umbraco/masterpages/default.Master delete mode 100644 src/Umbraco.Web.UI/default.aspx delete mode 100644 src/Umbraco.Web/UI/Pages/BasePage.cs delete mode 100644 src/Umbraco.Web/UI/Pages/ClientTools.cs delete mode 100644 src/Umbraco.Web/UI/Pages/UmbracoEnsuredPage.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/AttributeCollectionAdapter.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/default.aspx.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/item.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/create.aspx.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/create/macroTasks.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/create/simple.ascx.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbracoPageHolder.cs diff --git a/src/Umbraco.Tests/Services/MemberTypeServiceTests.cs b/src/Umbraco.Tests/Services/MemberTypeServiceTests.cs index b607290c5e..459daa3da6 100644 --- a/src/Umbraco.Tests/Services/MemberTypeServiceTests.cs +++ b/src/Umbraco.Tests/Services/MemberTypeServiceTests.cs @@ -1,13 +1,10 @@ using System; -using System.Collections.Generic; using System.Linq; using System.Threading; using NUnit.Framework; -using umbraco.cms.presentation.create.controls; using Umbraco.Core; using Umbraco.Core.Models; using Umbraco.Core.Persistence.Dtos; -using Umbraco.Tests.TestHelpers; using Umbraco.Tests.TestHelpers.Entities; using Umbraco.Tests.Testing; diff --git a/src/Umbraco.Tests/UI/LegacyDialogTests.cs b/src/Umbraco.Tests/UI/LegacyDialogTests.cs index 5c8a621e10..9f1e474bd9 100644 --- a/src/Umbraco.Tests/UI/LegacyDialogTests.cs +++ b/src/Umbraco.Tests/UI/LegacyDialogTests.cs @@ -23,12 +23,12 @@ namespace Umbraco.Tests.UI } } - [TestCase(typeof(macroTasks), Constants.Applications.Settings)] - public void Check_Assigned_Apps_For_Tasks(Type taskType, string app) - { - var task = (LegacyDialogTask)Activator.CreateInstance(taskType); - Assert.AreEqual(task.AssignedApp, app); - } + //[TestCase(typeof(macroTasks), Constants.Applications.Settings)] + //public void Check_Assigned_Apps_For_Tasks(Type taskType, string app) + //{ + // var task = (LegacyDialogTask)Activator.CreateInstance(taskType); + // Assert.AreEqual(task.AssignedApp, app); + //} } } diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index 0ff158dadb..d51c2f7814 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -80,7 +80,6 @@ - @@ -134,7 +133,6 @@ noNodes.aspx - ASPXCodeBehind @@ -142,39 +140,6 @@ True Settings.settings - - create.aspx - ASPXCodeBehind - - - create.aspx - - - editMacro.aspx - ASPXCodeBehind - - - editMacro.aspx - - - default.Master - ASPXCodeBehind - - - default.Master - - - ASPXCodeBehind - - - umbracoDialog.Master - - - ASPXCodeBehind - - - umbracoPage.Master - @@ -197,12 +162,11 @@ + + - - - @@ -261,10 +225,6 @@ SettingsSingleFileGenerator Settings.Designer.cs - - UI.xml - Designer - Designer @@ -277,7 +237,6 @@ - Designer @@ -288,7 +247,6 @@ - Designer @@ -348,15 +306,10 @@ Web.Template.config Designer - - - - - Designer diff --git a/src/Umbraco.Web.UI/Umbraco/Create.aspx.cs b/src/Umbraco.Web.UI/Umbraco/Create.aspx.cs deleted file mode 100644 index 7848a5976b..0000000000 --- a/src/Umbraco.Web.UI/Umbraco/Create.aspx.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Web; -using Umbraco.Web._Legacy.UI; - -namespace Umbraco.Web.UI.Umbraco -{ - public partial class CreateDialog : global::umbraco.cms.presentation.Create - { - - protected override void OnLoad(EventArgs e) - { - if (SecurityCheck(Request.QueryString["nodeType"])) - { - //if we're allowed, then continue - base.OnLoad(e); - } - else - { - //otherwise show an error - UI.Visible = false; - AccessError.Visible = true; - } - } - - private bool SecurityCheck(string nodeTypeAlias) - { - return LegacyDialogHandler.UserHasCreateAccess( - new HttpContextWrapper(Context), - Security.CurrentUser, - nodeTypeAlias); - } - - } -} diff --git a/src/Umbraco.Web.UI/Umbraco/Create.aspx.designer.cs b/src/Umbraco.Web.UI/Umbraco/Create.aspx.designer.cs deleted file mode 100644 index c17aadcbf2..0000000000 --- a/src/Umbraco.Web.UI/Umbraco/Create.aspx.designer.cs +++ /dev/null @@ -1,25 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Umbraco.Web.UI.Umbraco { - - - public partial class CreateDialog - { - - /// - /// AccessError control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.PlaceHolder AccessError; - } -} diff --git a/src/Umbraco.Web.UI/Umbraco/config/create/UI.Release.xml b/src/Umbraco.Web.UI/Umbraco/config/create/UI.Release.xml deleted file mode 100644 index 635174b9da..0000000000 --- a/src/Umbraco.Web.UI/Umbraco/config/create/UI.Release.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - -
Macro
- /create/simple.ascx - - - -
- -
Macro
- /create/simple.ascx - - - - -
-
diff --git a/src/Umbraco.Web.UI/Umbraco/config/create/UI.xml b/src/Umbraco.Web.UI/Umbraco/config/create/UI.xml deleted file mode 100644 index c075a0b8b9..0000000000 --- a/src/Umbraco.Web.UI/Umbraco/config/create/UI.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - -
Macro
- /create/simple.ascx - - - -
- -
Macro
- /create/simple.ascx - - - - -
-
diff --git a/src/Umbraco.Web.UI/Umbraco/create.aspx b/src/Umbraco.Web.UI/Umbraco/create.aspx deleted file mode 100644 index d69bffc4b3..0000000000 --- a/src/Umbraco.Web.UI/Umbraco/create.aspx +++ /dev/null @@ -1,43 +0,0 @@ -<%@ Page Language="c#" MasterPageFile="masterpages/umbracoDialog.Master" Codebehind="CreateDialog.aspx.cs" AutoEventWireup="True" Inherits="Umbraco.Web.UI.Umbraco.CreateDialog" %> -<%@ Register Namespace="umbraco" TagPrefix="umb" Assembly="Umbraco.Web" %> - - - - - - - - - -
-

- The current user does not have access to create this type of object -

-
-
-
- - - - \ No newline at end of file diff --git a/src/Umbraco.Web.UI/Umbraco/create/simple.ascx b/src/Umbraco.Web.UI/Umbraco/create/simple.ascx deleted file mode 100644 index df8056019d..0000000000 --- a/src/Umbraco.Web.UI/Umbraco/create/simple.ascx +++ /dev/null @@ -1,22 +0,0 @@ -<%@ Control Language="c#" AutoEventWireup="True" Inherits="umbraco.cms.presentation.create.controls.simple" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %> -<%@ Register TagPrefix="cc1" Namespace="Umbraco.Web._Legacy.Controls" Assembly="Umbraco.Web" %> - - - - - * - - - - - <%=Services.TextService.Localize("cancel")%> - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- <%=Services.TextService.Localize("general/alias")%> - - <%=Services.TextService.Localize("general/name")%> - - <%=Services.TextService.Localize("general/type")%> - - <%=Services.TextService.Localize("general/sort")%> -
- - Required
- -
- Required
- -
- - Required
- - -
- Required
- Numbers only
- -
- -
- Required
- -
- Required
- -
- Required
- - -
- <%-- The macro parameter will automatically get sort order when created. --%> - - -
- - - - - diff --git a/src/Umbraco.Web.UI/Umbraco/masterpages/default.Master b/src/Umbraco.Web.UI/Umbraco/masterpages/default.Master deleted file mode 100644 index ebbc708d80..0000000000 --- a/src/Umbraco.Web.UI/Umbraco/masterpages/default.Master +++ /dev/null @@ -1,3 +0,0 @@ -<%@ Master Language="C#" AutoEventWireup="True" CodeBehind="Default.master.cs" Inherits="Umbraco.Web.UI.Umbraco.Masterpages.Default" %> - - \ No newline at end of file diff --git a/src/Umbraco.Web.UI/default.aspx b/src/Umbraco.Web.UI/default.aspx deleted file mode 100644 index a41d1eccf7..0000000000 --- a/src/Umbraco.Web.UI/default.aspx +++ /dev/null @@ -1,2 +0,0 @@ -<%@ Page language="c#" AutoEventWireup="True" Inherits="umbraco.UmbracoDefault" trace="true" validateRequest="false" %> - diff --git a/src/Umbraco.Web/Actions/ActionChangeDocType.cs b/src/Umbraco.Web/Actions/ActionChangeDocType.cs index 56868e9fb0..edae1bc84c 100644 --- a/src/Umbraco.Web/Actions/ActionChangeDocType.cs +++ b/src/Umbraco.Web/Actions/ActionChangeDocType.cs @@ -1,9 +1,4 @@ -using Umbraco.Core; -using Umbraco.Core.CodeAnnotations; -using Umbraco.Web.UI.Pages; - - -namespace Umbraco.Web.Actions +namespace Umbraco.Web.Actions { //TODO: Add this back in when we support this functionality again ///// diff --git a/src/Umbraco.Web/Actions/ActionCopy.cs b/src/Umbraco.Web/Actions/ActionCopy.cs index 3e4b2ddc31..477156d4ae 100644 --- a/src/Umbraco.Web/Actions/ActionCopy.cs +++ b/src/Umbraco.Web/Actions/ActionCopy.cs @@ -1,7 +1,4 @@ using Umbraco.Core; -using Umbraco.Core.CodeAnnotations; -using Umbraco.Web.UI.Pages; - namespace Umbraco.Web.Actions { diff --git a/src/Umbraco.Web/Actions/ActionDelete.cs b/src/Umbraco.Web/Actions/ActionDelete.cs index 0cf2e60c5a..470f1453d6 100644 --- a/src/Umbraco.Web/Actions/ActionDelete.cs +++ b/src/Umbraco.Web/Actions/ActionDelete.cs @@ -1,7 +1,4 @@ using Umbraco.Core; -using Umbraco.Core.CodeAnnotations; -using Umbraco.Web.UI.Pages; - namespace Umbraco.Web.Actions { diff --git a/src/Umbraco.Web/Actions/ActionMove.cs b/src/Umbraco.Web/Actions/ActionMove.cs index 7ae8474965..74c783aab9 100644 --- a/src/Umbraco.Web/Actions/ActionMove.cs +++ b/src/Umbraco.Web/Actions/ActionMove.cs @@ -1,7 +1,4 @@ using Umbraco.Core; -using Umbraco.Core.CodeAnnotations; -using Umbraco.Web.UI.Pages; - namespace Umbraco.Web.Actions { diff --git a/src/Umbraco.Web/Actions/ActionNew.cs b/src/Umbraco.Web/Actions/ActionNew.cs index c07580b42a..ab208a79a3 100644 --- a/src/Umbraco.Web/Actions/ActionNew.cs +++ b/src/Umbraco.Web/Actions/ActionNew.cs @@ -1,7 +1,4 @@ using Umbraco.Core; -using Umbraco.Core.CodeAnnotations; -using Umbraco.Web.UI.Pages; - namespace Umbraco.Web.Actions { diff --git a/src/Umbraco.Web/Actions/ActionProtect.cs b/src/Umbraco.Web/Actions/ActionProtect.cs index cd8b883ca8..dc6c7ff4e7 100644 --- a/src/Umbraco.Web/Actions/ActionProtect.cs +++ b/src/Umbraco.Web/Actions/ActionProtect.cs @@ -1,7 +1,4 @@ using Umbraco.Core; -using Umbraco.Core.CodeAnnotations; -using Umbraco.Web.UI.Pages; - namespace Umbraco.Web.Actions { diff --git a/src/Umbraco.Web/Actions/ActionRights.cs b/src/Umbraco.Web/Actions/ActionRights.cs index 0d9ace918e..b76f3b7800 100644 --- a/src/Umbraco.Web/Actions/ActionRights.cs +++ b/src/Umbraco.Web/Actions/ActionRights.cs @@ -1,7 +1,4 @@ using Umbraco.Core; -using Umbraco.Core.CodeAnnotations; -using Umbraco.Web.UI.Pages; - namespace Umbraco.Web.Actions { diff --git a/src/Umbraco.Web/Actions/ActionRollback.cs b/src/Umbraco.Web/Actions/ActionRollback.cs index 96ce1e7767..18d9efdb8d 100644 --- a/src/Umbraco.Web/Actions/ActionRollback.cs +++ b/src/Umbraco.Web/Actions/ActionRollback.cs @@ -1,7 +1,4 @@ using Umbraco.Core; -using Umbraco.Core.CodeAnnotations; -using Umbraco.Web.UI.Pages; - namespace Umbraco.Web.Actions { diff --git a/src/Umbraco.Web/Actions/ActionToPublish.cs b/src/Umbraco.Web/Actions/ActionToPublish.cs index 518c82ab87..61475c81f5 100644 --- a/src/Umbraco.Web/Actions/ActionToPublish.cs +++ b/src/Umbraco.Web/Actions/ActionToPublish.cs @@ -1,7 +1,4 @@ using Umbraco.Core; -using Umbraco.Core.CodeAnnotations; -using Umbraco.Web.UI.Pages; - namespace Umbraco.Web.Actions { diff --git a/src/Umbraco.Web/Actions/ActionUpdate.cs b/src/Umbraco.Web/Actions/ActionUpdate.cs index a2fba0fd89..2241c75955 100644 --- a/src/Umbraco.Web/Actions/ActionUpdate.cs +++ b/src/Umbraco.Web/Actions/ActionUpdate.cs @@ -1,7 +1,4 @@ using Umbraco.Core; -using Umbraco.Core.CodeAnnotations; -using Umbraco.Web.UI.Pages; - namespace Umbraco.Web.Actions { diff --git a/src/Umbraco.Web/Cache/MacroCacheRefresher.cs b/src/Umbraco.Web/Cache/MacroCacheRefresher.cs index 6b739b4f49..b224a07151 100644 --- a/src/Umbraco.Web/Cache/MacroCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/MacroCacheRefresher.cs @@ -37,6 +37,7 @@ namespace Umbraco.Web.Cache ClearAllIsolatedCacheByEntityType(); + //TODO: WB Was I too aggresive with cleanup? AppCaches.RuntimeCache.ClearOfType(); base.RefreshAll(); @@ -112,6 +113,7 @@ namespace Umbraco.Web.Cache public static void ClearMacroContentCache(AppCaches appCaches) { + //TODO: WB Was I too aggresive with cleanup? appCaches.RuntimeCache.ClearOfType(); } diff --git a/src/Umbraco.Web/Mvc/RenderRouteHandler.cs b/src/Umbraco.Web/Mvc/RenderRouteHandler.cs index c9123175b1..8183559871 100644 --- a/src/Umbraco.Web/Mvc/RenderRouteHandler.cs +++ b/src/Umbraco.Web/Mvc/RenderRouteHandler.cs @@ -347,10 +347,6 @@ namespace Umbraco.Web.Mvc // to Mvc since Mvc can't do much return new PublishedContentNotFoundHandler("In addition, no template exists to render the custom 404."); - // so we have a template, so we should have a rendering engine - if (request.RenderingEngine == RenderingEngine.WebForms) // back to webforms ? - return GetWebFormsHandler(); - if (request.RenderingEngine != RenderingEngine.Mvc) // else ? return new PublishedContentNotFoundHandler("In addition, no rendering engine exists to render the custom 404."); @@ -376,13 +372,6 @@ namespace Umbraco.Web.Mvc return HandlePostedValues(requestContext, postedInfo); } - //Now we can check if we are supposed to render WebForms when the route has not been hijacked - if (request.RenderingEngine == RenderingEngine.WebForms - && request.HasTemplate - && routeDef.HasHijackedRoute == false) - { - return GetWebFormsHandler(); - } //Here we need to check if there is no hijacked route and no template assigned, //if this is the case we want to return a blank page, but we'll leave that up to the NoTemplateHandler. @@ -434,16 +423,7 @@ namespace Umbraco.Web.Mvc return new UmbracoMvcHandler(requestContext); } - - /// - /// Returns the handler for webforms requests - /// - /// - internal static IHttpHandler GetWebFormsHandler() - { - return (umbraco.UmbracoDefault) BuildManager.CreateInstanceFromVirtualPath("~/default.aspx", typeof(umbraco.UmbracoDefault)); - } - + private SessionStateBehavior GetSessionStateBehavior(RequestContext requestContext, string controllerName) { return _controllerFactory.GetControllerSessionBehavior(requestContext, controllerName); diff --git a/src/Umbraco.Web/Mvc/UmbracoPageResult.cs b/src/Umbraco.Web/Mvc/UmbracoPageResult.cs index 9769945f37..fc6daada3e 100644 --- a/src/Umbraco.Web/Mvc/UmbracoPageResult.cs +++ b/src/Umbraco.Web/Mvc/UmbracoPageResult.cs @@ -30,15 +30,7 @@ namespace Umbraco.Web.Mvc var routeDef = (RouteDefinition)context.RouteData.DataTokens[Umbraco.Core.Constants.Web.UmbracoRouteDefinitionDataToken]; - //Special case, if it is webforms but we're posting to an MVC surface controller, then we - // need to return the webforms result instead - if (routeDef.PublishedRequest.RenderingEngine == RenderingEngine.WebForms) - { - EnsureViewContextForWebForms(context); - var webFormsHandler = RenderRouteHandler.GetWebFormsHandler(); - webFormsHandler.ProcessRequest(HttpContext.Current); - } - else + if (routeDef.PublishedRequest.RenderingEngine == RenderingEngine.Mvc) { var factory = ControllerBuilder.Current.GetControllerFactory(); context.RouteData.Values["action"] = routeDef.ActionName; diff --git a/src/Umbraco.Web/Mvc/UrlHelperExtensions.cs b/src/Umbraco.Web/Mvc/UrlHelperExtensions.cs index 6eb568c6af..9c583e4f88 100644 --- a/src/Umbraco.Web/Mvc/UrlHelperExtensions.cs +++ b/src/Umbraco.Web/Mvc/UrlHelperExtensions.cs @@ -19,6 +19,7 @@ namespace Umbraco.Web.Mvc /// The url to validate /// The url of the current local domain (to ensure we can validate if the requested url is local without dependency on the request) /// True if it's an allowed url + [Obsolete("This looks OLD & unused", true)] public static bool ValidateProxyUrl(this UrlHelper urlHelper, string url, string callerUrl) { if (Uri.IsWellFormedUriString(url, UriKind.RelativeOrAbsolute) == false) @@ -60,14 +61,6 @@ namespace Umbraco.Web.Mvc { return false; } - - // check for valid proxy urls - var feedProxyXml = XmlHelper.OpenAsXmlDocument(IOHelper.MapPath(SystemFiles.FeedProxyConfig)); - if (feedProxyXml != null && - feedProxyXml.SelectSingleNode(string.Concat("//allow[@host = '", requestUri.Host, "']")) != null) - { - return true; - } } else { diff --git a/src/Umbraco.Web/Templates/TemplateRenderer.cs b/src/Umbraco.Web/Templates/TemplateRenderer.cs index db786655b4..a10bdbb3c3 100644 --- a/src/Umbraco.Web/Templates/TemplateRenderer.cs +++ b/src/Umbraco.Web/Templates/TemplateRenderer.cs @@ -158,12 +158,7 @@ namespace Umbraco.Web.Templates break; case RenderingEngine.WebForms: default: - var webFormshandler = (UmbracoDefault) BuildManager - .CreateInstanceFromVirtualPath("~/default.aspx", typeof(UmbracoDefault)); - //the 'true' parameter will ensure that the current query strings are carried through, we don't have - // to build up the url again, it will just work. - _umbracoContext.HttpContext.Server.Execute(webFormshandler, sw, true); - break; + throw new Exception("We no longer support WebForms in Umbraco"); } } diff --git a/src/Umbraco.Web/UI/Pages/BasePage.cs b/src/Umbraco.Web/UI/Pages/BasePage.cs deleted file mode 100644 index a8fbc92722..0000000000 --- a/src/Umbraco.Web/UI/Pages/BasePage.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; -using System.Web; -using System.Web.Mvc; -using Umbraco.Core.Configuration; -using Umbraco.Core.Logging; -using Umbraco.Core.Services; -using Umbraco.Web.Security; -using System.Web.UI; -using Umbraco.Core; -using Umbraco.Web.Composing; - -namespace Umbraco.Web.UI.Pages -{ - /// - /// umbraco.BasePages.BasePage is the default page type for the umbraco backend. - /// The basepage keeps track of the current user and the page context. But does not - /// Restrict access to the page itself. - /// The keep the page secure, the umbracoEnsuredPage class should be used instead - /// - public class BasePage : Page - { - private UrlHelper _url; - private HtmlHelper _html; - private ClientTools _clientTools; - - /// - /// Gets the logger. - /// - public ILogger Logger => Current.Logger; - - /// - /// Gets the profiling helper. - /// - public IProfilingLogger ProfilingLogger => Current.ProfilingLogger; - - /// - /// Gets the Url helper. - /// - /// This URL helper is created without any route data and an empty request context. - public UrlHelper Url => _url ?? (_url = new UrlHelper(Context.Request.RequestContext)); - - /// - /// Gets the Html helper. - /// - /// This html helper is created with an empty context and page so it may not have all of the functionality expected. - public HtmlHelper Html => _html ?? (_html = new HtmlHelper(new ViewContext(), new ViewPage())); - - /// - /// Gets the Umbraco context. - /// - public UmbracoContext UmbracoContext => Current.UmbracoContext; - - /// - /// Gets the web security helper. - /// - public WebSecurity Security => UmbracoContext.Security; - - /// - /// Gets the services context. - /// - public ServiceContext Services => Current.Services; - - /// - /// Gets an instance of ClientTools for access to the pages client API. - /// - public ClientTools ClientTools => _clientTools ?? (_clientTools = new ClientTools(this)); - - /// - /// Raises the event. - /// - /// The object that contains the event data. - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - - if (Request.IsSecureConnection || Current.Configs.Global().UseHttps == false) return; - - var serverName = HttpUtility.UrlEncode(Request.ServerVariables["SERVER_NAME"]); - Response.Redirect($"https://{serverName}{Request.FilePath}"); - } - } -} diff --git a/src/Umbraco.Web/UI/Pages/ClientTools.cs b/src/Umbraco.Web/UI/Pages/ClientTools.cs deleted file mode 100644 index 6988877fa2..0000000000 --- a/src/Umbraco.Web/UI/Pages/ClientTools.cs +++ /dev/null @@ -1,347 +0,0 @@ -using Umbraco.Core.IO; -using System.Web.UI; -using Umbraco.Core; - -namespace Umbraco.Web.UI.Pages -{ - - /// - /// Renders the client side code necessary to interact with the Umbraco client side API. - /// Each method returns an instance of this class so you can chain calls together. - /// - public sealed class ClientTools - { - - public ClientTools(Page page) - { - _page = page; - } - - /// - /// Returns the string markup for the JavaScript that is rendered. - /// If referencing JavaScript scripts in the backend, this class should be used - /// in case future changes to the client code is change, this will remain intact. - /// - public static class Scripts - { - internal const string ClientMgrScript = "UmbClientMgr"; - public static string GetAppActions { get { return string.Format("{0}.appActions()", ClientMgrScript); } } - public static string GetMainWindow { get { return string.Format("{0}.mainWindow()", ClientMgrScript); } } - public static string GetMainTree { get { return string.Format("{0}.mainTree()", ClientMgrScript); } } - public static string GetContentFrame() { return string.Format("{0}.contentFrame()", ClientMgrScript); } - public static string ShiftApp(string appAlias) - { - return string.Format(ClientMgrScript + ".historyManager().addHistory('{0}')", appAlias); - } - public static string OpenDashboard(string app) - { - return string.Format(GetAppActions + ".openDashboard('{0}');", app); - } - public static string RefreshAdmin { get { return "setTimeout('" + GetMainWindow + ".location.reload()', {0});"; } } - public static string ShowSpeechBubble { get { return GetMainWindow + ".UmbSpeechBubble.ShowMessage('{0}','{1}', '{2}');"; } } - public static string ChangeContentFrameUrl(string url) { - return string.Format(ClientMgrScript + ".contentFrame('{0}');", url); - } - public static string ReloadContentFrameUrlIfPathLoaded(string url) - { - return string.Format(ClientMgrScript + ".reloadContentFrameUrlIfPathLoaded('{0}');", url); - } - public static string ReloadLocation { get { return ClientMgrScript + ".reloadLocation();"; } } - public static string ReloadLocationIfMatched { get { return ClientMgrScript + ".reloadLocation('{0}');"; } } - public static string ChildNodeCreated = GetMainTree + ".childNodeCreated();"; - public static string SyncTree { get { return GetMainTree + ".syncTree('{0}', {1});"; } } - public static string ClearTreeCache { get { return GetMainTree + ".clearTreeCache();"; } } - public static string CopyNode { get { return GetMainTree + ".copyNode('{0}', '{1}');"; } } - public static string MoveNode { get { return GetMainTree + ".moveNode('{0}', '{1}');"; } } - public static string ReloadActionNode { get { return GetMainTree + ".reloadActionNode({0}, {1}, null);"; } } - public static string RefreshTree { get { return GetMainTree + ".refreshTree();"; } } - public static string RefreshTreeType { get { return GetMainTree + ".refreshTree('{0}');"; } } - public static string CloseModalWindow() - { - return string.Format("{0}.closeModalWindow();", ClientMgrScript); - } - public static string CloseModalWindow(string rVal) - { - return string.Format("{0}.closeModalWindow('{1}');", ClientMgrScript, rVal); - } - public static string OpenModalWindow(string url, string name, int width, int height) - { - return OpenModalWindow(url, name, true, width, height, 0, 0, "", ""); - } - public static string OpenModalWindow(string url, string name, bool showHeader, int width, int height, int top, int leftOffset, string closeTriggers, string onCloseCallback) - { - return string.Format("{0}.openModalWindow('{1}', '{2}', {3}, {4}, {5}, {6}, {7}, '{8}', '{9}');", - new object[] { ClientMgrScript, url, name, showHeader.ToString().ToLower(), width, height, top, leftOffset, closeTriggers, onCloseCallback }); - } - } - - private readonly Page _page; - - /// - /// This removes all tree JSON data cached in the client browser. - /// Useful when you want to ensure that the tree is reloaded from live data. - /// - /// - public ClientTools ClearClientTreeCache() - { - RegisterClientScript(Scripts.ClearTreeCache); - return this; - } - - /// - /// Change applications - /// - /// - public ClientTools ShiftApp(string appAlias) - { - RegisterClientScript(Scripts.ShiftApp(appAlias)); - return this; - } - - /// - /// Refresh the entire administration console after a specified amount of time. - /// - /// - /// - public ClientTools RefreshAdmin(int seconds) - { - RegisterClientScript(string.Format(Scripts.RefreshAdmin, seconds * 1000)); - return this; - } - - /// - /// Refreshes the entire current tree - /// - /// - public ClientTools RefreshTree() - { - RegisterClientScript(Scripts.RefreshTree); - return this; - } - - public ClientTools RefreshTree(string treeType) - { - RegisterClientScript(string.Format(Scripts.RefreshTreeType, treeType)); - return this; - } - - /// - /// A reference to the umbraco UI component "speechbubble". The speechbubble appears in the lower right corner of the screen, notifying users of events - /// - /// The speechbubble icon. - /// The speechbubble header. - /// The body text - public ClientTools ShowSpeechBubble(SpeechBubbleIcon i, string header, string body) - { - RegisterClientScript(string.Format(Scripts.ShowSpeechBubble, i.ToString(), header.Replace("'", "\\'"), body.Replace("'", "\\'"))); - return this; - } - - /// - /// Changes the content in the content frame to the specified URL - /// - /// - public ClientTools ChangeContentFrameUrl(string url) - { - //don't load if there is no url - if (string.IsNullOrEmpty(url)) return this; - - url = EnsureUmbracoUrl(url); - - RegisterClientScript(Scripts.ChangeContentFrameUrl(url)); - - return this; - } - - /// - /// Reloads the content in the content frame if the specified URL is currently loaded - /// - /// - public ClientTools ReloadContentFrameUrlIfPathLoaded(string url) - { - if (string.IsNullOrEmpty(url)) return this; - - url = EnsureUmbracoUrl(url); - - RegisterClientScript(Scripts.ReloadContentFrameUrlIfPathLoaded(url)); - - return this; - } - - public ClientTools ReloadLocationIfMatched(string routePath) - { - RegisterClientScript(string.Format(Scripts.ReloadLocationIfMatched, routePath)); - return this; - } - - public ClientTools ReloadLocation() - { - RegisterClientScript(Scripts.ReloadLocation); - return this; - } - - - private string EnsureUmbracoUrl(string url) - { - if (url.StartsWith("/") && url.StartsWith(IOHelper.ResolveUrl(SystemDirectories.Umbraco)) == false) - { - url = IOHelper.ResolveUrl(SystemDirectories.Umbraco).EnsureEndsWith('/') + url; - } - - if (url.Trim().StartsWith("~")) - url = IOHelper.ResolveUrl(url); - - return url; - } - - /// - /// Shows the dashboard for the given application - /// - /// - /// - public ClientTools ShowDashboard(string app) - { - return ChangeContentFrameUrl(SystemDirectories.Umbraco + string.Format("/dashboard.aspx?app={0}", app)); - } - - /// - /// Reloads the children of the current action node and selects the node that didn't exist there before. - /// If the client side system cannot determine which node is new, then no node is selected. - /// - /// - /// This is used by many create dialogs, however the sync method should be used based on the full path of the - /// node but because the current Umbraco implementation of ITask only returns a url to load, there's no way - /// to determine what the full path of the new child is. - /// - /// - public ClientTools ChildNodeCreated() - { - RegisterClientScript(Scripts.ChildNodeCreated); - return this; - } - - /// - /// Synchronizes the tree to the path specified. - /// - /// - /// - /// If set to true, will ensure that the node to be synced has it's data - /// reloaded from the server. Otherwise, if the node already exists, the tree will simply sync to the node - /// that is already there. - /// - /// - /// This will work for any tree, however you would need to know the path of the node. Currently, media and content - /// are the only trees that store a path, however, if you were working in the template tree for example, a path to a - /// node could be "init,1090" and this method would still work. - /// - /// Sync tree will works by syncing the active tree type. This can be specified explicitly by calling SetActiveTreeType. - /// This will allow developers to sync many trees in one application at one time if needed. - /// - /// - /// - /// - public ClientTools SyncTree(string path, bool forceReload) - { - RegisterClientScript(string.Format(Scripts.SyncTree, path, forceReload.ToString().ToLower())); - return this; - } - - public ClientTools CopyNode(string currNodeId, string newParentPath) - { - RegisterClientScript(string.Format(Scripts.CopyNode, currNodeId, newParentPath)); - return this; - } - - public ClientTools MoveNode(string currNodeId, string newParentPath) - { - RegisterClientScript(string.Format(Scripts.MoveNode, currNodeId, newParentPath)); - return this; - } - - /// - /// Reloads only the last node that the user interacted with via the context menu. To reload a specify node, use SyncTree. - /// - /// - /// - /// - /// If for whatever reason the client side system cannot just refresh the one node, the system will use jsTree's built in - /// refresh tool, this however won't allow for reselect or reloadChildren. Most trees will work with the single node - /// refresh but 3rd party tools may have poorly built tree data models. - /// - public ClientTools ReloadActionNode(bool reselect, bool reloadChildren) - { - RegisterClientScript(string.Format(Scripts.ReloadActionNode, (!reselect).ToString().ToLower(), (!reloadChildren).ToString().ToLower())); - return this; - } - - /// - /// Closes the Umbraco dialog window if it is open - /// - /// specify a value to return to add to the onCloseCallback method if one was specified in the OpenModalWindow method - /// - public ClientTools CloseModalWindow(string returnVal) - { - RegisterClientScript(Scripts.CloseModalWindow(returnVal)); - return this; - } - /// - /// Closes the umbraco dialog window if it is open - /// - /// - public ClientTools CloseModalWindow() - { - return CloseModalWindow(""); - } - - - /// - /// Opens a modal window - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - public ClientTools OpenModalWindow(string url, string name, bool showHeader, int width, int height, int top, int leftOffset, string closeTriggers, string onCloseCallback) - { - RegisterClientScript(Scripts.OpenModalWindow(url, name, showHeader, width, height, top, leftOffset, closeTriggers, onCloseCallback)); - return this; - } - - /// - /// This will use the ScriptManager to register the script if one is available, otherwise will default to the ClientScript - /// class of the page. - /// - /// - private void RegisterClientScript(string script) - { - //use the hash code of the script to generate the key, this way, the exact same script won't be - //inserted more than once. - if (ScriptManager.GetCurrent(_page) != null) - { - ScriptManager.RegisterStartupScript(_page, _page.GetType(), script.GetHashCode().ToString(), script, true); - } - else - { - _page.ClientScript.RegisterStartupScript(_page.GetType(), script.GetHashCode().ToString(), script, true); - } - } - - - - - } -} diff --git a/src/Umbraco.Web/UI/Pages/UmbracoEnsuredPage.cs b/src/Umbraco.Web/UI/Pages/UmbracoEnsuredPage.cs deleted file mode 100644 index cafdfb0e04..0000000000 --- a/src/Umbraco.Web/UI/Pages/UmbracoEnsuredPage.cs +++ /dev/null @@ -1,151 +0,0 @@ -using System; -using System.Globalization; -using System.Linq; -using System.Security; -using System.Web; -using Umbraco.Core.IO; -using Umbraco.Core.Logging; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Core.Exceptions; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Security; -using Umbraco.Web.Actions; -using Umbraco.Web.Composing; -using Umbraco.Web.Security; - - -namespace Umbraco.Web.UI.Pages -{ - /// - /// UmbracoEnsuredPage is the standard protected page in the umbraco backend, and forces authentication. - /// - public class UmbracoEnsuredPage : BasePage - { - public UmbracoEnsuredPage() - { - //Assign security automatically if the attribute is found - var treeAuth = this.GetType().GetCustomAttribute(true); - if (treeAuth != null) - { - var treeByAlias = Current.TreeService - .GetByAlias(treeAuth.TreeAlias); - if (treeByAlias != null) - { - CurrentApp = treeByAlias.ApplicationAlias; - } - } - } - - /// - /// Performs an authorization check for the user against the requested entity/path and permission set, this is only relevant to content and media - /// - /// - /// - /// - protected void CheckPathAndPermissions(int entityId, UmbracoObjectTypes objectType, IAction actionToCheck) - { - if (objectType != UmbracoObjectTypes.Document && objectType != UmbracoObjectTypes.Media) - return; - - //check path access - - var entity = entityId == Constants.System.Root - ? EntitySlim.Root - : Services.EntityService.Get(entityId, objectType); - var hasAccess = objectType == UmbracoObjectTypes.Document - ? Security.CurrentUser.HasContentPathAccess(entity, Services.EntityService) - : Security.CurrentUser.HasMediaPathAccess(entity, Services.EntityService); - if (hasAccess == false) - throw new AuthorizationException($"The current user doesn't have access to the path '{entity.Path}'"); - - //only documents have action permissions - if (objectType == UmbracoObjectTypes.Document) - { - var allActions = Current.Actions; - var perms = Security.CurrentUser.GetPermissions(entity.Path, Services.UserService); - var actions = perms - .Select(x => allActions.FirstOrDefault(y => y.Letter.ToString(CultureInfo.InvariantCulture) == x)) - .WhereNotNull(); - if (actions.Contains(actionToCheck) == false) - throw new AuthorizationException($"The current user doesn't have permission to {actionToCheck.Alias} on the path '{entity.Path}'"); - } - } - - private bool _hasValidated = false; - - /// - /// Authorizes the user - /// - /// - /// - /// Checks if the page exists outside of the /umbraco route, in which case the request will not have been authenticated for the back office - /// so we'll force authentication. - /// - protected override void OnPreInit(EventArgs e) - { - base.OnPreInit(e); - - //If this is not a back office request, then the module won't have authenticated it, in this case we - // need to do the auth manually and since this is an UmbracoEnsuredPage, this is the anticipated behavior - // TODO: When we implement Identity, this process might not work anymore, will be an interesting challenge - if (Context.Request.Url.IsBackOfficeRequest(HttpRuntime.AppDomainAppVirtualPath, Current.Configs.Global()) == false) - { - var http = new HttpContextWrapper(Context); - var ticket = http.GetUmbracoAuthTicket(); - http.AuthenticateCurrentRequest(ticket, true); - } - - try - { - Security.ValidateCurrentUser(true); - _hasValidated = true; - - if (!Security.ValidateUserApp(CurrentApp)) - { - var ex = new SecurityException(String.Format("The current user doesn't have access to the section/app '{0}'", CurrentApp)); - Current.Logger.Error(ex, "Tried to access '{CurrentApp}'", CurrentApp); - throw ex; - } - - } - catch - { - // Clear content as .NET transfers rendered content. - Response.Clear(); - - // Ensure the person is definitely logged out - UmbracoContext.Current.Security.ClearCurrentLogin(); - - // Redirect to the login page - Response.Redirect(SystemDirectories.Umbraco + "#/login", true); - } - } - - /// - /// Gets/sets the app that this page is assigned to - /// - protected string CurrentApp { get; set; } - - /// - /// If true then umbraco will force any window/frame to reload umbraco in the main window - /// - protected bool RedirectToUmbraco { get; set; } - - /// - /// Used to assign a webforms page's security to a specific tree which will in turn check to see - /// if the current user has access to the specified tree's registered section - /// - [AttributeUsage(AttributeTargets.Class)] - public sealed class WebformsPageTreeAuthorizeAttribute : Attribute - { - public string TreeAlias { get; private set; } - - public WebformsPageTreeAuthorizeAttribute(string treeAlias) - { - TreeAlias = treeAlias; - } - } - } -} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index ca5d242d5f..3843c3d1d3 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -247,6 +247,7 @@ + @@ -894,9 +895,6 @@ - - ASPXCodeBehind - True @@ -1049,9 +1047,6 @@ - - ASPXCodeBehind - @@ -1149,35 +1144,13 @@ - - - ASPXCodeBehind - - - - ASPXCodeBehind - - - - ASPXCodeBehind - - - - ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - @@ -1213,9 +1186,6 @@ Code - - Code - Code @@ -1224,10 +1194,6 @@ True Settings.settings - - Code - - FeedProxy.aspx ASPXCodeBehind @@ -1235,11 +1201,6 @@ FeedProxy.aspx - - - - - diff --git a/src/Umbraco.Web/umbraco.presentation/AttributeCollectionAdapter.cs b/src/Umbraco.Web/umbraco.presentation/AttributeCollectionAdapter.cs deleted file mode 100644 index 6b8ce5f1a7..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/AttributeCollectionAdapter.cs +++ /dev/null @@ -1,312 +0,0 @@ -using System; -using System.Collections; -using System.Web.UI; - -namespace umbraco -{ - /// - /// Class that adapts an to the interface. - /// - public class AttributeCollectionAdapter : IDictionary - { - private readonly AttributeCollection _collection; - - /// - /// Initializes a new instance of the class. - /// - /// The collection. - public AttributeCollectionAdapter(AttributeCollection collection) - { - _collection = collection; - } - - #region IDictionary Members - - /// - /// Adds an element with the provided key and value to the object. - /// - /// The to use as the key of the element to add. - /// The to use as the value of the element to add. - public void Add(object key, object value) - { - _collection.Add(key.ToString(), value.ToString()); - } - - /// - /// Removes all elements from the object. - /// - /// - /// The object is read-only. - /// - public void Clear() - { - _collection.Clear(); - } - - /// - /// Determines whether the object contains an element with the specified key. - /// - /// The key to locate in the object. - /// - /// true if the contains an element with the key; otherwise, false. - /// - public bool Contains(object key) - { - return _collection[key.ToString()] != null; - } - - /// - /// Returns an object for the object. - /// - /// - /// An object for the object. - /// - public IDictionaryEnumerator GetEnumerator() - { - return new AttributeCollectionAdapterEnumerator(this); - } - - /// - /// Gets a value indicating whether the object has a fixed size. - /// - /// - /// true if the object has a fixed size; otherwise, false. - /// - public bool IsFixedSize - { - get { return false; } - } - - /// - /// Gets a value indicating whether the object is read-only. - /// - /// - /// true if the object is read-only; otherwise, false. - /// - public bool IsReadOnly - { - get { return false; } - } - - /// - /// Gets an object containing the keys of the object. - /// - /// - /// - /// An object containing the keys of the object. - /// - public ICollection Keys - { - get { return _collection.Keys; } - } - - /// - /// Removes the element with the specified key from the object. - /// - /// The key of the element to remove. - public void Remove(object key) - { - _collection.Remove(key.ToString()); - } - - /// - /// Gets an object containing the values in the object. - /// - /// - /// - /// An object containing the values in the object. - /// - public ICollection Values - { - get { throw new NotImplementedException(); } - } - - /// - /// Gets or sets the with the specified key. - /// - /// - public object this[object key] - { - get { return _collection[key.ToString()]; } - set { _collection[key.ToString()] = value.ToString(); } - } - - #endregion - - #region ICollection Members - - /// Not implemented. - /// The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - /// The zero-based index in at which copying begins. - public void CopyTo(Array array, int index) - { - throw new NotImplementedException(); - } - - /// - /// Gets the number of elements contained in the . - /// - /// - /// - /// The number of elements contained in the . - /// - public int Count - { - get { return _collection.Count; } - } - - /// - /// Gets a value indicating whether access to the is synchronized (thread safe). - /// - /// - /// true if access to the is synchronized (thread safe); otherwise, false. - /// - public bool IsSynchronized - { - get { return false; } - } - - /// - /// Gets an object that can be used to synchronize access to the . - /// - /// - /// - /// An object that can be used to synchronize access to the . - /// - public object SyncRoot - { - get { return _collection; } - } - - #endregion - - #region IEnumerable Members - - /// - /// Returns an enumerator that iterates through a collection. - /// - /// - /// An object that can be used to iterate through the collection. - /// - IEnumerator IEnumerable.GetEnumerator() - { - foreach (object key in _collection.Keys) - yield return _collection[(string)key]; - } - - #endregion - - - /// - /// for the class. - /// - private class AttributeCollectionAdapterEnumerator : IDictionaryEnumerator - { - private readonly AttributeCollectionAdapter _adapter; - private readonly IEnumerator _enumerator; - - /// - /// Initializes a new instance of the class. - /// - /// The adapter. - public AttributeCollectionAdapterEnumerator(AttributeCollectionAdapter adapter) - { - _adapter = adapter; - _enumerator = ((IEnumerable)adapter).GetEnumerator(); - } - - #region IDictionaryEnumerator Members - - /// - /// Gets both the key and the value of the current dictionary entry. - /// - /// - /// - /// A containing both the key and the value of the current dictionary entry. - /// - /// - /// The is positioned before the first entry of the dictionary or after the last entry. - /// - public DictionaryEntry Entry - { - get { return new DictionaryEntry(Key, Value); } - } - - /// - /// Gets the key of the current dictionary entry. - /// - /// - /// - /// The key of the current element of the enumeration. - /// - /// - /// The is positioned before the first entry of the dictionary or after the last entry. - /// - public object Key - { - get { return _enumerator.Current; } - } - - /// - /// Gets the value of the current dictionary entry. - /// - /// - /// - /// The value of the current element of the enumeration. - /// - /// - /// The is positioned before the first entry of the dictionary or after the last entry. - /// - public object Value - { - get { return _adapter[_enumerator.Current]; } - } - - #endregion - - #region IEnumerator Members - - /// - /// Gets the current element in the collection. - /// - /// - /// - /// The current element in the collection. - /// - /// - /// The enumerator is positioned before the first element of the collection or after the last element. - /// - public object Current - { - get { return _enumerator.Current; } - } - - /// - /// Advances the enumerator to the next element of the collection. - /// - /// - /// true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. - /// - /// - /// The collection was modified after the enumerator was created. - /// - public bool MoveNext() - { - return _enumerator.MoveNext(); - } - - /// - /// Sets the enumerator to its initial position, which is before the first element in the collection. - /// - /// - /// The collection was modified after the enumerator was created. - /// - public void Reset() - { - _enumerator.Reset(); - } - - #endregion - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/MacroCacheContent.cs b/src/Umbraco.Web/umbraco.presentation/MacroCacheContent.cs index 287f75c769..38fa4deca8 100644 --- a/src/Umbraco.Web/umbraco.presentation/MacroCacheContent.cs +++ b/src/Umbraco.Web/umbraco.presentation/MacroCacheContent.cs @@ -1,4 +1,5 @@ -using System.Web.UI; +using System; +using System.Web.UI; namespace umbraco { @@ -7,6 +8,7 @@ namespace umbraco private readonly Control _control; private readonly string _id; + [Obsolete("TODO: WB This seems legacy as we reference WebForms Control type", false)] public MacroCacheContent(Control control, string ID) { _control = control; diff --git a/src/Umbraco.Web/umbraco.presentation/default.aspx.cs b/src/Umbraco.Web/umbraco.presentation/default.aspx.cs deleted file mode 100644 index 56d596e24d..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/default.aspx.cs +++ /dev/null @@ -1,183 +0,0 @@ -using System; -using System.Web; -using System.Web.Mvc; -using System.Web.Routing; -using System.Web.UI; -using System.IO; -using Umbraco.Core; -using Umbraco.Core.Logging; -using Umbraco.Web; -using Umbraco.Web.Routing; -using Umbraco.Core.Configuration; -using Umbraco.Core.IO; -using Umbraco.Web.Templates; -using Umbraco.Web.Composing; - -namespace umbraco -{ - /// - /// The codebehind class for the main default.aspx page that does the webforms rendering in Umbraco - /// - /// - /// We would move this to the UI project but there is a public API property and some protected properties which people may be using so - /// we cannot move it. - /// - public class UmbracoDefault : Page - { - /// - /// Simply used to clear temp data - /// - private class TempDataController : Controller - { - } - - private page _upage; - private PublishedRequest _frequest; - - /// - /// To turn off request validation set this to false before the PageLoad event. This equivalent to the validateRequest page directive - /// and has nothing to do with "normal" validation controls. Default value is true. - /// - public bool ValidateRequest { get; set; } = true; - - protected override void OnPreInit(EventArgs e) - { - base.OnPreInit(e); - using (Current.ProfilingLogger.DebugDuration("PreInit")) - { - // handle the infamous umbDebugShowTrace, etc - Page.Trace.IsEnabled &= GlobalSettings.DebugMode && string.IsNullOrWhiteSpace(Request["umbDebugShowTrace"]) == false; - - // get the document request and the page - _frequest = UmbracoContext.Current.PublishedRequest; - _upage = _frequest.UmbracoPage; - - var args = new RequestInitEventArgs() - { - Page = _upage, - PageId = _upage.PageID, - Context = Context - }; - FireBeforeRequestInit(args); - - //if we are cancelling then return and don't proceed - if (args.Cancel) return; - - // reset the friendly path so it's used by forms, etc. - Context.RewritePath(UmbracoContext.Current.OriginalRequestUrl.PathAndQuery); - - //fire the init finished event - FireAfterRequestInit(args); - } - } - - protected override void OnInit(EventArgs e) - { - using (Current.ProfilingLogger.DebugDuration("Init")) - { - base.OnInit(e); - - //This is a special case for webforms since in some cases we may be POSTing to an MVC controller, adding TempData there and then redirecting - // to a webforms handler. In that case we need to manually clear out the tempdata ourselves since this is normally the function of the base - // MVC controller instance and since that is not executing, we'll deal with that here. - //Unfortunately for us though, we can never know which TempDataProvider was used for the previous controller, by default it is the sessionstateprovider - // but since the tempdataprovider is not a global mvc thing, it is only a per-controller thing, we can only just assume it will be the sessionstateprovider - var provider = new SessionStateTempDataProvider(); - //We create a custom controller context, the only thing that is referenced from this controller context in the sessionstateprovider is the HttpContext.Session - // so we just need to ensure that is set - var ctx = new ControllerContext(new HttpContextWrapper(Context), new RouteData(), new TempDataController()); - provider.LoadTempData(ctx); - } - } - - protected override void OnLoad(EventArgs e) - { - using (Current.ProfilingLogger.DebugDuration("Load")) - { - base.OnLoad(e); - - if (ValidateRequest) - Request.ValidateInput(); - } - } - - protected override void Render(HtmlTextWriter writer) - { - using (Current.ProfilingLogger.DebugDuration("Render")) - { - - // do the original rendering - TextWriter sw = new StringWriter(); - base.Render(new HtmlTextWriter(sw)); - string text = sw.ToString(); - - // filter / parse internal links - although this should be done elsewhere! - text = TemplateUtilities.ParseInternalLinks(text, UmbracoContext.Current.UrlProvider); - - // filter / add preview banner - if (UmbracoContext.Current.InPreviewMode) - { - Current.Logger.Debug("Umbraco is running in preview mode."); - - if (Response.ContentType.InvariantEquals("text/html")) // ASP.NET default value - { - int pos = text.ToLower().IndexOf(""); - if (pos > -1) - { - string htmlBadge = - string.Format(Current.Configs.Settings().Content.PreviewBadge, - IOHelper.ResolveUrl(SystemDirectories.Umbraco), - Server.UrlEncode(UmbracoContext.Current.HttpContext.Request.Path)); - - text = text.Substring(0, pos) + htmlBadge + text.Substring(pos, text.Length - pos); - } - } - } - - // render - writer.Write(text); - } - } - - /// - /// The preinit event handler - /// - public delegate void RequestInitEventHandler(object sender, RequestInitEventArgs e); - /// - /// occurs before the umbraco page is initialized for rendering. - /// - public static event RequestInitEventHandler BeforeRequestInit; - /// - /// Raises the event. - /// - /// The instance containing the event data. - protected internal virtual void FireBeforeRequestInit(RequestInitEventArgs e) - { - if (BeforeRequestInit != null) - BeforeRequestInit(this, e); - } - - /// - /// Occurs when [after save]. - /// - public static event RequestInitEventHandler AfterRequestInit; - /// - /// Raises the event. - /// - /// The instance containing the event data. - protected virtual void FireAfterRequestInit(RequestInitEventArgs e) - { - if (AfterRequestInit != null) - AfterRequestInit(this, e); - - } - } - - public class RequestInitEventArgs : System.ComponentModel.CancelEventArgs - { - public page Page { get; internal set; } - public HttpContext Context { get; internal set; } - public string Url { get; internal set; } - public int PageId { get; internal set; } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/item.cs b/src/Umbraco.Web/umbraco.presentation/item.cs deleted file mode 100644 index 74cfb9bf25..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/item.cs +++ /dev/null @@ -1,237 +0,0 @@ -using System; -using System.Collections; -using System.Web; -using System.Xml; -using StackExchange.Profiling; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Web; -using Umbraco.Core.Profiling; -using Umbraco.Core.Strings; -using Umbraco.Web.Composing; -using Umbraco.Web.Macros; - -namespace umbraco -{ - /// - /// - /// - public class item - { - private string _fieldContent = ""; - private readonly string _fieldName; - - public string FieldContent - { - get { return _fieldContent; } - } - - public item(string itemValue, IDictionary attributes) - { - _fieldContent = itemValue; - ParseItem(attributes); - } - - /// - /// Creates a new Legacy item - /// - /// - /// - public item(IDictionary elements, IDictionary attributes) - : this(null, elements, attributes) - { - } - - /// - /// Creates an Item with a publishedContent item in order to properly recurse and return the value. - /// - /// - /// - /// - /// - /// THIS ENTIRE CLASS WILL BECOME LEGACY, THE FIELD RENDERING NEEDS TO BE REPLACES SO THAT IS WHY THIS - /// CTOR IS INTERNAL. - /// - internal item(IPublishedContent publishedContent, IDictionary elements, IDictionary attributes) - { - _fieldName = FindAttribute(attributes, "field"); - - if (_fieldName.StartsWith("#")) - { - var umbHelper = new UmbracoHelper(Current.UmbracoContext, Current.Services); - - _fieldContent = umbHelper.GetDictionaryValue(_fieldName.Substring(1, _fieldName.Length - 1)); - } - else - { - // Loop through XML children we need to find the fields recursive - var recursive = FindAttribute(attributes, "recursive") == "true"; - - if (publishedContent == null) - { - if (recursive) - { - var recursiveVal = GetRecursiveValueLegacy(elements); - _fieldContent = recursiveVal.IsNullOrWhiteSpace() ? _fieldContent : recursiveVal; - } - - } - - //check for published content and get its value using that - if (publishedContent != null && (publishedContent.HasProperty(_fieldName) || recursive)) - { - var pval = publishedContent.Value(_fieldName, fallback: Fallback.ToAncestors); - var rval = pval == null ? string.Empty : pval.ToString(); - _fieldContent = rval.IsNullOrWhiteSpace() ? _fieldContent : rval; - } - else - { - //get the vaue the legacy way (this will not parse locallinks, etc... since that is handled with ipublishedcontent) - var elt = elements[_fieldName]; - if (elt != null && string.IsNullOrEmpty(elt.ToString()) == false) - _fieldContent = elt.ToString().Trim(); - } - - //now we check if the value is still empty and if so we'll check useIfEmpty - if (string.IsNullOrEmpty(_fieldContent)) - { - var altFieldName = FindAttribute(attributes, "useIfEmpty"); - if (string.IsNullOrEmpty(altFieldName) == false) - { - if (publishedContent != null && (publishedContent.HasProperty(altFieldName) || recursive)) - { - var pval = publishedContent.Value(altFieldName, fallback: Fallback.ToAncestors); - var rval = pval == null ? string.Empty : pval.ToString(); - _fieldContent = rval.IsNullOrWhiteSpace() ? _fieldContent : rval; - } - else - { - //get the vaue the legacy way (this will not parse locallinks, etc... since that is handled with ipublishedcontent) - var elt = elements[altFieldName]; - if (elt != null && string.IsNullOrEmpty(elt.ToString()) == false) - _fieldContent = elt.ToString().Trim(); - } - } - } - - } - - ParseItem(attributes); - } - - static string FindAttribute(IDictionary attributes, string key) - { - key = key.ToLowerInvariant(); - var attributeValue = attributes.Contains(key) ? attributes[key].ToString() : string.Empty; - return MacroRenderer.ParseAttribute(null, attributeValue); - } - - /// - /// Returns the recursive value using a legacy strategy of looking at the xml cache and the splitPath in the elements collection - /// - /// - /// - private string GetRecursiveValueLegacy(IDictionary elements) - { - using (Current.ProfilingLogger.DebugDuration("Checking recusively")) - { - var content = ""; - - var umbracoContext = UmbracoContext.Current; - var cache = umbracoContext.ContentCache as Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedContentCache; - if (cache == null) - throw new InvalidOperationException("Unsupported IPublishedContentCache, only the Xml one is supported."); - var umbracoXml = cache.GetXml(umbracoContext.InPreviewMode); - - var splitpath = (string[])elements["splitpath"]; - for (int i = 0; i < splitpath.Length - 1; i++) - { - XmlNode element = umbracoXml.GetElementById(splitpath[splitpath.Length - i - 1]); - - if (element == null) - continue; - - var xpath = "./{0}"; - var currentNode = element.SelectSingleNode(string.Format(xpath, _fieldName)); - - //continue if all is null - if (currentNode == null || currentNode.FirstChild == null || string.IsNullOrEmpty(currentNode.FirstChild.Value) || string.IsNullOrEmpty(currentNode.FirstChild.Value.Trim())) - continue; - - HttpContext.Current.Trace.Write("item.recursive", "Item loaded from " + splitpath[splitpath.Length - i - 1]); - content = currentNode.FirstChild.Value; - break; - } - - return content; - } - } - - private void ParseItem(IDictionary attributes) - { - using (Current.ProfilingLogger.DebugDuration("Start parsing " + _fieldName)) - { - HttpContext.Current.Trace.Write("item", "Start parsing '" + _fieldName + "'"); - if (FindAttribute(attributes, "textIfEmpty") != "" && _fieldContent == "") - _fieldContent = FindAttribute(attributes, "textIfEmpty"); - - _fieldContent = _fieldContent.Trim(); - - // DATE FORMATTING FUNCTIONS - if (FindAttribute(attributes, "formatAsDateWithTime") == "true") - { - if (_fieldContent == "") - _fieldContent = DateTime.Now.ToString(); - _fieldContent = Convert.ToDateTime(_fieldContent).ToLongDateString() + - FindAttribute(attributes, "formatAsDateWithTimeSeparator") + - Convert.ToDateTime(_fieldContent).ToShortTimeString(); - } - else if (FindAttribute(attributes, "formatAsDate") == "true") - { - if (_fieldContent == "") - _fieldContent = DateTime.Now.ToString(); - _fieldContent = Convert.ToDateTime(_fieldContent).ToLongDateString(); - } - - - // TODO: Needs revision to check if parameter-tags has attributes - if (FindAttribute(attributes, "stripParagraph") == "true" && _fieldContent.Length > 5) - { - _fieldContent = _fieldContent.Trim(); - string fieldContentLower = _fieldContent.ToLower(); - - // the field starts with an opening p tag - if (fieldContentLower.Substring(0, 3) == "

" - // it ends with a closing p tag - && fieldContentLower.Substring(_fieldContent.Length - 4, 4) == "

" - // it doesn't contain multiple p-tags - && fieldContentLower.IndexOf("

", 1) < 0) - { - _fieldContent = _fieldContent.Substring(3, _fieldContent.Length - 7); - } - } - - // CASING - if (FindAttribute(attributes, "case") == "lower") - _fieldContent = _fieldContent.ToLower(); - else if (FindAttribute(attributes, "case") == "upper") - _fieldContent = _fieldContent.ToUpper(); - else if (FindAttribute(attributes, "case") == "title") - _fieldContent = _fieldContent.ToCleanString(CleanStringType.Ascii | CleanStringType.Alias | CleanStringType.PascalCase); - - // OTHER FORMATTING FUNCTIONS - - if (FindAttribute(attributes, "urlEncode") == "true") - _fieldContent = HttpUtility.UrlEncode(_fieldContent); - if (FindAttribute(attributes, "htmlEncode") == "true") - _fieldContent = HttpUtility.HtmlEncode(_fieldContent); - if (FindAttribute(attributes, "convertLineBreaks") == "true") - _fieldContent = _fieldContent.Replace("\n", "
\n"); - - HttpContext.Current.Trace.Write("item", "Done parsing '" + _fieldName + "'"); - } - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/page.cs b/src/Umbraco.Web/umbraco.presentation/page.cs index 0c9b0c6ff3..e4c2fad24a 100644 --- a/src/Umbraco.Web/umbraco.presentation/page.cs +++ b/src/Umbraco.Web/umbraco.presentation/page.cs @@ -17,6 +17,7 @@ namespace umbraco ///

/// Summary description for page. /// + [Obsolete("TODO: WB This seems legacy", false)] public class page { diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create.aspx.cs deleted file mode 100644 index d1e5f05e1c..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create.aspx.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Web.UI.WebControls; - -using System.Xml; -using Umbraco.Core.IO; -using Umbraco.Web.UI.Pages; - -namespace umbraco.cms.presentation -{ - public class Create : UmbracoEnsuredPage - { - protected Label helpText; - protected TextBox rename; - protected Label Label1; - protected ListBox nodeType; - protected PlaceHolder UI; - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - - // Load create definitions - var nodeType = Request.QueryString["nodeType"]; - - var createDef = new XmlDocument(); - var defReader = new XmlTextReader(IOHelper.MapPath(SystemFiles.CreateUiXml)); - createDef.Load(defReader); - defReader.Close(); - - // Find definition for current nodeType - var def = createDef.SelectSingleNode("//nodeType [@alias = '" + nodeType + "']"); - if (def == null) - { - throw new ArgumentException("The create dialog for \"" + nodeType + "\" does not match anything defined in the \"" + SystemFiles.CreateUiXml + "\". This could mean an incorrectly installed package or a corrupt UI file"); - } - - try - { - var virtualPath = SystemDirectories.Umbraco + def.SelectSingleNode("./usercontrol").FirstChild.Value; - var mainControl = LoadControl(virtualPath); - UI.Controls.Add(mainControl); - } - catch (Exception ex) - { - throw new ArgumentException("ERROR CREATING CONTROL FOR NODETYPE: " + nodeType, ex); - } - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/macroTasks.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/macroTasks.cs deleted file mode 100644 index 16811aaa2f..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/macroTasks.cs +++ /dev/null @@ -1,36 +0,0 @@ -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Web.Composing; -using Umbraco.Web._Legacy.UI; - -namespace Umbraco.Web -{ - public class macroTasks : LegacyDialogTask - { - public override bool PerformSave() - { - var macro = Current.Services.MacroService.GetByAlias(Alias); - if (macro == null) - { - macro = new Macro(Alias, Alias, string.Empty, MacroTypes.Unknown); - Current.Services.MacroService.Save(macro); - } - _returnUrl = $"developer/Macros/editMacro.aspx?macroID={macro.Id}"; - return true; - } - - public override bool PerformDelete() - { - var macro = Current.Services.MacroService.GetById(ParentID); - if (macro != null) - Current.Services.MacroService.Delete(macro); - return true; - } - - private string _returnUrl = ""; - - public override string ReturnUrl => _returnUrl; - - public override string AssignedApp => Constants.Applications.Settings; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/simple.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/simple.ascx.cs deleted file mode 100644 index 94264fa8b6..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/simple.ascx.cs +++ /dev/null @@ -1,100 +0,0 @@ -using Umbraco.Core.Services; -using System; -using System.Linq; -using System.Web; -using System.Web.UI.WebControls; -using ClientDependency.Core; -using Umbraco.Core; -using Umbraco.Web; -using Umbraco.Web.UI; -using Umbraco.Web._Legacy.UI; -using UmbracoUserControl = Umbraco.Web.UI.Controls.UmbracoUserControl; - -namespace umbraco.cms.presentation.create.controls -{ - /// - /// Summary description for simple. - /// - public partial class simple : UmbracoUserControl - { - - protected void Page_Load(object sender, EventArgs e) - { - sbmt.Text = Services.TextService.Localize("create"); - rename.Attributes["placeholder"] = Services.TextService.Localize("name"); - - // Put user code to initialize the page here - } - - protected void sbmt_Click(object sender, EventArgs e) - { - if (Page.IsValid) - { - int nodeId; - if (int.TryParse(Request.QueryString["nodeId"], out nodeId) == false) - nodeId = -1; - - try - { - - var returnUrl = LegacyDialogHandler.Create( - new HttpContextWrapper(Context), - Security.CurrentUser, - Request.GetItemAsString("nodeType"), - nodeId, - rename.Text.Trim(), - Request.QueryString.AsEnumerable().ToDictionary(x => x.Key, x => (object)x.Value)); - - ClientTools - .ChangeContentFrameUrl(returnUrl) - .ReloadActionNode(false, true) - .CloseModalWindow(); - } - catch (Exception ex) - { - CustomValidation.ErrorMessage = "* " + ex.Message; - CustomValidation.IsValid = false; - } - } - - } - - protected CustomValidator CustomValidation; - - /// - /// RequiredFieldValidator1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1; - - /// - /// rename control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox rename; - - /// - /// Textbox1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox Textbox1; - - /// - /// sbmt control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button sbmt; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbracoPageHolder.cs b/src/Umbraco.Web/umbraco.presentation/umbracoPageHolder.cs deleted file mode 100644 index 8f7423b1b5..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbracoPageHolder.cs +++ /dev/null @@ -1,114 +0,0 @@ -using System; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.ComponentModel; -using System.Text; -using System.Collections; - -namespace umbraco.layoutControls -{ - /// - /// Summary description for umbracoPageHolder. - /// - [DefaultProperty("Text"), - ToolboxData("<{0}:umbracoPageHolder runat=server>")] - public class umbracoPageHolder : System.Web.UI.WebControls.PlaceHolder - { - #region private properties - - private String _pageName; - private String _writerName; - private DateTime _createDate; - private DateTime _updateDate; - private int _pageID; - private int _pageVersion; - private int _templateID; - private Hashtable _elements = new Hashtable(); - private StringBuilder _pageContent = new StringBuilder(); - - #endregion - - [Bindable(true), Category("umbraco"), DefaultValue("")] - public string PageName - { - get {return _pageName;} - set {_pageName = value;} - } - - [Bindable(true), Category("umbraco"), DefaultValue("")] - public string WriterName - { - get {return _writerName;} - set {_writerName = value;} - } - [Bindable(true), Category("umbraco"), DefaultValue("")] - public DateTime CreateDate - { - get {return _createDate;} - set {_createDate = value;} - } - [Bindable(true), Category("umbraco"), DefaultValue("")] - public DateTime updateDate - { - get {return _updateDate;} - set {_updateDate = value;} - } - [Bindable(true), Category("umbraco"), DefaultValue("")] - public int pageID - { - get {return _pageID;} - set {_pageID = value;} - } - [Bindable(true), Category("umbraco"), DefaultValue("")] - public int pageVersion - { - get {return _pageVersion;} - set {_pageVersion = value;} - } - [Bindable(true), Category("umbraco"), DefaultValue("")] - public int templateID - { - get {return _templateID;} - set {_templateID = value;} - } - [Bindable(true), Category("umbraco"), DefaultValue("")] - public Hashtable Elements - { - get {return _elements;} - set {_elements = value;} - } - [Bindable(true), Category("umbraco"), DefaultValue("")] - public StringBuilder PageContent - { - get {return _pageContent;} - set {_pageContent = value;} - } - - public void Populate(page Page) { - if (Page != null) - { - _pageID = Page.PageID; - _templateID = Page.Template; - - _createDate = Page.CreateDate; - _updateDate = Page.UpdateDate; - - _writerName = Page.WriterName; - _pageName = Page.PageName; - _elements = Page.Elements; - - _pageContent.Append(Page.PageContent); - this.Controls.Add(Page.PageContentControl); - } - } - - /// - /// Render this control to the output parameter specified. - /// - /// The HTML writer to write out to - protected override void Render(HtmlTextWriter output) - { - base.Render(output); - } - } -} From ba098f49c4e9f0b236e712ffad3b3b5ab9093f86 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Thu, 24 Jan 2019 13:59:17 +0000 Subject: [PATCH 252/437] =?UTF-8?q?=E2=98=A0=EF=B8=8F=E2=98=A0=EF=B8=8F=20?= =?UTF-8?q?Bye=20bye=20feedproxy.config=20=E2=98=A0=EF=B8=8F=E2=98=A0?= =?UTF-8?q?=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Umbraco.Core/IO/SystemFiles.cs | 4 +- .../common/resources/dashboard.resource.js | 18 +++-- .../src/common/services/help.service.js | 21 +++--- .../dashboard/dashboard.tabs.controller.js | 18 +++-- .../members/membersdashboardvideos.html | 6 +- src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 5 -- .../Umbraco/dashboard/FeedProxy.aspx | 2 - .../config/feedProxy.Release.config | 12 --- src/Umbraco.Web.UI/config/feedProxy.config | 12 --- .../Editors/DashboardController.cs | 73 ++++++++++++++++++- src/Umbraco.Web/Umbraco.Web.csproj | 8 -- .../umbraco/dashboard/FeedProxy.aspx | 2 - .../umbraco/dashboard/FeedProxy.aspx.cs | 65 ----------------- .../dashboard/FeedProxy.aspx.designer.cs | 15 ---- 14 files changed, 111 insertions(+), 150 deletions(-) delete mode 100644 src/Umbraco.Web.UI/Umbraco/dashboard/FeedProxy.aspx delete mode 100644 src/Umbraco.Web.UI/config/feedProxy.Release.config delete mode 100644 src/Umbraco.Web.UI/config/feedProxy.config delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/FeedProxy.aspx delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/FeedProxy.aspx.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/FeedProxy.aspx.designer.cs diff --git a/src/Umbraco.Core/IO/SystemFiles.cs b/src/Umbraco.Core/IO/SystemFiles.cs index 511c39c98b..7d0b31b578 100644 --- a/src/Umbraco.Core/IO/SystemFiles.cs +++ b/src/Umbraco.Core/IO/SystemFiles.cs @@ -12,9 +12,7 @@ namespace Umbraco.Core.IO public static string TinyMceConfig => SystemDirectories.Config + "/tinyMceConfig.config"; public static string NotFoundhandlersConfig => SystemDirectories.Config + "/404handlers.config"; - - public static string FeedProxyConfig => string.Concat(SystemDirectories.Config, "/feedProxy.config"); - + public static string GetContentCacheXml(IGlobalSettings globalSettings) { switch (globalSettings.LocalTempStorageLocation) diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/dashboard.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/dashboard.resource.js index c48b2dd2a7..1459822c96 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/dashboard.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/dashboard.resource.js @@ -14,7 +14,7 @@ function dashboardResource($q, $http, umbRequestHelper) { * * @description * Retrieves the dashboard configuration for a given section - * + * * @param {string} section Alias of section to retrieve dashboard configuraton for * @returns {Promise} resourcePromise object containing the user array. * @@ -36,7 +36,7 @@ function dashboardResource($q, $http, umbRequestHelper) { * * @description * Retrieves dashboard content from a remote source for a given section - * + * * @param {string} section Alias of section to retrieve dashboard content for * @returns {Promise} resourcePromise object containing the user array. * @@ -70,10 +70,18 @@ function dashboardResource($q, $http, umbRequestHelper) { "dashboardApiBaseUrl", "GetRemoteDashboardCss", values); + }, + + getRemoteXmlData: function (site, url) { + //build request values with optional params + var values = { site: site, url: url }; + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "dashboardApiBaseUrl", + "GetRemoteXml", + values)), "Failed to get remote xml"); } - - - }; } diff --git a/src/Umbraco.Web.UI.Client/src/common/services/help.service.js b/src/Umbraco.Web.UI.Client/src/common/services/help.service.js index ff8d487bb7..cd727ac32b 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/help.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/help.service.js @@ -1,9 +1,9 @@ angular.module('umbraco.services') - .factory('helpService', function ($http, $q, umbRequestHelper) { + .factory('helpService', function ($http, $q, umbRequestHelper, dashboardResource) { var helpTopics = {}; - var defaultUrl = "https://our.umbraco.com/rss/help"; - var tvUrl = "https://umbraco.tv/feeds/help"; + var defaultUrl = "rss/help"; + var tvUrl = "feeds/help"; function getCachedHelp(url){ if(helpTopics[url]){ @@ -17,16 +17,14 @@ angular.module('umbraco.services') helpTopics[url] = data; } - function fetchUrl(url){ + function fetchUrl(site, url){ var deferred = $q.defer(); var found = getCachedHelp(url); if(found){ deferred.resolve(found); }else{ - - var proxyUrl = "dashboard/feedproxy.aspx?url=" + url; - $http.get(proxyUrl).then(function(data){ + dashboardResource.getRemoteXmlData(site, url).then(function (data) { var feed = $(data.data); var topics = []; @@ -41,7 +39,12 @@ angular.module('umbraco.services') setCachedHelp(topics); deferred.resolve(topics); + + }, + function (exception) { + console.error('ex from remote data', exception); }); + } return deferred.promise; @@ -50,12 +53,12 @@ angular.module('umbraco.services') var service = { findHelp: function (args) { var url = service.getUrl(defaultUrl, args); - return fetchUrl(url); + return fetchUrl('OUR', url); }, findVideos: function (args) { var url = service.getUrl(tvUrl, args); - return fetchUrl(url); + return fetchUrl('TV', url); }, getContextHelpForPage: function (section, tree, baseurl) { diff --git a/src/Umbraco.Web.UI.Client/src/views/dashboard/dashboard.tabs.controller.js b/src/Umbraco.Web.UI.Client/src/views/dashboard/dashboard.tabs.controller.js index 877135c105..ed3d6ded33 100644 --- a/src/Umbraco.Web.UI.Client/src/views/dashboard/dashboard.tabs.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/dashboard/dashboard.tabs.controller.js @@ -1,9 +1,9 @@ -function startUpVideosDashboardController($scope, xmlhelper, $log, $http) { +function startUpVideosDashboardController($scope, dashboardResource) { $scope.videos = []; $scope.init = function(url){ - var proxyUrl = "dashboard/feedproxy.aspx?url=" + url; - $http.get(proxyUrl).then(function(data){ - var feed = $(data.data); + + dashboardResource.getRemoteXmlData('COM', url).then(function (data) { + var feed = $(data.data); $('item', feed).each(function (i, item) { var video = {}; video.thumbnail = $(item).find('thumbnail').attr('url'); @@ -11,6 +11,10 @@ function startUpVideosDashboardController($scope, xmlhelper, $log, $http) { video.link = $("guid", item).text(); $scope.videos.push(video); }); + + }, + function (exception) { + console.error('ex from remote data', exception); }); }; } @@ -24,7 +28,7 @@ function startUpDynamicContentController($timeout, $scope, dashboardResource, as vm.loading = true; vm.showDefault = false; - + vm.startTour = startTour; function onInit() { @@ -93,7 +97,7 @@ function startUpDynamicContentController($timeout, $scope, dashboardResource, as }); }); })); - + //proxy remote css through the local server assetsService.loadCss(dashboardResource.getRemoteDashboardCssUrl("content"), $scope); dashboardResource.getRemoteDashboardContent("content").then( @@ -117,7 +121,7 @@ function startUpDynamicContentController($timeout, $scope, dashboardResource, as vm.showDefault = true; }); - + onInit(); } diff --git a/src/Umbraco.Web.UI.Client/src/views/dashboard/members/membersdashboardvideos.html b/src/Umbraco.Web.UI.Client/src/views/dashboard/members/membersdashboardvideos.html index a403e6186a..83f3fb2f7a 100644 --- a/src/Umbraco.Web.UI.Client/src/views/dashboard/members/membersdashboardvideos.html +++ b/src/Umbraco.Web.UI.Client/src/views/dashboard/members/membersdashboardvideos.html @@ -1,5 +1,5 @@ -
@@ -8,7 +8,7 @@

Want to master Umbraco? Spend a couple of minutes learning some best practices by watching one of these videos about using Umbraco. And visit umbraco.tv for even more Umbraco videos

- +

To get you started:

    diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index d51c2f7814..e414b0521d 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -212,9 +212,6 @@ scripting.config - - feedProxy.config - Dashboard.config Designer @@ -236,7 +233,6 @@ - Designer @@ -255,7 +251,6 @@ Designer - diff --git a/src/Umbraco.Web.UI/Umbraco/dashboard/FeedProxy.aspx b/src/Umbraco.Web.UI/Umbraco/dashboard/FeedProxy.aspx deleted file mode 100644 index 22fbd78837..0000000000 --- a/src/Umbraco.Web.UI/Umbraco/dashboard/FeedProxy.aspx +++ /dev/null @@ -1,2 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FeedProxy.aspx.cs" Inherits="dashboardUtilities.FeedProxy" %> -<%@ OutputCache Duration="1800" VaryByParam="url" %> diff --git a/src/Umbraco.Web.UI/config/feedProxy.Release.config b/src/Umbraco.Web.UI/config/feedProxy.Release.config deleted file mode 100644 index 38e7d27acf..0000000000 --- a/src/Umbraco.Web.UI/config/feedProxy.Release.config +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/src/Umbraco.Web.UI/config/feedProxy.config b/src/Umbraco.Web.UI/config/feedProxy.config deleted file mode 100644 index 38e7d27acf..0000000000 --- a/src/Umbraco.Web.UI/config/feedProxy.config +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/src/Umbraco.Web/Editors/DashboardController.cs b/src/Umbraco.Web/Editors/DashboardController.cs index c6e0049865..44fe04ef92 100644 --- a/src/Umbraco.Web/Editors/DashboardController.cs +++ b/src/Umbraco.Web/Editors/DashboardController.cs @@ -79,7 +79,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)); @@ -117,7 +117,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)); @@ -130,6 +130,75 @@ namespace Umbraco.Web.Editors }; } + public async Task GetRemoteXml(string site, string url) + { + // This is used in place of the old feedproxy.config + // Which was used to grab data from our.umbraco.com, umbraco.com or umbraco.tv + // for certain dashboards or the help drawer + var urlPrefix = string.Empty; + switch (site.ToUpper()) + { + case "TV": + urlPrefix = "https://umbraco.tv/"; + break; + + case "OUR": + urlPrefix = "https://our.umbraco.org/"; + break; + + case "COM": + urlPrefix = "https://umbraco.com/"; + break; + + default: + //Throw error + return new HttpResponseMessage(HttpStatusCode.Unauthorized) + { + Content = new StringContent($"The Site {site} and {url} is not on the whitelist"), + }; + } + + + //Make remote call to fetch videos or remote dashboard feed data + var key = $"umbraco-XML-feed-{site}-{url.ToCleanString(Core.Strings.CleanStringType.UrlSegment)}"; + + var content = AppCaches.RuntimeCache.GetCacheItem(key); + var result = string.Empty; + + if (content != null) + { + result = content; + } + else + { + //content is null, go get it + try + { + //fetch remote css + content = await HttpClient.GetStringAsync($"{urlPrefix}{url}"); + + //can't use content directly, modified closure problem + result = content; + + //save server content for 30 mins + AppCaches.RuntimeCache.InsertCacheItem(key, () => result, new TimeSpan(0, 30, 0)); + } + catch (HttpRequestException ex) + { + 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)); + } + } + + return new HttpResponseMessage(HttpStatusCode.OK) + { + Content = new StringContent(result, Encoding.UTF8, "text/xml") + }; + + } + [ValidateAngularAntiForgeryToken] [OutgoingEditorModelEvent] public IEnumerable> GetDashboard(string section) diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 3843c3d1d3..ec19acb00d 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -1194,13 +1194,6 @@ True Settings.settings - - FeedProxy.aspx - ASPXCodeBehind - - - FeedProxy.aspx - @@ -1240,7 +1233,6 @@ - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/FeedProxy.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/FeedProxy.aspx deleted file mode 100644 index 22fbd78837..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/FeedProxy.aspx +++ /dev/null @@ -1,2 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FeedProxy.aspx.cs" Inherits="dashboardUtilities.FeedProxy" %> -<%@ OutputCache Duration="1800" VaryByParam="url" %> diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/FeedProxy.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/FeedProxy.aspx.cs deleted file mode 100644 index 58d219e0c6..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/FeedProxy.aspx.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System.Net.Http; -using Umbraco.Core; -using Umbraco.Core.Logging; -using Umbraco.Web; -using Umbraco.Web.UI.Pages; -using System; -using System.Linq; -using System.Net.Mime; -using Umbraco.Core.IO; -using Umbraco.Core.Xml; -using Umbraco.Web.Composing; - -namespace dashboardUtilities -{ - - - public partial class FeedProxy : UmbracoEnsuredPage - { - private static HttpClient _httpClient; - - protected void Page_Load(object sender, EventArgs e) - { - try - { - if (Request.QueryString.AllKeys.Contains("url") == false || Request.QueryString["url"] == null) - return; - - var url = Request.QueryString["url"]; - if (string.IsNullOrWhiteSpace(url) || url.StartsWith("/")) - return; - - if (Uri.TryCreate(url, UriKind.Absolute, out var requestUri) == false) - return; - - var feedProxyXml = XmlHelper.OpenAsXmlDocument(IOHelper.MapPath(SystemFiles.FeedProxyConfig)); - if (feedProxyXml?.SelectSingleNode($"//allow[@host = '{requestUri.Host}']") != null && (requestUri.Port == 80 || requestUri.Port == 443)) - { - if (_httpClient == null) - _httpClient = new HttpClient(); - - using (var request = new HttpRequestMessage(HttpMethod.Get, requestUri)) - { - var response = _httpClient.SendAsync(request).Result; - var result = response.Content.ReadAsStringAsync().Result; - - if (string.IsNullOrEmpty(result)) - return; - - Response.Clear(); - Response.ContentType = Request.CleanForXss("type") ?? MediaTypeNames.Text.Xml; - Response.Write(result); - } - } - else - { - Current.Logger.Debug("Access to unallowed feedproxy attempted: {RequestUrl}", requestUri); - } - } - catch (Exception ex) - { - Current.Logger.Error(ex, "Exception occurred"); - } - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/FeedProxy.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/FeedProxy.aspx.designer.cs deleted file mode 100644 index 1996437167..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/FeedProxy.aspx.designer.cs +++ /dev/null @@ -1,15 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace dashboardUtilities { - - - public partial class FeedProxy { - } -} From 85da2a94b92a8f527843f30b5191e959cb75bebe Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Thu, 24 Jan 2019 14:09:28 +0000 Subject: [PATCH 253/437] Bye 404Handlers XML config file - add/remove IContentFinders in your own composer/component --- src/Umbraco.Core/IO/SystemFiles.cs | 2 -- src/Umbraco.Tests/Routing/UmbracoModuleTests.cs | 12 ------------ src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 4 ---- src/Umbraco.Web.UI/config/404handlers.Release.config | 7 ------- src/Umbraco.Web.UI/config/404handlers.config | 7 ------- 5 files changed, 32 deletions(-) delete mode 100644 src/Umbraco.Web.UI/config/404handlers.Release.config delete mode 100644 src/Umbraco.Web.UI/config/404handlers.config diff --git a/src/Umbraco.Core/IO/SystemFiles.cs b/src/Umbraco.Core/IO/SystemFiles.cs index 7d0b31b578..449d5bdad6 100644 --- a/src/Umbraco.Core/IO/SystemFiles.cs +++ b/src/Umbraco.Core/IO/SystemFiles.cs @@ -10,8 +10,6 @@ namespace Umbraco.Core.IO public static string CreateUiXml => SystemDirectories.Umbraco + "/config/create/UI.xml"; public static string TinyMceConfig => SystemDirectories.Config + "/tinyMceConfig.config"; - - public static string NotFoundhandlersConfig => SystemDirectories.Config + "/404handlers.config"; public static string GetContentCacheXml(IGlobalSettings globalSettings) { diff --git a/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs b/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs index c87a02f43a..659c7aa2db 100644 --- a/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs +++ b/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs @@ -54,18 +54,6 @@ namespace Umbraco.Tests.Routing //SettingsForTests.ReservedPaths = "~/umbraco,~/install/"; //SettingsForTests.ReservedUrls = "~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx,~/VSEnterpriseHelper.axd"; - Directory.CreateDirectory(Path.GetDirectoryName(IOHelper.MapPath(SystemFiles.NotFoundhandlersConfig, false))); - - //create the not found handlers config - using (var sw = File.CreateText(IOHelper.MapPath(SystemFiles.NotFoundhandlersConfig, false))) - { - sw.Write(@" - - - - -"); - } } public override void TearDown() diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index e414b0521d..045c56764a 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -169,9 +169,6 @@ - - 404handlers.config - ClientDependency.config Designer @@ -308,7 +305,6 @@ Designer - Designer diff --git a/src/Umbraco.Web.UI/config/404handlers.Release.config b/src/Umbraco.Web.UI/config/404handlers.Release.config deleted file mode 100644 index 8da3c8dbf9..0000000000 --- a/src/Umbraco.Web.UI/config/404handlers.Release.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/src/Umbraco.Web.UI/config/404handlers.config b/src/Umbraco.Web.UI/config/404handlers.config deleted file mode 100644 index 3233f00a04..0000000000 --- a/src/Umbraco.Web.UI/config/404handlers.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file From 74bd8fa0db5ad5dd4bafe2495a2596de36b84c14 Mon Sep 17 00:00:00 2001 From: Niels Lyngsoe Date: Thu, 24 Jan 2019 15:11:34 +0100 Subject: [PATCH 254/437] added 2019 brand colors --- .../application/umb-app-header.less | 2 +- .../src/less/sections.less | 4 ++-- .../src/less/variables.less | 20 ++++++++++++++++--- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/components/application/umb-app-header.less b/src/Umbraco.Web.UI.Client/src/less/components/application/umb-app-header.less index a033e8abef..1e3aa332fa 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/application/umb-app-header.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/application/umb-app-header.less @@ -1,5 +1,5 @@ .umb-app-header { - background: @purple; + background: @blueNight; display: flex; align-items: center; justify-content: space-between; diff --git a/src/Umbraco.Web.UI.Client/src/less/sections.less b/src/Umbraco.Web.UI.Client/src/less/sections.less index ac41f69998..a639d06d5a 100644 --- a/src/Umbraco.Web.UI.Client/src/less/sections.less +++ b/src/Umbraco.Web.UI.Client/src/less/sections.less @@ -36,7 +36,7 @@ ul.sections>li>a::after { content: ""; height: 4px; width: 100%; - background-color: @turquoise; + background-color: @ui-active; position: absolute; bottom: -4px; border-radius: 3px 3px 0 0; @@ -93,7 +93,7 @@ ul.sections-tray>li>a::after { content: ""; width: 4px; height: 100%; - background-color: @turquoise; + background-color: @ui-active; position: absolute; border-radius: 0 3px 3px 0; opacity: 0; diff --git a/src/Umbraco.Web.UI.Client/src/less/variables.less b/src/Umbraco.Web.UI.Client/src/less/variables.less index 513c645365..a7360148a9 100644 --- a/src/Umbraco.Web.UI.Client/src/less/variables.less +++ b/src/Umbraco.Web.UI.Client/src/less/variables.less @@ -27,13 +27,27 @@ @blue: #2E8AEA; -@blueDark: #0064CD; +@blueDark: #3544b1;// updated 2019 +@blueExtraDark: #1b264f;// added 2019 @blueLight: #ADD8E6; +@blueNight: #162335;// added 2019 @green: #46A546; @red: #9D261D; -@yellow: #FFC40D; -@orange: #DF7F48; +@yellow: #fad634;// updated 2019 +@orange: #f79c37;// updated 2019 @pink: #C3325F; +@pinkLight: #f5c1bc;// added 2019 +@brown: #9d8057;// added 2019 + +@u-grey: #f2ebe6;// added 2019 +@u-white: #f9f7f4;// added 2019 + + +// Accent colors +// ------------------------- + +@ui-active: @pinkLight; +@ui-selected: @pinkLight; // Colors From 38ec97bbe34f2408a40ef9f70e35d4baf79f739d Mon Sep 17 00:00:00 2001 From: Stephan Date: Thu, 24 Jan 2019 15:22:20 +0100 Subject: [PATCH 255/437] Need to refactor IsPublished --- .../Models/PublishedContent/IPublishedContent.cs | 11 +++++++++-- .../PublishedContent/PublishedContentWrapped.cs | 1 - src/Umbraco.Web/Models/PublishedContentBase.cs | 1 + .../PublishedCache/NuCache/PublishedContent.cs | 5 +++-- .../XmlPublishedCache/XmlPublishedContent.cs | 4 ++-- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs b/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs index e50fb2c396..f613f926e9 100644 --- a/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs +++ b/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs @@ -156,10 +156,17 @@ namespace Umbraco.Core.Models.PublishedContent /// /// Gets a value indicating whether the content is published. /// - /// + /// + /// A content is published when it has a published version. + /// When retrieving documents from cache in non-preview mode, IsPublished is always + /// true, as only published documents are returned. When retrieving in draft mode, IsPublished + /// can either be true (document has a published version) or false (document has no + /// published version). + /// It is therefore possible for both IsDraft and IsPublished to be true at the same + /// time, meaning that the content is the draft version, and a published version exists. + /// bool IsPublished(string culture = null); - #endregion #region Tree diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedContentWrapped.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedContentWrapped.cs index 42ff16bae5..8bf8cec244 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedContentWrapped.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedContentWrapped.cs @@ -114,7 +114,6 @@ namespace Umbraco.Core.Models.PublishedContent /// public virtual bool IsPublished(string culture = null) => _content.IsPublished(culture); - #endregion #region Tree diff --git a/src/Umbraco.Web/Models/PublishedContentBase.cs b/src/Umbraco.Web/Models/PublishedContentBase.cs index 12acb6b0c8..45243b86e6 100644 --- a/src/Umbraco.Web/Models/PublishedContentBase.cs +++ b/src/Umbraco.Web/Models/PublishedContentBase.cs @@ -144,6 +144,7 @@ namespace Umbraco.Web.Models /// public abstract bool IsDraft(string culture = null); + /// public abstract bool IsPublished(string culture = null); #endregion diff --git a/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs b/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs index 69c672ab98..3f57bf3340 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs @@ -293,8 +293,11 @@ namespace Umbraco.Web.PublishedCache.NuCache return _contentData.CultureInfos.TryGetValue(culture, out var cvar) && cvar.IsDraft; } + /// public override bool IsPublished(string culture = null) { + // fixme I don't understand this - and it does probably not do what's expected + if (!ContentType.VariesByCulture()) { return _contentData.Published; @@ -302,9 +305,7 @@ namespace Umbraco.Web.PublishedCache.NuCache // handle context culture if (culture == null) - { culture = VariationContextAccessor?.VariationContext?.Culture ?? ""; - } //If the current culture is not a draft, it must be the published version return _contentData.CultureInfos.TryGetValue(culture, out var cvar) && !cvar.IsDraft; diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs index c3cf22559d..f601114ffd 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs @@ -232,7 +232,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache public override bool IsPublished(string culture = null) { EnsureNodeInitialized(); - return _isPublished; + return _isPublished; // bah } public override IEnumerable Properties @@ -309,7 +309,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache name = writerName = urlName = creatorName = docTypeAlias = path = null; createDate = updateDate = default(DateTime); isDraft = false; - isPublished = false; + isPublished = false; // fixme not implemented? contentType = null; properties = null; From 1f79d9e635f6cf7385390d0a0c93dd0ffd041555 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Thu, 24 Jan 2019 14:29:00 +0000 Subject: [PATCH 256/437] =?UTF-8?q?=F0=9F=94=AA=F0=9F=94=AANext=20on=20the?= =?UTF-8?q?=20chobbing=20block=20is=20config/create/ui.xml=20&=20reference?= =?UTF-8?q?s=20back=20to=20it=20which=20was=20Legacy=20Controller,=20Dialo?= =?UTF-8?q?gTask=20etc=F0=9F=94=AA=F0=9F=94=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Umbraco.Core/IO/SystemFiles.cs | 2 - src/Umbraco.Tests/UI/LegacyDialogTests.cs | 34 --- src/Umbraco.Tests/Umbraco.Tests.csproj | 1 - .../src/common/resources/legacy.resource.js | 29 --- .../common/overlays/ysod/ysod.controller.js | 2 +- .../Editors/BackOfficeServerVariables.cs | 6 +- src/Umbraco.Web/Editors/LegacyController.cs | 59 ----- src/Umbraco.Web/Umbraco.Web.csproj | 5 - src/Umbraco.Web/_Legacy/UI/ITask.cs | 18 -- src/Umbraco.Web/_Legacy/UI/ITaskReturnUrl.cs | 10 - .../_Legacy/UI/LegacyDialogHandler.cs | 228 ------------------ .../_Legacy/UI/LegacyDialogTask.cs | 94 -------- 12 files changed, 2 insertions(+), 486 deletions(-) delete mode 100644 src/Umbraco.Tests/UI/LegacyDialogTests.cs delete mode 100644 src/Umbraco.Web.UI.Client/src/common/resources/legacy.resource.js delete mode 100644 src/Umbraco.Web/Editors/LegacyController.cs delete mode 100644 src/Umbraco.Web/_Legacy/UI/ITask.cs delete mode 100644 src/Umbraco.Web/_Legacy/UI/ITaskReturnUrl.cs delete mode 100644 src/Umbraco.Web/_Legacy/UI/LegacyDialogHandler.cs delete mode 100644 src/Umbraco.Web/_Legacy/UI/LegacyDialogTask.cs diff --git a/src/Umbraco.Core/IO/SystemFiles.cs b/src/Umbraco.Core/IO/SystemFiles.cs index 449d5bdad6..0e5ae8388b 100644 --- a/src/Umbraco.Core/IO/SystemFiles.cs +++ b/src/Umbraco.Core/IO/SystemFiles.cs @@ -7,8 +7,6 @@ namespace Umbraco.Core.IO { public class SystemFiles { - public static string CreateUiXml => SystemDirectories.Umbraco + "/config/create/UI.xml"; - public static string TinyMceConfig => SystemDirectories.Config + "/tinyMceConfig.config"; public static string GetContentCacheXml(IGlobalSettings globalSettings) diff --git a/src/Umbraco.Tests/UI/LegacyDialogTests.cs b/src/Umbraco.Tests/UI/LegacyDialogTests.cs deleted file mode 100644 index 9f1e474bd9..0000000000 --- a/src/Umbraco.Tests/UI/LegacyDialogTests.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using NUnit.Framework; -using umbraco; -using Umbraco.Core; -using Umbraco.Core.Composing; -using Umbraco.Web; -using Umbraco.Web._Legacy.UI; - -namespace Umbraco.Tests.UI -{ - [TestFixture] - public class LegacyDialogTests - { - - [Test] - public void Ensure_All_Tasks_Are_Secured() - { - var allTasks = TypeFinder.FindClassesOfType(); - - foreach (var t in allTasks) - { - Assert.IsTrue(TypeHelper.IsTypeAssignableFrom(t), "The type " + t + " is not of type " + typeof(LegacyDialogTask)); - } - } - - //[TestCase(typeof(macroTasks), Constants.Applications.Settings)] - //public void Check_Assigned_Apps_For_Tasks(Type taskType, string app) - //{ - // var task = (LegacyDialogTask)Activator.CreateInstance(taskType); - // Assert.AreEqual(task.AssignedApp, app); - //} - - } -} diff --git a/src/Umbraco.Tests/Umbraco.Tests.csproj b/src/Umbraco.Tests/Umbraco.Tests.csproj index 11f5527a8c..61d0672d7f 100644 --- a/src/Umbraco.Tests/Umbraco.Tests.csproj +++ b/src/Umbraco.Tests/Umbraco.Tests.csproj @@ -470,7 +470,6 @@ True TestFiles.resx - diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/legacy.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/legacy.resource.js deleted file mode 100644 index b42d80408f..0000000000 --- a/src/Umbraco.Web.UI.Client/src/common/resources/legacy.resource.js +++ /dev/null @@ -1,29 +0,0 @@ -/** - * @ngdoc service - * @name umbraco.resources.legacyResource - * @description Handles legacy dialog requests - **/ -function legacyResource($q, $http, umbRequestHelper) { - - //the factory object returned - return { - /** Loads in the data to display the section list */ - deleteItem: function (args) { - - if (!args.nodeId || !args.nodeType || !args.alias) { - throw "The args parameter is not formatted correct, it requires properties: nodeId, nodeType, alias"; - } - - return umbRequestHelper.resourcePromise( - $http.post( - umbRequestHelper.getApiUrl( - "legacyApiBaseUrl", - "DeleteLegacyItem", - [{ nodeId: args.nodeId }, { nodeType: args.nodeType }, { alias: args.alias }])), - 'Failed to delete item ' + args.nodeId); - - } - }; -} - -angular.module('umbraco.resources').factory('legacyResource', legacyResource); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/common/overlays/ysod/ysod.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/overlays/ysod/ysod.controller.js index f632547bfc..f3c220075d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/overlays/ysod/ysod.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/overlays/ysod/ysod.controller.js @@ -1,5 +1,5 @@ angular.module("umbraco") - .controller("Umbraco.Overlays.YsodController", function ($scope, legacyResource, treeService, navigationService, localizationService) { + .controller("Umbraco.Overlays.YsodController", function ($scope, localizationService) { function onInit() { diff --git a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs index d6a6947eba..14853d97d8 100644 --- a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs +++ b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs @@ -183,11 +183,7 @@ namespace Umbraco.Web.Editors { "currentUserApiBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl( controller => controller.PostChangePassword(null)) - }, - { - "legacyApiBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl( - controller => controller.DeleteLegacyItem(null, null, null)) - }, + }, { "entityApiBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl( controller => controller.GetById(0, UmbracoEntityTypes.Media)) diff --git a/src/Umbraco.Web/Editors/LegacyController.cs b/src/Umbraco.Web/Editors/LegacyController.cs deleted file mode 100644 index e2e22457c1..0000000000 --- a/src/Umbraco.Web/Editors/LegacyController.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.Net; -using System.Net.Http; -using System.Web; -using System.Web.Http; -using Umbraco.Web.Mvc; -using Umbraco.Web.WebApi.Filters; -using Umbraco.Web._Legacy.UI; - -namespace Umbraco.Web.Editors -{ - /// - /// The API controller used for dealing with legacy content - /// - [PluginController("UmbracoApi")] - [ValidationFilter] - public class LegacyController : UmbracoAuthorizedJsonController - { - /// - /// This will perform the delete operation for legacy items which include any item that - /// has functionality included in the ui.xml structure. - /// - /// - [HttpPost] - public HttpResponseMessage DeleteLegacyItem(string nodeId, string alias, string nodeType) - { - //U4-2686 - alias is html encoded, make sure to decode - alias = HttpUtility.HtmlDecode(alias); - - //In order to process this request we MUST have an HttpContext available - var httpContextAttempt = TryGetHttpContext(); - if (httpContextAttempt.Success) - { - //this is a hack check based on legacy - if (nodeType == "memberGroups") - { - LegacyDialogHandler.Delete(httpContextAttempt.Result, Security.CurrentUser, nodeType, 0, alias); - return Request.CreateResponse(HttpStatusCode.OK); - } - - int id; - if (int.TryParse(nodeId, out id)) - { - LegacyDialogHandler.Delete(httpContextAttempt.Result, Security.CurrentUser, nodeType, id, alias); - return Request.CreateResponse(HttpStatusCode.OK); - } - - //the way this legacy stuff used to work is that if the node id didn't parse, we would - //pass the node id as the alias with an id of zero = sure whatevs. - LegacyDialogHandler.Delete(httpContextAttempt.Result, Security.CurrentUser, nodeType, 0, nodeId); - return Request.CreateResponse(HttpStatusCode.OK); - } - - //We must have an HttpContext available for this to work. - return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, new InvalidOperationException("No HttpContext found in the current request")); - } - - } -} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index ec19acb00d..86772c13c4 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -921,7 +921,6 @@ - @@ -1146,10 +1145,6 @@ - - - - diff --git a/src/Umbraco.Web/_Legacy/UI/ITask.cs b/src/Umbraco.Web/_Legacy/UI/ITask.cs deleted file mode 100644 index 62ce4c92c8..0000000000 --- a/src/Umbraco.Web/_Legacy/UI/ITask.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; - -namespace Umbraco.Web._Legacy.UI -{ - /// - /// Summary description for ITask. - /// - [Obsolete("ITask is used for legacy webforms back office editors, change to using the v7 angular approach")] - public interface ITask - { - int ParentID {set; get;} - int TypeID {set; get;} - string Alias {set; get;} - bool Save(); - bool Delete(); - int UserId {set;} - } -} diff --git a/src/Umbraco.Web/_Legacy/UI/ITaskReturnUrl.cs b/src/Umbraco.Web/_Legacy/UI/ITaskReturnUrl.cs deleted file mode 100644 index c42ad9dbdb..0000000000 --- a/src/Umbraco.Web/_Legacy/UI/ITaskReturnUrl.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; - -namespace Umbraco.Web._Legacy.UI -{ - [Obsolete("ITask is used for legacy webforms back office editors, change to using the v7 angular approach")] - public interface ITaskReturnUrl : ITask - { - string ReturnUrl {get;} - } -} diff --git a/src/Umbraco.Web/_Legacy/UI/LegacyDialogHandler.cs b/src/Umbraco.Web/_Legacy/UI/LegacyDialogHandler.cs deleted file mode 100644 index cfa93dc0f6..0000000000 --- a/src/Umbraco.Web/_Legacy/UI/LegacyDialogHandler.cs +++ /dev/null @@ -1,228 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Web; -using System.Xml; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.Models.Membership; - -namespace Umbraco.Web._Legacy.UI -{ - /// - /// This is used to replace the old umbraco.presentation.create.dialogHandler_temp class which is used - /// to handle sections create/delete actions. - /// - /// - /// We need to overhaul how all of this is handled which is why this is a legacy class - /// http://issues.umbraco.org/issue/U4-1373 - /// - public static class LegacyDialogHandler - { - private enum Operation - { - Create, - Delete - } - - private const string ContextKeyCreate = "LegacyDialogHandler-Create-"; - private const string ContextKeyDelete = "LegacyDialogHandler-Delete-"; - - /// - /// Gets the ITask for the operation for the node Type - /// - /// - /// - /// - /// - /// - /// Returns the ITask if one is found and can be made, otherwise null - /// - /// - /// This will first check if we've already created the ITask in the current Http request - /// - private static ITask GetTaskForOperation(HttpContextBase httpContext, IUser umbracoUser, Operation op, string nodeType) - { - if (httpContext == null) throw new ArgumentNullException(nameof(httpContext)); - if (umbracoUser == null) throw new ArgumentNullException(nameof(umbracoUser)); - if (nodeType == null) throw new ArgumentNullException(nameof(nodeType)); - - var ctxKey = op == Operation.Create ? ContextKeyCreate : ContextKeyDelete; - - //check contextual cache - if (httpContext.Items[ctxKey] != null) - { - return (ITask) httpContext.Items[ctxKey]; - } - - var operationNode = op == Operation.Create ? "create" : "delete"; - var createDef = GetXmlDoc(); - var def = createDef.SelectSingleNode("//nodeType [@alias = '" + nodeType + "']"); - if (def == null) - { - return null; - } - var del = def.SelectSingleNode("./tasks/" + operationNode); - if (del == null) - { - return null; - } - if (!del.Attributes.HasAttribute("assembly")) - { - return null; - } - var taskAssembly = del.AttributeValue("assembly"); - - if (!del.Attributes.HasAttribute("type")) - { - return null; - } - var taskType = del.AttributeValue("type"); - - var assembly = Assembly.LoadFrom(IOHelper.MapPath(SystemDirectories.Bin + "/" + taskAssembly + ".dll")); - var type = assembly.GetType(taskAssembly + "." + taskType); - var typeInstance = Activator.CreateInstance(type) as ITask; - if (typeInstance == null) - { - return null; - } - - //set the user/user id for the instance - var dialogTask = typeInstance as LegacyDialogTask; - if (dialogTask != null) - { - dialogTask.User = umbracoUser; - } - else - { - typeInstance.UserId = umbracoUser.Id; - } - - //put in contextual cache - httpContext.Items[ctxKey] = typeInstance; - - return typeInstance; - } - - /// - /// Checks if the user has access to launch the ITask that matches the node type based on the app assigned - /// - /// - /// - /// - /// - /// - /// If the ITask doesn't implement LegacyDialogTask then we will return 'true' since we cannot validate - /// the application assigned. - /// - /// TODO: Create an API to assign a nodeType to an app so developers can manually secure it - /// - internal static bool UserHasCreateAccess(HttpContextBase httpContext, IUser umbracoUser, string nodeType) - { - var task = GetTaskForOperation(httpContext, umbracoUser, Operation.Create, nodeType); - - //if no task was found it will use the default task and we cannot validate the application assigned so return true - if (task == null) - return true; - - return task is LegacyDialogTask ltask ? ltask.ValidateUserForApplication() : true; - } - - /// - /// Checks if the user has access to launch the ITask that matches the node type based on the app assigned - /// - /// - /// - /// - /// - /// - /// If the ITask doesn't implement LegacyDialogTask then we will return 'true' since we cannot validate - /// the application assigned. - /// - /// TODO: Create an API to assign a nodeType to an app so developers can manually secure it - /// - internal static bool UserHasDeleteAccess(HttpContextBase httpContext, User umbracoUser, string nodeType) - { - var task = GetTaskForOperation(httpContext, umbracoUser, Operation.Delete, nodeType); - - //if no task was found it will use the default task and we cannot validate the application assigned so return true - if (task == null) - return true; - - return task is LegacyDialogTask ltask ? ltask.ValidateUserForApplication() : true; - } - - public static void Delete(HttpContextBase httpContext, IUser umbracoUser, string nodeType, int nodeId, string text) - { - var typeInstance = GetTaskForOperation(httpContext, umbracoUser, Operation.Delete, nodeType); - if (typeInstance == null) - throw new InvalidOperationException($"Could not task for operation {Operation.Delete} for node type {nodeType}"); - - typeInstance.ParentID = nodeId; - typeInstance.Alias = text; - - typeInstance.Delete(); - } - - public static string Create(HttpContextBase httpContext, IUser umbracoUser, string nodeType, int nodeId, string text, int typeId = 0) - { - var typeInstance = GetTaskForOperation(httpContext, umbracoUser, Operation.Create, nodeType); - if (typeInstance == null) - throw new InvalidOperationException($"Could not task for operation {Operation.Create} for node type {nodeType}"); - - typeInstance.TypeID = typeId; - typeInstance.ParentID = nodeId; - typeInstance.Alias = text; - - typeInstance.Save(); - - // check for returning url - var returnUrlTask = typeInstance as ITaskReturnUrl; - return returnUrlTask != null - ? returnUrlTask.ReturnUrl - : ""; - } - - internal static string Create(HttpContextBase httpContext, IUser umbracoUser, string nodeType, int nodeId, string text, IDictionary additionalValues, int typeId = 0) - { - var typeInstance = GetTaskForOperation(httpContext, umbracoUser, Operation.Create, nodeType); - if (typeInstance == null) - throw new InvalidOperationException($"Could not task for operation {Operation.Create} for node type {nodeType}"); - - typeInstance.TypeID = typeId; - typeInstance.ParentID = nodeId; - typeInstance.Alias = text; - - // check for returning url - ITaskReturnUrl returnUrlTask = typeInstance as LegacyDialogTask; - if (returnUrlTask != null) - { - // if castable to LegacyDialogTask: add in additionalValues - ((LegacyDialogTask) returnUrlTask).AdditionalValues = additionalValues; - } - else - { - // otherwise cast to returnUrl interface - returnUrlTask = typeInstance as ITaskReturnUrl; - } - - typeInstance.Save(); - - return returnUrlTask != null - ? returnUrlTask.ReturnUrl - : ""; - } - - private static XmlDocument GetXmlDoc() - { - // Load task settings - var createDef = new XmlDocument(); - using (var defReader = new XmlTextReader(IOHelper.MapPath(SystemFiles.CreateUiXml))) - { - createDef.Load(defReader); - defReader.Close(); - return createDef; - } - } - } -} diff --git a/src/Umbraco.Web/_Legacy/UI/LegacyDialogTask.cs b/src/Umbraco.Web/_Legacy/UI/LegacyDialogTask.cs deleted file mode 100644 index 1b040970dd..0000000000 --- a/src/Umbraco.Web/_Legacy/UI/LegacyDialogTask.cs +++ /dev/null @@ -1,94 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Security.Authentication; -using Umbraco.Core; -using Umbraco.Core.Models.Membership; -using Umbraco.Web.Composing; -using Umbraco.Web.UI; - -namespace Umbraco.Web._Legacy.UI -{ - /// - /// An abstract class that is used to implement all secure ITasks - /// - /// - /// In the near future we will overhaul how create dialogs work and how deletions work as well. In the meantime - /// if you ever need to create an ITask you should just inherit from this class and do not manually implement - /// ITask or ITaskReturnUrl. If you do, you MUST also implement IAppTask which associates an ITask to an app - /// so we can validate the current user's security with the implementation. If you do not do this then your - /// implementation will not be secure. It means that if someone is logged in and doesn't have access to a - /// specific app, they'd still be able to execute code to create/delete for any ITask regardless of what app - /// they have access to. - /// - [Obsolete("ITask is used for legacy webforms back office editors, change to using the v7 angular approach")] - public abstract class LegacyDialogTask : ITaskReturnUrl, IAssignedApp - { - public virtual int ParentID { get; set; } - public int TypeID { get; set; } - public string Alias { get; set; } - - /// - /// Base class first performs authentication for the current app before proceeding - /// - /// - public bool Save() - { - if (ValidateUserForApplication()) - { - return PerformSave(); - } - throw new AuthenticationException("The current user does not have access to the required application that this task belongs to"); - } - - public abstract bool PerformSave(); - - /// - /// Base class first performs authentication for the current app before proceeding - /// - /// - public bool Delete() - { - if (ValidateUserForApplication()) - { - return PerformDelete(); - } - throw new AuthenticationException("The current user does not have access to the required application that this task belongs to"); - } - - public abstract bool PerformDelete(); - - /// - /// Gets/sets the user object for this Task - /// - /// - /// accessible by inheritors but can only be set internally - /// - protected internal IUser User { get; internal set; } - - /// - /// Implemented explicitly as we don't want to expose this - /// - int ITask.UserId - { - set { User = Current.Services.UserService.GetUserById(value); } - } - - /// - /// Checks if the currently assigned user has access to the assigned app - /// - /// - protected internal bool ValidateUserForApplication() - { - if (User == null) - throw new InvalidOperationException("Cannot authenticate, no User object assigned"); - - return User.AllowedSections.Any(app => app.InvariantEquals(AssignedApp)); - } - - public abstract string ReturnUrl { get; } - public abstract string AssignedApp { get; } - - public IDictionary AdditionalValues { get; set; } - } -} From e4c644e745165d7f13d1a3a294c876dfdf3720bb Mon Sep 17 00:00:00 2001 From: Stephan Date: Thu, 24 Jan 2019 15:29:50 +0100 Subject: [PATCH 257/437] Consistent PublishedContentExtensions, culture always optional --- src/Umbraco.Web/PublishedContentExtensions.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Umbraco.Web/PublishedContentExtensions.cs b/src/Umbraco.Web/PublishedContentExtensions.cs index 1284cf513d..c57d0249c1 100644 --- a/src/Umbraco.Web/PublishedContentExtensions.cs +++ b/src/Umbraco.Web/PublishedContentExtensions.cs @@ -749,9 +749,9 @@ namespace Umbraco.Web /// /// This can be useful in order to return all nodes in an entire site by a type when combined with TypedContentAtRoot /// - public static IEnumerable DescendantsOrSelf(this IEnumerable parentNodes, string docTypeAlias, string culture = null) + public static IEnumerable DescendantsOrSelfOfType(this IEnumerable parentNodes, string docTypeAlias, string culture = null) { - return parentNodes.SelectMany(x => x.DescendantsOrSelf(docTypeAlias, culture)); + return parentNodes.SelectMany(x => x.DescendantsOrSelfOfType(docTypeAlias, culture)); } /// @@ -799,7 +799,7 @@ namespace Umbraco.Web return content.DescendantsOrSelf(false, p => p.Level >= level, culture); } - public static IEnumerable Descendants(this IPublishedContent content, string contentTypeAlias, string culture) + public static IEnumerable DescendantsOfType(this IPublishedContent content, string contentTypeAlias, string culture = null) { return content.DescendantsOrSelf(false, p => p.ContentType.Alias == contentTypeAlias, culture); } @@ -826,7 +826,7 @@ namespace Umbraco.Web return content.DescendantsOrSelf(true, p => p.Level >= level, culture); } - public static IEnumerable DescendantsOrSelf(this IPublishedContent content, string contentTypeAlias, string culture) + public static IEnumerable DescendantsOrSelfOfType(this IPublishedContent content, string contentTypeAlias, string culture = null) { return content.DescendantsOrSelf(true, p => p.ContentType.Alias == contentTypeAlias, culture); } @@ -853,7 +853,7 @@ namespace Umbraco.Web return content.EnumerateDescendants(false, culture).FirstOrDefault(x => x.Level == level); } - public static IPublishedContent Descendant(this IPublishedContent content, string contentTypeAlias, string culture) + public static IPublishedContent DescendantOfType(this IPublishedContent content, string contentTypeAlias, string culture = null) { return content.EnumerateDescendants(false, culture).FirstOrDefault(x => x.ContentType.Alias == contentTypeAlias); } @@ -880,7 +880,7 @@ namespace Umbraco.Web return content.EnumerateDescendants(true, culture).FirstOrDefault(x => x.Level == level); } - public static IPublishedContent DescendantOrSelf(this IPublishedContent content, string contentTypeAlias, string culture) + public static IPublishedContent DescendantOrSelfOfType(this IPublishedContent content, string contentTypeAlias, string culture = null) { return content.EnumerateDescendants(true, culture).FirstOrDefault(x => x.ContentType.Alias == contentTypeAlias); } @@ -1010,7 +1010,7 @@ namespace Umbraco.Web /// /// Gets the first child of the content, of a given content type. /// - public static IPublishedContent FirstChild(this IPublishedContent content, string alias, string culture) + public static IPublishedContent FirstChildOfType(this IPublishedContent content, string alias, string culture = null) { return content.Children(culture,alias).FirstOrDefault(); } From 1ad0c8873174611563dcd62094e729b1ea23ba88 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Thu, 24 Jan 2019 14:34:18 +0000 Subject: [PATCH 258/437] =?UTF-8?q?=F0=9F=91=BB=F0=9F=91=BB=20Nightmares?= =?UTF-8?q?=20of=20writing=20WebForms=20controls=20with=20CSS=20markup=20&?= =?UTF-8?q?=20attributes=20in=20a=20.cs=20file=20=F0=9F=91=BB=F0=9F=91=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Umbraco.Web/Umbraco.Web.csproj | 5 - src/Umbraco.Web/_Legacy/Controls/Panel.cs | 108 ------------- .../_Legacy/Controls/PropertyPanel.cs | 73 --------- src/Umbraco.Web/_Legacy/Controls/TabPage.cs | 96 ------------ src/Umbraco.Web/_Legacy/Controls/TabView.cs | 145 ------------------ src/Umbraco.Web/_Legacy/Controls/pane.cs | 117 -------------- 6 files changed, 544 deletions(-) delete mode 100644 src/Umbraco.Web/_Legacy/Controls/Panel.cs delete mode 100644 src/Umbraco.Web/_Legacy/Controls/PropertyPanel.cs delete mode 100644 src/Umbraco.Web/_Legacy/Controls/TabPage.cs delete mode 100644 src/Umbraco.Web/_Legacy/Controls/TabView.cs delete mode 100644 src/Umbraco.Web/_Legacy/Controls/pane.cs diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 86772c13c4..fb5401c137 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -1138,11 +1138,6 @@ - - - - - diff --git a/src/Umbraco.Web/_Legacy/Controls/Panel.cs b/src/Umbraco.Web/_Legacy/Controls/Panel.cs deleted file mode 100644 index bb14d93482..0000000000 --- a/src/Umbraco.Web/_Legacy/Controls/Panel.cs +++ /dev/null @@ -1,108 +0,0 @@ -using System; -using System.Web.UI.WebControls; -using System.Web.UI.HtmlControls; - -namespace Umbraco.Web._Legacy.Controls -{ - public class UmbracoPanel : Panel - { - - private bool _hasMenu = false; - private string _StatusBarText = ""; - private string _text; - private bool _autoResize = true; - - public bool hasMenu - { - get { return _hasMenu; } - set { _hasMenu = value; } - } - - public bool AutoResize - { - get { return _autoResize; } - set { _autoResize = value; } - } - - public string Text - { - get - { - if (_text == "") - _text = " "; - - return _text; - } - set { _text = value; } - } - - public string StatusBarText - { - get { return _StatusBarText; } - set { _StatusBarText = value; } - } - - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - EnsureChildControls(); - } - - - internal HtmlGenericControl header = new HtmlGenericControl(); - internal HtmlGenericControl row = new HtmlGenericControl(); - internal HtmlGenericControl leftcol = new HtmlGenericControl(); - internal HtmlGenericControl rightcol = new HtmlGenericControl(); - internal HtmlGenericControl title = new HtmlGenericControl(); - - internal HtmlGenericControl body = new HtmlGenericControl(); - - protected override void CreateChildControls() - { - //fucking webforms controls and their rendering.. - CssClass = "umb-panel form-horizontal umb-panel-nobody"; - ID = base.ClientID + "_container"; - - header.TagName = "div"; - header.ID = base.ClientID + "_header"; - header.Attributes.Add("class","umb-panel-header"); - - row.TagName = "div"; - row.Attributes.Add("class", "row-fluid"); - header.Controls.Add(row); - - leftcol.TagName = "span"; - leftcol.Attributes.Add("class", "span8"); - - title.TagName = "h1"; - title.Attributes.Add("class", "headline"); - leftcol.Controls.Add(title); - - row.Controls.Add(leftcol); - - rightcol.TagName = "span"; - rightcol.Attributes.Add("class", "span4"); - row.Controls.Add(rightcol); - - body.TagName = "div"; - body.Attributes.Add("class", "umb-panel-body row-fluid"); - - Width = Unit.Empty; - Height = Unit.Empty; - - Controls.AddAt(0,header); - - - base.CreateChildControls(); - } - - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - title.InnerHtml = Text; - } - - } -} diff --git a/src/Umbraco.Web/_Legacy/Controls/PropertyPanel.cs b/src/Umbraco.Web/_Legacy/Controls/PropertyPanel.cs deleted file mode 100644 index 6ce9c40b46..0000000000 --- a/src/Umbraco.Web/_Legacy/Controls/PropertyPanel.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Web.UI; - -namespace Umbraco.Web._Legacy.Controls -{ - public class PropertyPanel : System.Web.UI.WebControls.Panel - { - private Control _control; - private string _text = string.Empty; - - public string Text - { - get { return _text; } - set { _text = value; } - } - - protected override void OnLoad(EventArgs eventArguments) - { - } - - protected override void Render(HtmlTextWriter writer) - { - ViewStateMode = ViewStateMode.Disabled; - CreateChildControls(); - - - if (string.IsNullOrEmpty(_text)) - CssClass += " hidelabel"; - - - writer.WriteLine("
    "); - - - if (_text != string.Empty) - { - if (_control == null) - { - _control = Controls.OfType().FirstOrDefault(c => c.Visible && (c.GetType().Name.Contains("Literal") == false)); - } - - if (_control == null) - { - writer.WriteLine("{0}", _text); - } - else - { - writer.WriteLine("", _control != null ? _control.ClientID : "", _text); - } - - } - - writer.WriteLine("
    "); - - try - { - this.RenderChildren(writer); - } - catch (Exception ex) - { - writer.WriteLine("Error creating control
    "); - writer.WriteLine(ex.ToString()); - } - - writer.WriteLine("
    "); - - } - - } - -} diff --git a/src/Umbraco.Web/_Legacy/Controls/TabPage.cs b/src/Umbraco.Web/_Legacy/Controls/TabPage.cs deleted file mode 100644 index 4a5be34d7c..0000000000 --- a/src/Umbraco.Web/_Legacy/Controls/TabPage.cs +++ /dev/null @@ -1,96 +0,0 @@ -using System; -using System.Collections; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Web; -using System.Web.SessionState; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.HtmlControls; - -namespace Umbraco.Web._Legacy.Controls -{ - - public class TabPage : WebControl - { - // Ensure that a TabPage cannot be instatiated outside - // this assembly -> New instances of a tabpage can only be retrieved through the tabview - private bool _hasMenu = true; - protected LiteralControl ErrorHeaderControl = new LiteralControl(); - private LiteralControl _closeButtonControl = new LiteralControl(); - private readonly ValidationSummary _vs = new ValidationSummary(); - private readonly Control _tempErr = new Control(); - internal TabView parent; - - - public string Text { get; set; } - - internal TabPage() - { - - } - - public ValidationSummary ValidationSummaryControl - { - get { return _vs; } - } - - public string ErrorHeader { get; set; } - public string CloseCaption { get; set; } - public bool Active { get; set; } - - public Control ErrorControl - { - get { return _tempErr; } - } - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - - _vs.ShowSummary = true; - _vs.Attributes.Remove("style"); - _vs.Style.Clear(); - _vs.ForeColor = new Color(); - _vs.ID = String.Format("{0}_validationSummary", this.ID); - - // Add error pane - _tempErr.Visible = false; - _tempErr.ID = String.Format("{0}_errorPaneContainer", this.ID); - _tempErr.Controls.Add(_closeButtonControl); - _tempErr.Controls.Add(ErrorHeaderControl); - _tempErr.Controls.Add(new LiteralControl("

    ")); - _tempErr.Controls.Add(_vs); - _tempErr.Controls.Add(new LiteralControl("

")); - - this.Controls.Add(_tempErr); - } - - - public bool HasMenu - { - get { return _hasMenu; } - set { _hasMenu = value; } - } - - protected override void Render(System.Web.UI.HtmlTextWriter writer) - { - _closeButtonControl.Text = "

"; - ErrorHeaderControl.Text = ErrorHeader; - - var activeClass = string.Empty; - - if (this.ID == parent.ActiveTabId) - activeClass = "active"; - - writer.WriteLine("
"); - writer.WriteLine("
"); - - this.RenderChildren(writer); - - writer.WriteLine("
"); - writer.WriteLine("
"); - } - } -} diff --git a/src/Umbraco.Web/_Legacy/Controls/TabView.cs b/src/Umbraco.Web/_Legacy/Controls/TabView.cs deleted file mode 100644 index 9d2657dad5..0000000000 --- a/src/Umbraco.Web/_Legacy/Controls/TabView.cs +++ /dev/null @@ -1,145 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Web; -using System.Web.SessionState; -using System.Web.UI; -using System.Web.UI.WebControls; -using ClientDependency.Core; -using System.Web.UI.HtmlControls; - -namespace Umbraco.Web._Legacy.Controls -{ - - public class TabView : Umbraco.Web._Legacy.Controls.UmbracoPanel - { - public readonly ArrayList Tabs = new ArrayList(); - protected ArrayList Panels = new ArrayList(); - protected Dictionary TabPages = new Dictionary(); - - private string _status = ""; - - private HtmlGenericControl _tabList = new HtmlGenericControl(); - private HtmlGenericControl _body = new HtmlGenericControl(); - private HtmlGenericControl _tabsHolder = new HtmlGenericControl(); - - private HiddenField _activeTabHolder = new HiddenField(); - - protected override void CreateChildControls() - { - base.CreateChildControls(); - - _tabList.TagName = "ul"; - _tabList.Attributes.Add("class", "nav nav-tabs umb-nav-tabs -padding-left"); - base.row.Controls.Add(_tabList); - - _body.TagName = "div"; - _body.Attributes.Add("class", "umb-panel-body umb-scrollable row-fluid"); - base.Controls.Add(_body); - - _tabsHolder.TagName = "div"; - _tabsHolder.Attributes.Add("class", "tab-content form-horizontal"); - _tabsHolder.ID = this.ID + "_content"; - _body.Controls.Add(_tabsHolder); - - for (int i = 0; i < Tabs.Count; i++) - { - var tabPage = TabPages.ElementAt(i).Value; - tabPage.Active = false || tabPage.ID == ActiveTabId; - - _tabsHolder.Controls.Add(tabPage); - } - - _activeTabHolder.ID = "activeTabHolder"; - _body.Controls.Add(_activeTabHolder); - - } - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - base.CssClass = "umb-panel tabbable"; - } - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - - if (string.IsNullOrEmpty(Text)) - Text = " "; - - - for (int i = 0; i < Tabs.Count; i++) - { - var tabPage = TabPages.ElementAt(i).Value; - string tabPageCaption = tabPage.Text; - string tabId = tabPage.ID; - - HtmlGenericControl li = new HtmlGenericControl(); - li.TagName = "li"; - if (tabId == ActiveTabId) - li.Attributes.Add("class", "active"); - _tabList.Controls.Add(li); - - HtmlGenericControl a = new HtmlGenericControl(); - a.TagName = "a"; - a.Attributes.Add("href", "#"+tabId); - a.Attributes.Add("onclick", "$('#" + _activeTabHolder.ClientID + "').val('" + tabId + "');"); - a.Attributes.Add("data-toggle", "tab"); - a.InnerText = tabPageCaption; - li.Controls.Add(a); - } - } - - public ArrayList GetPanels() - { - return Panels; - } - - public TabPage NewTabPage(string text) - { - Tabs.Add(text); - TabPage tp = new TabPage(); - tp.Width = this.Width; - tp.ID = "tab0" + (TabPages.Count + 1); - tp.Text = text; - tp.parent = this; - - Panels.Add(tp); - TabPages.Add(tp.ID, tp); - - _tabsHolder.Controls.Add(tp); - return tp; - } - - - public string Status - { - get { return _status; } - set { _status = value; } - } - - - - public string ActiveTabId - { - get - { - - if (_activeTabHolder.Value != "") - return _activeTabHolder.Value; - - if (TabPages.Count > 0) - return TabPages.ElementAt(0).Value.ID; - - - - return "tab01"; - } - } - } -} diff --git a/src/Umbraco.Web/_Legacy/Controls/pane.cs b/src/Umbraco.Web/_Legacy/Controls/pane.cs deleted file mode 100644 index 2d37a2c099..0000000000 --- a/src/Umbraco.Web/_Legacy/Controls/pane.cs +++ /dev/null @@ -1,117 +0,0 @@ -using System; -using System.Collections; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Web; -using System.Web.SessionState; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.HtmlControls; -using ClientDependency.Core; - -namespace Umbraco.Web._Legacy.Controls -{ - - public class Pane : System.Web.UI.WebControls.Panel - { - - - public Pane() - { - - } - - private string m_Text = string.Empty; - public string Text - { - get { return m_Text; } - set { m_Text = value; } - } - - private string m_title = string.Empty; - public string Title - { - get { return m_title; } - set { m_title = value; } - } - - public void addProperty(string Caption, Control C, params BaseValidator[] validators) - { - - PropertyPanel pp = new PropertyPanel(); - pp.Controls.Add(C); - - foreach (var validator in validators) - { - validator.Display = ValidatorDisplay.Dynamic; - pp.Controls.Add(validator); - } - pp.Text = Caption; - - this.Controls.Add(pp); - } - - public void addProperty(string Caption, Control C) - { - - PropertyPanel pp = new PropertyPanel(); - pp.Controls.Add(C); - pp.Text = Caption; - - this.Controls.Add(pp); - } - - public void addProperty(Control ctrl) - { - - PropertyPanel pp = new PropertyPanel(); - pp.Controls.Add(ctrl); - this.Controls.Add(pp); - } - - - protected override void OnLoad(System.EventArgs EventArguments) - { - - } - - protected override void Render(System.Web.UI.HtmlTextWriter writer) - { - this.ViewStateMode = ViewStateMode.Disabled; - this.CreateChildControls(); - - string styleString = ""; - - foreach (string key in this.Style.Keys) - { - styleString += key + ":" + this.Style[key] + ";"; - } - - - writer.WriteLine("
"); - if (!string.IsNullOrEmpty(m_title)) - writer.WriteLine("
" + m_title + "
"); - writer.WriteLine("
"); - - if (!string.IsNullOrEmpty(m_Text)) - writer.WriteLine("

" + m_Text + "

"); - - try - { - this.RenderChildren(writer); - } - catch (Exception ex) - { - writer.WriteLine("Error creating control
"); - writer.WriteLine(ex.ToString()); - } - - writer.WriteLine("
"); - writer.WriteLine("
"); - - } - - } - -} From 874c89656c2f29da8bad9b3c19e5486cee6825f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Thu, 24 Jan 2019 15:57:28 +0100 Subject: [PATCH 259/437] action colors --- .../src/less/components/editor.less | 3 --- .../src/less/components/tree/umb-tree-item.less | 16 ++++++++-------- .../less/components/umb-editor-navigation.less | 6 +++--- .../src/less/components/umb-flatpickr.less | 6 +++--- .../src/less/components/umb-iconpicker.less | 2 +- .../less/components/umb-list-view-settings.less | 5 +++-- .../src/less/components/umb-node-preview.less | 12 +++++++----- .../src/less/variables.less | 10 +++++++++- 8 files changed, 34 insertions(+), 26 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/components/editor.less b/src/Umbraco.Web.UI.Client/src/less/components/editor.less index d699193c24..f193561ff3 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/editor.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/editor.less @@ -101,9 +101,6 @@ input.umb-editor-header__name-input { padding: 0 10px; background: @white; border: 1px solid @gray-8; - &:hover { - border-color: @turquoise-d1; - } } input.umb-editor-header__name-input:disabled { diff --git a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less index 002d076461..39facb1f48 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less @@ -42,13 +42,13 @@ .umb-tree-item.current > .umb-tree-item__inner { - background: @turquoise-d1; + background: @ui-active; // override small icon color. TODO => check usage -// &:before { -// color: @turquoise-l2; -// } - + &:before { + color: @turquoise-l2; + } + .umb-options { &:hover i { @@ -57,7 +57,7 @@ i { background: @white; - border-color: @turquoise-d1; + border-color: @ui-active; transition: opacity 120ms ease; } } @@ -66,7 +66,7 @@ .umb-tree-icon, ins { color: @white !important; - background-color: @turquoise-d1; - border-color: @turquoise-d1; + background-color: @ui-active; + border-color: @ui-active; } } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-editor-navigation.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-editor-navigation.less index d8b83af67a..db24210e30 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-editor-navigation.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-editor-navigation.less @@ -32,8 +32,8 @@ } .umb-sub-views-nav-item.is-active { - color: @turquoise-d1; - border-bottom-color: @turquoise-d1; + color: @ui-active; + border-bottom-color: @ui-active; } .show-validation .umb-sub-views-nav-item.-has-error { @@ -98,7 +98,7 @@ // make dots green the an item is active .umb-sub-views-nav-item.is-active .umb-sub-views-nav-item__more i { - background-color: @turquoise-d1; + background-color: @ui-active; } .umb-sub-views-nav__dropdown.umb-sub-views-nav__dropdown { diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-flatpickr.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-flatpickr.less index 1848d55d96..8cdcc8b877 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-flatpickr.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-flatpickr.less @@ -13,9 +13,9 @@ span.flatpickr-day:hover { } span.flatpickr-day.selected { - background-color: @turquoise; + background-color: @ui-selected; } span.flatpickr-day.selected:hover { - background-color: @turquoise-d1; -} \ No newline at end of file + background-color: @ui-selected-hover; +} diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-iconpicker.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-iconpicker.less index 6b03d80214..34070256ce 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-iconpicker.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-iconpicker.less @@ -34,7 +34,7 @@ .umb-iconpicker-item.-selected { background: @gray-10; - border: solid 1px @turquoise-d1; + border: solid 1px @ui-active; border-radius: @baseBorderRadius; box-sizing: border-box; } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-list-view-settings.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-list-view-settings.less index 4fb20f5c68..b23a9d14b8 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-list-view-settings.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-list-view-settings.less @@ -34,11 +34,12 @@ .umb-list-view-settings__create-new { font-size: 13px; - color: @turquoise-d1; + color: @ui-action; } .umb-list-view-settings__create-new:hover { - color: @turquoise-d1; + color: @ui-action-hover; + border-color: @ui-action-hover; } .umb-list-view-settings__remove-new { diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less index 07bc32d79a..3d1af014c7 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less @@ -71,12 +71,12 @@ margin-right: 5px; font-size: 13px; font-weight: bold; - color: @gray-5; + color: @ui-action-disgrete; cursor: pointer; } .umb-node-preview__action:hover { - color: @turquoise; + color: @ui-action-disgrete-hover; text-decoration: none; opacity: 1; } @@ -90,14 +90,16 @@ align-items: center; justify-content: center; border: 1px dashed @gray-7; - color: @turquoise-d1; + color: @ui-action; font-weight: bold; padding: 5px 15px; box-sizing: border-box; } .umb-node-preview-add:hover { - color: @turquoise-d1; + color: @ui-action-hover; + border-color: @ui-action-hover; + text-decoration: none; } .umb-editor-wrapper .umb-node-preview-add { @@ -112,4 +114,4 @@ .umb-node-preview-add { max-width: none; } -} \ No newline at end of file +} diff --git a/src/Umbraco.Web.UI.Client/src/less/variables.less b/src/Umbraco.Web.UI.Client/src/less/variables.less index a7360148a9..be9276bf35 100644 --- a/src/Umbraco.Web.UI.Client/src/less/variables.less +++ b/src/Umbraco.Web.UI.Client/src/less/variables.less @@ -39,7 +39,7 @@ @pinkLight: #f5c1bc;// added 2019 @brown: #9d8057;// added 2019 -@u-grey: #f2ebe6;// added 2019 +@u-greyLight: #f2ebe6;// added 2019 @u-white: #f9f7f4;// added 2019 @@ -47,7 +47,15 @@ // ------------------------- @ui-active: @pinkLight; +@ui-active-hover: @pinkLight; @ui-selected: @pinkLight; +@ui-selected-hover: @pinkLight; + +@ui-action: @orange; +@ui-action-hover: @orange; + +@ui-action-disgrete: @gray-4; +@ui-action-disgrete-hover: @orange; // Colors From 37b614a577c895769cb988c2d9ceef17ec5c295c Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Thu, 24 Jan 2019 15:41:38 +0000 Subject: [PATCH 260/437] Another file that can be gone as was used by LegacyDialogTask --- src/Umbraco.Web/UI/IAssignedApp.cs | 17 ----------------- src/Umbraco.Web/Umbraco.Web.csproj | 1 - 2 files changed, 18 deletions(-) delete mode 100644 src/Umbraco.Web/UI/IAssignedApp.cs diff --git a/src/Umbraco.Web/UI/IAssignedApp.cs b/src/Umbraco.Web/UI/IAssignedApp.cs deleted file mode 100644 index b70dafa50e..0000000000 --- a/src/Umbraco.Web/UI/IAssignedApp.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace Umbraco.Web.UI -{ - /// - /// This is used for anything that is assigned to an app - /// - /// - /// Currently things that need to be assigned to an app in order for user security to work are: - /// LegacyDialogTask - /// - public interface IAssignedApp - { - /// - /// Returns the app alias that this element belongs to - /// - string AssignedApp { get; } - } -} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index fb5401c137..47c3c24de4 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -1137,7 +1137,6 @@ - From 79eaeef25892298e7ad2ff20c9ae188a3fba8d13 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Thu, 24 Jan 2019 15:44:47 +0000 Subject: [PATCH 261/437] Fixup NuSpec as we no longer ship with default.aspx --- build/NuSpecs/UmbracoCms.nuspec | 1 - 1 file changed, 1 deletion(-) diff --git a/build/NuSpecs/UmbracoCms.nuspec b/build/NuSpecs/UmbracoCms.nuspec index a188377c19..678037a84a 100644 --- a/build/NuSpecs/UmbracoCms.nuspec +++ b/build/NuSpecs/UmbracoCms.nuspec @@ -33,7 +33,6 @@ - From 3e69ceb4871769682cea28089733022d0dd76083 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Thu, 24 Jan 2019 15:52:56 +0000 Subject: [PATCH 262/437] Remove dashboard from web.config --- src/Umbraco.Web.UI/web.Template.config | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Umbraco.Web.UI/web.Template.config b/src/Umbraco.Web.UI/web.Template.config index 2371282a14..e7399f600b 100644 --- a/src/Umbraco.Web.UI/web.Template.config +++ b/src/Umbraco.Web.UI/web.Template.config @@ -14,7 +14,6 @@
-
@@ -28,7 +27,6 @@ - From 0ffa4702bad8ae8ae1b196053b3aed0fc01f9c7b Mon Sep 17 00:00:00 2001 From: Stephan Date: Thu, 24 Jan 2019 18:26:08 +0100 Subject: [PATCH 263/437] Bugfix install --- src/Umbraco.Core/Migrations/Install/DatabaseBuilder.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Core/Migrations/Install/DatabaseBuilder.cs b/src/Umbraco.Core/Migrations/Install/DatabaseBuilder.cs index e73fc7453f..9c6ff208f8 100644 --- a/src/Umbraco.Core/Migrations/Install/DatabaseBuilder.cs +++ b/src/Umbraco.Core/Migrations/Install/DatabaseBuilder.cs @@ -284,7 +284,7 @@ namespace Umbraco.Core.Migrations.Install if (string.IsNullOrWhiteSpace(providerName)) throw new ArgumentNullOrEmptyException(nameof(providerName)); var fileSource = "web.config"; - var fileName = IOHelper.MapPath(Path.Combine(SystemDirectories.Root, fileSource)); + var fileName = IOHelper.MapPath(SystemDirectories.Root +"/" + fileSource); var xml = XDocument.Load(fileName, LoadOptions.PreserveWhitespace); if (xml.Root == null) throw new Exception($"Invalid {fileSource} file (no root)."); @@ -297,7 +297,7 @@ namespace Umbraco.Core.Migrations.Install if (configSourceAttribute != null) { fileSource = configSourceAttribute.Value; - fileName = IOHelper.MapPath(Path.Combine(SystemDirectories.Root, fileSource)); + fileName = IOHelper.MapPath(SystemDirectories.Root + "/" + fileSource); if (!File.Exists(fileName)) throw new Exception($"Invalid configSource \"{fileSource}\" (no such file)."); From d25739601372e3bf1f8855904747b976820dd576 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Fri, 25 Jan 2019 08:21:43 +0000 Subject: [PATCH 264/437] =?UTF-8?q?Missing=20Serilog.Formatting.Compact.Re?= =?UTF-8?q?ader=20from=20Nuspec=20for=20the=20Logviewer=20stuff-=20thanks?= =?UTF-8?q?=20Twitter=20for=20the=20heads=20up=20=F0=9F=91=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/NuSpecs/UmbracoCms.Core.nuspec | 1 + 1 file changed, 1 insertion(+) diff --git a/build/NuSpecs/UmbracoCms.Core.nuspec b/build/NuSpecs/UmbracoCms.Core.nuspec index 8826705157..9e6e375745 100644 --- a/build/NuSpecs/UmbracoCms.Core.nuspec +++ b/build/NuSpecs/UmbracoCms.Core.nuspec @@ -35,6 +35,7 @@ + From 585abf2902f26d555e418441fb400f7a361af721 Mon Sep 17 00:00:00 2001 From: Stephan Date: Tue, 22 Jan 2019 17:23:30 +0100 Subject: [PATCH 265/437] Cleanup trees --- .../components/tree/umbtree.directive.js | 2 +- .../src/common/resources/tree.resource.js | 15 +- .../treepicker/treepicker.controller.js | 2 - .../treepicker/treepicker.html | 1 - .../src/views/packages/edit.controller.js | 2 +- .../Editors/BackOfficeServerVariables.cs | 2 +- src/Umbraco.Web/Services/ITreeService.cs | 6 +- src/Umbraco.Web/Services/TreeService.cs | 10 +- .../Trees/ApplicationTreeController.cs | 342 ++++++++---------- src/Umbraco.Web/Trees/FilesTreeController.cs | 5 +- src/Umbraco.Web/Trees/ITree.cs | 5 + .../Trees/LogViewerTreeController.cs | 3 +- src/Umbraco.Web/Trees/Tree.cs | 8 +- src/Umbraco.Web/Trees/TreeAttribute.cs | 27 ++ .../Trees/TreeCollectionBuilder.cs | 2 +- src/Umbraco.Web/Trees/TreeController.cs | 3 + src/Umbraco.Web/Trees/TreeControllerBase.cs | 3 + .../WebApi/HttpControllerContextExtensions.cs | 54 ++- 18 files changed, 243 insertions(+), 249 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js index 052f497ee9..4f57319b36 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js @@ -235,7 +235,7 @@ function umbTreeDirective($q, $rootScope, treeService, notificationsService, use $scope.loading = true; //default args - var args = { section: $scope.section, tree: $scope.treealias, cacheKey: $scope.cachekey, isDialog: $scope.isdialog ? $scope.isdialog : false, onlyinitialized: $scope.onlyInitialized }; + var args = { section: $scope.section, tree: $scope.treealias, cacheKey: $scope.cachekey, isDialog: $scope.isdialog ? $scope.isdialog : false }; //add the extra query string params if specified if ($scope.customtreeparams) { diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/tree.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/tree.resource.js index 0e08ac6518..73db2c9777 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/tree.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/tree.resource.js @@ -12,7 +12,7 @@ function treeResource($q, $http, umbRequestHelper) { } return node.childNodesUrl; } - + /** internal method to get the tree menu url */ function getTreeMenuUrl(node) { if (!node.menuUrl) { @@ -23,7 +23,7 @@ function treeResource($q, $http, umbRequestHelper) { //the factory object returned return { - + /** Loads in the data to display the nodes menu */ loadMenu: function (node) { var treeMenuUrl = getTreeMenuUrl(node); @@ -53,12 +53,9 @@ function treeResource($q, $http, umbRequestHelper) { } //create the query string for the tree request, these are the mandatory options: - var query = "application=" + options.section + "&tree=" + options.tree + "&isDialog=" + options.isDialog; - - //if you need to load a not initialized tree set this value to false - default is true - if (options.onlyinitialized) { - query += "&onlyInitialized=" + options.onlyinitialized; - } + var query = "application=" + options.section + + "&tree=" + options.tree + + "&use=" + (options.isDialog ? "dialog" : "main"); //the options can contain extra query string parameters if (options.queryString) { @@ -73,7 +70,7 @@ function treeResource($q, $http, umbRequestHelper) { query)), 'Failed to retrieve data for application tree ' + options.section); }, - + /** Loads in the data to display the child nodes for a given node */ loadNodes: function (options) { diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/treepicker/treepicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/treepicker/treepicker.controller.js index 346bddf00f..0628af1118 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/treepicker/treepicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/treepicker/treepicker.controller.js @@ -28,8 +28,6 @@ angular.module("umbraco").controller("Umbraco.Editors.TreePickerController", vm.treeAlias = $scope.model.treeAlias; vm.multiPicker = $scope.model.multiPicker; vm.hideHeader = (typeof $scope.model.hideHeader) === "boolean" ? $scope.model.hideHeader : true; - // if you need to load a not initialized tree set this value to false - default is true - vm.onlyInitialized = $scope.model.onlyInitialized; vm.searchInfo = { searchFromId: $scope.model.startNodeId, searchFromName: null, diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/treepicker/treepicker.html b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/treepicker/treepicker.html index da81d48c78..c592b4ec3b 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/treepicker/treepicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/treepicker/treepicker.html @@ -56,7 +56,6 @@ hideheader="{{vm.hideHeader}}" hideoptions="true" isdialog="true" - only-initialized="{{vm.onlyInitialized}}" customtreeparams="{{vm.customTreeParams}}" enablelistviewsearch="true" enablelistviewexpand="true" diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js index 282fd0472c..b6026edf03 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js @@ -198,7 +198,7 @@ treeAlias: "files", entityType: "file", multiPicker: true, - onlyInitialized: false, + isDialog: true, select: function(node) { node.selected = !node.selected; diff --git a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs index 7fe279d9c7..eac6852684 100644 --- a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs +++ b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs @@ -159,7 +159,7 @@ namespace Umbraco.Web.Editors }, { "treeApplicationApiBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl( - controller => controller.GetApplicationTrees(null, null, null)) + controller => controller.GetApplicationTrees(null, null, null, TreeUse.None)) }, { "contentTypeApiBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl( diff --git a/src/Umbraco.Web/Services/ITreeService.cs b/src/Umbraco.Web/Services/ITreeService.cs index 691e5a6370..f9ed522e71 100644 --- a/src/Umbraco.Web/Services/ITreeService.cs +++ b/src/Umbraco.Web/Services/ITreeService.cs @@ -17,16 +17,16 @@ namespace Umbraco.Web.Services /// /// Gets all trees. /// - IEnumerable GetAll(); + IEnumerable GetAll(TreeUse use = TreeUse.Main); /// /// Gets all trees for a section. /// - IEnumerable GetBySection(string sectionAlias); + IEnumerable GetBySection(string sectionAlias, TreeUse use = TreeUse.Main); /// /// Gets all trees for a section, grouped. /// - IDictionary> GetBySectionGrouped(string sectionAlias); + IDictionary> GetBySectionGrouped(string sectionAlias, TreeUse use = TreeUse.Main); } } diff --git a/src/Umbraco.Web/Services/TreeService.cs b/src/Umbraco.Web/Services/TreeService.cs index c697a89a62..a5574946a6 100644 --- a/src/Umbraco.Web/Services/TreeService.cs +++ b/src/Umbraco.Web/Services/TreeService.cs @@ -26,16 +26,16 @@ namespace Umbraco.Web.Services public Tree GetByAlias(string treeAlias) => _treeCollection.FirstOrDefault(x => x.TreeAlias == treeAlias); /// - public IEnumerable GetAll() => _treeCollection; + public IEnumerable GetAll(TreeUse use = TreeUse.Main) => _treeCollection.Where(x => x.TreeUse.HasAny(use)); /// - public IEnumerable GetBySection(string sectionAlias) - => _treeCollection.Where(x => x.SectionAlias.InvariantEquals(sectionAlias)).OrderBy(x => x.SortOrder).ToList(); + public IEnumerable GetBySection(string sectionAlias, TreeUse use = TreeUse.Main) + => _treeCollection.Where(x => x.SectionAlias.InvariantEquals(sectionAlias) && x.TreeUse.HasAny(use)).OrderBy(x => x.SortOrder).ToList(); /// - public IDictionary> GetBySectionGrouped(string sectionAlias) + public IDictionary> GetBySectionGrouped(string sectionAlias, TreeUse use = TreeUse.Main) { - return GetBySection(sectionAlias).GroupBy(x => x.TreeGroup).ToDictionary( + return GetBySection(sectionAlias, use).GroupBy(x => x.TreeGroup).ToDictionary( x => x.Key ?? "", x => (IEnumerable) x.ToArray()); } diff --git a/src/Umbraco.Web/Trees/ApplicationTreeController.cs b/src/Umbraco.Web/Trees/ApplicationTreeController.cs index 61d09cd3f2..28bc464d55 100644 --- a/src/Umbraco.Web/Trees/ApplicationTreeController.cs +++ b/src/Umbraco.Web/Trees/ApplicationTreeController.cs @@ -14,11 +14,8 @@ using Umbraco.Core; using Umbraco.Core.Cache; using Umbraco.Core.Configuration; using Umbraco.Core.Logging; -using Umbraco.Core.Models; -using Umbraco.Core.Models.ContentEditing; using Umbraco.Core.Persistence; using Umbraco.Core.Services; -using Umbraco.Web.Models.ContentEditing; using Umbraco.Web.Models.Trees; using Umbraco.Web.Mvc; using Umbraco.Web.Services; @@ -50,262 +47,235 @@ namespace Umbraco.Web.Trees ///

/// The application to load tree for /// An optional single tree alias, if specified will only load the single tree for the request app - /// + /// + /// Tree use. /// [HttpQueryStringFilter("queryStrings")] - public async Task GetApplicationTrees(string application, string tree, FormDataCollection queryStrings) + public async Task GetApplicationTrees(string application, string tree, FormDataCollection querystring, TreeUse use = TreeUse.Main) { application = application.CleanForXss(); - if (string.IsNullOrEmpty(application)) throw new HttpResponseException(HttpStatusCode.NotFound); + if (string.IsNullOrEmpty(application)) + throw new HttpResponseException(HttpStatusCode.NotFound); //find all tree definitions that have the current application alias - var groupedTrees = _treeService.GetBySectionGrouped(application); + var groupedTrees = _treeService.GetBySectionGrouped(application, use); var allTrees = groupedTrees.Values.SelectMany(x => x).ToList(); - if (string.IsNullOrEmpty(tree) == false || allTrees.Count == 1) + if (allTrees.Count == 0) + throw new HttpResponseException(HttpStatusCode.NotFound); + + // handle request for a specific tree / or when there is only one tree + if (!tree.IsNullOrWhiteSpace() || allTrees.Count == 1) { - var apptree = !tree.IsNullOrWhiteSpace() - ? allTrees.FirstOrDefault(x => x.TreeAlias == tree) - : allTrees.FirstOrDefault(); + var t = tree.IsNullOrWhiteSpace() + ? allTrees[0] + : allTrees.FirstOrDefault(x => x.TreeAlias == tree); - if (apptree == null) throw new HttpResponseException(HttpStatusCode.NotFound); + if (t == null) + throw new HttpResponseException(HttpStatusCode.NotFound); - var result = await GetRootForSingleAppTree( - apptree, - Constants.System.Root.ToString(CultureInfo.InvariantCulture), - queryStrings, - application); + var treeRootNode = await GetTreeRootNode(t, Constants.System.Root, querystring); + if (treeRootNode != null) + return treeRootNode; - //this will be null if it cannot convert to a single root section - if (result != null) - { - return result; - } + throw new HttpResponseException(HttpStatusCode.NotFound); } - //Don't apply fancy grouping logic futher down, if we only have one group of items - var hasGroups = groupedTrees.Count > 1; - if (!hasGroups) + // handle requests for all trees + // for only 1 group + if (groupedTrees.Count == 1) { - var collection = new TreeNodeCollection(); - foreach (var apptree in allTrees) + var nodes = new TreeNodeCollection(); + foreach (var t in allTrees) { - //return the root nodes for each tree in the app - var rootNode = await GetRootForMultipleAppTree(apptree, queryStrings); - //This could be null if the tree decides not to return it's root (i.e. the member type tree does this when not in umbraco membership mode) - if (rootNode != null) - { - collection.Add(rootNode); - } + var node = await TryGetRootNode(t, querystring); + if (node != null) + nodes.Add(node); } - if(collection.Count > 0) - { - var multiTree = TreeRootNode.CreateMultiTreeRoot(collection); - multiTree.Name = Services.TextService.Localize("sections/" + application); + var name = Services.TextService.Localize("sections/" + application); - return multiTree; + if (nodes.Count > 0) + { + var treeRootNode = TreeRootNode.CreateMultiTreeRoot(nodes); + treeRootNode.Name = name; + return treeRootNode; } - //Otherwise its a application/section with no trees (aka a full screen app) - //For example we do not have a Forms tree defined in C# & can not attribute with [Tree(isSingleNodeTree:true0] - var rootId = Constants.System.Root.ToString(CultureInfo.InvariantCulture); - var section = Services.TextService.Localize("sections/" + application); - - return TreeRootNode.CreateSingleTreeRoot(rootId, null, null, section, TreeNodeCollection.Empty, true); + // otherwise it's a section with no tree, aka a fullscreen section + // todo is this true? what if we just failed to TryGetRootNode on all of them? + return TreeRootNode.CreateSingleTreeRoot(Constants.System.Root.ToInvariantString(), null, null, name, TreeNodeCollection.Empty, true); } - var rootNodeGroups = new List(); - - //Group trees by [CoreTree] attribute with a TreeGroup property - foreach (var treeSectionGroup in groupedTrees) + // for many groups + var treeRootNodes = new List(); + foreach (var (groupName, trees) in groupedTrees) { - var treeGroupName = treeSectionGroup.Key; - - var groupNodeCollection = new TreeNodeCollection(); - foreach (var appTree in treeSectionGroup.Value) + var nodes = new TreeNodeCollection(); + foreach (var t in trees) { - var rootNode = await GetRootForMultipleAppTree(appTree, queryStrings); - if (rootNode != null) - { - //Add to a new list/collection - groupNodeCollection.Add(rootNode); - } + var node = await TryGetRootNode(t, querystring); + if (node != null) + nodes.Add(node); } - //If treeGroupName == null then its third party - if (treeGroupName.IsNullOrWhiteSpace()) - { - //This is used for the localisation key - //treeHeaders/thirdPartyGroup - treeGroupName = "thirdPartyGroup"; - } + if (nodes.Count == 0) + continue; - if (groupNodeCollection.Count > 0) - { - var groupRoot = TreeRootNode.CreateGroupNode(groupNodeCollection, application); - groupRoot.Name = Services.TextService.Localize("treeHeaders/" + treeGroupName); + // no name => third party + // use localization key treeHeaders/thirdPartyGroup + // todo this is an odd convention + var name = groupName.IsNullOrWhiteSpace() ? "thirdPartyGroup" : groupName; - rootNodeGroups.Add(groupRoot); - } + var groupRootNode = TreeRootNode.CreateGroupNode(nodes, application); + groupRootNode.Name = Services.TextService.Localize("treeHeaders/" + name); + treeRootNodes.Add(groupRootNode); } - return TreeRootNode.CreateGroupedMultiTreeRoot(new TreeNodeCollection(rootNodeGroups.OrderBy(x => x.Name))); + return TreeRootNode.CreateGroupedMultiTreeRoot(new TreeNodeCollection(treeRootNodes.OrderBy(x => x.Name))); } /// - /// Get the root node for an application with multiple trees + /// Tries to get the root node of a tree. /// - /// - /// - /// - private async Task GetRootForMultipleAppTree(Tree tree, FormDataCollection queryStrings) + /// + /// Returns null if the root node could not be obtained due to an HttpResponseException, + /// which probably indicates that the user isn't authorized to view that tree. + /// + private async Task TryGetRootNode(Tree tree, FormDataCollection querystring) { if (tree == null) throw new ArgumentNullException(nameof(tree)); + try { - var byControllerAttempt = await TryGetRootNodeFromControllerTree(tree, queryStrings, ControllerContext); - if (byControllerAttempt.Success) - { - return byControllerAttempt.Result; - } + return await GetRootNode(tree, querystring); } catch (HttpResponseException) { - //if this occurs its because the user isn't authorized to view that tree, in this case since we are loading multiple trees we - //will just return null so that it's not added to the list. + // if this occurs its because the user isn't authorized to view that tree, + // in this case since we are loading multiple trees we will just return + // null so that it's not added to the list. return null; } - - throw new ApplicationException("Could not get root node for tree type " + tree.TreeAlias); } /// - /// Get the root node for an application with one tree + /// Get the tree root node of a tree. /// - /// - /// - /// - /// - /// - private async Task GetRootForSingleAppTree(Tree tree, string id, FormDataCollection queryStrings, string application) + private async Task GetTreeRootNode(Tree tree, int id, FormDataCollection querystring) { - var rootId = Constants.System.Root.ToString(CultureInfo.InvariantCulture); if (tree == null) throw new ArgumentNullException(nameof(tree)); - var byControllerAttempt = TryLoadFromControllerTree(tree, id, queryStrings, ControllerContext); - if (!byControllerAttempt.Success) - throw new ApplicationException("Could not render a tree for type " + tree.TreeAlias); - var rootNode = await TryGetRootNodeFromControllerTree(tree, queryStrings, ControllerContext); - if (rootNode.Success == false) - { - //This should really never happen if we've successfully got the children above. - throw new InvalidOperationException("Could not create root node for tree " + tree.TreeAlias); - } + var children = await GetChildren(tree, id, querystring); + var rootNode = await GetRootNode(tree, querystring); var sectionRoot = TreeRootNode.CreateSingleTreeRoot( - rootId, - rootNode.Result.ChildNodesUrl, - rootNode.Result.MenuUrl, - rootNode.Result.Name, - byControllerAttempt.Result, + Constants.System.Root.ToInvariantString(), + rootNode.ChildNodesUrl, + rootNode.MenuUrl, + rootNode.Name, + children, tree.IsSingleNodeTree); - //assign the route path based on the root node, this means it will route there when the section is navigated to - //and no dashboards will be available for this section - sectionRoot.RoutePath = rootNode.Result.RoutePath; - sectionRoot.Path = rootNode.Result.Path; + // assign the route path based on the root node, this means it will route there when the + // section is navigated to and no dashboards will be available for this section + sectionRoot.RoutePath = rootNode.RoutePath; + sectionRoot.Path = rootNode.Path; - foreach (var d in rootNode.Result.AdditionalData) - { + foreach (var d in rootNode.AdditionalData) sectionRoot.AdditionalData[d.Key] = d.Value; - } - return sectionRoot; + return sectionRoot; } /// - /// Proxies a request to the destination tree controller to get it's root tree node + /// Gets the root node of a tree. /// - /// - /// - /// - /// - /// - /// This ensures that authorization filters are applied to the sub request - /// - private async Task> TryGetRootNodeFromControllerTree(Tree appTree, FormDataCollection formCollection, HttpControllerContext controllerContext) + private async Task GetRootNode(Tree tree, FormDataCollection querystring) { - //instantiate it, since we are proxying, we need to setup the instance with our current context - var instance = (TreeController)DependencyResolver.Current.GetService(appTree.TreeControllerType); + if (tree == null) throw new ArgumentNullException(nameof(tree)); - //NOTE: This is all required in order to execute the auth-filters for the sub request, we + var controller = (TreeController) await GetApiControllerProxy(tree.TreeControllerType, "GetRootNode", querystring); + var rootNode = controller.GetRootNode(querystring); + if (rootNode == null) + throw new InvalidOperationException($"Failed to get root node for tree \"{tree.TreeAlias}\"."); + return rootNode; + } + + /// + /// Get the child nodes of a tree node. + /// + private async Task GetChildren(Tree tree, int id, FormDataCollection querystring) + { + if (tree == null) throw new ArgumentNullException(nameof(tree)); + + // the method we proxy has an 'id' parameter which is *not* in the querystring, + // we need to add it for the proxy to work (else, it does not find the method, + // when trying to run auth filters etc). + var d = querystring?.ToDictionary(x => x.Key, x => x.Value) ?? new Dictionary(); + d["id"] = null; + var proxyQuerystring = new FormDataCollection(d); + + var controller = (TreeController) await GetApiControllerProxy(tree.TreeControllerType, "GetNodes", proxyQuerystring); + return controller.GetNodes(id.ToInvariantString(), querystring); + } + + /// + /// Gets a proxy to a controller for a specified action. + /// + /// The type of the controller. + /// The action. + /// The querystring. + /// An instance of the controller. + /// + /// Creates an instance of the and initializes it with a route + /// and context etc. so it can execute the specified . Runs the authorization + /// filters for that action, to ensure that the user has permission to execute it. + /// + private async Task GetApiControllerProxy(Type controllerType, string action, FormDataCollection querystring) + { + // note: this is all required in order to execute the auth-filters for the sub request, we // need to "trick" web-api into thinking that it is actually executing the proxied controller. - var urlHelper = controllerContext.Request.GetUrlHelper(); - //create the proxied URL for the controller action - var proxiedUrl = controllerContext.Request.RequestUri.GetLeftPart(UriPartial.Authority) + - urlHelper.GetUmbracoApiService("GetRootNode", instance.GetType()); - //add the query strings to it - proxiedUrl += "?" + formCollection.ToQueryString(); - //create proxy route data specifying the action / controller to execute - var proxiedRouteData = new HttpRouteData( - controllerContext.RouteData.Route, - new HttpRouteValueDictionary(new { action = "GetRootNode", controller = ControllerExtensions.GetControllerName(instance.GetType()) })); + var context = ControllerContext; - //create a proxied controller context - var proxiedControllerContext = new HttpControllerContext( - controllerContext.Configuration, - proxiedRouteData, - new HttpRequestMessage(HttpMethod.Get, proxiedUrl)) + // get the controller + var controller = (ApiController) DependencyResolver.Current.GetService(controllerType) + ?? throw new Exception($"Failed to create controller of type {controllerType.FullName}."); + + // create the proxy URL for the controller action + var proxyUrl = context.Request.RequestUri.GetLeftPart(UriPartial.Authority) + + context.Request.GetUrlHelper().GetUmbracoApiService(action, controllerType) + + "?" + querystring.ToQueryString(); + + // create proxy route data specifying the action & controller to execute + var proxyRoute = new HttpRouteData( + context.RouteData.Route, + new HttpRouteValueDictionary(new { action, controller = ControllerExtensions.GetControllerName(controllerType) })); + + // create a proxy request + var proxyRequest = new HttpRequestMessage(HttpMethod.Get, proxyUrl); + + // create a proxy controller context + var proxyContext = new HttpControllerContext(context.Configuration, proxyRoute, proxyRequest) { - ControllerDescriptor = new HttpControllerDescriptor(controllerContext.ControllerDescriptor.Configuration, ControllerExtensions.GetControllerName(instance.GetType()), instance.GetType()), - RequestContext = controllerContext.RequestContext + ControllerDescriptor = new HttpControllerDescriptor(context.ControllerDescriptor.Configuration, ControllerExtensions.GetControllerName(controllerType), controllerType), + RequestContext = context.RequestContext, + Controller = controller }; - instance.ControllerContext = proxiedControllerContext; - instance.Request = controllerContext.Request; - instance.RequestContext.RouteData = proxiedRouteData; + // wire everything + controller.ControllerContext = proxyContext; + controller.Request = proxyContext.Request; + controller.RequestContext.RouteData = proxyRoute; - //invoke auth filters for this sub request - var result = await instance.ControllerContext.InvokeAuthorizationFiltersForRequest(); - //if a result is returned it means they are unauthorized, just throw the response. - if (result != null) - { - throw new HttpResponseException(result); - } + // auth + var authResult = await controller.ControllerContext.InvokeAuthorizationFiltersForRequest(); + if (authResult != null) + throw new HttpResponseException(authResult); - //return the root - var node = instance.GetRootNode(formCollection); - return node == null - ? Attempt.Fail(new InvalidOperationException("Could not return a root node for tree " + appTree.TreeAlias)) - : Attempt.Succeed(node); + return controller; } - - /// - /// Proxies a request to the destination tree controller to get it's tree node collection - /// - /// - /// - /// - /// - /// - private Attempt TryLoadFromControllerTree(Tree appTree, string id, FormDataCollection formCollection, HttpControllerContext controllerContext) - { - // instantiate it, since we are proxying, we need to setup the instance with our current context - var instance = (TreeController)DependencyResolver.Current.GetService(appTree.TreeControllerType); - if (instance == null) - throw new Exception("Failed to create tree " + appTree.TreeControllerType + "."); - - //TODO: Shouldn't we be applying the same proxying logic as above so that filters work? seems like an oversight - - instance.ControllerContext = controllerContext; - instance.Request = controllerContext.Request; - - // return its data - return Attempt.Succeed(instance.GetNodes(id, formCollection)); - } - } } diff --git a/src/Umbraco.Web/Trees/FilesTreeController.cs b/src/Umbraco.Web/Trees/FilesTreeController.cs index 7e326870e3..ce31b0978f 100644 --- a/src/Umbraco.Web/Trees/FilesTreeController.cs +++ b/src/Umbraco.Web/Trees/FilesTreeController.cs @@ -1,9 +1,10 @@ -using Umbraco.Core.IO; +using Umbraco.Core; +using Umbraco.Core.IO; using Umbraco.Web.Models.Trees; namespace Umbraco.Web.Trees { - // this is not a section tree - do not mark with [Tree] + [Tree(Constants.Applications.Settings, "files", TreeTitle = "Files", IconOpen = "icon-folder", IconClosed = "icon-folder", TreeUse = TreeUse.Dialog)] [CoreTree] public class FilesTreeController : FileSystemTreeController { diff --git a/src/Umbraco.Web/Trees/ITree.cs b/src/Umbraco.Web/Trees/ITree.cs index 4546ddce4f..8672c467bc 100644 --- a/src/Umbraco.Web/Trees/ITree.cs +++ b/src/Umbraco.Web/Trees/ITree.cs @@ -30,6 +30,11 @@ /// string TreeTitle { get; } + /// + /// Gets the tree use. + /// + TreeUse TreeUse { get; } + /// /// Flag to define if this tree is a single node tree (will never contain child nodes, full screen app) /// diff --git a/src/Umbraco.Web/Trees/LogViewerTreeController.cs b/src/Umbraco.Web/Trees/LogViewerTreeController.cs index 22a1c799d6..3d9490b9a0 100644 --- a/src/Umbraco.Web/Trees/LogViewerTreeController.cs +++ b/src/Umbraco.Web/Trees/LogViewerTreeController.cs @@ -7,9 +7,8 @@ using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Trees { [UmbracoTreeAuthorize(Constants.Trees.LogViewer)] - [Tree(Constants.Applications.Settings, Constants.Trees.LogViewer, null, sortOrder: 9)] + [Tree(Constants.Applications.Settings, Constants.Trees.LogViewer, SortOrder= 9, TreeGroup = Constants.Trees.Groups.Settings)] [PluginController("UmbracoTrees")] - [CoreTree(TreeGroup = Constants.Trees.Groups.Settings)] public class LogViewerTreeController : TreeController { protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) diff --git a/src/Umbraco.Web/Trees/Tree.cs b/src/Umbraco.Web/Trees/Tree.cs index b0a24e3b2b..37b379e292 100644 --- a/src/Umbraco.Web/Trees/Tree.cs +++ b/src/Umbraco.Web/Trees/Tree.cs @@ -4,16 +4,17 @@ using Umbraco.Core.Services; namespace Umbraco.Web.Trees { - [DebuggerDisplay("Tree - {TreeAlias} ({SectionAlias})")] + [DebuggerDisplay("Tree - {SectionAlias}/{TreeAlias}")] public class Tree : ITree { - public Tree(int sortOrder, string applicationAlias, string group, string alias, string title, Type treeControllerType, bool isSingleNodeTree) + public Tree(int sortOrder, string applicationAlias, string group, string alias, string title, TreeUse use, Type treeControllerType, bool isSingleNodeTree) { SortOrder = sortOrder; SectionAlias = applicationAlias; TreeGroup = group; TreeAlias = alias; TreeTitle = title; + TreeUse = use; TreeControllerType = treeControllerType; IsSingleNodeTree = isSingleNodeTree; } @@ -33,6 +34,9 @@ namespace Umbraco.Web.Trees /// public string TreeTitle { get; set; } + /// + public TreeUse TreeUse { get; set; } + /// public bool IsSingleNodeTree { get; } diff --git a/src/Umbraco.Web/Trees/TreeAttribute.cs b/src/Umbraco.Web/Trees/TreeAttribute.cs index bfd7b53f4a..2102bd4bfc 100644 --- a/src/Umbraco.Web/Trees/TreeAttribute.cs +++ b/src/Umbraco.Web/Trees/TreeAttribute.cs @@ -2,6 +2,28 @@ namespace Umbraco.Web.Trees { + // fixme move + [Flags] + public enum TreeUse + { + None = 0, + Main = 1, + Dialog = 2, + } + + public static class TreeUseExtensions + { + public static bool Has(this TreeUse use, TreeUse uses) + { + return use == uses; + } + + public static bool HasAny(this TreeUse use, TreeUse uses) + { + return (use & uses) > 0; + } + } + /// /// Identifies a section tree. /// @@ -37,6 +59,11 @@ namespace Umbraco.Web.Trees /// public string TreeGroup { get; set; } + /// + /// Gets the usage of the tree. + /// + public TreeUse TreeUse { get; set; } = TreeUse.Main; + /// /// Gets or sets the tree icon when closed. /// diff --git a/src/Umbraco.Web/Trees/TreeCollectionBuilder.cs b/src/Umbraco.Web/Trees/TreeCollectionBuilder.cs index ad2a99a6c7..438971ac41 100644 --- a/src/Umbraco.Web/Trees/TreeCollectionBuilder.cs +++ b/src/Umbraco.Web/Trees/TreeCollectionBuilder.cs @@ -34,7 +34,7 @@ namespace Umbraco.Web.Trees var attribute = controllerType.GetCustomAttribute(false); if (attribute == null) return; // todo - shouldn't we throw or at least log? - var tree = new Tree(attribute.SortOrder, attribute.SectionAlias, attribute.TreeGroup, attribute.TreeAlias, attribute.TreeTitle, controllerType, attribute.IsSingleNodeTree); + var tree = new Tree(attribute.SortOrder, attribute.SectionAlias, attribute.TreeGroup, attribute.TreeAlias, attribute.TreeTitle, attribute.TreeUse, controllerType, attribute.IsSingleNodeTree); _trees.Add(tree); } diff --git a/src/Umbraco.Web/Trees/TreeController.cs b/src/Umbraco.Web/Trees/TreeController.cs index bc9345eb1d..e6d948e19a 100644 --- a/src/Umbraco.Web/Trees/TreeController.cs +++ b/src/Umbraco.Web/Trees/TreeController.cs @@ -41,6 +41,9 @@ namespace Umbraco.Web.Trees /// public override string TreeTitle => _treeAttribute.TreeTitle; + /// + public override TreeUse TreeUse => _treeAttribute.TreeUse; + /// public override string SectionAlias => _treeAttribute.SectionAlias; diff --git a/src/Umbraco.Web/Trees/TreeControllerBase.cs b/src/Umbraco.Web/Trees/TreeControllerBase.cs index e2e9c21c66..12cf423c7d 100644 --- a/src/Umbraco.Web/Trees/TreeControllerBase.cs +++ b/src/Umbraco.Web/Trees/TreeControllerBase.cs @@ -68,6 +68,9 @@ namespace Umbraco.Web.Trees /// public abstract string TreeTitle { get; } + /// + public abstract TreeUse TreeUse { get; } + /// public abstract string SectionAlias { get; } diff --git a/src/Umbraco.Web/WebApi/HttpControllerContextExtensions.cs b/src/Umbraco.Web/WebApi/HttpControllerContextExtensions.cs index fee1f25ada..323e52eb36 100644 --- a/src/Umbraco.Web/WebApi/HttpControllerContextExtensions.cs +++ b/src/Umbraco.Web/WebApi/HttpControllerContextExtensions.cs @@ -1,8 +1,6 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using System.Net.Http; -using System.Runtime.Remoting.Contexts; using System.Threading; using System.Threading.Tasks; using System.Web.Http; @@ -15,52 +13,42 @@ namespace Umbraco.Web.WebApi internal static class HttpControllerContextExtensions { /// - /// This method will go an execute the authorization filters for the controller action, if any fail - /// it will return their response, otherwise we'll return null. + /// Invokes the authorization filters for the controller action. /// - /// + /// The response of the first filter returning a result, if any, otherwise null (authorized). internal static async Task InvokeAuthorizationFiltersForRequest(this HttpControllerContext controllerContext) { var controllerDescriptor = controllerContext.ControllerDescriptor; var controllerServices = controllerDescriptor.Configuration.Services; var actionDescriptor = controllerServices.GetActionSelector().SelectAction(controllerContext); - var actionContext = new HttpActionContext(controllerContext, actionDescriptor); + var filters = actionDescriptor.GetFilterPipeline(); var filterGrouping = new FilterGrouping(filters); - var actionFilters = filterGrouping.ActionFilters; - // Because the continuation gets built from the inside out we need to reverse the filter list - // so that least specific filters (Global) get run first and the most specific filters (Action) get run last. - var authorizationFilters = filterGrouping.AuthorizationFilters.Reverse().ToArray(); - if (authorizationFilters.Any()) - { - var cancelToken = new CancellationToken(); - var filterResult = await FilterContinuation(actionContext, cancelToken, authorizationFilters, 0); - if (filterResult != null) - { - //this means that the authorization filter has returned a result - unauthorized so we cannot continue - return filterResult; - } - } - return null; + // because the continuation gets built from the inside out we need to reverse the filter list + // so that least specific filters (Global) get run first and the most specific filters (Action) get run last. + var authorizationFilters = filterGrouping.AuthorizationFilters.Reverse().ToList(); + + if (authorizationFilters.Count == 0) + return null; + + // if the authorization filter returns a result, it means it failed to authorize + var actionContext = new HttpActionContext(controllerContext, actionDescriptor); + return await ExecuteAuthorizationFiltersAsync(actionContext, CancellationToken.None, authorizationFilters); } /// - /// This method is how you execute a chain of filters, it needs to recursively call in to itself as the continuation for the next filter in the chain + /// Executes a chain of filters. /// - /// - /// - /// - /// - /// - private static async Task FilterContinuation(HttpActionContext actionContext, CancellationToken token, IList filters, int index) + /// + /// Recursively calls in to itself as its continuation for the next filter in the chain. + /// + private static async Task ExecuteAuthorizationFiltersAsync(HttpActionContext actionContext, CancellationToken token, IList filters, int index = 0) { return await filters[index].ExecuteAuthorizationFilterAsync(actionContext, token, - () => (index + 1) == filters.Count + () => ++index == filters.Count ? Task.FromResult(null) - : FilterContinuation(actionContext, token, filters, ++index)); + : ExecuteAuthorizationFiltersAsync(actionContext, token, filters, index)); } - - } } From 5f80faa7256534390c0c60241871c6a6ee21e1e9 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Fri, 25 Jan 2019 09:52:18 +0100 Subject: [PATCH 266/437] Review fix suggestions for dashboards. --- src/Umbraco.Core/Dashboards/IAccessRule.cs | 5 +- .../Dashboards/IDashboardSection.cs | 12 +- ...gnoreDataMemberWhenSerializingAttribute.cs | 15 + src/Umbraco.Core/Manifest/ManifestParser.cs | 374 +++++++++--------- src/Umbraco.Core/Umbraco.Core.csproj | 1 + .../Dashboards/ContentDashboard.cs | 23 +- .../Dashboards/DashboardCollectionBuilder.cs | 30 +- .../Dashboards/ExamineDashboard.cs | 9 +- src/Umbraco.Web/Dashboards/FormsDashboard.cs | 9 +- .../Dashboards/HealthCheckDashboard.cs | 9 +- src/Umbraco.Web/Dashboards/MediaDashboard.cs | 9 +- .../Dashboards/MembersDashboard.cs | 9 +- .../Dashboards/ModelsBuilderDashboard.cs | 9 +- .../Dashboards/PublishedStatusDashboard.cs | 9 +- .../Dashboards/RedirectUrlDashboard.cs | 9 +- .../Dashboards/SettingsDashboards.cs | 9 +- .../Editors/DashboardController.cs | 2 + src/Umbraco.Web/Services/DashboardService.cs | 19 +- src/Umbraco.Web/Umbraco.Web.csproj | 1 + ...taMemberWhenSerializingContractResolver.cs | 31 ++ .../WebApi/JsonCamelCaseFormatter.cs | 3 +- 21 files changed, 310 insertions(+), 287 deletions(-) create mode 100644 src/Umbraco.Core/Manifest/IgnoreDataMemberWhenSerializingAttribute.cs create mode 100644 src/Umbraco.Web/WebApi/CamelCaseAndDataMemberWhenSerializingContractResolver.cs diff --git a/src/Umbraco.Core/Dashboards/IAccessRule.cs b/src/Umbraco.Core/Dashboards/IAccessRule.cs index f44a846248..e3ac583379 100644 --- a/src/Umbraco.Core/Dashboards/IAccessRule.cs +++ b/src/Umbraco.Core/Dashboards/IAccessRule.cs @@ -1,4 +1,7 @@ -namespace Umbraco.Core.Dashboards +using Newtonsoft.Json; +using Umbraco.Core.Manifest; + +namespace Umbraco.Core.Dashboards { /// /// Represents an access rule. diff --git a/src/Umbraco.Core/Dashboards/IDashboardSection.cs b/src/Umbraco.Core/Dashboards/IDashboardSection.cs index 90d351bcd2..7b5963c9f5 100644 --- a/src/Umbraco.Core/Dashboards/IDashboardSection.cs +++ b/src/Umbraco.Core/Dashboards/IDashboardSection.cs @@ -1,30 +1,40 @@ -namespace Umbraco.Core.Dashboards +using System.Runtime.Serialization; +using Umbraco.Core.Manifest; + +namespace Umbraco.Core.Dashboards { public interface IDashboardSection { /// /// Display name of the dashboard tab /// + [DataMember(Name="name")] string Name { get; } /// /// Alias to refer to this dashboard via code /// + [DataMember(Name = "alias")] string Alias { get; } /// /// A collection of sections/application aliases that this dashboard will appear on /// + [DataMember(Name = "sections")] + [IgnoreDataMemberWhenSerializing] string[] Sections { get; } /// /// The HTML view to load for the dashboard /// + [DataMember(Name = "view")] string View { get; } /// /// Dashboards can be shown/hidden based on access rights /// + [DataMember(Name = "access")] + [IgnoreDataMemberWhenSerializing] IAccessRule[] AccessRules { get; } } } diff --git a/src/Umbraco.Core/Manifest/IgnoreDataMemberWhenSerializingAttribute.cs b/src/Umbraco.Core/Manifest/IgnoreDataMemberWhenSerializingAttribute.cs new file mode 100644 index 0000000000..8486e1b6a9 --- /dev/null +++ b/src/Umbraco.Core/Manifest/IgnoreDataMemberWhenSerializingAttribute.cs @@ -0,0 +1,15 @@ +using System; +using System.Runtime.Serialization; + +namespace Umbraco.Core.Manifest +{ + /// + /// When applied to the member of a type, specifies that the member is not part of a data contract when + /// serialized but still when deserialized as opposite to . + /// + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = false)] + public class IgnoreDataMemberWhenSerializingAttribute : Attribute + { + + } +} diff --git a/src/Umbraco.Core/Manifest/ManifestParser.cs b/src/Umbraco.Core/Manifest/ManifestParser.cs index 01bc0b1983..674449c4f0 100644 --- a/src/Umbraco.Core/Manifest/ManifestParser.cs +++ b/src/Umbraco.Core/Manifest/ManifestParser.cs @@ -1,184 +1,190 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using Newtonsoft.Json; -using Umbraco.Core.Cache; -using Umbraco.Core.Exceptions; -using Umbraco.Core.IO; -using Umbraco.Core.Logging; -using Umbraco.Core.Models.ContentEditing; -using Umbraco.Core.Models.Trees; -using Umbraco.Core.PropertyEditors; - -namespace Umbraco.Core.Manifest -{ - /// - /// Parses the Main.js file and replaces all tokens accordingly. - /// - public class ManifestParser - { - private static readonly string Utf8Preamble = Encoding.UTF8.GetString(Encoding.UTF8.GetPreamble()); - - private readonly IAppPolicyCache _cache; - private readonly ILogger _logger; - private readonly ManifestValueValidatorCollection _validators; - - private string _path; - - /// - /// Initializes a new instance of the class. - /// - public ManifestParser(AppCaches appCaches, ManifestValueValidatorCollection validators, ILogger logger) - : this(appCaches, validators, "~/App_Plugins", logger) - { } - - /// - /// Initializes a new instance of the class. - /// - private ManifestParser(AppCaches appCaches, ManifestValueValidatorCollection validators, string path, ILogger logger) - { - if (appCaches == null) throw new ArgumentNullException(nameof(appCaches)); - _cache = appCaches.RuntimeCache; - _validators = validators ?? throw new ArgumentNullException(nameof(validators)); - if (string.IsNullOrWhiteSpace(path)) throw new ArgumentNullOrEmptyException(nameof(path)); - Path = path; - _logger = logger ?? throw new ArgumentNullException(nameof(logger)); - } - - public string Path - { - get => _path; - set => _path = value.StartsWith("~/") ? IOHelper.MapPath(value) : value; - } - - /// - /// Gets all manifests, merged into a single manifest object. - /// - /// - public PackageManifest Manifest - => _cache.GetCacheItem("Umbraco.Core.Manifest.ManifestParser::Manifests", () => - { - var manifests = GetManifests(); - return MergeManifests(manifests); - }, new TimeSpan(0, 4, 0)); - - /// - /// Gets all manifests. - /// - private IEnumerable GetManifests() - { - var manifests = new List(); - - foreach (var path in GetManifestFiles()) - { - try - { - var text = File.ReadAllText(path); - text = TrimPreamble(text); - if (string.IsNullOrWhiteSpace(text)) - continue; - var manifest = ParseManifest(text); - manifests.Add(manifest); - } - catch (Exception e) - { - _logger.Error(e, "Failed to parse manifest at '{Path}', ignoring.", path); - } - } - - return manifests; - } - - /// - /// Merges all manifests into one. - /// - private static PackageManifest MergeManifests(IEnumerable manifests) - { - var scripts = new HashSet(); - var stylesheets = new HashSet(); - var propertyEditors = new List(); - var parameterEditors = new List(); - var gridEditors = new List(); - var contentApps = new List(); - var dashboards = new List(); - var sections = new List(); - - foreach (var manifest in manifests) - { - if (manifest.Scripts != null) foreach (var script in manifest.Scripts) scripts.Add(script); - if (manifest.Stylesheets != null) foreach (var stylesheet in manifest.Stylesheets) stylesheets.Add(stylesheet); - if (manifest.PropertyEditors != null) propertyEditors.AddRange(manifest.PropertyEditors); - if (manifest.ParameterEditors != null) parameterEditors.AddRange(manifest.ParameterEditors); - if (manifest.GridEditors != null) gridEditors.AddRange(manifest.GridEditors); - if (manifest.ContentApps != null) contentApps.AddRange(manifest.ContentApps); - if (manifest.Dashboards != null) dashboards.AddRange(manifest.Dashboards); - if (manifest.Sections != null) sections.AddRange(manifest.Sections.DistinctBy(x => x.Alias.ToLowerInvariant())); - } - - return new PackageManifest - { - Scripts = scripts.ToArray(), - Stylesheets = stylesheets.ToArray(), - PropertyEditors = propertyEditors.ToArray(), - ParameterEditors = parameterEditors.ToArray(), - GridEditors = gridEditors.ToArray(), - ContentApps = contentApps.ToArray(), - Dashboards = dashboards.ToArray(), - Sections = sections.ToArray() - }; - } - - // gets all manifest files (recursively) - private IEnumerable GetManifestFiles() - { - if (Directory.Exists(_path) == false) - return new string[0]; - return Directory.GetFiles(_path, "package.manifest", SearchOption.AllDirectories); - } - - private static string TrimPreamble(string text) - { - // strangely StartsWith(preamble) would always return true - if (text.Substring(0, 1) == Utf8Preamble) - text = text.Remove(0, Utf8Preamble.Length); - - return text; - } - - /// - /// Parses a manifest. - /// - internal PackageManifest ParseManifest(string text) - { - if (string.IsNullOrWhiteSpace(text)) - throw new ArgumentNullOrEmptyException(nameof(text)); - - var manifest = JsonConvert.DeserializeObject(text, - new DataEditorConverter(_logger), - new ValueValidatorConverter(_validators), - new DashboardAccessRuleConverter()); - - // scripts and stylesheets are raw string, must process here - for (var i = 0; i < manifest.Scripts.Length; i++) - manifest.Scripts[i] = IOHelper.ResolveVirtualUrl(manifest.Scripts[i]); - for (var i = 0; i < manifest.Stylesheets.Length; i++) - manifest.Stylesheets[i] = IOHelper.ResolveVirtualUrl(manifest.Stylesheets[i]); - - // add property editors that are also parameter editors, to the parameter editors list - // (the manifest format is kinda legacy) - var ppEditors = manifest.PropertyEditors.Where(x => (x.Type & EditorType.MacroParameter) > 0).ToList(); - if (ppEditors.Count > 0) - manifest.ParameterEditors = manifest.ParameterEditors.Union(ppEditors).ToArray(); - - return manifest; - } - - // purely for tests - internal IEnumerable ParseGridEditors(string text) - { - return JsonConvert.DeserializeObject>(text); - } - } -} +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using Newtonsoft.Json; +using Umbraco.Core.Cache; +using Umbraco.Core.Exceptions; +using Umbraco.Core.IO; +using Umbraco.Core.Logging; +using Umbraco.Core.Models.ContentEditing; +using Umbraco.Core.Models.Trees; +using Umbraco.Core.PropertyEditors; + +namespace Umbraco.Core.Manifest +{ + /// + /// Parses the Main.js file and replaces all tokens accordingly. + /// + public class ManifestParser + { + private static readonly string Utf8Preamble = Encoding.UTF8.GetString(Encoding.UTF8.GetPreamble()); + + private readonly IAppPolicyCache _cache; + private readonly ILogger _logger; + private readonly ManifestValueValidatorCollection _validators; + + private string _path; + + /// + /// Initializes a new instance of the class. + /// + public ManifestParser(AppCaches appCaches, ManifestValueValidatorCollection validators, ILogger logger) + : this(appCaches, validators, "~/App_Plugins", logger) + { } + + /// + /// Initializes a new instance of the class. + /// + private ManifestParser(AppCaches appCaches, ManifestValueValidatorCollection validators, string path, ILogger logger) + { + if (appCaches == null) throw new ArgumentNullException(nameof(appCaches)); + _cache = appCaches.RuntimeCache; + _validators = validators ?? throw new ArgumentNullException(nameof(validators)); + if (string.IsNullOrWhiteSpace(path)) throw new ArgumentNullOrEmptyException(nameof(path)); + Path = path; + _logger = logger ?? throw new ArgumentNullException(nameof(logger)); + } + + public string Path + { + get => _path; + set => _path = value.StartsWith("~/") ? IOHelper.MapPath(value) : value; + } + + /// + /// Gets all manifests, merged into a single manifest object. + /// + /// + public PackageManifest Manifest + => _cache.GetCacheItem("Umbraco.Core.Manifest.ManifestParser::Manifests", () => + { + var manifests = GetManifests(); + return MergeManifests(manifests); + }, new TimeSpan(0, 4, 0)); + + /// + /// Gets all manifests. + /// + private IEnumerable GetManifests() + { + var manifests = new List(); + + foreach (var path in GetManifestFiles()) + { + try + { + var text = File.ReadAllText(path); + text = TrimPreamble(text); + if (string.IsNullOrWhiteSpace(text)) + continue; + var manifest = ParseManifest(text); + manifests.Add(manifest); + } + catch (Exception e) + { + _logger.Error(e, "Failed to parse manifest at '{Path}', ignoring.", path); + } + } + + return manifests; + } + + /// + /// Merges all manifests into one. + /// + private static PackageManifest MergeManifests(IEnumerable manifests) + { + var scripts = new HashSet(); + var stylesheets = new HashSet(); + var propertyEditors = new List(); + var parameterEditors = new List(); + var gridEditors = new List(); + var contentApps = new List(); + var dashboards = new List(); + var sections = new List(); + + foreach (var manifest in manifests) + { + if (manifest.Scripts != null) foreach (var script in manifest.Scripts) scripts.Add(script); + if (manifest.Stylesheets != null) foreach (var stylesheet in manifest.Stylesheets) stylesheets.Add(stylesheet); + if (manifest.PropertyEditors != null) propertyEditors.AddRange(manifest.PropertyEditors); + if (manifest.ParameterEditors != null) parameterEditors.AddRange(manifest.ParameterEditors); + if (manifest.GridEditors != null) gridEditors.AddRange(manifest.GridEditors); + if (manifest.ContentApps != null) contentApps.AddRange(manifest.ContentApps); + if (manifest.Dashboards != null) dashboards.AddRange(manifest.Dashboards); + if (manifest.Sections != null) sections.AddRange(manifest.Sections.DistinctBy(x => x.Alias.ToLowerInvariant())); + } + + return new PackageManifest + { + Scripts = scripts.ToArray(), + Stylesheets = stylesheets.ToArray(), + PropertyEditors = propertyEditors.ToArray(), + ParameterEditors = parameterEditors.ToArray(), + GridEditors = gridEditors.ToArray(), + ContentApps = contentApps.ToArray(), + Dashboards = dashboards.ToArray(), + Sections = sections.ToArray() + }; + } + + // gets all manifest files (recursively) + private IEnumerable GetManifestFiles() + { + if (Directory.Exists(_path) == false) + return new string[0]; + return Directory.GetFiles(_path, "package.manifest", SearchOption.AllDirectories); + } + + private static string TrimPreamble(string text) + { + // strangely StartsWith(preamble) would always return true + if (text.Substring(0, 1) == Utf8Preamble) + text = text.Remove(0, Utf8Preamble.Length); + + return text; + } + + /// + /// Parses a manifest. + /// + internal PackageManifest ParseManifest(string text) + { + if (string.IsNullOrWhiteSpace(text)) + throw new ArgumentNullOrEmptyException(nameof(text)); + + var manifest = JsonConvert.DeserializeObject(text, new JsonSerializerSettings() + { + Converters = new JsonConverter[] + { + new DataEditorConverter(_logger), + new ValueValidatorConverter(_validators), + new DashboardAccessRuleConverter() + }, + } + ); + + // scripts and stylesheets are raw string, must process here + for (var i = 0; i < manifest.Scripts.Length; i++) + manifest.Scripts[i] = IOHelper.ResolveVirtualUrl(manifest.Scripts[i]); + for (var i = 0; i < manifest.Stylesheets.Length; i++) + manifest.Stylesheets[i] = IOHelper.ResolveVirtualUrl(manifest.Stylesheets[i]); + + // add property editors that are also parameter editors, to the parameter editors list + // (the manifest format is kinda legacy) + var ppEditors = manifest.PropertyEditors.Where(x => (x.Type & EditorType.MacroParameter) > 0).ToList(); + if (ppEditors.Count > 0) + manifest.ParameterEditors = manifest.ParameterEditors.Union(ppEditors).ToArray(); + + return manifest; + } + + // purely for tests + internal IEnumerable ParseGridEditors(string text) + { + return JsonConvert.DeserializeObject>(text); + } + } +} diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 1f6141d834..ebd0e2735b 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -354,6 +354,7 @@ + diff --git a/src/Umbraco.Web/Dashboards/ContentDashboard.cs b/src/Umbraco.Web/Dashboards/ContentDashboard.cs index c184e593aa..6a41b07c2c 100644 --- a/src/Umbraco.Web/Dashboards/ContentDashboard.cs +++ b/src/Umbraco.Web/Dashboards/ContentDashboard.cs @@ -1,37 +1,30 @@ -using System.Collections.Generic; -using System.Runtime.Serialization; +using Umbraco.Core; using Umbraco.Core.Composing; using Umbraco.Core.Dashboards; namespace Umbraco.Web.Dashboards { [Weight(10)] - //[HideFromTypeFinder] - [DataContract] public class ContentDashboard : IDashboardSection { - [DataMember(Name = "name")] public string Name => "Get Started"; - [DataMember(Name = "alias")] public string Alias => "contentIntro"; - [IgnoreDataMember] - public string[] Sections => new string[] { "content" }; + public string[] Sections => new [] { "content" }; - [DataMember(Name = "view")] public string View => "views/dashboard/default/startupdashboardintro.html"; - [IgnoreDataMember] public IAccessRule[] AccessRules { get { - //TODO: WB Not convinced these rules work correctly?! - var rules = new List(); - rules.Add(new AccessRule { Type = AccessRuleType.Deny, Value = "translator" }); - rules.Add(new AccessRule { Type = AccessRuleType.Grant, Value = "admin" }); - return rules.ToArray(); + var rules = new IAccessRule[] + { + new AccessRule {Type = AccessRuleType.Deny, Value = Constants.Security.TranslatorGroupAlias}, + new AccessRule {Type = AccessRuleType.Grant, Value = Constants.Security.AdminGroupAlias} + }; + return rules; } } } diff --git a/src/Umbraco.Web/Dashboards/DashboardCollectionBuilder.cs b/src/Umbraco.Web/Dashboards/DashboardCollectionBuilder.cs index d4a89a61b2..336625c415 100644 --- a/src/Umbraco.Web/Dashboards/DashboardCollectionBuilder.cs +++ b/src/Umbraco.Web/Dashboards/DashboardCollectionBuilder.cs @@ -8,7 +8,7 @@ namespace Umbraco.Web.Dashboards { public class DashboardCollectionBuilder : WeightedCollectionBuilderBase { - protected override DashboardCollectionBuilder This => this; + protected override DashboardCollectionBuilder This => this; protected override IEnumerable CreateItems(IFactory factory) { @@ -17,8 +17,32 @@ namespace Umbraco.Web.Dashboards // its dependencies too, and that can create cycles or other oddities var manifestParser = factory.GetInstance(); - //TODO WB: We will need to re-sort items from package manifest with the C# Types - return base.CreateItems(factory).Concat(manifestParser.Manifest.Dashboards); + var dashboardSections = Merge(base.CreateItems(factory).ToArray(), manifestParser.Manifest.Dashboards); + + return dashboardSections; + } + + private IEnumerable Merge(IReadOnlyList dashboardsFromCode, IReadOnlyList dashboardFromManifest) + { + var list = dashboardsFromCode.Concat(dashboardFromManifest) + .Where(x=>!string.IsNullOrEmpty(x.Alias)) + .Select(x => (Weight: GetWeight(x), DashboardSection: x)) + .OrderBy(x=>x.Weight); + + return list.Select(x => x.DashboardSection); + } + + private static int GetWeight(IDashboardSection dashboardSection) + { + switch (dashboardSection) + { + case ManifestDashboardDefinition danifestDashboardDefinition: + return danifestDashboardDefinition.Weight; + default: + var weightAttribute = dashboardSection.GetType().GetCustomAttributes(typeof(WeightAttribute), false) + .Cast().FirstOrDefault(); + return weightAttribute.Weight; + } } } } diff --git a/src/Umbraco.Web/Dashboards/ExamineDashboard.cs b/src/Umbraco.Web/Dashboards/ExamineDashboard.cs index 5f04a4b78d..e686545b51 100644 --- a/src/Umbraco.Web/Dashboards/ExamineDashboard.cs +++ b/src/Umbraco.Web/Dashboards/ExamineDashboard.cs @@ -1,27 +1,20 @@ using System; -using System.Runtime.Serialization; using Umbraco.Core.Composing; using Umbraco.Core.Dashboards; namespace Umbraco.Web.Dashboards { [Weight(20)] - [DataContract] public class ExamineDashboard : IDashboardSection { - [DataMember(Name = "name")] public string Name => "Examine Management"; - [DataMember(Name = "alias")] public string Alias => "settingsExamine"; - [IgnoreDataMember] - public string[] Sections => new string[] { "settings" }; + public string[] Sections => new [] { "settings" }; - [DataMember(Name = "view")] public string View => "views/dashboard/settings/examinemanagement.html"; - [IgnoreDataMember] public IAccessRule[] AccessRules => Array.Empty(); } diff --git a/src/Umbraco.Web/Dashboards/FormsDashboard.cs b/src/Umbraco.Web/Dashboards/FormsDashboard.cs index c9e8e06b7d..3592c88d13 100644 --- a/src/Umbraco.Web/Dashboards/FormsDashboard.cs +++ b/src/Umbraco.Web/Dashboards/FormsDashboard.cs @@ -1,27 +1,20 @@ using System; -using System.Runtime.Serialization; using Umbraco.Core.Composing; using Umbraco.Core.Dashboards; namespace Umbraco.Web.Dashboards { [Weight(10)] - [DataContract] public class FormsDashboard : IDashboardSection { - [DataMember(Name = "name")] public string Name => "Install Umbraco Forms"; - [DataMember(Name = "alias")] public string Alias => "formsInstall"; - [IgnoreDataMember] - public string[] Sections => new string[] { "forms" }; + public string[] Sections => new [] { "forms" }; - [DataMember(Name = "view")] public string View => "views/dashboard/forms/formsdashboardintro.html"; - [IgnoreDataMember] public IAccessRule[] AccessRules => Array.Empty(); } } diff --git a/src/Umbraco.Web/Dashboards/HealthCheckDashboard.cs b/src/Umbraco.Web/Dashboards/HealthCheckDashboard.cs index 808dc099e8..b7373a6d44 100644 --- a/src/Umbraco.Web/Dashboards/HealthCheckDashboard.cs +++ b/src/Umbraco.Web/Dashboards/HealthCheckDashboard.cs @@ -1,27 +1,20 @@ using System; -using System.Runtime.Serialization; using Umbraco.Core.Composing; using Umbraco.Core.Dashboards; namespace Umbraco.Web.Dashboards { [Weight(50)] - [DataContract] public class HealthCheckDashboard : IDashboardSection { - [DataMember(Name="name")] public string Name => "Health Check"; - [DataMember(Name = "alias")] public string Alias => "settingsHealthCheck"; - [IgnoreDataMember] - public string[] Sections => new string[] { "settings" }; + public string[] Sections => new [] { "settings" }; - [DataMember(Name = "view")] public string View => "views/dashboard/settings/healthcheck.html"; - [IgnoreDataMember] public IAccessRule[] AccessRules => Array.Empty(); } diff --git a/src/Umbraco.Web/Dashboards/MediaDashboard.cs b/src/Umbraco.Web/Dashboards/MediaDashboard.cs index c122ba1f7f..c72046388e 100644 --- a/src/Umbraco.Web/Dashboards/MediaDashboard.cs +++ b/src/Umbraco.Web/Dashboards/MediaDashboard.cs @@ -1,27 +1,20 @@ using System; -using System.Runtime.Serialization; using Umbraco.Core.Composing; using Umbraco.Core.Dashboards; namespace Umbraco.Web.Dashboards { [Weight(10)] - [DataContract] public class MediaDashboard : IDashboardSection { - [DataMember(Name = "name")] public string Name => "Content"; - [DataMember(Name = "alias")] public string Alias => "mediaFolderBrowser"; - [IgnoreDataMember] - public string[] Sections => new string[] { "media" }; + public string[] Sections => new [] { "media" }; - [DataMember(Name = "view")] public string View => "views/dashboard/media/mediafolderbrowser.html"; - [IgnoreDataMember] public IAccessRule[] AccessRules => Array.Empty(); } } diff --git a/src/Umbraco.Web/Dashboards/MembersDashboard.cs b/src/Umbraco.Web/Dashboards/MembersDashboard.cs index 9da6f59108..44aa6c4de6 100644 --- a/src/Umbraco.Web/Dashboards/MembersDashboard.cs +++ b/src/Umbraco.Web/Dashboards/MembersDashboard.cs @@ -1,27 +1,20 @@ using System; -using System.Runtime.Serialization; using Umbraco.Core.Composing; using Umbraco.Core.Dashboards; namespace Umbraco.Web.Dashboards { [Weight(10)] - [DataContract] public class MembersDashboard : IDashboardSection { - [DataMember(Name = "name")] public string Name => "Get Started"; - [DataMember(Name = "alias")] public string Alias => "memberIntro"; - [IgnoreDataMember] - public string[] Sections => new string[] { "member" }; + public string[] Sections => new [] { "member" }; - [DataMember(Name = "view")] public string View => "views/dashboard/members/membersdashboardvideos.html"; - [IgnoreDataMember] public IAccessRule[] AccessRules => Array.Empty(); } } diff --git a/src/Umbraco.Web/Dashboards/ModelsBuilderDashboard.cs b/src/Umbraco.Web/Dashboards/ModelsBuilderDashboard.cs index f25a9f7ea0..431e129840 100644 --- a/src/Umbraco.Web/Dashboards/ModelsBuilderDashboard.cs +++ b/src/Umbraco.Web/Dashboards/ModelsBuilderDashboard.cs @@ -1,27 +1,20 @@ using System; -using System.Runtime.Serialization; using Umbraco.Core.Composing; using Umbraco.Core.Dashboards; namespace Umbraco.Web.Dashboards { [Weight(40)] - [DataContract] public class ModelsBuilderDashboard : IDashboardSection { - [DataMember(Name = "name")] public string Name => "Models Builder"; - [DataMember(Name = "alias")] public string Alias => "settingsModelsBuilder"; - [IgnoreDataMember] - public string[] Sections => new string[] { "settings" }; + public string[] Sections => new [] { "settings" }; - [DataMember(Name = "view")] public string View => "/App_Plugins/ModelsBuilder/modelsbuilder.htm"; - [IgnoreDataMember] public IAccessRule[] AccessRules => Array.Empty(); } diff --git a/src/Umbraco.Web/Dashboards/PublishedStatusDashboard.cs b/src/Umbraco.Web/Dashboards/PublishedStatusDashboard.cs index d2fa5b217b..5feca94324 100644 --- a/src/Umbraco.Web/Dashboards/PublishedStatusDashboard.cs +++ b/src/Umbraco.Web/Dashboards/PublishedStatusDashboard.cs @@ -1,27 +1,20 @@ using System; -using System.Runtime.Serialization; using Umbraco.Core.Composing; using Umbraco.Core.Dashboards; namespace Umbraco.Web.Dashboards { [Weight(30)] - [DataContract] public class PublishedStatusDashboard : IDashboardSection { - [DataMember(Name = "name")] public string Name => "Published Status"; - [DataMember(Name = "alias")] public string Alias => "settingsPublishedStatus"; - [IgnoreDataMember] - public string[] Sections => new string[] { "settings" }; + public string[] Sections => new [] { "settings" }; - [DataMember(Name = "view")] public string View => "views/dashboard/settings/publishedstatus.html"; - [IgnoreDataMember] public IAccessRule[] AccessRules => Array.Empty(); } diff --git a/src/Umbraco.Web/Dashboards/RedirectUrlDashboard.cs b/src/Umbraco.Web/Dashboards/RedirectUrlDashboard.cs index 731d259d39..748db64658 100644 --- a/src/Umbraco.Web/Dashboards/RedirectUrlDashboard.cs +++ b/src/Umbraco.Web/Dashboards/RedirectUrlDashboard.cs @@ -1,27 +1,20 @@ using System; -using System.Runtime.Serialization; using Umbraco.Core.Composing; using Umbraco.Core.Dashboards; namespace Umbraco.Web.Dashboards { [Weight(20)] - [DataContract] public class RedirectUrlDashboard : IDashboardSection { - [DataMember(Name = "name")] public string Name => "Redirect URL Management"; - [DataMember(Name = "alias")] public string Alias => "contentRedirectManager"; - [IgnoreDataMember] - public string[] Sections => new string[] { "content" }; + public string[] Sections => new [] { "content" }; - [DataMember(Name = "view")] public string View => "views/dashboard/content/redirecturls.html"; - [IgnoreDataMember] public IAccessRule[] AccessRules => Array.Empty(); } } diff --git a/src/Umbraco.Web/Dashboards/SettingsDashboards.cs b/src/Umbraco.Web/Dashboards/SettingsDashboards.cs index 47c1723075..b5ab56c319 100644 --- a/src/Umbraco.Web/Dashboards/SettingsDashboards.cs +++ b/src/Umbraco.Web/Dashboards/SettingsDashboards.cs @@ -1,27 +1,20 @@ using System; -using System.Runtime.Serialization; using Umbraco.Core.Composing; using Umbraco.Core.Dashboards; namespace Umbraco.Web.Dashboards { [Weight(10)] - [DataContract] public class SettingsDashboard : IDashboardSection { - [DataMember(Name = "name")] public string Name => "Welcome"; - [DataMember(Name = "alias")] public string Alias => "settingsWelcome"; - [IgnoreDataMember] - public string[] Sections => new string[] { "settings" }; + public string[] Sections => new [] { "settings" }; - [DataMember(Name = "view")] public string View => "views/dashboard/settings/settingsdashboardintro.html"; - [IgnoreDataMember] public IAccessRule[] AccessRules => Array.Empty(); } } diff --git a/src/Umbraco.Web/Editors/DashboardController.cs b/src/Umbraco.Web/Editors/DashboardController.cs index 11d31a86b4..00635d852f 100644 --- a/src/Umbraco.Web/Editors/DashboardController.cs +++ b/src/Umbraco.Web/Editors/DashboardController.cs @@ -27,6 +27,8 @@ namespace Umbraco.Web.Editors [AngularJsonOnlyConfiguration] [IsBackOffice] [WebApi.UmbracoAuthorize] + [JsonCamelCaseFormatter] + public class DashboardController : UmbracoApiController { private readonly IDashboardService _dashboardService; diff --git a/src/Umbraco.Web/Services/DashboardService.cs b/src/Umbraco.Web/Services/DashboardService.cs index 9f70f876a3..89f241252f 100644 --- a/src/Umbraco.Web/Services/DashboardService.cs +++ b/src/Umbraco.Web/Services/DashboardService.cs @@ -20,7 +20,7 @@ namespace Umbraco.Web.Services _dashboardCollection = dashboardCollection ?? throw new ArgumentNullException(nameof(dashboardCollection)); } - + /// public IEnumerable> GetDashboards(string section, IUser currentUser) { @@ -32,20 +32,19 @@ namespace Umbraco.Web.Services // validate access if (!CheckUserAccessByRules(currentUser, _sectionService, dashboard.AccessRules)) continue; - + if (dashboard.View.InvariantEndsWith(".ascx")) throw new NotSupportedException("Legacy UserControl (.ascx) dashboards are no longer supported."); - var dashboards = new List(); - dashboards.Add(dashboard); + var dashboards = new List {dashboard}; - tabs.Add(new Tab() + tabs.Add(new Tab { Id = tabId++, Label = dashboard.Name, Alias = dashboard.Alias, Properties = dashboards - }); + }); } return tabs; @@ -56,7 +55,7 @@ namespace Umbraco.Web.Services { return _sectionService.GetSections().ToDictionary(x => x.Alias, x => GetDashboards(x.Alias, currentUser)); } - + private bool CheckUserAccessByRules(IUser user, ISectionService sectionService, IEnumerable rules) { if (user.Id == Constants.Security.SuperUserId) @@ -97,7 +96,7 @@ namespace Umbraco.Web.Services } if (!hasAccess || denyRules.Length == 0) - return false; + return true; // check if this item has any deny arguments, if so check if the user is in one of the denied user groups, if so they will // be denied to see it no matter what @@ -110,7 +109,7 @@ namespace Umbraco.Web.Services return hasAccess; } - private (IAccessRule[], IAccessRule[], IAccessRule[]) GroupRules(IEnumerable rules) + private static (IAccessRule[], IAccessRule[], IAccessRule[]) GroupRules(IEnumerable rules) { IAccessRule[] denyRules = null, grantRules = null, grantBySectionRules = null; @@ -130,7 +129,7 @@ namespace Umbraco.Web.Services grantBySectionRules = a; break; default: - throw new Exception("panic"); + throw new NotSupportedException($"The '{group.Key.ToString()}'-AccessRuleType is not supported."); } } diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index f81eff75ad..c3ff7d47da 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -262,6 +262,7 @@ + diff --git a/src/Umbraco.Web/WebApi/CamelCaseAndDataMemberWhenSerializingContractResolver.cs b/src/Umbraco.Web/WebApi/CamelCaseAndDataMemberWhenSerializingContractResolver.cs new file mode 100644 index 0000000000..49ab02a12e --- /dev/null +++ b/src/Umbraco.Web/WebApi/CamelCaseAndDataMemberWhenSerializingContractResolver.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using Newtonsoft.Json.Serialization; +using Umbraco.Core.Manifest; + +namespace Umbraco.Web.WebApi +{ + + public class CamelCaseAndDataMemberWhenSerializingContractResolver : CamelCasePropertyNamesContractResolver + { + /// + protected override List GetSerializableMembers(Type objectType) + { + return base.GetSerializableMembers(objectType) + .Where(HasNotTheIgnoreDataMemberWhenSerializingAttribute) + .ToList(); + } + + private bool HasNotTheIgnoreDataMemberWhenSerializingAttribute(MemberInfo member) + { + if (member.GetCustomAttributes(typeof(IgnoreDataMemberWhenSerializingAttribute), true).Any()) + { + return false; + } + + return true; + } + } +} diff --git a/src/Umbraco.Web/WebApi/JsonCamelCaseFormatter.cs b/src/Umbraco.Web/WebApi/JsonCamelCaseFormatter.cs index 19683f7f86..5803afc819 100644 --- a/src/Umbraco.Web/WebApi/JsonCamelCaseFormatter.cs +++ b/src/Umbraco.Web/WebApi/JsonCamelCaseFormatter.cs @@ -4,6 +4,7 @@ using System.Net.Http.Formatting; using System.Web.Http.Controllers; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; +using Umbraco.Core.Manifest; namespace Umbraco.Web.WebApi { @@ -25,7 +26,7 @@ namespace Umbraco.Web.WebApi { SerializerSettings = { - ContractResolver = new CamelCasePropertyNamesContractResolver() + ContractResolver = new CamelCaseAndDataMemberWhenSerializingContractResolver() } }; controllerSettings.Formatters.Add(jsonFormatter); From 6626edbfa8aab59ce4a090d2982d8796a4b8faef Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Fri, 25 Jan 2019 10:04:18 +0100 Subject: [PATCH 267/437] unused using --- .../Editors/DashboardController.cs | 252 ++++++++++-------- 1 file changed, 145 insertions(+), 107 deletions(-) diff --git a/src/Umbraco.Web/Editors/DashboardController.cs b/src/Umbraco.Web/Editors/DashboardController.cs index 00635d852f..825ffb7314 100644 --- a/src/Umbraco.Web/Editors/DashboardController.cs +++ b/src/Umbraco.Web/Editors/DashboardController.cs @@ -1,144 +1,182 @@ -using System.Collections.Generic; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Web.Models.ContentEditing; -using Umbraco.Web.Mvc; -using Newtonsoft.Json.Linq; -using System.Threading.Tasks; -using System.Net.Http; -using System.Web.Http; -using System; -using System.Net; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; using System.Text; +using Newtonsoft.Json; using Umbraco.Core.Cache; -using Umbraco.Web.WebApi; -using Umbraco.Web.WebApi.Filters; +using Umbraco.Core.Exceptions; +using Umbraco.Core.IO; using Umbraco.Core.Logging; -using Umbraco.Core.Persistence; -using Umbraco.Core.Services; -using Umbraco.Core.Dashboards; -using Umbraco.Web.Services; +using Umbraco.Core.PropertyEditors; -namespace Umbraco.Web.Editors +namespace Umbraco.Core.Manifest { - //we need to fire up the controller like this to enable loading of remote css directly from this controller - [PluginController("UmbracoApi")] - [ValidationFilter] - [AngularJsonOnlyConfiguration] - [IsBackOffice] - [WebApi.UmbracoAuthorize] - [JsonCamelCaseFormatter] - - public class DashboardController : UmbracoApiController + /// + /// Parses the Main.js file and replaces all tokens accordingly. + /// + public class ManifestParser { - private readonly IDashboardService _dashboardService; + private static readonly string Utf8Preamble = Encoding.UTF8.GetString(Encoding.UTF8.GetPreamble()); + + private readonly IAppPolicyCache _cache; + private readonly ILogger _logger; + private readonly ManifestValueValidatorCollection _validators; + + private string _path; /// - /// Initializes a new instance of the with auto dependencies. + /// Initializes a new instance of the class. /// - public DashboardController() + public ManifestParser(AppCaches appCaches, ManifestValueValidatorCollection validators, ILogger logger) + : this(appCaches, validators, "~/App_Plugins", logger) { } /// - /// Initializes a new instance of the with all its dependencies. + /// Initializes a new instance of the class. /// - public DashboardController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, IDashboardService dashboardService) - : base(globalSettings, umbracoContext, sqlContext, services, appCaches, logger, runtimeState) + private ManifestParser(AppCaches appCaches, ManifestValueValidatorCollection validators, string path, ILogger logger) { - _dashboardService = dashboardService; + if (appCaches == null) throw new ArgumentNullException(nameof(appCaches)); + _cache = appCaches.RuntimeCache; + _validators = validators ?? throw new ArgumentNullException(nameof(validators)); + if (string.IsNullOrWhiteSpace(path)) throw new ArgumentNullOrEmptyException(nameof(path)); + Path = path; + _logger = logger ?? throw new ArgumentNullException(nameof(logger)); } - //we have just one instance of HttpClient shared for the entire application - private static readonly HttpClient HttpClient = new HttpClient(); - - //we have baseurl as a param to make previewing easier, so we can test with a dev domain from client side - [ValidateAngularAntiForgeryToken] - public async Task GetRemoteDashboardContent(string section, string baseUrl = "https://dashboard.umbraco.org/") + public string Path { - var user = Security.CurrentUser; - var allowedSections = string.Join(",", user.AllowedSections); - var language = user.Language; - var version = UmbracoVersion.SemanticVersion.ToSemanticString(); - - var url = string.Format(baseUrl + "{0}?section={0}&allowed={1}&lang={2}&version={3}", section, allowedSections, language, version); - var key = "umbraco-dynamic-dashboard-" + language + allowedSections.Replace(",", "-") + section; - - var content = AppCaches.RuntimeCache.GetCacheItem(key); - var result = new JObject(); - if (content != null) - { - result = content; - } - else - { - //content is null, go get it - try - { - //fetch dashboard json and parse to JObject - var json = await HttpClient.GetStringAsync(url); - content = JObject.Parse(json); - result = content; - - AppCaches.RuntimeCache.InsertCacheItem(key, () => result, new TimeSpan(0, 30, 0)); - } - catch (HttpRequestException ex) - { - 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)); - } - } - - return result; + get => _path; + set => _path = value.StartsWith("~/") ? IOHelper.MapPath(value) : value; } - public async Task GetRemoteDashboardCss(string section, string baseUrl = "https://dashboard.umbraco.org/") + /// + /// Gets all manifests, merged into a single manifest object. + /// + /// + public PackageManifest Manifest + => _cache.GetCacheItem("Umbraco.Core.Manifest.ManifestParser::Manifests", () => + { + var manifests = GetManifests(); + return MergeManifests(manifests); + }, new TimeSpan(0, 4, 0)); + + /// + /// Gets all manifests. + /// + private IEnumerable GetManifests() { - var url = string.Format(baseUrl + "css/dashboard.css?section={0}", section); - var key = "umbraco-dynamic-dashboard-css-" + section; + var manifests = new List(); - var content = AppCaches.RuntimeCache.GetCacheItem(key); - var result = string.Empty; - - if (content != null) + foreach (var path in GetManifestFiles()) { - result = content; - } - else - { - //content is null, go get it try { - //fetch remote css - content = await HttpClient.GetStringAsync(url); - - //can't use content directly, modified closure problem - result = content; - - //save server content for 30 mins - AppCaches.RuntimeCache.InsertCacheItem(key, () => result, new TimeSpan(0, 30, 0)); + var text = File.ReadAllText(path); + text = TrimPreamble(text); + if (string.IsNullOrWhiteSpace(text)) + continue; + var manifest = ParseManifest(text); + manifests.Add(manifest); } - catch (HttpRequestException ex) + catch (Exception e) { - 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)); + _logger.Error(e, "Failed to parse manifest at '{Path}', ignoring.", path); } } - return new HttpResponseMessage(HttpStatusCode.OK) + return manifests; + } + + /// + /// Merges all manifests into one. + /// + private static PackageManifest MergeManifests(IEnumerable manifests) + { + var scripts = new HashSet(); + var stylesheets = new HashSet(); + var propertyEditors = new List(); + var parameterEditors = new List(); + var gridEditors = new List(); + var contentApps = new List(); + var dashboards = new List(); + var sections = new List(); + + foreach (var manifest in manifests) { - Content = new StringContent(result, Encoding.UTF8, "text/css") + if (manifest.Scripts != null) foreach (var script in manifest.Scripts) scripts.Add(script); + if (manifest.Stylesheets != null) foreach (var stylesheet in manifest.Stylesheets) stylesheets.Add(stylesheet); + if (manifest.PropertyEditors != null) propertyEditors.AddRange(manifest.PropertyEditors); + if (manifest.ParameterEditors != null) parameterEditors.AddRange(manifest.ParameterEditors); + if (manifest.GridEditors != null) gridEditors.AddRange(manifest.GridEditors); + if (manifest.ContentApps != null) contentApps.AddRange(manifest.ContentApps); + if (manifest.Dashboards != null) dashboards.AddRange(manifest.Dashboards); + if (manifest.Sections != null) sections.AddRange(manifest.Sections.DistinctBy(x => x.Alias.ToLowerInvariant())); + } + + return new PackageManifest + { + Scripts = scripts.ToArray(), + Stylesheets = stylesheets.ToArray(), + PropertyEditors = propertyEditors.ToArray(), + ParameterEditors = parameterEditors.ToArray(), + GridEditors = gridEditors.ToArray(), + ContentApps = contentApps.ToArray(), + Dashboards = dashboards.ToArray(), + Sections = sections.ToArray() }; } - [ValidateAngularAntiForgeryToken] - [OutgoingEditorModelEvent] - public IEnumerable> GetDashboard(string section) + // gets all manifest files (recursively) + private IEnumerable GetManifestFiles() { - return _dashboardService.GetDashboards(section, Security.CurrentUser); + if (Directory.Exists(_path) == false) + return new string[0]; + return Directory.GetFiles(_path, "package.manifest", SearchOption.AllDirectories); + } + + private static string TrimPreamble(string text) + { + // strangely StartsWith(preamble) would always return true + if (text.Substring(0, 1) == Utf8Preamble) + text = text.Remove(0, Utf8Preamble.Length); + + return text; + } + + /// + /// Parses a manifest. + /// + internal PackageManifest ParseManifest(string text) + { + if (string.IsNullOrWhiteSpace(text)) + throw new ArgumentNullOrEmptyException(nameof(text)); + + var manifest = JsonConvert.DeserializeObject(text, + new DataEditorConverter(_logger), + new ValueValidatorConverter(_validators), + new DashboardAccessRuleConverter()); + + // scripts and stylesheets are raw string, must process here + for (var i = 0; i < manifest.Scripts.Length; i++) + manifest.Scripts[i] = IOHelper.ResolveVirtualUrl(manifest.Scripts[i]); + for (var i = 0; i < manifest.Stylesheets.Length; i++) + manifest.Stylesheets[i] = IOHelper.ResolveVirtualUrl(manifest.Stylesheets[i]); + + // add property editors that are also parameter editors, to the parameter editors list + // (the manifest format is kinda legacy) + var ppEditors = manifest.PropertyEditors.Where(x => (x.Type & EditorType.MacroParameter) > 0).ToList(); + if (ppEditors.Count > 0) + manifest.ParameterEditors = manifest.ParameterEditors.Union(ppEditors).ToArray(); + + return manifest; + } + + // purely for tests + internal IEnumerable ParseGridEditors(string text) + { + return JsonConvert.DeserializeObject>(text); } } } From 8926e28706333b5c47b098db9e072a073f0e9cfa Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Fri, 25 Jan 2019 10:08:52 +0100 Subject: [PATCH 268/437] revert --- .../Editors/DashboardController.cs | 241 ++++++++---------- 1 file changed, 101 insertions(+), 140 deletions(-) diff --git a/src/Umbraco.Web/Editors/DashboardController.cs b/src/Umbraco.Web/Editors/DashboardController.cs index 825ffb7314..b166a8b4bf 100644 --- a/src/Umbraco.Web/Editors/DashboardController.cs +++ b/src/Umbraco.Web/Editors/DashboardController.cs @@ -1,182 +1,143 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; +using System.Collections.Generic; +using Umbraco.Core; +using Umbraco.Core.Configuration; +using Umbraco.Web.Models.ContentEditing; +using Umbraco.Web.Mvc; +using Newtonsoft.Json.Linq; +using System.Threading.Tasks; +using System.Net.Http; +using System; +using System.Net; using System.Text; -using Newtonsoft.Json; using Umbraco.Core.Cache; -using Umbraco.Core.Exceptions; -using Umbraco.Core.IO; +using Umbraco.Web.WebApi; +using Umbraco.Web.WebApi.Filters; using Umbraco.Core.Logging; -using Umbraco.Core.PropertyEditors; +using Umbraco.Core.Persistence; +using Umbraco.Core.Services; +using Umbraco.Core.Dashboards; +using Umbraco.Web.Services; -namespace Umbraco.Core.Manifest +namespace Umbraco.Web.Editors { - /// - /// Parses the Main.js file and replaces all tokens accordingly. - /// - public class ManifestParser + //we need to fire up the controller like this to enable loading of remote css directly from this controller + [PluginController("UmbracoApi")] + [ValidationFilter] + [AngularJsonOnlyConfiguration] + [IsBackOffice] + [WebApi.UmbracoAuthorize] + [JsonCamelCaseFormatter] + + public class DashboardController : UmbracoApiController { - private static readonly string Utf8Preamble = Encoding.UTF8.GetString(Encoding.UTF8.GetPreamble()); - - private readonly IAppPolicyCache _cache; - private readonly ILogger _logger; - private readonly ManifestValueValidatorCollection _validators; - - private string _path; + private readonly IDashboardService _dashboardService; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the with auto dependencies. /// - public ManifestParser(AppCaches appCaches, ManifestValueValidatorCollection validators, ILogger logger) - : this(appCaches, validators, "~/App_Plugins", logger) + public DashboardController() { } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the with all its dependencies. /// - private ManifestParser(AppCaches appCaches, ManifestValueValidatorCollection validators, string path, ILogger logger) + public DashboardController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, IDashboardService dashboardService) + : base(globalSettings, umbracoContext, sqlContext, services, appCaches, logger, runtimeState) { - if (appCaches == null) throw new ArgumentNullException(nameof(appCaches)); - _cache = appCaches.RuntimeCache; - _validators = validators ?? throw new ArgumentNullException(nameof(validators)); - if (string.IsNullOrWhiteSpace(path)) throw new ArgumentNullOrEmptyException(nameof(path)); - Path = path; - _logger = logger ?? throw new ArgumentNullException(nameof(logger)); + _dashboardService = dashboardService; } - public string Path + //we have just one instance of HttpClient shared for the entire application + private static readonly HttpClient HttpClient = new HttpClient(); + + //we have baseurl as a param to make previewing easier, so we can test with a dev domain from client side + [ValidateAngularAntiForgeryToken] + public async Task GetRemoteDashboardContent(string section, string baseUrl = "https://dashboard.umbraco.org/") { - get => _path; - set => _path = value.StartsWith("~/") ? IOHelper.MapPath(value) : value; - } + var user = Security.CurrentUser; + var allowedSections = string.Join(",", user.AllowedSections); + var language = user.Language; + var version = UmbracoVersion.SemanticVersion.ToSemanticString(); - /// - /// Gets all manifests, merged into a single manifest object. - /// - /// - public PackageManifest Manifest - => _cache.GetCacheItem("Umbraco.Core.Manifest.ManifestParser::Manifests", () => + var url = string.Format(baseUrl + "{0}?section={0}&allowed={1}&lang={2}&version={3}", section, allowedSections, language, version); + var key = "umbraco-dynamic-dashboard-" + language + allowedSections.Replace(",", "-") + section; + + var content = AppCaches.RuntimeCache.GetCacheItem(key); + var result = new JObject(); + if (content != null) { - var manifests = GetManifests(); - return MergeManifests(manifests); - }, new TimeSpan(0, 4, 0)); - - /// - /// Gets all manifests. - /// - private IEnumerable GetManifests() - { - var manifests = new List(); - - foreach (var path in GetManifestFiles()) + result = content; + } + else { + //content is null, go get it try { - var text = File.ReadAllText(path); - text = TrimPreamble(text); - if (string.IsNullOrWhiteSpace(text)) - continue; - var manifest = ParseManifest(text); - manifests.Add(manifest); + //fetch dashboard json and parse to JObject + var json = await HttpClient.GetStringAsync(url); + content = JObject.Parse(json); + result = content; + + AppCaches.RuntimeCache.InsertCacheItem(key, () => result, new TimeSpan(0, 30, 0)); } - catch (Exception e) + catch (HttpRequestException ex) { - _logger.Error(e, "Failed to parse manifest at '{Path}', ignoring.", path); + 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)); } } - return manifests; + return result; } - /// - /// Merges all manifests into one. - /// - private static PackageManifest MergeManifests(IEnumerable manifests) + public async Task GetRemoteDashboardCss(string section, string baseUrl = "https://dashboard.umbraco.org/") { - var scripts = new HashSet(); - var stylesheets = new HashSet(); - var propertyEditors = new List(); - var parameterEditors = new List(); - var gridEditors = new List(); - var contentApps = new List(); - var dashboards = new List(); - var sections = new List(); + var url = string.Format(baseUrl + "css/dashboard.css?section={0}", section); + var key = "umbraco-dynamic-dashboard-css-" + section; - foreach (var manifest in manifests) + var content = AppCaches.RuntimeCache.GetCacheItem(key); + var result = string.Empty; + + if (content != null) { - if (manifest.Scripts != null) foreach (var script in manifest.Scripts) scripts.Add(script); - if (manifest.Stylesheets != null) foreach (var stylesheet in manifest.Stylesheets) stylesheets.Add(stylesheet); - if (manifest.PropertyEditors != null) propertyEditors.AddRange(manifest.PropertyEditors); - if (manifest.ParameterEditors != null) parameterEditors.AddRange(manifest.ParameterEditors); - if (manifest.GridEditors != null) gridEditors.AddRange(manifest.GridEditors); - if (manifest.ContentApps != null) contentApps.AddRange(manifest.ContentApps); - if (manifest.Dashboards != null) dashboards.AddRange(manifest.Dashboards); - if (manifest.Sections != null) sections.AddRange(manifest.Sections.DistinctBy(x => x.Alias.ToLowerInvariant())); + result = content; + } + else + { + //content is null, go get it + try + { + //fetch remote css + content = await HttpClient.GetStringAsync(url); + + //can't use content directly, modified closure problem + result = content; + + //save server content for 30 mins + AppCaches.RuntimeCache.InsertCacheItem(key, () => result, new TimeSpan(0, 30, 0)); + } + catch (HttpRequestException ex) + { + 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)); + } } - return new PackageManifest + return new HttpResponseMessage(HttpStatusCode.OK) { - Scripts = scripts.ToArray(), - Stylesheets = stylesheets.ToArray(), - PropertyEditors = propertyEditors.ToArray(), - ParameterEditors = parameterEditors.ToArray(), - GridEditors = gridEditors.ToArray(), - ContentApps = contentApps.ToArray(), - Dashboards = dashboards.ToArray(), - Sections = sections.ToArray() + Content = new StringContent(result, Encoding.UTF8, "text/css") }; } - // gets all manifest files (recursively) - private IEnumerable GetManifestFiles() + [ValidateAngularAntiForgeryToken] + [OutgoingEditorModelEvent] + public IEnumerable> GetDashboard(string section) { - if (Directory.Exists(_path) == false) - return new string[0]; - return Directory.GetFiles(_path, "package.manifest", SearchOption.AllDirectories); - } - - private static string TrimPreamble(string text) - { - // strangely StartsWith(preamble) would always return true - if (text.Substring(0, 1) == Utf8Preamble) - text = text.Remove(0, Utf8Preamble.Length); - - return text; - } - - /// - /// Parses a manifest. - /// - internal PackageManifest ParseManifest(string text) - { - if (string.IsNullOrWhiteSpace(text)) - throw new ArgumentNullOrEmptyException(nameof(text)); - - var manifest = JsonConvert.DeserializeObject(text, - new DataEditorConverter(_logger), - new ValueValidatorConverter(_validators), - new DashboardAccessRuleConverter()); - - // scripts and stylesheets are raw string, must process here - for (var i = 0; i < manifest.Scripts.Length; i++) - manifest.Scripts[i] = IOHelper.ResolveVirtualUrl(manifest.Scripts[i]); - for (var i = 0; i < manifest.Stylesheets.Length; i++) - manifest.Stylesheets[i] = IOHelper.ResolveVirtualUrl(manifest.Stylesheets[i]); - - // add property editors that are also parameter editors, to the parameter editors list - // (the manifest format is kinda legacy) - var ppEditors = manifest.PropertyEditors.Where(x => (x.Type & EditorType.MacroParameter) > 0).ToList(); - if (ppEditors.Count > 0) - manifest.ParameterEditors = manifest.ParameterEditors.Union(ppEditors).ToArray(); - - return manifest; - } - - // purely for tests - internal IEnumerable ParseGridEditors(string text) - { - return JsonConvert.DeserializeObject>(text); + return _dashboardService.GetDashboards(section, Security.CurrentUser); } } } From 1c55f4ed4fa4ad6b3de48d89d76d1716e0427ede Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Fri, 25 Jan 2019 10:09:28 +0100 Subject: [PATCH 269/437] changed correct file --- src/Umbraco.Core/Manifest/ManifestParser.cs | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/Umbraco.Core/Manifest/ManifestParser.cs b/src/Umbraco.Core/Manifest/ManifestParser.cs index 674449c4f0..825ffb7314 100644 --- a/src/Umbraco.Core/Manifest/ManifestParser.cs +++ b/src/Umbraco.Core/Manifest/ManifestParser.cs @@ -8,8 +8,6 @@ using Umbraco.Core.Cache; using Umbraco.Core.Exceptions; using Umbraco.Core.IO; using Umbraco.Core.Logging; -using Umbraco.Core.Models.ContentEditing; -using Umbraco.Core.Models.Trees; using Umbraco.Core.PropertyEditors; namespace Umbraco.Core.Manifest @@ -155,16 +153,10 @@ namespace Umbraco.Core.Manifest if (string.IsNullOrWhiteSpace(text)) throw new ArgumentNullOrEmptyException(nameof(text)); - var manifest = JsonConvert.DeserializeObject(text, new JsonSerializerSettings() - { - Converters = new JsonConverter[] - { - new DataEditorConverter(_logger), - new ValueValidatorConverter(_validators), - new DashboardAccessRuleConverter() - }, - } - ); + var manifest = JsonConvert.DeserializeObject(text, + new DataEditorConverter(_logger), + new ValueValidatorConverter(_validators), + new DashboardAccessRuleConverter()); // scripts and stylesheets are raw string, must process here for (var i = 0; i < manifest.Scripts.Length; i++) From bee2776035e5ebd2b1b92574adeca1fbb25712af Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Fri, 25 Jan 2019 09:10:49 +0000 Subject: [PATCH 270/437] Bye bye FileSystemProvider.config - we no longer use you --- .../FileSystemProviderElement.cs | 67 ------------------- .../FileSystemProviderElementCollection.cs | 43 ------------ .../FileSystemProvidersSection.cs | 30 --------- .../IFileSystemProviderElement.cs | 11 --- .../IFileSystemProvidersSection.cs | 9 --- src/Umbraco.Core/Umbraco.Core.csproj | 5 -- .../Configurations/FileSystemProviderTests.cs | 25 ------- src/Umbraco.Tests/Umbraco.Tests.csproj | 1 - src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 4 -- .../config/FileSystemProviders.Release.config | 11 --- .../config/FileSystemProviders.config | 11 --- 11 files changed, 217 deletions(-) delete mode 100644 src/Umbraco.Core/Configuration/FileSystemProviderElement.cs delete mode 100644 src/Umbraco.Core/Configuration/FileSystemProviderElementCollection.cs delete mode 100644 src/Umbraco.Core/Configuration/FileSystemProvidersSection.cs delete mode 100644 src/Umbraco.Core/Configuration/IFileSystemProviderElement.cs delete mode 100644 src/Umbraco.Core/Configuration/IFileSystemProvidersSection.cs delete mode 100644 src/Umbraco.Tests/Configurations/FileSystemProviderTests.cs delete mode 100644 src/Umbraco.Web.UI/config/FileSystemProviders.Release.config delete mode 100644 src/Umbraco.Web.UI/config/FileSystemProviders.config diff --git a/src/Umbraco.Core/Configuration/FileSystemProviderElement.cs b/src/Umbraco.Core/Configuration/FileSystemProviderElement.cs deleted file mode 100644 index 1085439b9e..0000000000 --- a/src/Umbraco.Core/Configuration/FileSystemProviderElement.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Linq; -using System.Text; - -namespace Umbraco.Core.Configuration -{ - public class FileSystemProviderElement : ConfigurationElement, IFileSystemProviderElement - { - private const string ALIAS_KEY = "alias"; - private const string TYPE_KEY = "type"; - private const string PARAMETERS_KEY = "Parameters"; - - [ConfigurationProperty(ALIAS_KEY, IsKey = true, IsRequired = true)] - public string Alias - { - get - { - return ((string)(base[ALIAS_KEY])); - } - } - - [ConfigurationProperty(TYPE_KEY, IsKey = false, IsRequired = true)] - public string Type - { - get - { - return ((string)(base[TYPE_KEY])); - } - } - - [ConfigurationProperty(PARAMETERS_KEY, IsDefaultCollection = true, IsRequired = false)] - public KeyValueConfigurationCollection Parameters - { - get - { - return ((KeyValueConfigurationCollection)(base[PARAMETERS_KEY])); - } - } - - string IFileSystemProviderElement.Alias - { - get { return Alias; } - } - - string IFileSystemProviderElement.Type - { - get { return Type; } - } - - private IDictionary _params; - IDictionary IFileSystemProviderElement.Parameters - { - get - { - if (_params != null) return _params; - _params = new Dictionary(); - foreach (KeyValueConfigurationElement element in Parameters) - { - _params.Add(element.Key, element.Value); - } - return _params; - } - } - } -} diff --git a/src/Umbraco.Core/Configuration/FileSystemProviderElementCollection.cs b/src/Umbraco.Core/Configuration/FileSystemProviderElementCollection.cs deleted file mode 100644 index 8d1fdb017e..0000000000 --- a/src/Umbraco.Core/Configuration/FileSystemProviderElementCollection.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Linq; -using System.Text; - -namespace Umbraco.Core.Configuration -{ - [ConfigurationCollection(typeof(FileSystemProviderElement), AddItemName = "Provider")] - public class FileSystemProviderElementCollection : ConfigurationElementCollection, IEnumerable - { - protected override ConfigurationElement CreateNewElement() - { - return new FileSystemProviderElement(); - } - - protected override object GetElementKey(ConfigurationElement element) - { - return ((FileSystemProviderElement)(element)).Alias; - } - - public new FileSystemProviderElement this[string key] - { - get - { - return (FileSystemProviderElement)BaseGet(key); - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - for (var i = 0; i < Count; i++) - { - yield return BaseGet(i) as IFileSystemProviderElement; - } - } - - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - } -} diff --git a/src/Umbraco.Core/Configuration/FileSystemProvidersSection.cs b/src/Umbraco.Core/Configuration/FileSystemProvidersSection.cs deleted file mode 100644 index 7c6c552ddd..0000000000 --- a/src/Umbraco.Core/Configuration/FileSystemProvidersSection.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Linq; -using System.Text; - -namespace Umbraco.Core.Configuration -{ - public class FileSystemProvidersSection : ConfigurationSection, IFileSystemProvidersSection - { - - [ConfigurationProperty("", IsDefaultCollection = true, IsRequired = true)] - public FileSystemProviderElementCollection Providers - { - get { return ((FileSystemProviderElementCollection)(base[""])); } - } - - private IDictionary _providers; - - IDictionary IFileSystemProvidersSection.Providers - { - get - { - if (_providers != null) return _providers; - _providers = Providers.ToDictionary(x => x.Alias, x => x); - return _providers; - } - } - } -} diff --git a/src/Umbraco.Core/Configuration/IFileSystemProviderElement.cs b/src/Umbraco.Core/Configuration/IFileSystemProviderElement.cs deleted file mode 100644 index 438e6f2b81..0000000000 --- a/src/Umbraco.Core/Configuration/IFileSystemProviderElement.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Collections.Generic; - -namespace Umbraco.Core.Configuration -{ - public interface IFileSystemProviderElement - { - string Alias { get; } - string Type { get; } - IDictionary Parameters { get; } - } -} diff --git a/src/Umbraco.Core/Configuration/IFileSystemProvidersSection.cs b/src/Umbraco.Core/Configuration/IFileSystemProvidersSection.cs deleted file mode 100644 index f87ba383a9..0000000000 --- a/src/Umbraco.Core/Configuration/IFileSystemProvidersSection.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Collections.Generic; - -namespace Umbraco.Core.Configuration -{ - public interface IFileSystemProvidersSection - { - IDictionary Providers { get; } - } -} diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 1a978650f0..1faa913d75 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -231,9 +231,6 @@ - - - @@ -255,8 +252,6 @@ - - diff --git a/src/Umbraco.Tests/Configurations/FileSystemProviderTests.cs b/src/Umbraco.Tests/Configurations/FileSystemProviderTests.cs deleted file mode 100644 index c65980e763..0000000000 --- a/src/Umbraco.Tests/Configurations/FileSystemProviderTests.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Configuration; -using System.Linq; -using Moq; -using NUnit.Framework; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.UmbracoSettings; - -namespace Umbraco.Tests.Configurations -{ - - [TestFixture] - public class FileSystemProviderTests - { - [Test] - public void Can_Get_Media_Provider() - { - var config = (FileSystemProvidersSection)ConfigurationManager.GetSection("umbracoConfiguration/FileSystemProviders"); - var providerConfig = config.Providers["media"]; - - Assert.That(providerConfig, Is.Not.Null); - Assert.That(providerConfig.Parameters.AllKeys.Any(), Is.True); - } - } -} diff --git a/src/Umbraco.Tests/Umbraco.Tests.csproj b/src/Umbraco.Tests/Umbraco.Tests.csproj index 61d0672d7f..0db92db58b 100644 --- a/src/Umbraco.Tests/Umbraco.Tests.csproj +++ b/src/Umbraco.Tests/Umbraco.Tests.csproj @@ -293,7 +293,6 @@ - diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index 045c56764a..2b257b4a51 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -178,9 +178,6 @@ Designer - - FileSystemProviders.config - EmbeddedMedia.config @@ -314,7 +311,6 @@ Designer - diff --git a/src/Umbraco.Web.UI/config/FileSystemProviders.Release.config b/src/Umbraco.Web.UI/config/FileSystemProviders.Release.config deleted file mode 100644 index 1f038f61c5..0000000000 --- a/src/Umbraco.Web.UI/config/FileSystemProviders.Release.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/src/Umbraco.Web.UI/config/FileSystemProviders.config b/src/Umbraco.Web.UI/config/FileSystemProviders.config deleted file mode 100644 index 1f038f61c5..0000000000 --- a/src/Umbraco.Web.UI/config/FileSystemProviders.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - From 6ee8ef0a07d09bb45f87311a00a18c69bb9a30b8 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Fri, 25 Jan 2019 09:18:19 +0000 Subject: [PATCH 271/437] =?UTF-8?q?Fix=20the=20build!=20Sorry=20Stephan=20?= =?UTF-8?q?=F0=9F=91=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/NuSpecs/UmbracoCms.Core.nuspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/NuSpecs/UmbracoCms.Core.nuspec b/build/NuSpecs/UmbracoCms.Core.nuspec index 9e6e375745..dc1224842e 100644 --- a/build/NuSpecs/UmbracoCms.Core.nuspec +++ b/build/NuSpecs/UmbracoCms.Core.nuspec @@ -35,7 +35,7 @@ - + From b88ca1db49a75db2fdb93222d3616c07b589dbd7 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Fri, 25 Jan 2019 09:22:02 +0000 Subject: [PATCH 272/437] Remove FIleSystemProviders.config from web.config XML files --- build/NuSpecs/tools/Web.config.install.xdt | 5 --- src/Umbraco.Tests/App.config | 50 ---------------------- src/Umbraco.Web.UI/web.Template.config | 2 - 3 files changed, 57 deletions(-) diff --git a/build/NuSpecs/tools/Web.config.install.xdt b/build/NuSpecs/tools/Web.config.install.xdt index e3ba6b27df..2f6fb8f61c 100644 --- a/build/NuSpecs/tools/Web.config.install.xdt +++ b/build/NuSpecs/tools/Web.config.install.xdt @@ -2,7 +2,6 @@ -
@@ -11,7 +10,6 @@
-
@@ -27,13 +25,10 @@ - - - diff --git a/src/Umbraco.Tests/App.config b/src/Umbraco.Tests/App.config index fdb18c598d..4c5bb57aa2 100644 --- a/src/Umbraco.Tests/App.config +++ b/src/Umbraco.Tests/App.config @@ -1,58 +1,8 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Umbraco.Web.UI/web.Template.config b/src/Umbraco.Web.UI/web.Template.config index 2371282a14..749fa0b500 100644 --- a/src/Umbraco.Web.UI/web.Template.config +++ b/src/Umbraco.Web.UI/web.Template.config @@ -13,7 +13,6 @@
-
@@ -27,7 +26,6 @@ - From 15c197abd3398d77a9e195c0c52db1476ad3c9ba Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Fri, 25 Jan 2019 11:04:56 +0100 Subject: [PATCH 273/437] public AccessRule.cs, to let third party create dashboards from code without having to implement there own --- src/Umbraco.Core/Dashboards/AccessRule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Dashboards/AccessRule.cs b/src/Umbraco.Core/Dashboards/AccessRule.cs index 70f9da8fa9..4f725e32f0 100644 --- a/src/Umbraco.Core/Dashboards/AccessRule.cs +++ b/src/Umbraco.Core/Dashboards/AccessRule.cs @@ -3,7 +3,7 @@ /// /// Implements . /// - internal class AccessRule : IAccessRule + public class AccessRule : IAccessRule { /// public AccessRuleType Type { get; set; } From a8e8832a759a2b9dee260e0a08e0da864b4bd3dc Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Fri, 25 Jan 2019 10:17:40 +0000 Subject: [PATCH 274/437] Bye bye dashboard.config.install XDT transform as part of NuGet install --- build/NuSpecs/UmbracoCms.nuspec | 1 - .../tools/Dashboard.config.install.xdt | 95 ------------------- src/umbraco.sln | 1 - 3 files changed, 97 deletions(-) delete mode 100644 build/NuSpecs/tools/Dashboard.config.install.xdt diff --git a/build/NuSpecs/UmbracoCms.nuspec b/build/NuSpecs/UmbracoCms.nuspec index a188377c19..622671dd9d 100644 --- a/build/NuSpecs/UmbracoCms.nuspec +++ b/build/NuSpecs/UmbracoCms.nuspec @@ -53,7 +53,6 @@ - diff --git a/build/NuSpecs/tools/Dashboard.config.install.xdt b/build/NuSpecs/tools/Dashboard.config.install.xdt deleted file mode 100644 index a81af8c365..0000000000 --- a/build/NuSpecs/tools/Dashboard.config.install.xdt +++ /dev/null @@ -1,95 +0,0 @@ - - -
- - - - views/dashboard/settings/settingsdashboardintro.html - - -
- -
- - forms - - - - views/dashboard/forms/formsdashboardintro.html - - -
- -
- - developer - -
- -
- - - views/dashboard/developer/developerdashboardvideos.html - - - -
- -
- - - views/dashboard/developer/examinemanagement.html - - -
- -
- - - - - views/dashboard/media/mediafolderbrowser.html - - -
- -
- - - - views/dashboard/members/membersdashboardvideos.html - - -
- -
- -
- -
- - -
- -
- - content - - - - views/dashboard/developer/redirecturls.html - - -
- -
- - developer - - - - views/dashboard/developer/healthcheck.html - - -
- diff --git a/src/umbraco.sln b/src/umbraco.sln index 0bdcb53d99..c02a5ba85c 100644 --- a/src/umbraco.sln +++ b/src/umbraco.sln @@ -70,7 +70,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{E3F9F378 ProjectSection(SolutionItems) = preProject ..\build\NuSpecs\tools\applications.config.install.xdt = ..\build\NuSpecs\tools\applications.config.install.xdt ..\build\NuSpecs\tools\ClientDependency.config.install.xdt = ..\build\NuSpecs\tools\ClientDependency.config.install.xdt - ..\build\NuSpecs\tools\Dashboard.config.install.xdt = ..\build\NuSpecs\tools\Dashboard.config.install.xdt ..\build\NuSpecs\tools\install.core.ps1 = ..\build\NuSpecs\tools\install.core.ps1 ..\build\NuSpecs\tools\install.ps1 = ..\build\NuSpecs\tools\install.ps1 ..\build\NuSpecs\tools\Readme.txt = ..\build\NuSpecs\tools\Readme.txt From bb079213636b54a7756d2a628e37e5fe17d83677 Mon Sep 17 00:00:00 2001 From: Stephan Date: Fri, 25 Jan 2019 11:57:08 +0100 Subject: [PATCH 275/437] KeyValueService supports more weird situations --- src/Umbraco.Core/Services/Implement/KeyValueService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Services/Implement/KeyValueService.cs b/src/Umbraco.Core/Services/Implement/KeyValueService.cs index b30543ed48..eb68cea25c 100644 --- a/src/Umbraco.Core/Services/Implement/KeyValueService.cs +++ b/src/Umbraco.Core/Services/Implement/KeyValueService.cs @@ -40,7 +40,7 @@ namespace Umbraco.Core.Services.Implement // if already running 8, either following an upgrade or an install, // then everything should be ok (the table should exist, etc) - if (UmbracoVersion.LocalVersion.Major >= 8) + if (UmbracoVersion.LocalVersion != null && UmbracoVersion.LocalVersion.Major >= 8) return; // else we are upgrading from 7, we can assume that the locks table From 427ac259f4121280b5c909aa26f043d015a31335 Mon Sep 17 00:00:00 2001 From: Stephan Date: Fri, 25 Jan 2019 11:57:42 +0100 Subject: [PATCH 276/437] Refactor datatype configuration connector --- .../Deploy/IDataTypeConfigurationConnector.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs b/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs index f2a08575b5..7b292307cc 100644 --- a/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs +++ b/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using Umbraco.Core.Models; namespace Umbraco.Core.Deploy { @@ -17,18 +18,17 @@ namespace Umbraco.Core.Deploy IEnumerable PropertyEditorAliases { get; } /// - /// Gets the environment-agnostic data type configurations corresponding to environment-specific configurations. + /// Gets the artifact datatype configuration corresponding to the actual datatype configuration. /// - /// The environment-specific configuration. + /// The datatype. /// The dependencies. - /// - IDictionary ConvertToDeploy(IDictionary configuration, ICollection dependencies); + IDictionary ToArtifact(IDataType dataType, ICollection dependencies); /// - /// Gets the environment-specific data type configurations corresponding to environment-agnostic configurations. + /// Gets the actual datatype configuration corresponding to the artifact configuration. /// - /// The environment-agnostic configuration. - /// - IDictionary ConvertToLocalEnvironment(IDictionary configuration); + /// The datatype. + /// The artifact configuration. + object FromArtifact(IDataType dataType, IDictionary configuration); } } From e8cb30fbc4cb5ee71aec1ed5a6e29b7681aed8ab Mon Sep 17 00:00:00 2001 From: Stephan Date: Fri, 25 Jan 2019 12:33:20 +0100 Subject: [PATCH 277/437] Fix exception when replacing IServerRegistrar --- .../Runtime/CoreRuntimeComposer.cs | 18 ++++++---- ...aseServerRegistrarAndMessengerComponent.cs | 36 ++++++++++++------- 2 files changed, 35 insertions(+), 19 deletions(-) diff --git a/src/Umbraco.Core/Runtime/CoreRuntimeComposer.cs b/src/Umbraco.Core/Runtime/CoreRuntimeComposer.cs index 5535d5c67b..83cc456127 100644 --- a/src/Umbraco.Core/Runtime/CoreRuntimeComposer.cs +++ b/src/Umbraco.Core/Runtime/CoreRuntimeComposer.cs @@ -73,16 +73,20 @@ namespace Umbraco.Core.Runtime // register a server registrar, by default it's the db registrar composition.RegisterUnique(f => { - if ("true".InvariantEquals(ConfigurationManager.AppSettings["umbracoDisableElectionForSingleServer"])) - return new SingleServerRegistrar(f.GetInstance()); - return new DatabaseServerRegistrar( - new Lazy(f.GetInstance), - new DatabaseServerRegistrarOptions()); + // TODO this is a hack, use proper configuration! + // also: we still register the full IServerMessenger because + // even on 1 single server we can have 2 concurrent app domains + var singleServer = "true".InvariantEquals(ConfigurationManager.AppSettings["umbracoDisableElectionForSingleServer"]); + return singleServer + ? (IServerRegistrar) new SingleServerRegistrar(f.GetInstance()) + : new DatabaseServerRegistrar( + new Lazy(f.GetInstance), + new DatabaseServerRegistrarOptions()); }); // by default we'll use the database server messenger with default options (no callbacks), - // this will be overridden by either the legacy thing or the db thing in the corresponding - // components in the web project - todo - should obsolete the legacy thing + // this will be overridden by the db thing in the corresponding components in the web + // project composition.RegisterUnique(factory => new DatabaseServerMessenger( factory.GetInstance(), diff --git a/src/Umbraco.Web/Components/DatabaseServerRegistrarAndMessengerComponent.cs b/src/Umbraco.Web/Components/DatabaseServerRegistrarAndMessengerComponent.cs index 2e3132a82c..589502e6a2 100644 --- a/src/Umbraco.Web/Components/DatabaseServerRegistrarAndMessengerComponent.cs +++ b/src/Umbraco.Web/Components/DatabaseServerRegistrarAndMessengerComponent.cs @@ -106,30 +106,36 @@ namespace Umbraco.Web.Components public DatabaseServerRegistrarAndMessengerComponent(IRuntimeState runtime, IServerRegistrar serverRegistrar, IServerMessenger serverMessenger, IServerRegistrationService registrationService, ILogger logger, IndexRebuilder indexRebuilder) { - _registrar = serverRegistrar as DatabaseServerRegistrar; - if (_registrar == null) throw new Exception("panic: registar."); - - _messenger = serverMessenger as BatchedDatabaseServerMessenger; - if (_messenger == null) throw new Exception("panic: messenger"); - _runtime = runtime; _logger = logger; _registrationService = registrationService; _indexRebuilder = indexRebuilder; - _touchTaskRunner = new BackgroundTaskRunner("ServerRegistration", - new BackgroundTaskRunnerOptions { AutoStart = true }, logger); - _processTaskRunner = new BackgroundTaskRunner("ServerInstProcess", - new BackgroundTaskRunnerOptions { AutoStart = true }, logger); + // create task runner for DatabaseServerRegistrar + _registrar = serverRegistrar as DatabaseServerRegistrar; + if (_registrar != null) + { + _touchTaskRunner = new BackgroundTaskRunner("ServerRegistration", + new BackgroundTaskRunnerOptions { AutoStart = true }, logger); + } + + // create task runner for BatchedDatabaseServerMessenger + _messenger = serverMessenger as BatchedDatabaseServerMessenger; + if (_messenger != null) + { + _processTaskRunner = new BackgroundTaskRunner("ServerInstProcess", + new BackgroundTaskRunnerOptions { AutoStart = true }, logger); + } } public void Initialize() { //We will start the whole process when a successful request is made - UmbracoModule.RouteAttempt += RegisterBackgroundTasksOnce; + if (_registrar != null || _messenger != null) + UmbracoModule.RouteAttempt += RegisterBackgroundTasksOnce; // must come last, as it references some _variables - _messenger.Startup(); + _messenger?.Startup(); } public void Terminate() @@ -175,6 +181,9 @@ namespace Umbraco.Web.Components private IBackgroundTask RegisterInstructionProcess() { + if (_messenger == null) + return null; + var task = new InstructionProcessTask(_processTaskRunner, 60000, //delay before first execution _messenger.Options.ThrottleSeconds*1000, //amount of ms between executions @@ -186,6 +195,9 @@ namespace Umbraco.Web.Components private IBackgroundTask RegisterTouchServer(IServerRegistrationService registrationService, string serverAddress) { + if (_registrar == null) + return null; + var task = new TouchServerTask(_touchTaskRunner, 15000, //delay before first execution _registrar.Options.RecurringSeconds*1000, //amount of ms between executions From 66959baabee4803e2dc4004a9d6ec8b3890ce030 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Fri, 25 Jan 2019 12:56:53 +0100 Subject: [PATCH 278/437] Reimplemented IsPublished on PublishedContent --- .../NuCache/DataSource/CultureVariation.cs | 3 +++ .../NuCache/PublishedContent.cs | 14 ++++++++++--- .../NuCache/PublishedSnapshotService.cs | 21 +++++++++++++------ 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/CultureVariation.cs b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/CultureVariation.cs index c6e603f5a9..27bae6bf39 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/CultureVariation.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/CultureVariation.cs @@ -16,5 +16,8 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource [JsonProperty("isDraft")] public bool IsDraft { get; set; } + + [JsonProperty("isPublished")] + public bool IsPublished { get; set; } } } diff --git a/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs b/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs index 3f57bf3340..e145f89220 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs @@ -296,7 +296,10 @@ namespace Umbraco.Web.PublishedCache.NuCache /// public override bool IsPublished(string culture = null) { - // fixme I don't understand this - and it does probably not do what's expected + if (!IsDraft(culture)) + { + return true; + } if (!ContentType.VariesByCulture()) { @@ -307,8 +310,13 @@ namespace Umbraco.Web.PublishedCache.NuCache if (culture == null) culture = VariationContextAccessor?.VariationContext?.Culture ?? ""; - //If the current culture is not a draft, it must be the published version - return _contentData.CultureInfos.TryGetValue(culture, out var cvar) && !cvar.IsDraft; + if (_contentData.CultureInfos.TryGetValue(culture, out var variant)) + { + return variant.IsPublished; + } + + return false; + } #endregion diff --git a/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs b/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs index 8675aefd1a..ff0d330a3c 100755 --- a/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs @@ -1202,16 +1202,25 @@ namespace Umbraco.Web.PublishedCache.NuCache // sanitize - names should be ok but ... never knows if (content.GetContentType().VariesByCulture()) { - var infos = content is IContent document - ? (published - ? document.PublishCultureInfos - : document.CultureInfos) - : content.CultureInfos; + + IReadOnlyDictionary infos = content.CultureInfos; + var publishedCultures = new HashSet(); + + if (content is IContent document) + { + if (published) + { + infos = document.PublishCultureInfos; + } + + publishedCultures = new HashSet(document.PublishedCultures); + } + foreach (var (culture, info) in infos) { var cultureIsDraft = !published && content is IContent d && d.IsCultureEdited(culture); - cultureData[culture] = new CultureVariation { Name = info.Name, Date = content.GetUpdateDate(culture) ?? DateTime.MinValue, IsDraft = cultureIsDraft }; + cultureData[culture] = new CultureVariation { Name = info.Name, Date = content.GetUpdateDate(culture) ?? DateTime.MinValue, IsDraft = cultureIsDraft, IsPublished = publishedCultures.Contains(culture)}; } } From 19d084e0863183012057ad17e699a95e716af54b Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Fri, 25 Jan 2019 12:11:07 +0000 Subject: [PATCH 279/437] Localize dashboard tabs with a convention of dashboardsTabs_dashboardAlias as the localization key --- src/Umbraco.Web.UI/Umbraco/config/lang/en.xml | 12 ++++++++++++ src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml | 12 ++++++++++++ src/Umbraco.Web/Services/DashboardService.cs | 10 +++++++--- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml index 2e63acd3c3..3dcbfcded2 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml @@ -2016,4 +2016,16 @@ To manage your website, simply open the Umbraco back office and start adding con Relation Type Relations + + Getting Started + Redirect URL Management + Content + Welcome + Examine Management + Published Status + Models Builder + Health Check + Getting Started + Install Umbraco Forms + > 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 86484b1393..8c8a405e29 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml @@ -2049,4 +2049,16 @@ To manage your website, simply open the Umbraco back office and start adding con Relation Type Relations + + Getting Started + Redirect URL Management + Content + Welcome + Examine Management + Published Status + Models Builder + Health Check + Getting Started + Install Umbraco Forms + diff --git a/src/Umbraco.Web/Services/DashboardService.cs b/src/Umbraco.Web/Services/DashboardService.cs index 89f241252f..e33bdb800a 100644 --- a/src/Umbraco.Web/Services/DashboardService.cs +++ b/src/Umbraco.Web/Services/DashboardService.cs @@ -2,8 +2,11 @@ using System.Collections.Generic; using System.Linq; using Umbraco.Core; +using Umbraco.Core.Composing; using Umbraco.Core.Dashboards; using Umbraco.Core.Models.Membership; +using Umbraco.Core.Services; +using Umbraco.Core.Services.Implement; using Umbraco.Web.Dashboards; using Umbraco.Web.Models.ContentEditing; @@ -13,11 +16,13 @@ namespace Umbraco.Web.Services { private readonly ISectionService _sectionService; private readonly DashboardCollection _dashboardCollection; + private readonly ILocalizedTextService _localizedText; - public DashboardService(ISectionService sectionService, DashboardCollection dashboardCollection) + public DashboardService(ISectionService sectionService, DashboardCollection dashboardCollection, ILocalizedTextService localizedText) { _sectionService = sectionService ?? throw new ArgumentNullException(nameof(sectionService)); _dashboardCollection = dashboardCollection ?? throw new ArgumentNullException(nameof(dashboardCollection)); + _localizedText = localizedText ?? throw new ArgumentNullException(nameof(localizedText)); } @@ -37,11 +42,10 @@ namespace Umbraco.Web.Services throw new NotSupportedException("Legacy UserControl (.ascx) dashboards are no longer supported."); var dashboards = new List {dashboard}; - tabs.Add(new Tab { Id = tabId++, - Label = dashboard.Name, + Label = _localizedText.Localize("dashboardTabs", dashboard.Alias), Alias = dashboard.Alias, Properties = dashboards }); From 4b3cd9118883680f3fd315e3589c70dcc9c8786d Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Fri, 25 Jan 2019 12:17:52 +0000 Subject: [PATCH 280/437] Remove Name property from IDashboardSection & the C# types (We use localization of dashboardTabs_alias) --- src/Umbraco.Core/Dashboards/IDashboardSection.cs | 6 ------ src/Umbraco.Web/Dashboards/ContentDashboard.cs | 2 -- src/Umbraco.Web/Dashboards/ExamineDashboard.cs | 2 -- src/Umbraco.Web/Dashboards/FormsDashboard.cs | 2 -- src/Umbraco.Web/Dashboards/HealthCheckDashboard.cs | 2 -- src/Umbraco.Web/Dashboards/MediaDashboard.cs | 2 -- src/Umbraco.Web/Dashboards/MembersDashboard.cs | 2 -- src/Umbraco.Web/Dashboards/ModelsBuilderDashboard.cs | 2 -- src/Umbraco.Web/Dashboards/PublishedStatusDashboard.cs | 2 -- src/Umbraco.Web/Dashboards/RedirectUrlDashboard.cs | 2 -- src/Umbraco.Web/Dashboards/SettingsDashboards.cs | 2 -- 11 files changed, 26 deletions(-) diff --git a/src/Umbraco.Core/Dashboards/IDashboardSection.cs b/src/Umbraco.Core/Dashboards/IDashboardSection.cs index 7b5963c9f5..73cf8513f9 100644 --- a/src/Umbraco.Core/Dashboards/IDashboardSection.cs +++ b/src/Umbraco.Core/Dashboards/IDashboardSection.cs @@ -5,12 +5,6 @@ namespace Umbraco.Core.Dashboards { public interface IDashboardSection { - /// - /// Display name of the dashboard tab - /// - [DataMember(Name="name")] - string Name { get; } - /// /// Alias to refer to this dashboard via code /// diff --git a/src/Umbraco.Web/Dashboards/ContentDashboard.cs b/src/Umbraco.Web/Dashboards/ContentDashboard.cs index 6a41b07c2c..1ff741b7e4 100644 --- a/src/Umbraco.Web/Dashboards/ContentDashboard.cs +++ b/src/Umbraco.Web/Dashboards/ContentDashboard.cs @@ -7,8 +7,6 @@ namespace Umbraco.Web.Dashboards [Weight(10)] public class ContentDashboard : IDashboardSection { - public string Name => "Get Started"; - public string Alias => "contentIntro"; public string[] Sections => new [] { "content" }; diff --git a/src/Umbraco.Web/Dashboards/ExamineDashboard.cs b/src/Umbraco.Web/Dashboards/ExamineDashboard.cs index e686545b51..8363e8079c 100644 --- a/src/Umbraco.Web/Dashboards/ExamineDashboard.cs +++ b/src/Umbraco.Web/Dashboards/ExamineDashboard.cs @@ -7,8 +7,6 @@ namespace Umbraco.Web.Dashboards [Weight(20)] public class ExamineDashboard : IDashboardSection { - public string Name => "Examine Management"; - public string Alias => "settingsExamine"; public string[] Sections => new [] { "settings" }; diff --git a/src/Umbraco.Web/Dashboards/FormsDashboard.cs b/src/Umbraco.Web/Dashboards/FormsDashboard.cs index 3592c88d13..0121fcd2c1 100644 --- a/src/Umbraco.Web/Dashboards/FormsDashboard.cs +++ b/src/Umbraco.Web/Dashboards/FormsDashboard.cs @@ -7,8 +7,6 @@ namespace Umbraco.Web.Dashboards [Weight(10)] public class FormsDashboard : IDashboardSection { - public string Name => "Install Umbraco Forms"; - public string Alias => "formsInstall"; public string[] Sections => new [] { "forms" }; diff --git a/src/Umbraco.Web/Dashboards/HealthCheckDashboard.cs b/src/Umbraco.Web/Dashboards/HealthCheckDashboard.cs index b7373a6d44..a8347f1806 100644 --- a/src/Umbraco.Web/Dashboards/HealthCheckDashboard.cs +++ b/src/Umbraco.Web/Dashboards/HealthCheckDashboard.cs @@ -7,8 +7,6 @@ namespace Umbraco.Web.Dashboards [Weight(50)] public class HealthCheckDashboard : IDashboardSection { - public string Name => "Health Check"; - public string Alias => "settingsHealthCheck"; public string[] Sections => new [] { "settings" }; diff --git a/src/Umbraco.Web/Dashboards/MediaDashboard.cs b/src/Umbraco.Web/Dashboards/MediaDashboard.cs index c72046388e..ae8f8343ce 100644 --- a/src/Umbraco.Web/Dashboards/MediaDashboard.cs +++ b/src/Umbraco.Web/Dashboards/MediaDashboard.cs @@ -7,8 +7,6 @@ namespace Umbraco.Web.Dashboards [Weight(10)] public class MediaDashboard : IDashboardSection { - public string Name => "Content"; - public string Alias => "mediaFolderBrowser"; public string[] Sections => new [] { "media" }; diff --git a/src/Umbraco.Web/Dashboards/MembersDashboard.cs b/src/Umbraco.Web/Dashboards/MembersDashboard.cs index 44aa6c4de6..57183ab6a6 100644 --- a/src/Umbraco.Web/Dashboards/MembersDashboard.cs +++ b/src/Umbraco.Web/Dashboards/MembersDashboard.cs @@ -7,8 +7,6 @@ namespace Umbraco.Web.Dashboards [Weight(10)] public class MembersDashboard : IDashboardSection { - public string Name => "Get Started"; - public string Alias => "memberIntro"; public string[] Sections => new [] { "member" }; diff --git a/src/Umbraco.Web/Dashboards/ModelsBuilderDashboard.cs b/src/Umbraco.Web/Dashboards/ModelsBuilderDashboard.cs index 431e129840..5e284ee0c2 100644 --- a/src/Umbraco.Web/Dashboards/ModelsBuilderDashboard.cs +++ b/src/Umbraco.Web/Dashboards/ModelsBuilderDashboard.cs @@ -7,8 +7,6 @@ namespace Umbraco.Web.Dashboards [Weight(40)] public class ModelsBuilderDashboard : IDashboardSection { - public string Name => "Models Builder"; - public string Alias => "settingsModelsBuilder"; public string[] Sections => new [] { "settings" }; diff --git a/src/Umbraco.Web/Dashboards/PublishedStatusDashboard.cs b/src/Umbraco.Web/Dashboards/PublishedStatusDashboard.cs index 5feca94324..17e99bdf5b 100644 --- a/src/Umbraco.Web/Dashboards/PublishedStatusDashboard.cs +++ b/src/Umbraco.Web/Dashboards/PublishedStatusDashboard.cs @@ -7,8 +7,6 @@ namespace Umbraco.Web.Dashboards [Weight(30)] public class PublishedStatusDashboard : IDashboardSection { - public string Name => "Published Status"; - public string Alias => "settingsPublishedStatus"; public string[] Sections => new [] { "settings" }; diff --git a/src/Umbraco.Web/Dashboards/RedirectUrlDashboard.cs b/src/Umbraco.Web/Dashboards/RedirectUrlDashboard.cs index 748db64658..76cc03202d 100644 --- a/src/Umbraco.Web/Dashboards/RedirectUrlDashboard.cs +++ b/src/Umbraco.Web/Dashboards/RedirectUrlDashboard.cs @@ -7,8 +7,6 @@ namespace Umbraco.Web.Dashboards [Weight(20)] public class RedirectUrlDashboard : IDashboardSection { - public string Name => "Redirect URL Management"; - public string Alias => "contentRedirectManager"; public string[] Sections => new [] { "content" }; diff --git a/src/Umbraco.Web/Dashboards/SettingsDashboards.cs b/src/Umbraco.Web/Dashboards/SettingsDashboards.cs index b5ab56c319..1fd32bee14 100644 --- a/src/Umbraco.Web/Dashboards/SettingsDashboards.cs +++ b/src/Umbraco.Web/Dashboards/SettingsDashboards.cs @@ -7,8 +7,6 @@ namespace Umbraco.Web.Dashboards [Weight(10)] public class SettingsDashboard : IDashboardSection { - public string Name => "Welcome"; - public string Alias => "settingsWelcome"; public string[] Sections => new [] { "settings" }; From b1f94c66dca390d04e6625335e5454957bacaa5e Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Fri, 25 Jan 2019 12:18:15 +0000 Subject: [PATCH 281/437] Remove name property from dashboard package.manifest collection --- src/Umbraco.Core/Manifest/ManifestDashboardDefinition.cs | 3 --- src/Umbraco.Tests/Manifest/ManifestParserTests.cs | 4 ---- 2 files changed, 7 deletions(-) diff --git a/src/Umbraco.Core/Manifest/ManifestDashboardDefinition.cs b/src/Umbraco.Core/Manifest/ManifestDashboardDefinition.cs index b2b3fd5dfb..879f78e19c 100644 --- a/src/Umbraco.Core/Manifest/ManifestDashboardDefinition.cs +++ b/src/Umbraco.Core/Manifest/ManifestDashboardDefinition.cs @@ -10,9 +10,6 @@ namespace Umbraco.Core.Manifest { private string _view; - [JsonProperty("name", Required = Required.Always)] - public string Name { get; set; } - [JsonProperty("alias", Required = Required.Always)] public string Alias { get; set; } diff --git a/src/Umbraco.Tests/Manifest/ManifestParserTests.cs b/src/Umbraco.Tests/Manifest/ManifestParserTests.cs index a12f90c4eb..546831974c 100644 --- a/src/Umbraco.Tests/Manifest/ManifestParserTests.cs +++ b/src/Umbraco.Tests/Manifest/ManifestParserTests.cs @@ -387,7 +387,6 @@ javascript: ['~/test.js',/*** some note about stuff asd09823-4**09234*/ '~/test2 { const string json = @"{'dashboards': [ { - 'name': 'First One', 'alias': 'something', 'view': '~/App_Plugins/MyPackage/Dashboards/one.html', 'sections': [ 'content' ], @@ -395,7 +394,6 @@ javascript: ['~/test.js',/*** some note about stuff asd09823-4**09234*/ '~/test2 }, { - 'name': 'Second-One', 'alias': 'something.else', 'weight': -1, 'view': '~/App_Plugins/MyPackage/Dashboards/two.html', @@ -409,7 +407,6 @@ javascript: ['~/test.js',/*** some note about stuff asd09823-4**09234*/ '~/test2 Assert.IsInstanceOf(manifest.Dashboards[0]); var db0 = manifest.Dashboards[0]; Assert.AreEqual("something", db0.Alias); - Assert.AreEqual("First One", db0.Name); Assert.AreEqual(100, db0.Weight); Assert.AreEqual("/App_Plugins/MyPackage/Dashboards/one.html", db0.View); Assert.AreEqual(1, db0.Sections.Length); @@ -423,7 +420,6 @@ javascript: ['~/test.js',/*** some note about stuff asd09823-4**09234*/ '~/test2 Assert.IsInstanceOf(manifest.Dashboards[1]); var db1 = manifest.Dashboards[1]; Assert.AreEqual("something.else", db1.Alias); - Assert.AreEqual("Second-One", db1.Name); Assert.AreEqual(-1, db1.Weight); Assert.AreEqual("/App_Plugins/MyPackage/Dashboards/two.html", db1.View); Assert.AreEqual(1, db1.Sections.Length); From 2c6b5f21b0cbfadb07a1d1998154798c07e97f57 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Fri, 25 Jan 2019 16:06:32 +0100 Subject: [PATCH 282/437] Migrates RelatedLink data to MultiUrlPicker and changes all RelatedLink datatypes to MultiUrlPicker ones --- .../Migrations/Upgrade/UmbracoPlan.cs | 1 + .../ConvertRelatedLinksToMultiUrlPicker.cs | 142 ++++++++++++++++++ src/Umbraco.Core/Umbraco.Core.csproj | 1 + .../MultiUrlPickerPropertyEditor.cs | 2 +- 4 files changed, 145 insertions(+), 1 deletion(-) create mode 100644 src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs diff --git a/src/Umbraco.Core/Migrations/Upgrade/UmbracoPlan.cs b/src/Umbraco.Core/Migrations/Upgrade/UmbracoPlan.cs index 833955ee6a..f4732acc4b 100644 --- a/src/Umbraco.Core/Migrations/Upgrade/UmbracoPlan.cs +++ b/src/Umbraco.Core/Migrations/Upgrade/UmbracoPlan.cs @@ -124,6 +124,7 @@ namespace Umbraco.Core.Migrations.Upgrade To("{64EBCE53-E1F0-463A-B40B-E98EFCCA8AE2}"); To("{0009109C-A0B8-4F3F-8FEB-C137BBDDA268}"); To("{8A027815-D5CD-4872-8B88-9A51AB5986A6}"); // from 7.14.0 + To("{ED28B66A-E248-4D94-8CDB-9BDF574023F0}"); //FINAL diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs new file mode 100644 index 0000000000..7e7f398791 --- /dev/null +++ b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs @@ -0,0 +1,142 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Umbraco.Core.Logging; +using Umbraco.Core.Models.PublishedContent; +using Umbraco.Core.Persistence; +using Umbraco.Core.Persistence.Dtos; + +namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +{ + public class ConvertRelatedLinksToMultiUrlPicker : MigrationBase + { + public ConvertRelatedLinksToMultiUrlPicker(IMigrationContext context) : base(context) + { } + + public override void Migrate() + { + var sqlDataTypes = Sql() + .Select() + .From() + .Where(x => x.EditorAlias == "Umbraco.RelatedLinks" + || x.EditorAlias == "Umbraco.RelatedLinks2"); + + var dataTypes = Database.Fetch(sqlDataTypes); + var dataTypeIds = dataTypes.Select(x => x.NodeId).ToList(); + + var sqlPropertyTpes = Sql() + .Select() + .From() + .Where(x => dataTypeIds.Contains(x.DataTypeId)); + + var propertyTypeIds = Database.Fetch(sqlPropertyTpes).Select(x => x.Id); + + var sqlPropertyData = Sql() + .Select() + .From() + .Where(x => propertyTypeIds.Contains(x.PropertyTypeId)); + + var properties = Database.Fetch(sqlPropertyData); + + // Create a Multi URL Picker datatype for the converted RelatedLinks data + if (properties.Any() == false) + return; + + foreach (var property in properties) + { + var value = property.Value.ToString(); + if (string.IsNullOrWhiteSpace(value)) + continue; + + var relatedLinks = JsonConvert.DeserializeObject>(value); + var links = new List(); + foreach (var relatedLink in relatedLinks) + { + GuidUdi udi = null; + if (relatedLink.IsInternal) + { + var linkIsUdi = GuidUdi.TryParse(relatedLink.Link, out udi); + if (linkIsUdi == false) + { + // oh no.. probably an integer, yikes! + if (int.TryParse(relatedLink.Link, out var intId)) + { + var sqlNodeData = Sql() + .Select() + .Where(x => x.NodeId == intId); + + var node = Database.Fetch(sqlNodeData).FirstOrDefault(); + if (node != null) + // Note: RelatedLinks did not allow for picking media items, + // so if there's a value this will be a content item - hence + // the hardcoded "document" here + udi = new GuidUdi("document", node.UniqueId); + } + } + } + + var link = new LinkDto + { + Name = relatedLink.Caption, + Target = relatedLink.NewWindow ? "_blank" : null, + Udi = udi, + // Should only have a URL if it's an external link otherwise it wil be a UDI + Url = relatedLink.IsInternal == false ? relatedLink.Link : null + }; + + links.Add(link); + } + + var json = JsonConvert.SerializeObject(links); + + // Update existing data + property.TextValue = json; + Database.Update(property); + } + + foreach (var dataType in dataTypes) + { + // Change existing datatypes from RelatedLinks to MultiUrlPicker + var dataTypeResult = Database.Fetch(Sql() + .Select() + .From() + .Where(x => x.NodeId == dataType.NodeId)).First(); + + dataTypeResult.EditorAlias = Constants.PropertyEditors.Aliases.MultiUrlPicker; + Database.Update(dataTypeResult); + } + } + } + + internal class RelatedLink + { + public int? Id { get; internal set; } + internal bool IsDeleted { get; set; } + [JsonProperty("caption")] + public string Caption { get; set; } + [JsonProperty("link")] + public string Link { get; set; } + [JsonProperty("newWindow")] + public bool NewWindow { get; set; } + [JsonProperty("isInternal")] + public bool IsInternal { get; set; } + } + + [DataContract] + internal class LinkDto + { + [DataMember(Name = "name")] + public string Name { get; set; } + + [DataMember(Name = "target")] + public string Target { get; set; } + + [DataMember(Name = "udi")] + public GuidUdi Udi { get; set; } + + [DataMember(Name = "url")] + public string Url { get; set; } + } +} diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 9a52cb8dc5..723c9c4c22 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -393,6 +393,7 @@ + diff --git a/src/Umbraco.Web/PropertyEditors/MultiUrlPickerPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/MultiUrlPickerPropertyEditor.cs index 54bf5c4d15..1648b81623 100644 --- a/src/Umbraco.Web/PropertyEditors/MultiUrlPickerPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/MultiUrlPickerPropertyEditor.cs @@ -7,7 +7,7 @@ using Umbraco.Web.PublishedCache; namespace Umbraco.Web.PropertyEditors { - [DataEditor(Constants.PropertyEditors.Aliases.MultiUrlPicker, EditorType.PropertyValue|EditorType.MacroParameter, "Multi Url Picker", "multiurlpicker", ValueType = "JSON", Group = "pickers", Icon = "icon-link")] + [DataEditor(Constants.PropertyEditors.Aliases.MultiUrlPicker, EditorType.PropertyValue|EditorType.MacroParameter, "Multi Url Picker", "multiurlpicker", ValueType = ValueTypes.Json, Group = "pickers", Icon = "icon-link")] public class MultiUrlPickerPropertyEditor : DataEditor { private readonly IEntityService _entityService; From 5a896e74171b1b6c38dd7ee86119ea60d80317ca Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Wed, 23 Jan 2019 08:56:20 +0100 Subject: [PATCH 283/437] Remove obsoleted RelatedLinks picker (replaced by Multi URL Picker) (cherry picked from commit fedf0c78de6d2ad365db1c112c22af13abd7b9fb) --- src/Umbraco.Core/Constants-PropertyEditors.cs | 7 +- .../Migrations/Install/DatabaseDataCreator.cs | 4 +- .../V_8_0_0/PropertyEditorsMigration.cs | 1 - .../Composing/TypeLoaderTests.cs | 2 +- .../Services/ContentServiceTests.cs | 2 +- .../TestHelpers/Entities/MockedContent.cs | 2 +- .../Entities/MockedContentTypes.cs | 2 +- .../Mvc/HtmlHelperExtensionMethodsTests.cs | 25 --- src/Umbraco.Web/HtmlHelperRenderExtensions.cs | 34 ---- src/Umbraco.Web/Models/RelatedLink.cs | 11 -- src/Umbraco.Web/Models/RelatedLinkBase.cs | 18 -- src/Umbraco.Web/Models/RelatedLinkType.cs | 27 --- src/Umbraco.Web/Models/RelatedLinks.cs | 42 ----- .../RelatedLinksConfiguration.cs | 13 -- .../RelatedLinksConfigurationEditor.cs | 18 -- .../RelatedLinksPropertyEditor.cs | 16 -- .../RelatedLinksLegacyValueConverter.cs | 132 -------------- .../RelatedLinksValueConverter.cs | 169 ------------------ src/Umbraco.Web/RelatedLinksTypeConverter.cs | 98 ---------- src/Umbraco.Web/Umbraco.Web.csproj | 10 -- 20 files changed, 7 insertions(+), 626 deletions(-) delete mode 100644 src/Umbraco.Web/Models/RelatedLink.cs delete mode 100644 src/Umbraco.Web/Models/RelatedLinkBase.cs delete mode 100644 src/Umbraco.Web/Models/RelatedLinkType.cs delete mode 100644 src/Umbraco.Web/Models/RelatedLinks.cs delete mode 100644 src/Umbraco.Web/PropertyEditors/RelatedLinksConfiguration.cs delete mode 100644 src/Umbraco.Web/PropertyEditors/RelatedLinksConfigurationEditor.cs delete mode 100644 src/Umbraco.Web/PropertyEditors/RelatedLinksPropertyEditor.cs delete mode 100644 src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksLegacyValueConverter.cs delete mode 100644 src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksValueConverter.cs delete mode 100644 src/Umbraco.Web/RelatedLinksTypeConverter.cs diff --git a/src/Umbraco.Core/Constants-PropertyEditors.cs b/src/Umbraco.Core/Constants-PropertyEditors.cs index b9f20fb449..8b637fe90e 100644 --- a/src/Umbraco.Core/Constants-PropertyEditors.cs +++ b/src/Umbraco.Core/Constants-PropertyEditors.cs @@ -118,12 +118,7 @@ namespace Umbraco.Core /// RadioButton list. ///
public const string RadioButtonList = "Umbraco.RadioButtonList"; - - /// - /// Related Links. - /// - public const string RelatedLinks = "Umbraco.RelatedLinks"; - + /// /// Slider. /// diff --git a/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs b/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs index f32ea1cb6f..4e0b5dfa0f 100644 --- a/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs +++ b/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs @@ -135,7 +135,7 @@ namespace Umbraco.Core.Migrations.Install _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1047, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1047", SortOrder = 2, UniqueId = new Guid("1EA2E01F-EBD8-4CE1-8D71-6B1149E63548"), Text = "Member Picker", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1048, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1048", SortOrder = 2, UniqueId = new Guid("135D60E0-64D9-49ED-AB08-893C9BA44AE5"), Text = "Media Picker", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1049, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1049", SortOrder = 2, UniqueId = new Guid("9DBBCBBB-2327-434A-B355-AF1B84E5010A"), Text = "Multiple Media Picker", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1050, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1050", SortOrder = 2, UniqueId = new Guid("B4E3535A-1753-47E2-8568-602CF8CFEE6F"), Text = "Related Links", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); + _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1050, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1050", SortOrder = 2, UniqueId = new Guid("B4E3535A-1753-47E2-8568-602CF8CFEE6F"), Text = "Multi URL Picker", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); } private void CreateLockData() @@ -301,7 +301,7 @@ namespace Umbraco.Core.Migrations.Install _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = 1048, EditorAlias = Constants.PropertyEditors.Aliases.MediaPicker, DbType = "Ntext" }); _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = 1049, EditorAlias = Constants.PropertyEditors.Aliases.MediaPicker, DbType = "Ntext", Configuration = "{\"multiPicker\":1}" }); - _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = 1050, EditorAlias = Constants.PropertyEditors.Aliases.RelatedLinks, DbType = "Ntext" }); + _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = 1050, EditorAlias = Constants.PropertyEditors.Aliases.MultiUrlPicker, DbType = "Ntext" }); } private void CreateRelationTypeData() diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigration.cs b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigration.cs index ee439088be..064ffc7228 100644 --- a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigration.cs +++ b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigration.cs @@ -16,7 +16,6 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 RenameDataType(Constants.PropertyEditors.Aliases.MediaPicker + "2", Constants.PropertyEditors.Aliases.MediaPicker); RenameDataType(Constants.PropertyEditors.Aliases.MemberPicker + "2", Constants.PropertyEditors.Aliases.MemberPicker); RenameDataType(Constants.PropertyEditors.Aliases.MultiNodeTreePicker + "2", Constants.PropertyEditors.Aliases.MultiNodeTreePicker); - RenameDataType(Constants.PropertyEditors.Aliases.RelatedLinks + "2", Constants.PropertyEditors.Aliases.RelatedLinks); RenameDataType("Umbraco.TextboxMultiple", Constants.PropertyEditors.Aliases.TextArea, false); RenameDataType("Umbraco.Textbox", Constants.PropertyEditors.Aliases.TextBox, false); } diff --git a/src/Umbraco.Tests/Composing/TypeLoaderTests.cs b/src/Umbraco.Tests/Composing/TypeLoaderTests.cs index 6b3ce3eb4e..add3424599 100644 --- a/src/Umbraco.Tests/Composing/TypeLoaderTests.cs +++ b/src/Umbraco.Tests/Composing/TypeLoaderTests.cs @@ -279,7 +279,7 @@ AnotherContentFinder public void GetDataEditors() { var types = _typeLoader.GetDataEditors(); - Assert.AreEqual(40, types.Count()); + Assert.AreEqual(39, types.Count()); } /// diff --git a/src/Umbraco.Tests/Services/ContentServiceTests.cs b/src/Umbraco.Tests/Services/ContentServiceTests.cs index 039bcaed24..9490213d62 100644 --- a/src/Umbraco.Tests/Services/ContentServiceTests.cs +++ b/src/Umbraco.Tests/Services/ContentServiceTests.cs @@ -2215,7 +2215,7 @@ namespace Umbraco.Tests.Services Assert.That(sut.GetValue("contentPicker"), Is.EqualTo(Udi.Create(Constants.UdiEntityType.Document, new Guid("74ECA1D4-934E-436A-A7C7-36CC16D4095C")))); Assert.That(sut.GetValue("mediaPicker"), Is.EqualTo(Udi.Create(Constants.UdiEntityType.Media, new Guid("44CB39C8-01E5-45EB-9CF8-E70AAF2D1691")))); Assert.That(sut.GetValue("memberPicker"), Is.EqualTo(Udi.Create(Constants.UdiEntityType.Member, new Guid("9A50A448-59C0-4D42-8F93-4F1D55B0F47D")))); - Assert.That(sut.GetValue("relatedLinks"), Is.EqualTo("")); + Assert.That(sut.GetValue("multiUrlPicker"), Is.EqualTo("[{\"name\":\"https://test.com\",\"url\":\"https://test.com\"}]")); Assert.That(sut.GetValue("tags"), Is.EqualTo("this,is,tags")); } diff --git a/src/Umbraco.Tests/TestHelpers/Entities/MockedContent.cs b/src/Umbraco.Tests/TestHelpers/Entities/MockedContent.cs index faf4acf8a4..19a57d7775 100644 --- a/src/Umbraco.Tests/TestHelpers/Entities/MockedContent.cs +++ b/src/Umbraco.Tests/TestHelpers/Entities/MockedContent.cs @@ -132,7 +132,7 @@ namespace Umbraco.Tests.TestHelpers.Entities content.SetValue("contentPicker", Udi.Create(Constants.UdiEntityType.Document, new Guid("74ECA1D4-934E-436A-A7C7-36CC16D4095C")).ToString()); content.SetValue("mediaPicker", Udi.Create(Constants.UdiEntityType.Media, new Guid("44CB39C8-01E5-45EB-9CF8-E70AAF2D1691")).ToString()); content.SetValue("memberPicker", Udi.Create(Constants.UdiEntityType.Member, new Guid("9A50A448-59C0-4D42-8F93-4F1D55B0F47D")).ToString()); - content.SetValue("relatedLinks", ""); + content.SetValue("multiUrlPicker", "[{\"name\":\"https://test.com\",\"url\":\"https://test.com\"}]"); content.SetValue("tags", "this,is,tags"); return content; diff --git a/src/Umbraco.Tests/TestHelpers/Entities/MockedContentTypes.cs b/src/Umbraco.Tests/TestHelpers/Entities/MockedContentTypes.cs index 14b967b1c9..d7dcf8e79a 100644 --- a/src/Umbraco.Tests/TestHelpers/Entities/MockedContentTypes.cs +++ b/src/Umbraco.Tests/TestHelpers/Entities/MockedContentTypes.cs @@ -370,7 +370,7 @@ namespace Umbraco.Tests.TestHelpers.Entities contentCollection.Add(new PropertyType(Constants.PropertyEditors.Aliases.ContentPicker, ValueStorageType.Integer) { Alias = "contentPicker", Name = "Content Picker", Mandatory = false, SortOrder = 16, DataTypeId = 1046 }); contentCollection.Add(new PropertyType(Constants.PropertyEditors.Aliases.MediaPicker, ValueStorageType.Integer) { Alias = "mediaPicker", Name = "Media Picker", Mandatory = false, SortOrder = 17, DataTypeId = 1048 }); contentCollection.Add(new PropertyType(Constants.PropertyEditors.Aliases.MemberPicker, ValueStorageType.Integer) { Alias = "memberPicker", Name = "Member Picker", Mandatory = false, SortOrder = 18, DataTypeId = 1047 }); - contentCollection.Add(new PropertyType(Constants.PropertyEditors.Aliases.RelatedLinks, ValueStorageType.Ntext) { Alias = "relatedLinks", Name = "Related Links", Mandatory = false, SortOrder = 21, DataTypeId = 1050 }); + contentCollection.Add(new PropertyType(Constants.PropertyEditors.Aliases.MultiUrlPicker, ValueStorageType.Nvarchar) { Alias = "multiUrlPicker", Name = "Multi URL Picker", Mandatory = false, SortOrder = 21, DataTypeId = 1050 }); contentCollection.Add(new PropertyType(Constants.PropertyEditors.Aliases.Tags, ValueStorageType.Ntext) { Alias = "tags", Name = "Tags", Mandatory = false, SortOrder = 22, DataTypeId = 1041 }); contentType.PropertyGroups.Add(new PropertyGroup(contentCollection) { Name = "Content", SortOrder = 1 }); diff --git a/src/Umbraco.Tests/Web/Mvc/HtmlHelperExtensionMethodsTests.cs b/src/Umbraco.Tests/Web/Mvc/HtmlHelperExtensionMethodsTests.cs index cc83dcb1c9..ba19f41e74 100644 --- a/src/Umbraco.Tests/Web/Mvc/HtmlHelperExtensionMethodsTests.cs +++ b/src/Umbraco.Tests/Web/Mvc/HtmlHelperExtensionMethodsTests.cs @@ -29,30 +29,5 @@ namespace Umbraco.Tests.Web.Mvc var output = _htmlHelper.Wrap("div", "hello world", new {style = "color:red;", onclick = "void();"}); Assert.AreEqual("
hello world
", output.ToHtmlString()); } - - [Test] - public void GetRelatedLinkHtml_Simple() - { - var relatedLink = new Umbraco.Web.Models.RelatedLink { - Caption = "Link Caption", - NewWindow = true, - Link = "https://www.google.com/" - }; - var output = _htmlHelper.GetRelatedLinkHtml(relatedLink); - Assert.AreEqual("Link Caption", output.ToHtmlString()); - } - - [Test] - public void GetRelatedLinkHtml_HtmlAttributes() - { - var relatedLink = new Umbraco.Web.Models.RelatedLink - { - Caption = "Link Caption", - NewWindow = true, - Link = "https://www.google.com/" - }; - var output = _htmlHelper.GetRelatedLinkHtml(relatedLink, new { @class = "test-class"}); - Assert.AreEqual("Link Caption", output.ToHtmlString()); - } } } diff --git a/src/Umbraco.Web/HtmlHelperRenderExtensions.cs b/src/Umbraco.Web/HtmlHelperRenderExtensions.cs index 626a19a369..1186102bc8 100644 --- a/src/Umbraco.Web/HtmlHelperRenderExtensions.cs +++ b/src/Umbraco.Web/HtmlHelperRenderExtensions.cs @@ -830,39 +830,5 @@ namespace Umbraco.Web } #endregion - - - #region RelatedLink - - /// - /// Renders an anchor element for a RelatedLink instance. - /// Format: <a href="relatedLink.Link" target="_blank/_self">relatedLink.Caption</a> - /// - /// The HTML helper instance that this method extends. - /// The RelatedLink instance - /// An anchor element - public static MvcHtmlString GetRelatedLinkHtml(this HtmlHelper htmlHelper, RelatedLink relatedLink) - { - return htmlHelper.GetRelatedLinkHtml(relatedLink, null); - } - - /// - /// Renders an anchor element for a RelatedLink instance, accepting htmlAttributes. - /// Format: <a href="relatedLink.Link" target="_blank/_self" htmlAttributes>relatedLink.Caption</a> - /// - /// The HTML helper instance that this method extends. - /// The RelatedLink instance - /// An object that contains the HTML attributes to set for the element. - /// - public static MvcHtmlString GetRelatedLinkHtml(this HtmlHelper htmlHelper, RelatedLink relatedLink, object htmlAttributes) - { - var tagBuilder = new TagBuilder("a"); - tagBuilder.MergeAttributes(HtmlHelper.AnonymousObjectToHtmlAttributes(htmlAttributes)); - tagBuilder.MergeAttribute("href", relatedLink.Link); - tagBuilder.MergeAttribute("target", relatedLink.NewWindow ? "_blank" : "_self"); - tagBuilder.InnerHtml = HttpUtility.HtmlEncode(relatedLink.Caption); - return MvcHtmlString.Create(tagBuilder.ToString(TagRenderMode.Normal)); - } - #endregion } } diff --git a/src/Umbraco.Web/Models/RelatedLink.cs b/src/Umbraco.Web/Models/RelatedLink.cs deleted file mode 100644 index 1e1d7636ad..0000000000 --- a/src/Umbraco.Web/Models/RelatedLink.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Umbraco.Core.Models.PublishedContent; - -namespace Umbraco.Web.Models -{ - public class RelatedLink : RelatedLinkBase - { - public int? Id { get; internal set; } - internal bool IsDeleted { get; set; } - public IPublishedContent Content { get; set; } - } -} diff --git a/src/Umbraco.Web/Models/RelatedLinkBase.cs b/src/Umbraco.Web/Models/RelatedLinkBase.cs deleted file mode 100644 index c2077ce4a9..0000000000 --- a/src/Umbraco.Web/Models/RelatedLinkBase.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Newtonsoft.Json; - -namespace Umbraco.Web.Models -{ - public abstract class RelatedLinkBase - { - [JsonProperty("caption")] - public string Caption { get; set; } - [JsonProperty("link")] - public string Link { get; set; } - [JsonProperty("newWindow")] - public bool NewWindow { get; set; } - [JsonProperty("isInternal")] - public bool IsInternal { get; set; } - [JsonProperty("type")] - public RelatedLinkType Type { get; set; } - } -} diff --git a/src/Umbraco.Web/Models/RelatedLinkType.cs b/src/Umbraco.Web/Models/RelatedLinkType.cs deleted file mode 100644 index eec7817ab6..0000000000 --- a/src/Umbraco.Web/Models/RelatedLinkType.cs +++ /dev/null @@ -1,27 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Umbraco -// -// -// Defines the RelatedLinkType type. -// -// -------------------------------------------------------------------------------------------------------------------- - -namespace Umbraco.Web.Models -{ - /// - /// The related link type. - /// - public enum RelatedLinkType - { - /// - /// Internal link type - /// - Internal, - - /// - /// External link type - /// - External - } -} diff --git a/src/Umbraco.Web/Models/RelatedLinks.cs b/src/Umbraco.Web/Models/RelatedLinks.cs deleted file mode 100644 index 22cdcd11b6..0000000000 --- a/src/Umbraco.Web/Models/RelatedLinks.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; - -namespace Umbraco.Web.Models -{ - [TypeConverter(typeof(RelatedLinksTypeConverter))] - public class RelatedLinks : IEnumerable - { - private readonly string _propertyData; - - private readonly IEnumerable _relatedLinks; - - public RelatedLinks(IEnumerable relatedLinks, string propertyData) - { - _relatedLinks = relatedLinks; - _propertyData = propertyData; - } - - /// - /// Gets the property data. - /// - internal string PropertyData - { - get - { - return this._propertyData; - } - } - - public IEnumerator GetEnumerator() - { - return _relatedLinks.GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return this.GetEnumerator(); - } - } -} diff --git a/src/Umbraco.Web/PropertyEditors/RelatedLinksConfiguration.cs b/src/Umbraco.Web/PropertyEditors/RelatedLinksConfiguration.cs deleted file mode 100644 index 5db14c6842..0000000000 --- a/src/Umbraco.Web/PropertyEditors/RelatedLinksConfiguration.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Umbraco.Core.PropertyEditors; - -namespace Umbraco.Web.PropertyEditors -{ - /// - /// Represents the configuration for the related links value editor. - /// - public class RelatedLinksConfiguration - { - [ConfigurationField("max", "Maximum number of links", "number", Description = "Enter the maximum amount of links to be added, enter 0 for unlimited")] - public int Maximum { get; set; } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/PropertyEditors/RelatedLinksConfigurationEditor.cs b/src/Umbraco.Web/PropertyEditors/RelatedLinksConfigurationEditor.cs deleted file mode 100644 index 07ff359a82..0000000000 --- a/src/Umbraco.Web/PropertyEditors/RelatedLinksConfigurationEditor.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Collections.Generic; -using Umbraco.Core.PropertyEditors; - -namespace Umbraco.Web.PropertyEditors -{ - /// - /// Represents the configuration editor for the related links value editor. - /// - public class RelatedLinksConfigurationEditor : ConfigurationEditor - { - public override IDictionary ToValueEditor(object configuration) - { - var d = base.ToValueEditor(configuration); - d["idType"] = "udi"; - return d; - } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/PropertyEditors/RelatedLinksPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/RelatedLinksPropertyEditor.cs deleted file mode 100644 index b450fcc67f..0000000000 --- a/src/Umbraco.Web/PropertyEditors/RelatedLinksPropertyEditor.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Umbraco.Core; -using Umbraco.Core.Logging; -using Umbraco.Core.PropertyEditors; - -namespace Umbraco.Web.PropertyEditors -{ - [DataEditor(Constants.PropertyEditors.Aliases.RelatedLinks, "Related links", "relatedlinks", ValueType = ValueTypes.Json, Icon = "icon-thumbnail-list", Group = "pickers")] - public class RelatedLinksPropertyEditor : DataEditor - { - public RelatedLinksPropertyEditor(ILogger logger) - : base(logger) - { } - - protected override IConfigurationEditor CreateConfigurationEditor() => new RelatedLinksConfigurationEditor(); - } -} diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksLegacyValueConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksLegacyValueConverter.cs deleted file mode 100644 index 6c2a4331d0..0000000000 --- a/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksLegacyValueConverter.cs +++ /dev/null @@ -1,132 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Xml; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Logging; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.PropertyEditors.ValueConverters; -using Umbraco.Core.Services; - -namespace Umbraco.Web.PropertyEditors.ValueConverters -{ - [DefaultPropertyValueConverter(typeof(JsonValueConverter))] //this shadows the JsonValueConverter - public class RelatedLinksLegacyValueConverter : PropertyValueConverterBase - { - private static readonly string[] MatchingEditors = { - Constants.PropertyEditors.Aliases.RelatedLinks - }; - - private readonly IUmbracoContextAccessor _umbracoContextAccessor; - private readonly ILogger _logger; - private readonly ServiceContext _services; - - public RelatedLinksLegacyValueConverter(IUmbracoContextAccessor umbracoContextAccessor, ServiceContext services, ILogger logger) - { - _umbracoContextAccessor = umbracoContextAccessor; - _services = services; - _logger = logger; - } - - public override bool IsConverter(PublishedPropertyType propertyType) - => MatchingEditors.Contains(propertyType.EditorAlias); - - public override Type GetPropertyValueType(PublishedPropertyType propertyType) - => typeof (JArray); - - public override PropertyCacheLevel GetPropertyCacheLevel(PublishedPropertyType propertyType) - => PropertyCacheLevel.Element; - - public override object ConvertSourceToIntermediate(IPublishedElement owner, PublishedPropertyType propertyType, object source, bool preview) - { - if (source == null) return null; - var sourceString = source.ToString(); - - if (sourceString.DetectIsJson()) - { - try - { - var obj = JsonConvert.DeserializeObject(sourceString); - //update the internal links if we have a context - if (UmbracoContext.Current != null) - { - var helper = new UmbracoHelper(_umbracoContextAccessor.UmbracoContext, _services); - foreach (var a in obj) - { - var type = a.Value("type"); - if (type.IsNullOrWhiteSpace() == false) - { - if (type == "internal") - { - switch (propertyType.EditorAlias) - { - case Constants.PropertyEditors.Aliases.RelatedLinks: - var strLinkId = a.Value("link"); - var udiAttempt = strLinkId.TryConvertTo(); - if (udiAttempt) - { - var content = helper.PublishedContent(udiAttempt.Result); - if (content == null) break; - a["link"] = helper.Url(content.Id); - } - break; - } - } - } - } - } - return obj; - } - catch (Exception ex) - { - _logger.Error(ex, "Could not parse the string '{Json}' to a json object", sourceString); - } - } - - //it's not json, just return the string - return sourceString; - } - - public override object ConvertIntermediateToXPath(IPublishedElement owner, PublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object source, bool preview) - { - if (source == null) return null; - var sourceString = source.ToString(); - - if (sourceString.DetectIsJson()) - { - try - { - var obj = JsonConvert.DeserializeObject(sourceString); - - var d = new XmlDocument(); - var e = d.CreateElement("links"); - d.AppendChild(e); - - foreach (dynamic link in obj) - { - var ee = d.CreateElement("link"); - ee.SetAttribute("title", link.title); - ee.SetAttribute("link", link.link); - ee.SetAttribute("type", link.type); - ee.SetAttribute("newwindow", link.newWindow); - - e.AppendChild(ee); - } - - return d.CreateNavigator(); - } - catch (Exception ex) - { - _logger.Error(ex, "Could not parse the string '{Json}' to a json object", sourceString); - } - } - - //it's not json, just return the string - return sourceString; - } - } -} diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksValueConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksValueConverter.cs deleted file mode 100644 index 983d122a83..0000000000 --- a/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksValueConverter.cs +++ /dev/null @@ -1,169 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Xml; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using Umbraco.Core; -using Umbraco.Core.Logging; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.PropertyEditors.ValueConverters; -using Umbraco.Web.Models; -using Umbraco.Web.PublishedCache; - -namespace Umbraco.Web.PropertyEditors.ValueConverters -{ - /// - /// The related links property value converter. - /// - [DefaultPropertyValueConverter(typeof(RelatedLinksLegacyValueConverter), typeof(JsonValueConverter))] - public class RelatedLinksValueConverter : PropertyValueConverterBase - { - private readonly IPublishedSnapshotAccessor _publishedSnapshotAccessor; - private readonly IUmbracoContextAccessor _umbracoContextAccessor; - private readonly ILogger _logger; - - public RelatedLinksValueConverter(IPublishedSnapshotAccessor publishedSnapshotAccessor, IUmbracoContextAccessor umbracoContextAccessor, ILogger logger) - { - _publishedSnapshotAccessor = publishedSnapshotAccessor; - _umbracoContextAccessor = umbracoContextAccessor; - _logger = logger; - } - - /// - /// Checks if this converter can convert the property editor and registers if it can. - /// - /// - /// The property type. - /// - /// - /// The . - /// - public override bool IsConverter(PublishedPropertyType propertyType) - => propertyType.EditorAlias.Equals(Constants.PropertyEditors.Aliases.RelatedLinks); - - public override Type GetPropertyValueType(PublishedPropertyType propertyType) - => typeof (JArray); - - public override PropertyCacheLevel GetPropertyCacheLevel(PublishedPropertyType propertyType) - => PropertyCacheLevel.Element; - - public override object ConvertSourceToIntermediate(IPublishedElement owner, PublishedPropertyType propertyType, object source, bool preview) - { - if (source == null) return null; - var sourceString = source.ToString(); - - var relatedLinksData = JsonConvert.DeserializeObject>(sourceString); - var relatedLinks = new List(); - - foreach (var linkData in relatedLinksData) - { - var relatedLink = new RelatedLink - { - Caption = linkData.Caption, - NewWindow = linkData.NewWindow, - IsInternal = linkData.IsInternal, - Type = linkData.Type, - Link = linkData.Link - }; - - int contentId; - if (int.TryParse(relatedLink.Link, out contentId)) - { - relatedLink.Id = contentId; - relatedLink = CreateLink(relatedLink); - } - else - { - var strLinkId = linkData.Link; - var udiAttempt = strLinkId.TryConvertTo(); - if (udiAttempt.Success && udiAttempt.Result != null) - { - var content = _publishedSnapshotAccessor.PublishedSnapshot.Content.GetById(udiAttempt.Result.Guid); - if (content != null) - { - relatedLink.Id = content.Id; - relatedLink = CreateLink(relatedLink); - relatedLink.Content = content; - } - } - } - - if (relatedLink.IsDeleted == false) - { - relatedLinks.Add(relatedLink); - } - else - { - _logger.Warn("Related Links value converter skipped a link as the node has been unpublished/deleted (Internal Link NodeId: {RelatedLinkNodeId}, Link Caption: '{RelatedLinkCaption}')", relatedLink.Link, relatedLink.Caption); - } - } - - return new RelatedLinks(relatedLinks, sourceString); - } - - private RelatedLink CreateLink(RelatedLink link) - { - var umbracoContext = _umbracoContextAccessor.UmbracoContext; - - if (link.IsInternal && link.Id != null) - { - if (umbracoContext == null) - return null; - - var urlProvider = umbracoContext.UrlProvider; - - link.Link = urlProvider.GetUrl((int)link.Id); - if (link.Link.Equals("#")) - { - link.IsDeleted = true; - link.Link = link.Id.ToString(); - } - else - { - link.IsDeleted = false; - } - } - - return link; - } - - public override object ConvertIntermediateToXPath(IPublishedElement owner, PublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object inter, bool preview) - { - if (inter == null) return null; - var sourceString = inter.ToString(); - - if (sourceString.DetectIsJson()) - { - try - { - var obj = JsonConvert.DeserializeObject(sourceString); - - var d = new XmlDocument(); - var e = d.CreateElement("links"); - d.AppendChild(e); - - foreach (dynamic link in obj) - { - var ee = d.CreateElement("link"); - ee.SetAttribute("title", link.title); - ee.SetAttribute("link", link.link); - ee.SetAttribute("type", link.type); - ee.SetAttribute("newwindow", link.newWindow); - - e.AppendChild(ee); - } - - return d.CreateNavigator(); - } - catch (Exception ex) - { - _logger.Error(ex, "Could not parse the string {Json} to a json object", sourceString); - } - } - - //it's not json, just return the string - return sourceString; - } - } -} diff --git a/src/Umbraco.Web/RelatedLinksTypeConverter.cs b/src/Umbraco.Web/RelatedLinksTypeConverter.cs deleted file mode 100644 index 647959b920..0000000000 --- a/src/Umbraco.Web/RelatedLinksTypeConverter.cs +++ /dev/null @@ -1,98 +0,0 @@ -using System; -using System.ComponentModel; -using System.Globalization; -using System.Linq; - -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; - -using Umbraco.Core; -using Umbraco.Core.Logging; -using Umbraco.Core.Composing; -using Umbraco.Web.Models; - -namespace Umbraco.Web -{ - public class RelatedLinksTypeConverter : TypeConverter - { - private readonly UmbracoHelper _umbracoHelper; - - public RelatedLinksTypeConverter(UmbracoHelper umbracoHelper) - { - _umbracoHelper = umbracoHelper; - } - - public RelatedLinksTypeConverter() - { - - } - - private static readonly Type[] ConvertableTypes = new[] - { - typeof(JArray) - }; - - public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) - { - return ConvertableTypes.Any(x => TypeHelper.IsTypeAssignableFrom(x, destinationType)) - || base.CanConvertFrom(context, destinationType); - } - - public override object ConvertTo( - ITypeDescriptorContext context, - CultureInfo culture, - object value, - Type destinationType) - { - var relatedLinks = value as RelatedLinks; - if (relatedLinks == null) - return null; - - if (TypeHelper.IsTypeAssignableFrom(destinationType)) - { - // Conversion to JArray taken from old value converter - - var obj = JsonConvert.DeserializeObject(relatedLinks.PropertyData); - - var umbracoHelper = GetUmbracoHelper(); - - //update the internal links if we have a context - if (umbracoHelper != null) - { - foreach (var a in obj) - { - var type = a.Value("type"); - if (type.IsNullOrWhiteSpace() == false) - { - if (type == "internal") - { - var linkId = a.Value("link"); - var link = umbracoHelper.Url(linkId); - a["link"] = link; - } - } - } - } - return obj; - - } - - return base.ConvertTo(context, culture, value, destinationType); - } - - private UmbracoHelper GetUmbracoHelper() - { - if (_umbracoHelper != null) - return _umbracoHelper; - - if (UmbracoContext.Current == null) - { - Current.Logger.Warn("Cannot create an UmbracoHelper the UmbracoContext is null"); - return null; - } - - //DO NOT assign to _umbracoHelper variable, this is a singleton class and we cannot assign this based on an UmbracoHelper which is request based - return new UmbracoHelper(UmbracoContext.Current, Current.Services); - } - } -} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 6736f7512b..64a60d824a 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -404,10 +404,6 @@ - - - - @@ -453,9 +449,6 @@ - - - @@ -471,7 +464,6 @@ - @@ -535,7 +527,6 @@ - @@ -860,7 +851,6 @@ - From dfaa297104babc0fcc5a6a0b6e9a1676e16a9e3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Fri, 25 Jan 2019 16:33:06 +0100 Subject: [PATCH 284/437] V8: Color refactoring up + first draft to fit with 2019 brand colors. --- .../components/tree/umbtreeitem.directive.js | 1 + src/Umbraco.Web.UI.Client/src/less/belle.less | 2 +- .../src/less/button-groups.less | 229 ++++++++++++++++++ .../src/less/buttons.less | 8 +- .../src/less/canvas-designer.less | 4 +- .../application/umb-language-picker.less | 4 +- .../src/less/components/html/umb-alert.less | 4 +- .../less/components/tree/umb-tree-item.less | 7 +- .../less/components/umb-child-selector.less | 11 +- .../components/umb-editor-navigation.less | 22 +- .../less/components/umb-group-builder.less | 24 +- .../src/less/components/umb-tabs.less | 32 ++- .../src/less/mixins.less | 16 +- .../src/less/property-editors.less | 10 +- .../src/less/sections.less | 2 +- .../src/less/variables.less | 113 +++++---- .../querybuilder/querybuilder.html | 12 +- .../src/views/common/overlays/user/user.html | 3 +- .../views/components/umb-groups-builder.html | 4 +- 19 files changed, 410 insertions(+), 98 deletions(-) create mode 100644 src/Umbraco.Web.UI.Client/src/less/button-groups.less diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreeitem.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreeitem.directive.js index 4440ceeb4b..20bcdf437c 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreeitem.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreeitem.directive.js @@ -141,6 +141,7 @@ angular.module("umbraco.directives") defined on the tree */ scope.altSelect = function(n, ev) { + if(ev.altKey) return false; umbTreeCtrl.emitEvent("treeNodeAltSelect", { element: element, tree: scope.tree, node: n, event: ev }); }; diff --git a/src/Umbraco.Web.UI.Client/src/less/belle.less b/src/Umbraco.Web.UI.Client/src/less/belle.less index a65b94444e..78e9cabcfc 100644 --- a/src/Umbraco.Web.UI.Client/src/less/belle.less +++ b/src/Umbraco.Web.UI.Client/src/less/belle.less @@ -25,7 +25,7 @@ @import "../../lib/bootstrap/less/close.less"; // Components: Buttons & Alerts -@import "../../lib/bootstrap/less/button-groups.less"; +@import "button-groups.less"; @import "alerts.less"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less // Components: Nav diff --git a/src/Umbraco.Web.UI.Client/src/less/button-groups.less b/src/Umbraco.Web.UI.Client/src/less/button-groups.less new file mode 100644 index 0000000000..070e353c14 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/less/button-groups.less @@ -0,0 +1,229 @@ +// +// Button groups +// -------------------------------------------------- + + +// Make the div behave like a button +.btn-group { + position: relative; + display: inline-block; + .ie7-inline-block(); + font-size: 0; // remove as part 1 of font-size inline-block hack + vertical-align: middle; // match .btn alignment given font-size hack above + white-space: nowrap; // prevent buttons from wrapping when in tight spaces (e.g., the table on the tests page) + .ie7-restore-left-whitespace(); +} + +// Space out series of button groups +.btn-group + .btn-group { + margin-left: 5px; +} + +// Optional: Group multiple button groups together for a toolbar +.btn-toolbar { + font-size: 0; // Hack to remove whitespace that results from using inline-block + margin-top: @baseLineHeight / 2; + margin-bottom: @baseLineHeight / 2; + > .btn + .btn, + > .btn-group + .btn, + > .btn + .btn-group { + margin-left: 5px; + } +} + +// Float them, remove border radius, then re-add to first and last elements +.btn-group > .btn { + position: relative; + .border-radius(0); +} +.btn-group > .btn + .btn { + margin-left: -1px; +} +.btn-group > .btn, +.btn-group > .dropdown-menu, +.btn-group > .popover { + font-size: @baseFontSize; // redeclare as part 2 of font-size inline-block hack +} + +// Reset fonts for other sizes +.btn-group > .btn-mini { + font-size: @fontSizeMini; +} +.btn-group > .btn-small { + font-size: @fontSizeSmall; +} +.btn-group > .btn-large { + font-size: @fontSizeLarge; +} + +// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match +.btn-group > .btn:first-child { + margin-left: 0; + .border-top-left-radius(@baseBorderRadius); + .border-bottom-left-radius(@baseBorderRadius); +} +// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it +.btn-group > .btn:last-child, +.btn-group > .dropdown-toggle { + .border-top-right-radius(@baseBorderRadius); + .border-bottom-right-radius(@baseBorderRadius); +} +// Reset corners for large buttons +.btn-group > .btn.large:first-child { + margin-left: 0; + .border-top-left-radius(@borderRadiusLarge); + .border-bottom-left-radius(@borderRadiusLarge); +} +.btn-group > .btn.large:last-child, +.btn-group > .large.dropdown-toggle { + .border-top-right-radius(@borderRadiusLarge); + .border-bottom-right-radius(@borderRadiusLarge); +} + +// On hover/focus/active, bring the proper btn to front +.btn-group > .btn:hover, +.btn-group > .btn:focus, +.btn-group > .btn:active, +.btn-group > .btn.active { + z-index: 2; +} + +// On active and open, don't show outline +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} + + + +// Split button dropdowns +// ---------------------- + +// Give the line between buttons some depth +.btn-group > .btn + .dropdown-toggle { + padding-left: 8px; + padding-right: 8px; + .box-shadow(~"inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)"); + *padding-top: 5px; + *padding-bottom: 5px; +} +.btn-group > .btn-mini + .dropdown-toggle { + padding-left: 5px; + padding-right: 5px; + *padding-top: 2px; + *padding-bottom: 2px; +} +.btn-group > .btn-small + .dropdown-toggle { + *padding-top: 5px; + *padding-bottom: 4px; +} +.btn-group > .btn-large + .dropdown-toggle { + padding-left: 12px; + padding-right: 12px; + *padding-top: 7px; + *padding-bottom: 7px; +} + +.btn-group.open { + + // The clickable button for toggling the menu + // Remove the gradient and set the same inset shadow as the :active state + .dropdown-toggle { + background-image: none; + .box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)"); + } + + // Keep the hover's background when dropdown is open + .btn.dropdown-toggle { + background-color: @btnBackgroundHighlight; + } + .btn-primary.dropdown-toggle { + background-color: @btnPrimaryBackgroundHighlight; + } + .btn-warning.dropdown-toggle { + background-color: @btnWarningBackgroundHighlight; + } + .btn-danger.dropdown-toggle { + background-color: @btnDangerBackgroundHighlight; + } + .btn-success.dropdown-toggle { + background-color: @btnSuccessBackgroundHighlight; + } + .btn-info.dropdown-toggle { + background-color: @btnInfoBackgroundHighlight; + } + .btn-inverse.dropdown-toggle { + background-color: @btnInverseBackgroundHighlight; + } +} + + +// Reposition the caret +.btn .caret { + margin-top: 8px; + margin-left: 0; +} +// Carets in other button sizes +.btn-large .caret { + margin-top: 6px; +} +.btn-large .caret { + border-left-width: 5px; + border-right-width: 5px; + border-top-width: 5px; +} +.btn-mini .caret, +.btn-small .caret { + margin-top: 8px; +} +// Upside down carets for .dropup +.dropup .btn-large .caret { + border-bottom-width: 5px; +} + + +/* +// Account for other colors +.btn-primary, +.btn-warning, +.btn-danger, +.btn-info, +.btn-success, +.btn-inverse { + .caret { + border-top-color: @white; + border-bottom-color: @white; + } +} +*/ + + +// Vertical button groups +// ---------------------- + +.btn-group-vertical { + display: inline-block; // makes buttons only take up the width they need + .ie7-inline-block(); +} +.btn-group-vertical > .btn { + display: block; + float: none; + max-width: 100%; + .border-radius(0); +} +.btn-group-vertical > .btn + .btn { + margin-left: 0; + margin-top: -1px; +} +.btn-group-vertical > .btn:first-child { + .border-radius(@baseBorderRadius @baseBorderRadius 0 0); +} +.btn-group-vertical > .btn:last-child { + .border-radius(0 0 @baseBorderRadius @baseBorderRadius); +} +.btn-group-vertical > .btn-large:first-child { + .border-radius(@borderRadiusLarge @borderRadiusLarge 0 0); +} +.btn-group-vertical > .btn-large:last-child { + .border-radius(0 0 @borderRadiusLarge @borderRadiusLarge); +} diff --git a/src/Umbraco.Web.UI.Client/src/less/buttons.less b/src/Umbraco.Web.UI.Client/src/less/buttons.less index 0b21864127..c99b759b59 100644 --- a/src/Umbraco.Web.UI.Client/src/less/buttons.less +++ b/src/Umbraco.Web.UI.Client/src/less/buttons.less @@ -189,11 +189,15 @@ input[type="button"] { } // Success appears as green .btn-success { - .buttonBackground(@btnSuccessBackground, @btnSuccessBackgroundHighlight); + .buttonBackground(@btnSuccessBackground, @btnSuccessBackgroundHighlight, @btnSuccessType); } // Info appears as a neutral blue .btn-info { - .buttonBackground(@btnInfoBackground, @btnInfoBackgroundHighlight); + .buttonBackground(@btnInfoBackground, @btnInfoBackgroundHighlight, @btnInfoType); +} +// Made for Umbraco, 2019 +.btn-action { + .buttonBackground(@btnInfoBackground, @btnInfoBackgroundHighlight, @btnInfoType); } // Inverse appears as dark gray .btn-inverse { diff --git a/src/Umbraco.Web.UI.Client/src/less/canvas-designer.less b/src/Umbraco.Web.UI.Client/src/less/canvas-designer.less index cbb38a23b1..4d57f20063 100644 --- a/src/Umbraco.Web.UI.Client/src/less/canvas-designer.less +++ b/src/Umbraco.Web.UI.Client/src/less/canvas-designer.less @@ -113,7 +113,7 @@ a, a:hover{ -webkit-box-shadow: none; box-shadow: none; } - +/* .btn-success { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); @@ -133,7 +133,7 @@ a, a:hover{ .btn-success:hover { color: #ffffff; } - +*/ .btn-group > .btn + .dropdown-toggle { -webkit-box-shadow: none; box-shadow: none; diff --git a/src/Umbraco.Web.UI.Client/src/less/components/application/umb-language-picker.less b/src/Umbraco.Web.UI.Client/src/less/components/application/umb-language-picker.less index 78f631ac0d..cf252020ee 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/application/umb-language-picker.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/application/umb-language-picker.less @@ -52,5 +52,5 @@ .umb-language-picker__dropdown-item--current { background-color: @gray-10; - border-left: 2px solid @turquoise; -} \ No newline at end of file + border-left: 2px solid @ui-active; +} diff --git a/src/Umbraco.Web.UI.Client/src/less/components/html/umb-alert.less b/src/Umbraco.Web.UI.Client/src/less/components/html/umb-alert.less index c9aff190ce..4cbee6b15e 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/html/umb-alert.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/html/umb-alert.less @@ -2,12 +2,12 @@ padding: 15px; box-sizing: border-box; background-color: @turquoise-washed; - border: 1px solid @turquoise; + border: 1px solid @blueMid; } .umb-alert--info { background-color: @turquoise-washed; - border: 1px solid @turquoise; + border: 1px solid @blueMid; } .umb-alert--warning { diff --git a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less index 39facb1f48..a0ea622d6b 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less @@ -42,7 +42,8 @@ .umb-tree-item.current > .umb-tree-item__inner { - background: @ui-active; + background: @ui-active; + color:@ui-active-type; // override small icon color. TODO => check usage &:before { @@ -56,7 +57,7 @@ } i { - background: @white; + background: @ui-active-type; border-color: @ui-active; transition: opacity 120ms ease; } @@ -65,7 +66,7 @@ a, .umb-tree-icon, ins { - color: @white !important; + color: @ui-active-type !important; background-color: @ui-active; border-color: @ui-active; } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-child-selector.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-child-selector.less index 18275631dd..d8e6676728 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-child-selector.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-child-selector.less @@ -19,6 +19,13 @@ cursor: pointer; text-align: center; justify-content: center; + + color:@ui-action; + &:hover { + color:@ui-action-hover; + border-color:@ui-action-hover; + text-decoration:none; + } } .umb-child-selector__children-container { @@ -44,11 +51,11 @@ .umb-child-selector__child-name { font-size: 14px; } - +/* .umb-child-selector__child-name.-blue { color: @turquoise-d1; } - +*/ .umb-child-selector__child-actions { flex: 0 0 50px; text-align: right; diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-editor-navigation.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-editor-navigation.less index db24210e30..0982eaed26 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-editor-navigation.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-editor-navigation.less @@ -32,8 +32,24 @@ } .umb-sub-views-nav-item.is-active { - color: @ui-active; - border-bottom-color: @ui-active; + color: @ui-active; + border-bottom-color: @ui-active; + + //background-color: @ui-active; + //color: @ui-active-type; + //border-bottom-color: @ui-active-type; + /* + &::after { + content: ""; + height: 4px; + background-color: @ui-active; + position: absolute; + bottom: -1px; + border-radius: 3px 3px 0 0; + left: 8px; + right: 8px; + } + */ } .show-validation .umb-sub-views-nav-item.-has-error { @@ -63,7 +79,7 @@ display: block; &.-type-alert { - background-color: @red-l1; + background-color: @red; } &.-type-warning { background-color: @yellow-d2; diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-group-builder.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-group-builder.less index be6729bf56..0472deabf6 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-group-builder.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-group-builder.less @@ -17,7 +17,7 @@ } .umb-group-builder__group.-active { - border-color: @turquoise; + border-color: @ui-active; } .umb-group-builder__group.-inherited { @@ -33,10 +33,15 @@ align-items: center; cursor: pointer; border: 1px dashed @gray-7; - color: @turquoise-d1; + color: @ui-action; font-weight: bold; position: relative; box-shadow: none; + &:hover { + color:@ui-action-hover; + text-decoration: none; + border-color: @ui-active-hover; + } } .umb-group-builder__group.-sortable { @@ -61,11 +66,12 @@ position: relative; margin-left: auto; font-size: 18px; + color: @ui-icon; } .umb-group-builder__group-remove:hover { cursor: pointer; - color: @turquoise; + color: @ui-icon-hover; } .umb-group-builder__group-title-wrapper { @@ -296,10 +302,11 @@ input.umb-group-builder__group-title-input:disabled:hover { font-size: 18px; position: relative; cursor: pointer; + color: @ui-icon; } .umb-group-builder__property-action:hover { - color: @turquoise; + color: @ui-icon-hover; } .umb-group-builder__property-tags { @@ -416,13 +423,14 @@ input.umb-group-builder__group-sort-value { text-align: center; display: block; border-radius: 5px; - color: @gray-3; font-weight: bold; font-size: 14px; - color: @turquoise-d1; - + color: @ui-active; + &:hover { text-decoration: none; + color:@ui-active-hover; + border-color:@ui-active-hover; } } @@ -493,4 +501,4 @@ input.umb-group-builder__group-sort-value { label.checkbox.no-indent { width: 100%; } -} \ No newline at end of file +} diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-tabs.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-tabs.less index 9da54f0bf9..f0f294ae4a 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-tabs.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-tabs.less @@ -16,22 +16,30 @@ .umb-tab > a { cursor: pointer; border-bottom: 2px solid transparent; - color: @gray-3; + color: @ui-action-disgrete; padding: 5px 20px 15px 20px; transition: color 150ms ease-in-out; + &:focus { + color: @ui-action-disgrete-hover; + } + &:hover { + color: @ui-action-disgrete-hover; + text-decoration: none; + } } -.umb-tab > a:hover, -.umb-tab > a:focus { - color: @black; - text-decoration: none; -} -.umb-tab--active > a, -.umb-tab--active > a:hover, -.umb-tab--active > a:focus { - color: @black; - border-bottom-color: @turquoise; +.umb-tab--active > a { + color: @ui-active; + border-bottom-color: @ui-active; + /* + &:focus { + border-bottom-color: @ui-active; + } + &:hover { + border-bottom-color: @ui-active-hover; + } + */ } .show-validation .umb-tab--error > a, @@ -72,4 +80,4 @@ display: inline-block; margin: 0 5px 0 0; opacity: .6; -} \ No newline at end of file +} diff --git a/src/Umbraco.Web.UI.Client/src/less/mixins.less b/src/Umbraco.Web.UI.Client/src/less/mixins.less index 5b4211f177..ffeaae680b 100644 --- a/src/Umbraco.Web.UI.Client/src/less/mixins.less +++ b/src/Umbraco.Web.UI.Client/src/less/mixins.less @@ -517,9 +517,19 @@ // ------------------ .buttonBackground(@startColor, @endColor, @textColor: #fff) { // gradientBar will set the background to a pleasing blend of these, to support IE<=9 - .gradientBar(@startColor, @endColor, @textColor); - *background-color: @endColor; /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + //.gradientBar(@startColor, @endColor, @textColor); + + color: @textColor; + border-color: @startColor @startColor darken(@startColor, 15%); + border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%); + + background-color: @endColor; /* Darken IE7 buttons by default so they stand out more given they won't have borders */ .reset-filter(); + + .caret { + border-top-color: @textColor; + border-bottom-color: @textColor; + } // button states &:hover, &:focus, &:active { @@ -529,7 +539,7 @@ // in these cases the gradient won't cover the background, so we override &:hover, &:focus, &:active, &.active, &.disabled, &[disabled] { color: @textColor; - *background-color: darken(@endColor, 5%); + background-color: darken(@endColor, 5%); } // IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves diff --git a/src/Umbraco.Web.UI.Client/src/less/property-editors.less b/src/Umbraco.Web.UI.Client/src/less/property-editors.less index 3ec8c383da..a0d32ee92e 100644 --- a/src/Umbraco.Web.UI.Client/src/less/property-editors.less +++ b/src/Umbraco.Web.UI.Client/src/less/property-editors.less @@ -236,15 +236,15 @@ align-items:center; width: 120px; text-align: center; - color: @gray-8; - border: 2px @gray-8 dashed; + color: @gray-9; + border: 2px @gray-9 dashed; text-decoration: none; transition: all 150ms ease-in-out; &:hover { - color: @turquoise-d1; - border-color: @turquoise; + color: @ui-action-disgrete-hover; + border-color: @ui-action-disgrete-hover; } } @@ -828,7 +828,7 @@ cursor: default; margin: 7px; padding: 10px; - background: @turquoise; + background: @ui-action; position: relative; .icon-trash{ diff --git a/src/Umbraco.Web.UI.Client/src/less/sections.less b/src/Umbraco.Web.UI.Client/src/less/sections.less index a639d06d5a..2c5be567c9 100644 --- a/src/Umbraco.Web.UI.Client/src/less/sections.less +++ b/src/Umbraco.Web.UI.Client/src/less/sections.less @@ -36,7 +36,7 @@ ul.sections>li>a::after { content: ""; height: 4px; width: 100%; - background-color: @ui-active; + background-color: #b3afbd; position: absolute; bottom: -4px; border-radius: 3px 3px 0 0; diff --git a/src/Umbraco.Web.UI.Client/src/less/variables.less b/src/Umbraco.Web.UI.Client/src/less/variables.less index be9276bf35..7fe253bc82 100644 --- a/src/Umbraco.Web.UI.Client/src/less/variables.less +++ b/src/Umbraco.Web.UI.Client/src/less/variables.less @@ -21,42 +21,6 @@ @white: #FFF; @grayIcon: #9E9E9E; -// Accent colors -// ------------------------- - - - -@blue: #2E8AEA; -@blueDark: #3544b1;// updated 2019 -@blueExtraDark: #1b264f;// added 2019 -@blueLight: #ADD8E6; -@blueNight: #162335;// added 2019 -@green: #46A546; -@red: #9D261D; -@yellow: #fad634;// updated 2019 -@orange: #f79c37;// updated 2019 -@pink: #C3325F; -@pinkLight: #f5c1bc;// added 2019 -@brown: #9d8057;// added 2019 - -@u-greyLight: #f2ebe6;// added 2019 -@u-white: #f9f7f4;// added 2019 - - -// Accent colors -// ------------------------- - -@ui-active: @pinkLight; -@ui-active-hover: @pinkLight; -@ui-selected: @pinkLight; -@ui-selected-hover: @pinkLight; - -@ui-action: @orange; -@ui-action-hover: @orange; - -@ui-action-disgrete: @gray-4; -@ui-action-disgrete-hover: @orange; - // Colors // ------------------------- @@ -78,7 +42,7 @@ // UI Colors @red-d1: #F02E28; -@red: #FE3E39; +@red: #D42054;// updated 2019 @red-l1: #FE6561; @red-l2: #FE8B88; @red-l3: #FFB2B0; @@ -86,14 +50,14 @@ @yellow-d2: #F0AC00; @yellow-d1: #FFC011; -@yellow: #FFCE38; +@yellow: #fad634;// updated 2019 @yellow-l1: #FFD861; @yellow-l2: #FFE28A; @yellow-l3: #FFECB0; @yellow-washed: #FFFAEB; @green-d1: #1FB572; -@green: #35C786; +@green: #36B37E;// updated 2019 @green-l1: #4ECF95; @green-l2: #79E1B2; @green-l3: #A6F0CF; @@ -131,6 +95,67 @@ @indigoIcon: #3F51B5; +// Accent colors +// ------------------------- + +//@blueLight: #4f89de; +@blue: #2E8AEA; +@blueMid: #2152A3;// updated 2019 +@blueDark: #3544b1;// updated 2019 +@blueExtraDark: #1b264f;// added 2019 +@blueLight: #ADD8E6; +@blueNight: #162335;// added 2019 +@orange: #f79c37;// updated 2019 +@pink: #D93F4C;// #C3325F;// update 2019 +@pinkLight: #f5c1bc;// added 2019 +@brown: #9d8057;// added 2019 +@brownLight: #e4e0dd;// added 2019 +@claus: #f6efe7; +@claus2: #f2ebe6; +@claus3: #535963; //#56777A +@claus4: #819a9e; +//@claus5: #2152A3;// blueMid +@claus6: #02A191; +//@clausSoftRed: #D93F4C; // todo +//@clausRed:#D42054;// todo. + +@u-greyLight: #f2ebe6;// added 2019 +@u-white: #f9f7f4;// added 2019 + + +// UI colors +// ------------------------- + +//@ui-active: #346ab3; +@ui-active: @blueMid; +@ui-active-type: white; +@ui-active-hover: @blueMid; +@ui-selected: @blueMid;//not used jet. +@ui-selected-hover: @blueMid;//not used jet. + +@ui-action: @blueMid; +@ui-action-hover: @blueMid; + +@ui-action-disgrete: @gray-4; +@ui-action-disgrete-hover: @blueMid; + +@type-white: @u-white; +@type-black: @blueNight; + +@ui-btn: @claus4; +@ui-btn-hover: @ui-btn; +@ui-btn-type: @u-white; + +@ui-btn-positive: @green; +@ui-btn-positive-hover: @green; +@ui-btn-positive-type: @u-white; + +@ui-btn-negative: @red; +@ui-btn-negative-hover: @red; + +@ui-icon: @blueNight; +@ui-icon-hover: @blueMid; + @@ -278,11 +303,13 @@ @btnPrimaryBackground: @green; @btnPrimaryBackgroundHighlight: @green; -@btnInfoBackground: @purple-l1; -@btnInfoBackgroundHighlight: @purple-l1; +@btnInfoType: @ui-btn-type;// updated 2019 +@btnInfoBackground: @ui-btn;// updated 2019 +@btnInfoBackgroundHighlight: @ui-btn-hover;// updated 2019 -@btnSuccessBackground: @green; -@btnSuccessBackgroundHighlight: @green; +@btnSuccessType: @ui-btn-positive-type;// updated 2019 +@btnSuccessBackground: @ui-btn-positive;// updated 2019 +@btnSuccessBackgroundHighlight: @ui-btn-positive-hover;// updated 2019 @btnWarningBackground: @red-l1; @btnWarningBackgroundHighlight: @red-l1; diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/querybuilder/querybuilder.html b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/querybuilder/querybuilder.html index 8376f50713..f919e1df61 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/querybuilder/querybuilder.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/querybuilder/querybuilder.html @@ -26,7 +26,7 @@ @@ -46,7 +46,7 @@ @@ -66,7 +66,7 @@ @@ -86,7 +86,7 @@ @@ -135,7 +135,7 @@ @@ -154,7 +154,7 @@ diff --git a/src/Umbraco.Web.UI.Client/src/views/common/overlays/user/user.html b/src/Umbraco.Web.UI.Client/src/views/common/overlays/user/user.html index 8021d66a43..754b170f23 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/overlays/user/user.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/overlays/user/user.html @@ -15,7 +15,7 @@ type="link" href="#/users/users/user/{{user.id}}" action="model.close()" - button-style="primary" + button-style="action" label="Edit" label-key="general_edit" ng-if="canEditProfile"> @@ -25,6 +25,7 @@ alias="changePassword" type="button" action="togglePasswordFields()" + button-style="action" label="Change password" label-key="general_changePassword" button-style="success"> diff --git a/src/Umbraco.Web.UI.Client/src/views/components/umb-groups-builder.html b/src/Umbraco.Web.UI.Client/src/views/components/umb-groups-builder.html index c0490a1707..e1d0182826 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/umb-groups-builder.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/umb-groups-builder.html @@ -9,7 +9,7 @@ alias="compositions" ng-if="compositions !== false" type="button" - button-style="outline" + button-style="action" label-key="contentTypeEditor_compositions" icon="icon-merge" action="openCompositionsDialog()" @@ -21,7 +21,7 @@ alias="reorder" ng-if="sorting !== false" type="button" - button-style="outline" + button-style="action" label-key="{{sortingButtonKey}}" icon="icon-navigation" action="toggleSortingMode();" From de8516d2c7bdc1a94b2ab5b1836b93a219db3c85 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Mon, 21 Jan 2019 19:02:52 +0100 Subject: [PATCH 285/437] Make it possible to create folders for stylesheets --- src/Umbraco.Core/Services/IFileService.cs | 13 +++++++ .../Services/Implement/FileService.cs | 18 ++++++++++ .../views/stylesheets/create.controller.js | 35 ++++++++++++++++++- .../src/views/stylesheets/create.html | 30 ++++++++++++++-- src/Umbraco.Web/Editors/CodeFileController.cs | 11 +++++- 5 files changed, 103 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Core/Services/IFileService.cs b/src/Umbraco.Core/Services/IFileService.cs index a895eff7e1..d32c984b5e 100644 --- a/src/Umbraco.Core/Services/IFileService.cs +++ b/src/Umbraco.Core/Services/IFileService.cs @@ -108,6 +108,19 @@ namespace Umbraco.Core.Services /// void DeleteScriptFolder(string folderPath); + /// + /// Creates a folder for style sheets + /// + /// + /// + void CreateStyleSheetFolder(string folderPath); + + /// + /// Deletes a folder for style sheets + /// + /// + void DeleteStyleSheetFolder(string folderPath); + /// /// Gets a list of all objects /// diff --git a/src/Umbraco.Core/Services/Implement/FileService.cs b/src/Umbraco.Core/Services/Implement/FileService.cs index da82d38e36..888407c0d0 100644 --- a/src/Umbraco.Core/Services/Implement/FileService.cs +++ b/src/Umbraco.Core/Services/Implement/FileService.cs @@ -140,6 +140,24 @@ namespace Umbraco.Core.Services.Implement } } + public void CreateStyleSheetFolder(string folderPath) + { + using (var scope = ScopeProvider.CreateScope()) + { + ((StylesheetRepository) _stylesheetRepository).AddFolder(folderPath); + scope.Complete(); + } + } + + public void DeleteStyleSheetFolder(string folderPath) + { + using (var scope = ScopeProvider.CreateScope()) + { + ((StylesheetRepository) _stylesheetRepository).DeleteFolder(folderPath); + scope.Complete(); + } + } + public Stream GetStylesheetFileContentStream(string filepath) { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) diff --git a/src/Umbraco.Web.UI.Client/src/views/stylesheets/create.controller.js b/src/Umbraco.Web.UI.Client/src/views/stylesheets/create.controller.js index b37b16d4d6..6033a6bdc7 100644 --- a/src/Umbraco.Web.UI.Client/src/views/stylesheets/create.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/stylesheets/create.controller.js @@ -1,7 +1,7 @@ (function () { "use strict"; - function StyleSheetsCreateController($scope, $location, navigationService) { + function StyleSheetsCreateController($scope, $location, navigationService, formHelper, codefileResource) { var vm = this; var node = $scope.currentNode; @@ -9,6 +9,9 @@ vm.createFile = createFile; vm.createRichtextStyle = createRichtextStyle; vm.close = close; + vm.creatingFolder = false; + vm.showCreateFolder = showCreateFolder; + vm.createFolder = createFolder; function createFile() { $location.path("/settings/stylesheets/edit/" + node.id).search("create", "true"); @@ -19,6 +22,36 @@ $location.path("/settings/stylesheets/edit/" + node.id).search("create", "true").search("rtestyle", "true"); navigationService.hideMenu(); } + + function showCreateFolder() { + vm.creatingFolder = true; + } + + function createFolder(form) { + + if (formHelper.submitForm({scope: $scope, formCtrl: form })) { + + codefileResource.createContainer("stylesheets", node.id, vm.folderName).then(function (saved) { + + navigationService.hideMenu(); + + navigationService.syncTree({ + tree: "stylesheets", + path: saved.path, + forceReload: true, + activate: true + }); + + formHelper.resetForm({ scope: $scope }); + + }, function(err) { + + vm.createFolderError = err; + + }); + } + + } function close() { const showMenu = true; diff --git a/src/Umbraco.Web.UI.Client/src/views/stylesheets/create.html b/src/Umbraco.Web.UI.Client/src/views/stylesheets/create.html index 71811d2b07..0554c430d1 100644 --- a/src/Umbraco.Web.UI.Client/src/views/stylesheets/create.html +++ b/src/Umbraco.Web.UI.Client/src/views/stylesheets/create.html @@ -2,7 +2,7 @@ \ No newline at end of file + diff --git a/src/Umbraco.Web/Editors/CodeFileController.cs b/src/Umbraco.Web/Editors/CodeFileController.cs index e995fa50a3..ec72ca3df4 100644 --- a/src/Umbraco.Web/Editors/CodeFileController.cs +++ b/src/Umbraco.Web/Editors/CodeFileController.cs @@ -68,7 +68,7 @@ namespace Umbraco.Web.Editors } /// - /// Used to create a container/folder in 'partialViews', 'partialViewMacros' or 'scripts' + /// Used to create a container/folder in 'partialViews', 'partialViewMacros', 'scripts' or 'stylesheets' /// /// 'partialViews', 'partialViewMacros' or 'scripts' /// The virtual path of the parent. @@ -111,6 +111,10 @@ namespace Umbraco.Web.Editors virtualPath = NormalizeVirtualPath(name, SystemDirectories.Scripts); Services.FileService.CreateScriptFolder(virtualPath); break; + case Core.Constants.Trees.Stylesheets: + virtualPath = NormalizeVirtualPath(name, SystemDirectories.Css); + Services.FileService.CreateStyleSheetFolder(virtualPath); + break; } @@ -328,6 +332,11 @@ namespace Umbraco.Web.Editors return Request.CreateErrorResponse(HttpStatusCode.NotFound, "No Script or folder found with the specified path"); case Core.Constants.Trees.Stylesheets: + if (IsDirectory(virtualPath, SystemDirectories.Css)) + { + Services.FileService.DeleteStyleSheetFolder(virtualPath); + return Request.CreateResponse(HttpStatusCode.OK); + } if (Services.FileService.GetStylesheetByName(virtualPath) != null) { Services.FileService.DeleteStylesheet(virtualPath, Security.CurrentUser.Id); From 43a97185b61e778139c7e67b7894ad9c94d0f999 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Mon, 21 Jan 2019 19:03:16 +0100 Subject: [PATCH 286/437] Clean up file system tree controller handling of no-op for nodes --- src/Umbraco.Web/Trees/FileSystemTreeController.cs | 5 ++++- src/Umbraco.Web/Trees/FilesTreeController.cs | 6 ------ src/Umbraco.Web/Trees/PartialViewMacrosTreeController.cs | 6 ------ src/Umbraco.Web/Trees/PartialViewsTreeController.cs | 7 ------- src/Umbraco.Web/Trees/ScriptsTreeController.cs | 6 ------ 5 files changed, 4 insertions(+), 26 deletions(-) diff --git a/src/Umbraco.Web/Trees/FileSystemTreeController.cs b/src/Umbraco.Web/Trees/FileSystemTreeController.cs index 528e57773c..11160ab282 100644 --- a/src/Umbraco.Web/Trees/FileSystemTreeController.cs +++ b/src/Umbraco.Web/Trees/FileSystemTreeController.cs @@ -28,7 +28,10 @@ namespace Umbraco.Web.Trees /// Inheritors can override this method to modify the folder node that is created. ///
/// - protected virtual void OnRenderFolderNode(ref TreeNode treeNode) { } + protected virtual void OnRenderFolderNode(ref TreeNode treeNode) { + //TODO: This isn't the best way to ensure a noop process for clicking a node but it works for now. + treeNode.AdditionalData["jsClickCallback"] = "javascript:void(0);"; + } protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) { diff --git a/src/Umbraco.Web/Trees/FilesTreeController.cs b/src/Umbraco.Web/Trees/FilesTreeController.cs index 598eb713eb..99c4ade09e 100644 --- a/src/Umbraco.Web/Trees/FilesTreeController.cs +++ b/src/Umbraco.Web/Trees/FilesTreeController.cs @@ -15,11 +15,5 @@ namespace Umbraco.Web.Trees protected override string[] Extensions => ExtensionsStatic; protected override string FileIcon => "icon-document"; - - protected override void OnRenderFolderNode(ref TreeNode treeNode) - { - //TODO: This isn't the best way to ensure a noop process for clicking a node but it works for now. - treeNode.AdditionalData["jsClickCallback"] = "javascript:void(0);"; - } } } diff --git a/src/Umbraco.Web/Trees/PartialViewMacrosTreeController.cs b/src/Umbraco.Web/Trees/PartialViewMacrosTreeController.cs index c874b01244..f8c3fe3e9a 100644 --- a/src/Umbraco.Web/Trees/PartialViewMacrosTreeController.cs +++ b/src/Umbraco.Web/Trees/PartialViewMacrosTreeController.cs @@ -23,11 +23,5 @@ namespace Umbraco.Web.Trees protected override string[] Extensions => ExtensionsStatic; protected override string FileIcon => "icon-article"; - - protected override void OnRenderFolderNode(ref TreeNode treeNode) - { - //TODO: This isn't the best way to ensure a noop process for clicking a node but it works for now. - treeNode.AdditionalData["jsClickCallback"] = "javascript:void(0);"; - } } } diff --git a/src/Umbraco.Web/Trees/PartialViewsTreeController.cs b/src/Umbraco.Web/Trees/PartialViewsTreeController.cs index a7aa8f134e..113f907e12 100644 --- a/src/Umbraco.Web/Trees/PartialViewsTreeController.cs +++ b/src/Umbraco.Web/Trees/PartialViewsTreeController.cs @@ -23,12 +23,5 @@ namespace Umbraco.Web.Trees protected override string[] Extensions => ExtensionsStatic; protected override string FileIcon => "icon-article"; - - protected override void OnRenderFolderNode(ref TreeNode treeNode) - { - //TODO: This isn't the best way to ensure a noop process for clicking a node but it works for now. - treeNode.AdditionalData["jsClickCallback"] = "javascript:void(0);"; - treeNode.Icon = "icon-folder"; - } } } diff --git a/src/Umbraco.Web/Trees/ScriptsTreeController.cs b/src/Umbraco.Web/Trees/ScriptsTreeController.cs index 191c9a7f8e..2fbeae4f6b 100644 --- a/src/Umbraco.Web/Trees/ScriptsTreeController.cs +++ b/src/Umbraco.Web/Trees/ScriptsTreeController.cs @@ -16,11 +16,5 @@ namespace Umbraco.Web.Trees protected override string[] Extensions => ExtensionsStatic; protected override string FileIcon => "icon-script"; - - protected override void OnRenderFolderNode(ref TreeNode treeNode) - { - //TODO: This isn't the best way to ensure a noop process for clicking a node but it works for now. - treeNode.AdditionalData["jsClickCallback"] = "javascript:void(0);"; - } } } From c9819b2d89fe9b17a726c5b0afc045c1e87ffa29 Mon Sep 17 00:00:00 2001 From: Paul Seal Date: Sat, 26 Jan 2019 14:01:03 +0000 Subject: [PATCH 287/437] - disabled the duplicated community health checks (#4175) --- src/Umbraco.Web.UI/config/HealthChecks.config | 30 +++++++++---------- .../HealthCheck/HealthCheckController.cs | 4 +-- .../Scheduling/HealthCheckNotifier.cs | 2 +- src/Umbraco.Web/WebBootManager.cs | 13 ++++++++ 4 files changed, 31 insertions(+), 18 deletions(-) diff --git a/src/Umbraco.Web.UI/config/HealthChecks.config b/src/Umbraco.Web.UI/config/HealthChecks.config index 4e927e8bb6..5cb99e195b 100644 --- a/src/Umbraco.Web.UI/config/HealthChecks.config +++ b/src/Umbraco.Web.UI/config/HealthChecks.config @@ -8,19 +8,19 @@ For details on the format of this configuration file see: https://our.umbraco.com/documentation/reference/config/healthchecks --> - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + diff --git a/src/Umbraco.Web/HealthCheck/HealthCheckController.cs b/src/Umbraco.Web/HealthCheck/HealthCheckController.cs index 34d201d5fe..dee62e936b 100644 --- a/src/Umbraco.Web/HealthCheck/HealthCheckController.cs +++ b/src/Umbraco.Web/HealthCheck/HealthCheckController.cs @@ -82,7 +82,7 @@ namespace Umbraco.Web.HealthCheck public object GetStatus(Guid id) { var check = GetCheckById(id); - + try { //Core.Logging.LogHelper.Debug("Running health check: " + check.Name); @@ -113,4 +113,4 @@ namespace Umbraco.Web.HealthCheck return check; } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Web/Scheduling/HealthCheckNotifier.cs b/src/Umbraco.Web/Scheduling/HealthCheckNotifier.cs index d6e72f936b..7d42a90e58 100644 --- a/src/Umbraco.Web/Scheduling/HealthCheckNotifier.cs +++ b/src/Umbraco.Web/Scheduling/HealthCheckNotifier.cs @@ -16,7 +16,7 @@ namespace Umbraco.Web.Scheduling private readonly ApplicationContext _appContext; private readonly IHealthCheckResolver _healthCheckResolver; - public HealthCheckNotifier(IBackgroundTaskRunner runner, int delayMilliseconds, int periodMilliseconds, + public HealthCheckNotifier(IBackgroundTaskRunner runner, int delayMilliseconds, int periodMilliseconds, ApplicationContext appContext) : base(runner, delayMilliseconds, periodMilliseconds) { diff --git a/src/Umbraco.Web/WebBootManager.cs b/src/Umbraco.Web/WebBootManager.cs index dbab3d2346..faf1418b42 100644 --- a/src/Umbraco.Web/WebBootManager.cs +++ b/src/Umbraco.Web/WebBootManager.cs @@ -544,6 +544,19 @@ namespace Umbraco.Web () => PluginManager.ResolveTypes()); HealthCheckNotificationMethodResolver.Current = new HealthCheckNotificationMethodResolver(LoggerResolver.Current.Logger, () => PluginManager.ResolveTypes()); + + // Disable duplicate community health checks which appear in Our.Umbraco.HealtchChecks and Umbraco Core. + // See this issue to understand why https://github.com/umbraco/Umbraco-CMS/issues/4174 + var disabledHealthCheckTypes = new[] + { + "Our.Umbraco.HealthChecks.Checks.Security.HstsCheck", + "Our.Umbraco.HealthChecks.Checks.Security.TlsCheck" + }.Select(TypeFinder.GetTypeByName).WhereNotNull(); + + foreach (var type in disabledHealthCheckTypes) + { + HealthCheckResolver.Current.RemoveType(type); + } } /// From 7a2f09643abf4ba9db5e648c8a816e0e6c95d37f Mon Sep 17 00:00:00 2001 From: Ronald Barendse Date: Wed, 23 Jan 2019 23:50:02 +0100 Subject: [PATCH 288/437] Changed health check to indicate HTTPS endpoint connectivity using TLS 1.2 --- .../Umbraco/config/lang/zh_tw.xml | 3 -- 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 | 3 -- src/Umbraco.Web.UI/umbraco/config/lang/nl.xml | 4 +- src/Umbraco.Web.UI/umbraco/config/lang/pl.xml | 3 -- src/Umbraco.Web.UI/umbraco/config/lang/ru.xml | 3 -- src/Umbraco.Web.UI/umbraco/config/lang/zh.xml | 3 -- .../HealthCheck/Checks/Security/TlsCheck.cs | 51 ------------------ .../HealthCheck/Checks/Services/Tls12Check.cs | 52 +++++++++++++++++++ src/Umbraco.Web/Umbraco.Web.csproj | 2 +- 11 files changed, 59 insertions(+), 73 deletions(-) delete mode 100644 src/Umbraco.Web/HealthCheck/Checks/Security/TlsCheck.cs create mode 100644 src/Umbraco.Web/HealthCheck/Checks/Services/Tls12Check.cs 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 ba30581267..d765b7cecf 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/zh_tw.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/zh_tw.xml @@ -1331,9 +1331,6 @@ SMTP伺服器 %0% : %1% 無法連接。請確認在Web.config 檔案中 system.net/mailsettings 設定正確。 %0%。]]> %0%。]]> - - 您的網站設置為使用TLS 1.2或更高版本進行傳出連接。 - 來自您網站的傳出連接通過舊協議提供。您應該考慮將其更新為使用TLS 1.2或更高版本。 停止網址追蹤器 diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml index 06a7fbb109..53a58bd7b1 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml @@ -2207,8 +2207,8 @@ To manage your website, simply open the Umbraco back office and start adding con

Results of the scheduled Umbraco Health Checks run on %0% at %1% are as follows:

%2%]]>
Umbraco Health Check Status: %0% - Your website is set up to use TLS 1.2 or greater for outgoing connections. - Outgoing connections from your website are being served over an old protocol. You should consider updating it to use TLS 1.2 or higher. + Your site can use the TLS 1.2 security protocol when making outbound connections to HTTPS endpoints. + Your site isn't configured to allow the TLS 1.2 security protocol when making outbound connections: some HTTPS endpoints might not be reachable using a less secure protocol. Disable URL tracker 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 766d2eec9e..a2b7e6d040 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml @@ -2200,8 +2200,8 @@ To manage your website, simply open the Umbraco back office and start adding con

Results of the scheduled Umbraco Health Checks run on %0% at %1% are as follows:

%2%]]>
Umbraco Health Check Status: %0% - Your website is set up to use TLS 1.2 or greater for outgoing connections. - Outgoing connections from your website are being served over an old protocol. You should consider updating it to use TLS 1.2 or higher. + Your site can use the TLS 1.2 security protocol when making outbound connections to HTTPS endpoints. + Your site isn't configured to allow the TLS 1.2 security protocol when making outbound connections: some HTTPS endpoints might not be reachable using a less secure protocol. Disable URL tracker diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/fr.xml b/src/Umbraco.Web.UI/umbraco/config/lang/fr.xml index dab9f49120..fd2b4c53a8 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/fr.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/fr.xml @@ -2170,9 +2170,6 @@ Pour gérer votre site, ouvrez simplement le backoffice Umbraco et commencez à %0%.]]>

Les résultats de l'exécution du Umbraco Health Checks planifiée le %0% à %1% sont les suivants :

%2%]]>
Statut du Umbraco Health Check: %0% - - Votre site Web est configuré pour utiliser TLS version 1.2 ou supérieure pour les connexions sortantes. - Les connexions sortantes de votre site Web sont servies via un ancien protocole. Vous devriez envisager de le mettre à jour pour utiliser TLS 1.2 ou supérieur. Désactiver URL tracker diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml b/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml index 4680d0dfc5..dc867823c2 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml @@ -1624,8 +1624,8 @@ Om een vertalingstaak te sluiten, ga aub naar het detailoverzicht en klik op de %0%.]]> %0%.]]> - Uw website is ingesteld om TLS 1.2 of hoger te gebruiken voor uitgaande verbindingen. - Uitgaande verbindingen van uw website worden via een oud protocol bediend. U zou moeten overwegen om het bij te werken om TLS 1.2 of hoger te gebruiken. + Uw website kan het TLS 1.2 beveiligingsprotocol gebruiken bij het maken van uitgaande verbindingen naar HTTPS-eindpunten. + Uw website is niet geconfigureerd om het TLS 1.2 beveiligingsprotocol te kunnen gebruiken bij het maken van uitgaande verbindingen: sommige HTTPS-eindpunten zijn mogelijk niet bereikbaar via een minder veilig protocol. URL tracker uitzetten diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml b/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml index bb36628757..9affa43727 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml @@ -1674,9 +1674,6 @@ Naciśnij przycisk instaluj, aby zainstalować bazę danych Umb %0%.]]> %0%.]]> - - Twoja strona internetowa jest skonfigurowana do używania protokołu TLS 1.2 lub nowszego dla połączeń wychodzących. - Połączenia wychodzące z Twojej witryny są obsługiwane przez stary protokół. Należy rozważyć zaktualizowanie go do korzystania z TLS w wersji 1.2 lub nowszej. Wyłącz śledzenie URL diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml b/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml index 37a4613d43..fd33e647ad 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml @@ -870,9 +870,6 @@ %0%.]]>

Зафиксированы следующие результаты автоматической проверки состояния Umbraco по расписанию, запущенной на %0% в %1%:

%2%]]>
Результат проверки состояния Umbraco: %0% - - Ваш веб-сайт настроен на использование TLS 1.2 или выше для исходящих соединений. - Исходящие соединения с вашего сайта обслуживаются по старому протоколу. Вы должны рассмотреть возможность его обновления для использования TLS 1.2 или выше. перейти к diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/zh.xml b/src/Umbraco.Web.UI/umbraco/config/lang/zh.xml index 471925ccd5..a918b78f95 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/zh.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/zh.xml @@ -1598,9 +1598,6 @@ The SMTP server configured with host '%0%' and port '%1%' could not be reached. Please check to ensure the SMTP settings in the Web.config file system.net/mailsettings are correct. %0%.]]> %0%.]]> - - 您的网站设置为使用TLS 1.2或更高版本进行传出连接。 - 来自您网站的传出连接通过旧协议提供。您应该考虑将其更新为使用TLS 1.2或更高版本。 禁用 url 跟踪程序 diff --git a/src/Umbraco.Web/HealthCheck/Checks/Security/TlsCheck.cs b/src/Umbraco.Web/HealthCheck/Checks/Security/TlsCheck.cs deleted file mode 100644 index 8d41965395..0000000000 --- a/src/Umbraco.Web/HealthCheck/Checks/Security/TlsCheck.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Net; -using Umbraco.Core.Services; - -namespace Umbraco.Web.HealthCheck.Checks.Security -{ - [HealthCheck("6D7D4E11-758E-4697-BA72-7E02A530CBD4", - "TLS Check", - Description = "Checks that your site is set up to use at least TLS 1.2 for outgoing connections.", - Group = "Security")] - public class TlsCheck : HealthCheck - { - private readonly ILocalizedTextService _textService; - - public TlsCheck(HealthCheckContext healthCheckContext) : base(healthCheckContext) - { - _textService = healthCheckContext.ApplicationContext.Services.TextService; - } - - public override IEnumerable GetStatus() - { - return new[] { CheckTls() }; - } - - public override HealthCheckStatus ExecuteAction(HealthCheckAction action) - { - throw new InvalidOperationException("TlsCheck has no executable actions"); - } - - public HealthCheckStatus CheckTls() - { - bool success = (int)ServicePointManager.SecurityProtocol >= (int)SecurityProtocolType.Tls12; - - string message = success - ? _textService.Localize("healthcheck/tlsHealthCheckSuccess") - : _textService.Localize("healthcheck/tlsHealthCheckWarn"); - - var actions = new List(); - - return - new HealthCheckStatus(message) - { - ResultType = success - ? StatusResultType.Success - : StatusResultType.Warning, - Actions = actions - }; - } - } -} diff --git a/src/Umbraco.Web/HealthCheck/Checks/Services/Tls12Check.cs b/src/Umbraco.Web/HealthCheck/Checks/Services/Tls12Check.cs new file mode 100644 index 0000000000..d93fa28b49 --- /dev/null +++ b/src/Umbraco.Web/HealthCheck/Checks/Services/Tls12Check.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Net; +using Umbraco.Core.Services; + +namespace Umbraco.Web.HealthCheck.Checks.Services +{ + [HealthCheck("6D7D4E11-758E-4697-BA72-7E02A530CBD4", + "HTTPS endpoints (TLS 1.2)", + Description = "Checks whether the TLS 1.2 security protocol can be used when making outbound connections to HTTPS endpoints.", + Group = "Services")] + public class Tls12Check : HealthCheck + { + private readonly ILocalizedTextService _textService; + + public Tls12Check(HealthCheckContext healthCheckContext) : base(healthCheckContext) + { + _textService = healthCheckContext.ApplicationContext.Services.TextService; + } + + public override IEnumerable GetStatus() + { + return new[] { CheckTls() }; + } + + public override HealthCheckStatus ExecuteAction(HealthCheckAction action) + { + throw new InvalidOperationException("This check has no executable actions."); + } + + public HealthCheckStatus CheckTls() + { + // When set to 0 (SystemDefault), allows the operating system to choose the best protocol to use, and to block protocols that are not secure (this allows TLS 1.2 by default). + var success = ServicePointManager.SecurityProtocol == 0 || + ServicePointManager.SecurityProtocol.HasFlag(SecurityProtocolType.Tls12); + + var message = success + ? _textService.Localize("healthcheck/tls12HealthCheckSuccess") + : _textService.Localize("healthcheck/tls12HealthCheckWarn"); + + var actions = new List(); + + return new HealthCheckStatus(message) + { + ResultType = success + ? StatusResultType.Success + : StatusResultType.Warning, + Actions = actions + }; + } + } +} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index a66e960e97..036cb96b50 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -338,7 +338,7 @@ - + From a13a38a482336440962e18aa607fa7c4f5b88ba9 Mon Sep 17 00:00:00 2001 From: Chris Houston Date: Sat, 26 Jan 2019 09:42:14 -0500 Subject: [PATCH 289/437] Updated all the TODO: comments in the Umbraco.Core project so they are all in the same format. ( // TODO: ) (#4220) Also moved some of the comments so they are will work better / are not within Code Documentation comments --- src/Umbraco.Core/Composing/Lifetime.cs | 2 +- .../Events/QueuingEventDispatcher.cs | 2 +- src/Umbraco.Core/IO/FileSystems.cs | 2 +- src/Umbraco.Core/IO/PhysicalFileSystem.cs | 2 +- .../Migrations/IMigrationExpression.cs | 2 +- .../Migrations/Install/DatabaseSchemaResult.cs | 2 +- src/Umbraco.Core/Models/ContentBase.cs | 4 ++-- src/Umbraco.Core/Models/ContentTypeBase.cs | 2 +- src/Umbraco.Core/Models/GridValue.cs | 4 ++-- src/Umbraco.Core/Models/IContent.cs | 2 +- .../Models/IContentTypeComposition.cs | 2 +- .../Models/Identity/BackOfficeIdentityUser.cs | 4 ++-- src/Umbraco.Core/Models/MediaExtensions.cs | 2 +- src/Umbraco.Core/Models/Membership/User.cs | 2 +- .../Models/Packaging/CompiledPackage.cs | 16 ++++++++-------- src/Umbraco.Core/Models/Property.cs | 4 ++-- src/Umbraco.Core/Models/PropertyCollection.cs | 2 +- .../Models/PropertyGroupCollection.cs | 2 +- .../Models/PropertyTagsExtensions.cs | 2 +- src/Umbraco.Core/Models/PropertyType.cs | 6 +++--- .../Models/PropertyTypeCollection.cs | 4 ++-- .../PublishedContent/IPublishedContent.cs | 2 +- .../PublishedContent/PublishedContentType.cs | 8 +++++--- .../PublishedContent/PublishedPropertyType.cs | 2 +- .../Persistence/Constants-DatabaseSchema.cs | 4 ++-- .../Dtos/ContentVersionCultureVariationDto.cs | 4 ++-- .../Persistence/Dtos/ContentVersionDto.cs | 6 +++--- .../Persistence/Dtos/DataTypeDto.cs | 2 +- src/Umbraco.Core/Persistence/Dtos/NodeDto.cs | 4 ++-- .../Persistence/Factories/ContentBaseFactory.cs | 10 +++++----- src/Umbraco.Core/Persistence/LocalDb.cs | 4 ++-- .../Persistence/NPocoDatabaseExtensions-Bulk.cs | 6 +++--- .../Persistence/NPocoDatabaseExtensions.cs | 4 ++-- .../Persistence/NPocoSqlExtensions.cs | 4 ++-- .../Querying/ExpressionVisitorBase.cs | 2 +- .../Implement/ContentRepositoryBase.cs | 12 ++++++------ .../Implement/ContentTypeRepositoryBase.cs | 3 +-- .../Implement/DocumentRepository.cs | 17 ++++++++--------- .../Repositories/Implement/EntityRepository.cs | 16 ++++++++-------- .../Repositories/Implement/MediaRepository.cs | 4 ++-- .../Implement/MemberGroupRepository.cs | 2 +- .../Repositories/Implement/MemberRepository.cs | 14 +++++++------- .../Implement/NPocoRepositoryBase.cs | 2 +- .../Implement/RepositoryBaseOfTIdTEntity.cs | 2 +- .../Implement/ServerRegistrationRepository.cs | 2 +- .../Repositories/Implement/UserRepository.cs | 4 ++-- .../Persistence/SqlSyntaxExtensions.cs | 2 +- src/Umbraco.Core/Persistence/UmbracoDatabase.cs | 4 ++-- .../Persistence/UmbracoDatabaseFactory.cs | 8 ++++---- src/Umbraco.Core/PropertyEditors/DataEditor.cs | 4 ++-- .../PropertyEditors/DataValueEditor.cs | 2 +- src/Umbraco.Core/PropertyEditors/IDataEditor.cs | 2 +- .../PropertyEditors/IDataValueEditor.cs | 4 ++-- .../ManifestValueValidatorCollection.cs | 2 +- .../TagsPropertyEditorAttribute.cs | 2 +- .../ValueConverters/SliderValueConverter.cs | 2 +- src/Umbraco.Core/Scoping/Scope.cs | 6 +++--- src/Umbraco.Core/Scoping/ScopeContext.cs | 5 +---- src/Umbraco.Core/Services/IContentService.cs | 2 +- src/Umbraco.Core/Services/IEntityService.cs | 3 ++- .../Services/IEntityXmlSerializer.cs | 2 +- .../Services/Implement/ContentService.cs | 10 +++++----- ...TypeServiceBaseOfTRepositoryTItemTService.cs | 2 +- .../Services/Implement/DataTypeService.cs | 8 ++++---- .../Services/Implement/EntityService.cs | 2 +- .../Services/Implement/EntityXmlSerializer.cs | 2 +- .../Services/Implement/FileService.cs | 2 +- .../Services/Implement/MediaService.cs | 4 ++-- .../Services/Implement/MemberService.cs | 2 +- .../Services/Implement/NotificationService.cs | 2 +- .../Services/Implement/RelationService.cs | 2 +- .../Implement/ScopeRepositoryService.cs | 2 +- .../Services/Implement/UserService.cs | 4 ++-- src/Umbraco.Core/Services/OperationResult.cs | 5 ++--- .../Services/OperationResultType.cs | 2 +- src/Umbraco.Core/Services/PublishResultType.cs | 2 +- .../Strings/Utf8ToAsciiConverter.cs | 3 +-- src/Umbraco.Core/Sync/ApplicationUrlHelper.cs | 2 +- .../Sync/DatabaseServerMessenger.cs | 2 +- 79 files changed, 157 insertions(+), 161 deletions(-) diff --git a/src/Umbraco.Core/Composing/Lifetime.cs b/src/Umbraco.Core/Composing/Lifetime.cs index a35d4d9ecf..1a2cc3119a 100644 --- a/src/Umbraco.Core/Composing/Lifetime.cs +++ b/src/Umbraco.Core/Composing/Lifetime.cs @@ -15,7 +15,7 @@ /// /// One unique instance per request. /// - // TODO - review lifetimes for LightInject vs other containers + // TODO: review lifetimes for LightInject vs other containers // currently, corresponds to 'Request' in LightInject which is 'Transient + disposed by Scope' // but NOT (in LightInject) a per-web-request lifetime, more a TransientScoped // diff --git a/src/Umbraco.Core/Events/QueuingEventDispatcher.cs b/src/Umbraco.Core/Events/QueuingEventDispatcher.cs index 164b452f2c..88b527e753 100644 --- a/src/Umbraco.Core/Events/QueuingEventDispatcher.cs +++ b/src/Umbraco.Core/Events/QueuingEventDispatcher.cs @@ -34,7 +34,7 @@ namespace Umbraco.Core.Events private IMediaFileSystem _mediaFileSystem; - // todo: inject + // TODO: inject private IMediaFileSystem MediaFileSystem => _mediaFileSystem ?? (_mediaFileSystem = Current.MediaFileSystem); } } diff --git a/src/Umbraco.Core/IO/FileSystems.cs b/src/Umbraco.Core/IO/FileSystems.cs index 38cb7df824..19d29e14ba 100644 --- a/src/Umbraco.Core/IO/FileSystems.cs +++ b/src/Umbraco.Core/IO/FileSystems.cs @@ -132,7 +132,7 @@ namespace Umbraco.Core.IO _scriptsFileSystem = new ShadowWrapper(scriptsFileSystem, "scripts", IsScoped); _mvcViewsFileSystem = new ShadowWrapper(mvcViewsFileSystem, "Views", IsScoped); - // todo - do we need a lock here? + // TODO: do we need a lock here? _shadowWrappers.Add(_macroPartialFileSystem); _shadowWrappers.Add(_partialViewsFileSystem); _shadowWrappers.Add(_stylesheetsFileSystem); diff --git a/src/Umbraco.Core/IO/PhysicalFileSystem.cs b/src/Umbraco.Core/IO/PhysicalFileSystem.cs index 80f4c57ee3..acf5e796e4 100644 --- a/src/Umbraco.Core/IO/PhysicalFileSystem.cs +++ b/src/Umbraco.Core/IO/PhysicalFileSystem.cs @@ -153,7 +153,7 @@ namespace Umbraco.Core.IO if (directory == null) throw new InvalidOperationException("Could not get directory."); Directory.CreateDirectory(directory); // ensure it exists - if (stream.CanSeek) // todo - what if we cannot? + if (stream.CanSeek) // TODO: what if we cannot? stream.Seek(0, 0); using (var destination = (Stream) File.Create(fullPath)) diff --git a/src/Umbraco.Core/Migrations/IMigrationExpression.cs b/src/Umbraco.Core/Migrations/IMigrationExpression.cs index 81063bd2da..c60126f63c 100644 --- a/src/Umbraco.Core/Migrations/IMigrationExpression.cs +++ b/src/Umbraco.Core/Migrations/IMigrationExpression.cs @@ -5,7 +5,7 @@ ///
public interface IMigrationExpression { - string Process(IMigrationContext context); // todo: remove that one? + string Process(IMigrationContext context); // TODO: remove that one? void Execute(); } } diff --git a/src/Umbraco.Core/Migrations/Install/DatabaseSchemaResult.cs b/src/Umbraco.Core/Migrations/Install/DatabaseSchemaResult.cs index d3f6937834..f21216fde3 100644 --- a/src/Umbraco.Core/Migrations/Install/DatabaseSchemaResult.cs +++ b/src/Umbraco.Core/Migrations/Install/DatabaseSchemaResult.cs @@ -27,7 +27,7 @@ namespace Umbraco.Core.Migrations.Install public List TableDefinitions { get; } - // todo what are these exactly? TableDefinitions are those that should be there, IndexDefinitions are those that... are in DB? + // TODO: what are these exactly? TableDefinitions are those that should be there, IndexDefinitions are those that... are in DB? internal List IndexDefinitions { get; } public List ValidTables { get; } diff --git a/src/Umbraco.Core/Models/ContentBase.cs b/src/Umbraco.Core/Models/ContentBase.cs index 0d4e9ce789..ca1152a9a4 100644 --- a/src/Umbraco.Core/Models/ContentBase.cs +++ b/src/Umbraco.Core/Models/ContentBase.cs @@ -128,14 +128,14 @@ namespace Umbraco.Core.Models /// /// Gets the enumeration of property groups for the entity. - /// todo - remove this proxy method + /// TODO: remove this proxy method /// [IgnoreDataMember] public IEnumerable PropertyGroups => ContentTypeBase.CompositionPropertyGroups; /// /// Gets the numeration of property types for the entity. - /// todo - remove this proxy method + /// TODO: remove this proxy method /// [IgnoreDataMember] public IEnumerable PropertyTypes => ContentTypeBase.CompositionPropertyTypes; diff --git a/src/Umbraco.Core/Models/ContentTypeBase.cs b/src/Umbraco.Core/Models/ContentTypeBase.cs index dadc3870b0..064bdd3d4a 100644 --- a/src/Umbraco.Core/Models/ContentTypeBase.cs +++ b/src/Umbraco.Core/Models/ContentTypeBase.cs @@ -431,7 +431,7 @@ namespace Umbraco.Core.Models /// PropertyTypes that are not part of a PropertyGroup /// [IgnoreDataMember] - //todo should we mark this as EditorBrowsable hidden since it really isn't ever used? + // TODO: should we mark this as EditorBrowsable hidden since it really isn't ever used? internal PropertyTypeCollection PropertyTypeCollection => _noGroupPropertyTypes; /// diff --git a/src/Umbraco.Core/Models/GridValue.cs b/src/Umbraco.Core/Models/GridValue.cs index c4a8b85b00..4f19576f17 100644 --- a/src/Umbraco.Core/Models/GridValue.cs +++ b/src/Umbraco.Core/Models/GridValue.cs @@ -21,7 +21,7 @@ namespace Umbraco.Core.Models public class GridSection { [JsonProperty("grid")] - public string Grid { get; set; } //todo: what is this? + public string Grid { get; set; } // TODO: what is this? [JsonProperty("rows")] public IEnumerable Rows { get; set; } @@ -48,7 +48,7 @@ namespace Umbraco.Core.Models public class GridArea { [JsonProperty("grid")] - public string Grid { get; set; } //todo: what is this? + public string Grid { get; set; } // TODO: what is this? [JsonProperty("controls")] public IEnumerable Controls { get; set; } diff --git a/src/Umbraco.Core/Models/IContent.cs b/src/Umbraco.Core/Models/IContent.cs index b3b4e03783..4363324c8d 100644 --- a/src/Umbraco.Core/Models/IContent.cs +++ b/src/Umbraco.Core/Models/IContent.cs @@ -137,7 +137,7 @@ namespace Umbraco.Core.Models /// IEnumerable EditedCultures { get; } - // todo - these two should move to some kind of service + // TODO: these two should move to some kind of service /// /// Changes the for the current content object diff --git a/src/Umbraco.Core/Models/IContentTypeComposition.cs b/src/Umbraco.Core/Models/IContentTypeComposition.cs index 84e436e46f..675d3cd268 100644 --- a/src/Umbraco.Core/Models/IContentTypeComposition.cs +++ b/src/Umbraco.Core/Models/IContentTypeComposition.cs @@ -10,7 +10,7 @@ namespace Umbraco.Core.Models /// /// Gets or sets the content types that compose this content type. /// - //todo: we should be storing key references, not the object else we are caching way too much + // TODO: we should be storing key references, not the object else we are caching way too much IEnumerable ContentTypeComposition { get; set; } /// diff --git a/src/Umbraco.Core/Models/Identity/BackOfficeIdentityUser.cs b/src/Umbraco.Core/Models/Identity/BackOfficeIdentityUser.cs index d118cd526e..f5c21a3a74 100644 --- a/src/Umbraco.Core/Models/Identity/BackOfficeIdentityUser.cs +++ b/src/Umbraco.Core/Models/Identity/BackOfficeIdentityUser.cs @@ -67,7 +67,7 @@ namespace Umbraco.Core.Models.Identity _startContentIds = new int[] { }; _groups = new IReadOnlyUserGroup[] { }; _allowedSections = new string[] { }; - _culture = Current.Configs.Global().DefaultUILanguage; //todo inject + _culture = Current.Configs.Global().DefaultUILanguage; // TODO: inject _groups = new IReadOnlyUserGroup[0]; _roles = new ObservableCollection>(); _roles.CollectionChanged += _roles_CollectionChanged; @@ -84,7 +84,7 @@ namespace Umbraco.Core.Models.Identity _startContentIds = new int[] { }; _groups = new IReadOnlyUserGroup[] { }; _allowedSections = new string[] { }; - _culture = Current.Configs.Global().DefaultUILanguage; //todo inject + _culture = Current.Configs.Global().DefaultUILanguage; // TODO: inject _groups = groups.ToArray(); _roles = new ObservableCollection>(_groups.Select(x => new IdentityUserRole { diff --git a/src/Umbraco.Core/Models/MediaExtensions.cs b/src/Umbraco.Core/Models/MediaExtensions.cs index 2945856817..e281aaf5ab 100644 --- a/src/Umbraco.Core/Models/MediaExtensions.cs +++ b/src/Umbraco.Core/Models/MediaExtensions.cs @@ -21,7 +21,7 @@ namespace Umbraco.Core.Models var val = media.Properties[propertyType]; if (val == null) return string.Empty; - //todo would need to be adjusted to variations, when media become variants + // TODO: would need to be adjusted to variations, when media become variants var jsonString = val.GetValue() as string; if (jsonString == null) return string.Empty; diff --git a/src/Umbraco.Core/Models/Membership/User.cs b/src/Umbraco.Core/Models/Membership/User.cs index 942c71f0c6..5e79967a94 100644 --- a/src/Umbraco.Core/Models/Membership/User.cs +++ b/src/Umbraco.Core/Models/Membership/User.cs @@ -27,7 +27,7 @@ namespace Umbraco.Core.Models.Membership { SessionTimeout = 60; _userGroups = new HashSet(); - _language = Current.Configs.Global().DefaultUILanguage; //todo inject + _language = Current.Configs.Global().DefaultUILanguage; // TODO: inject _isApproved = true; _isLockedOut = false; _startContentIds = new int[] { }; diff --git a/src/Umbraco.Core/Models/Packaging/CompiledPackage.cs b/src/Umbraco.Core/Models/Packaging/CompiledPackage.cs index ac460ca34c..f4ed11e09e 100644 --- a/src/Umbraco.Core/Models/Packaging/CompiledPackage.cs +++ b/src/Umbraco.Core/Models/Packaging/CompiledPackage.cs @@ -26,19 +26,19 @@ namespace Umbraco.Core.Models.Packaging public string PackageView { get; set; } public string IconUrl { get; set; } - public string Actions { get; set; } //todo: Should we make this strongly typed to IEnumerable ? + public string Actions { get; set; } // TODO: Should we make this strongly typed to IEnumerable ? public PreInstallWarnings Warnings { get; set; } = new PreInstallWarnings(); public List Files { get; set; } = new List(); - public IEnumerable Macros { get; set; } //todo: make strongly typed - public IEnumerable Templates { get; set; } //todo: make strongly typed - public IEnumerable Stylesheets { get; set; } //todo: make strongly typed - public IEnumerable DataTypes { get; set; } //todo: make strongly typed - public IEnumerable Languages { get; set; } //todo: make strongly typed - public IEnumerable DictionaryItems { get; set; } //todo: make strongly typed - public IEnumerable DocumentTypes { get; set; } //todo: make strongly typed + public IEnumerable Macros { get; set; } // TODO: make strongly typed + public IEnumerable Templates { get; set; } // TODO: make strongly typed + public IEnumerable Stylesheets { get; set; } // TODO: make strongly typed + public IEnumerable DataTypes { get; set; } // TODO: make strongly typed + public IEnumerable Languages { get; set; } // TODO: make strongly typed + public IEnumerable DictionaryItems { get; set; } // TODO: make strongly typed + public IEnumerable DocumentTypes { get; set; } // TODO: make strongly typed public IEnumerable Documents { get; set; } } } diff --git a/src/Umbraco.Core/Models/Property.cs b/src/Umbraco.Core/Models/Property.cs index 5e45475dd2..f5c475908d 100644 --- a/src/Umbraco.Core/Models/Property.cs +++ b/src/Umbraco.Core/Models/Property.cs @@ -347,7 +347,7 @@ namespace Umbraco.Core.Models /// internal bool IsValid(string culture = "*", string segment = "*") { - //todo - validating values shouldn't be done here, this calls in to IsValidValue + // TODO: validating values shouldn't be done here, this calls in to IsValidValue culture = culture.NullOrWhiteSpaceAsNull(); segment = segment.NullOrWhiteSpaceAsNull(); @@ -388,7 +388,7 @@ namespace Umbraco.Core.Models /// True is property value is valid, otherwise false private bool IsValidValue(object value) { - //todo - this shouldn't exist here, the model itself shouldn't be responsible for it's own validation and this requires singleton access + // TODO: this shouldn't exist here, the model itself shouldn't be responsible for it's own validation and this requires singleton access return PropertyType.IsPropertyValueValid(value); } diff --git a/src/Umbraco.Core/Models/PropertyCollection.cs b/src/Umbraco.Core/Models/PropertyCollection.cs index ef56ce4a4c..5e71fe9f65 100644 --- a/src/Umbraco.Core/Models/PropertyCollection.cs +++ b/src/Umbraco.Core/Models/PropertyCollection.cs @@ -97,7 +97,7 @@ namespace Umbraco.Core.Models /// internal new void Add(Property property) { - lock (_addLocker) // todo - why are we locking here and not everywhere else?! + lock (_addLocker) // TODO: why are we locking here and not everywhere else?! { var key = GetKeyForItem(property); if (key != null) diff --git a/src/Umbraco.Core/Models/PropertyGroupCollection.cs b/src/Umbraco.Core/Models/PropertyGroupCollection.cs index 5fe47b52a4..2e9fb6520e 100644 --- a/src/Umbraco.Core/Models/PropertyGroupCollection.cs +++ b/src/Umbraco.Core/Models/PropertyGroupCollection.cs @@ -19,7 +19,7 @@ namespace Umbraco.Core.Models { private readonly ReaderWriterLockSlim _addLocker = new ReaderWriterLockSlim(); - //todo: this doesn't seem to be used anywhere + // TODO: this doesn't seem to be used anywhere internal Action OnAdd; internal PropertyGroupCollection() diff --git a/src/Umbraco.Core/Models/PropertyTagsExtensions.cs b/src/Umbraco.Core/Models/PropertyTagsExtensions.cs index c0dcddc6ae..63cf870221 100644 --- a/src/Umbraco.Core/Models/PropertyTagsExtensions.cs +++ b/src/Umbraco.Core/Models/PropertyTagsExtensions.cs @@ -14,7 +14,7 @@ namespace Umbraco.Core.Models /// public static class PropertyTagsExtensions { - // todo: inject + // TODO: inject private static PropertyEditorCollection PropertyEditors => Current.PropertyEditors; private static IDataTypeService DataTypeService => Current.Services.DataTypeService; diff --git a/src/Umbraco.Core/Models/PropertyType.cs b/src/Umbraco.Core/Models/PropertyType.cs index 377e86d2e5..107831ebdd 100644 --- a/src/Umbraco.Core/Models/PropertyType.cs +++ b/src/Umbraco.Core/Models/PropertyType.cs @@ -378,14 +378,14 @@ namespace Umbraco.Core.Models } - //todo - this and other value validation methods should be a service level (not a model) thing. Changing this to internal for now + // TODO: this and other value validation methods should be a service level (not a model) thing. Changing this to internal for now /// /// Determines whether a value is valid for this property type. /// internal bool IsPropertyValueValid(object value) { - var editor = Current.PropertyEditors[_propertyEditorAlias]; // todo inject - var configuration = Current.Services.DataTypeService.GetDataType(_dataTypeId).Configuration; // todo inject + var editor = Current.PropertyEditors[_propertyEditorAlias]; // TODO: inject + var configuration = Current.Services.DataTypeService.GetDataType(_dataTypeId).Configuration; // TODO: inject var valueEditor = editor.GetValueEditor(configuration); return !valueEditor.Validate(value, Mandatory, ValidationRegExp).Any(); } diff --git a/src/Umbraco.Core/Models/PropertyTypeCollection.cs b/src/Umbraco.Core/Models/PropertyTypeCollection.cs index 6753ee7532..f39918d5af 100644 --- a/src/Umbraco.Core/Models/PropertyTypeCollection.cs +++ b/src/Umbraco.Core/Models/PropertyTypeCollection.cs @@ -19,7 +19,7 @@ namespace Umbraco.Core.Models [IgnoreDataMember] private readonly ReaderWriterLockSlim _addLocker = new ReaderWriterLockSlim(); - //todo: This doesn't seem to be used + // TODO: This doesn't seem to be used [IgnoreDataMember] internal Action OnAdd; @@ -81,7 +81,7 @@ namespace Umbraco.Core.Models { item.IsPublishing = IsPublishing; - // todo this is not pretty and should be refactored + // TODO: this is not pretty and should be refactored try { _addLocker.EnterWriteLock(); diff --git a/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs b/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs index e50fb2c396..33efc48c95 100644 --- a/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs +++ b/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs @@ -15,7 +15,7 @@ namespace Umbraco.Core.Models.PublishedContent { #region Content - // todo - IPublishedContent properties colliding with models + // TODO: IPublishedContent properties colliding with models // we need to find a way to remove as much clutter as possible from IPublishedContent, // since this is preventing someone from creating a property named 'Path' and have it // in a model, for instance. we could move them all under one unique property eg diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs index 083e8dcc6e..0798e9a4e0 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs @@ -86,7 +86,7 @@ namespace Umbraco.Core.Models.PublishedContent } } - // todo - this list somehow also exists in constants, see memberTypeRepository => remove duplicate! + // TODO: this list somehow also exists in constants, see memberTypeRepository => remove duplicate! private static readonly Dictionary BuiltinMemberProperties = new Dictionary { { "Email", (Constants.DataTypes.Textbox, Constants.PropertyEditors.Aliases.TextBox) }, @@ -148,7 +148,8 @@ namespace Umbraco.Core.Models.PublishedContent return -1; } - // virtual for unit tests - todo explain why + // virtual for unit tests + // TODO: explain why /// /// Gets a property type. /// @@ -158,7 +159,8 @@ namespace Umbraco.Core.Models.PublishedContent return GetPropertyType(index); } - // virtual for unit tests - todo explain why + // virtual for unit tests + // TODO: explain why /// /// Gets a property type. /// diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs index 0860fdb822..68892fd79a 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs @@ -12,7 +12,7 @@ namespace Umbraco.Core.Models.PublishedContent /// if the property type changes, then a new class needs to be created. public class PublishedPropertyType { - //todo - API design review, should this be an interface? + // TODO: API design review, should this be an interface? private readonly IPublishedModelFactory _publishedModelFactory; private readonly PropertyValueConverterCollection _propertyValueConverters; diff --git a/src/Umbraco.Core/Persistence/Constants-DatabaseSchema.cs b/src/Umbraco.Core/Persistence/Constants-DatabaseSchema.cs index bfbde592b5..7898a9997a 100644 --- a/src/Umbraco.Core/Persistence/Constants-DatabaseSchema.cs +++ b/src/Umbraco.Core/Persistence/Constants-DatabaseSchema.cs @@ -14,8 +14,8 @@ namespace Umbraco.Core public const string Node = /*TableNamePrefix*/ "umbraco" + "Node"; public const string NodeData = /*TableNamePrefix*/ "cms" + "ContentNu"; - public const string NodeXml = /*TableNamePrefix*/ "cms" + "ContentXml"; // todo get rid of these with the xml cache - public const string NodePreviewXml = /*TableNamePrefix*/ "cms" + "PreviewXml"; // todo get rid of these with the xml cache + public const string NodeXml = /*TableNamePrefix*/ "cms" + "ContentXml"; // TODO: get rid of these with the xml cache + public const string NodePreviewXml = /*TableNamePrefix*/ "cms" + "PreviewXml"; // TODO: get rid of these with the xml cache public const string ContentType = /*TableNamePrefix*/ "cms" + "ContentType"; public const string ContentChildType = /*TableNamePrefix*/ "cms" + "ContentTypeAllowedContentType"; diff --git a/src/Umbraco.Core/Persistence/Dtos/ContentVersionCultureVariationDto.cs b/src/Umbraco.Core/Persistence/Dtos/ContentVersionCultureVariationDto.cs index ada26358dc..65d677d240 100644 --- a/src/Umbraco.Core/Persistence/Dtos/ContentVersionCultureVariationDto.cs +++ b/src/Umbraco.Core/Persistence/Dtos/ContentVersionCultureVariationDto.cs @@ -33,10 +33,10 @@ namespace Umbraco.Core.Persistence.Dtos [Column("name")] public string Name { get; set; } - [Column("date")] // todo: db rename to 'updateDate' + [Column("date")] // TODO: db rename to 'updateDate' public DateTime UpdateDate { get; set; } - [Column("availableUserId")] // todo: db rename to 'updateDate' + [Column("availableUserId")] // TODO: db rename to 'updateDate' [ForeignKey(typeof(UserDto))] [NullSetting(NullSetting = NullSettings.Null)] public int? UpdateUserId { get => _updateUserId == 0 ? null : _updateUserId; set => _updateUserId = value; } //return null if zero diff --git a/src/Umbraco.Core/Persistence/Dtos/ContentVersionDto.cs b/src/Umbraco.Core/Persistence/Dtos/ContentVersionDto.cs index 287e812211..3c2c3deda4 100644 --- a/src/Umbraco.Core/Persistence/Dtos/ContentVersionDto.cs +++ b/src/Umbraco.Core/Persistence/Dtos/ContentVersionDto.cs @@ -21,16 +21,16 @@ namespace Umbraco.Core.Persistence.Dtos [ForeignKey(typeof(ContentDto))] public int NodeId { get; set; } - [Column("versionDate")] // todo: db rename to 'updateDate' + [Column("versionDate")] // TODO: db rename to 'updateDate' [Constraint(Default = SystemMethods.CurrentDateTime)] public DateTime VersionDate { get; set; } - [Column("userId")] // todo: db rename to 'updateUserId' + [Column("userId")] // TODO: db rename to 'updateUserId' [ForeignKey(typeof(UserDto))] [NullSetting(NullSetting = NullSettings.Null)] public int? UserId { get => _userId == 0 ? null : _userId; set => _userId = value; } //return null if zero - //todo - we need an index on this it is used almost always in querying and sorting + // TODO: we need an index on this it is used almost always in querying and sorting [Column("current")] public bool Current { get; set; } diff --git a/src/Umbraco.Core/Persistence/Dtos/DataTypeDto.cs b/src/Umbraco.Core/Persistence/Dtos/DataTypeDto.cs index a0e526b62e..d270c7b732 100644 --- a/src/Umbraco.Core/Persistence/Dtos/DataTypeDto.cs +++ b/src/Umbraco.Core/Persistence/Dtos/DataTypeDto.cs @@ -14,7 +14,7 @@ namespace Umbraco.Core.Persistence.Dtos public int NodeId { get; set; } [Column("propertyEditorAlias")] - public string EditorAlias { get; set; } // todo should this have a length + public string EditorAlias { get; set; } // TODO: should this have a length [Column("dbType")] [Length(50)] diff --git a/src/Umbraco.Core/Persistence/Dtos/NodeDto.cs b/src/Umbraco.Core/Persistence/Dtos/NodeDto.cs index 8f50891b34..5800efb97a 100644 --- a/src/Umbraco.Core/Persistence/Dtos/NodeDto.cs +++ b/src/Umbraco.Core/Persistence/Dtos/NodeDto.cs @@ -45,7 +45,7 @@ namespace Umbraco.Core.Persistence.Dtos [Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_Trashed")] public bool Trashed { get; set; } - [Column("nodeUser")] // todo: db rename to 'createUserId' + [Column("nodeUser")] // TODO: db rename to 'createUserId' [ForeignKey(typeof(UserDto))] [NullSetting(NullSetting = NullSettings.Null)] public int? UserId { get => _userId == 0 ? null : _userId; set => _userId = value; } //return null if zero @@ -54,7 +54,7 @@ namespace Umbraco.Core.Persistence.Dtos [NullSetting(NullSetting = NullSettings.Null)] public string Text { get; set; } - [Column("nodeObjectType")] // todo: db rename to 'objectType' + [Column("nodeObjectType")] // TODO: db rename to 'objectType' [NullSetting(NullSetting = NullSettings.Null)] [Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_ObjectType")] public Guid? NodeObjectType { get; set; } diff --git a/src/Umbraco.Core/Persistence/Factories/ContentBaseFactory.cs b/src/Umbraco.Core/Persistence/Factories/ContentBaseFactory.cs index 97e172f98f..434e0393cd 100644 --- a/src/Umbraco.Core/Persistence/Factories/ContentBaseFactory.cs +++ b/src/Umbraco.Core/Persistence/Factories/ContentBaseFactory.cs @@ -49,7 +49,7 @@ namespace Umbraco.Core.Persistence.Factories content.Published = dto.Published; content.Edited = dto.Edited; - // todo - shall we get published infos or not? + // TODO: shall we get published infos or not? //if (dto.Published) if (publishedVersionDto != null) { @@ -89,7 +89,7 @@ namespace Umbraco.Core.Persistence.Factories content.Key = nodeDto.UniqueId; content.VersionId = contentVersionDto.Id; - // todo missing names? + // TODO: missing names? content.Path = nodeDto.Path; content.Level = nodeDto.Level; @@ -130,7 +130,7 @@ namespace Umbraco.Core.Persistence.Factories content.Key = nodeDto.UniqueId; content.VersionId = contentVersionDto.Id; - // todo missing names? + // TODO: missing names? content.Path = nodeDto.Path; content.Level = nodeDto.Level; @@ -294,7 +294,7 @@ namespace Umbraco.Core.Persistence.Factories private static MediaVersionDto BuildMediaVersionDto(IMedia entity, ContentDto contentDto) { // try to get a path from the string being stored for media - // todo - only considering umbracoFile + // TODO: only considering umbracoFile TryMatch(entity.GetValue("umbracoFile"), out var path); @@ -309,7 +309,7 @@ namespace Umbraco.Core.Persistence.Factories return dto; } - // todo - this should NOT be here?! + // TODO: this should NOT be here?! // more dark magic ;-( internal static bool TryMatch(string text, out string path) { diff --git a/src/Umbraco.Core/Persistence/LocalDb.cs b/src/Umbraco.Core/Persistence/LocalDb.cs index 94e930abe9..55d6565344 100644 --- a/src/Umbraco.Core/Persistence/LocalDb.cs +++ b/src/Umbraco.Core/Persistence/LocalDb.cs @@ -317,8 +317,8 @@ namespace Umbraco.Core.Persistence if (dbname == "master" || dbname == "tempdb" || dbname == "model" || dbname == "msdb") continue; - // todo - shall we deal with stale databases? - // todo - is it always ok to assume file names? + // TODO: shall we deal with stale databases? + // TODO: is it always ok to assume file names? //var mdf = database.Value; //var ldf = mdf.Replace(".mdf", "_log.ldf"); //if (staleOnly && File.Exists(mdf) && File.Exists(ldf)) diff --git a/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions-Bulk.cs b/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions-Bulk.cs index b596ab60a3..09f754c47a 100644 --- a/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions-Bulk.cs +++ b/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions-Bulk.cs @@ -17,7 +17,7 @@ namespace Umbraco.Core.Persistence /// public static partial class NPocoDatabaseExtensions { - // todo: review NPoco native InsertBulk to replace the code below + // TODO: review NPoco native InsertBulk to replace the code below /// /// Bulk-inserts records within a transaction. @@ -177,8 +177,8 @@ namespace Umbraco.Core.Persistence using (var command = database.CreateCommand(database.Connection, CommandType.TableDirect, string.Empty)) { command.CommandText = pocoData.TableInfo.TableName; - command.CommandType = CommandType.TableDirect; // todo - why repeat? - // todo - not supporting transactions? + command.CommandType = CommandType.TableDirect; // TODO: why repeat? + // TODO: not supporting transactions? //cmd.Transaction = GetTypedTransaction(db.Connection.); var count = 0; diff --git a/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions.cs b/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions.cs index b8417d743d..248f91284f 100644 --- a/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions.cs +++ b/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions.cs @@ -32,7 +32,7 @@ namespace Umbraco.Core.Persistence // // works in READ COMMITED, TSQL & SQLCE lock the constraint even if it does not exist, so INSERT is OK // - // todo: use the proper database syntax, not this kludge + // TODO: use the proper database syntax, not this kludge /// /// Safely inserts a record, or updates if it exists, based on a unique constraint. @@ -81,7 +81,7 @@ namespace Umbraco.Core.Persistence if (poco == null) throw new ArgumentNullException(nameof(poco)); - // todo - NPoco has a Save method that works with the primary key + // TODO: NPoco has a Save method that works with the primary key // in any case, no point trying to update if there's no primary key! // try to update diff --git a/src/Umbraco.Core/Persistence/NPocoSqlExtensions.cs b/src/Umbraco.Core/Persistence/NPocoSqlExtensions.cs index 10735f865c..23d818f0b3 100644 --- a/src/Umbraco.Core/Persistence/NPocoSqlExtensions.cs +++ b/src/Umbraco.Core/Persistence/NPocoSqlExtensions.cs @@ -496,7 +496,7 @@ namespace Umbraco.Core.Persistence public static Sql On(this Sql.SqlJoinClause sqlJoin, Expression> leftField, Expression> rightField) { - // todo - ugly - should define on SqlContext! + // TODO: ugly - should define on SqlContext! var xLeft = new Sql(sqlJoin.SqlContext).Columns(leftField); var xRight = new Sql(sqlJoin.SqlContext).Columns(rightField); @@ -1180,7 +1180,7 @@ namespace Umbraco.Core.Persistence private static string GetTableName(this Type type) { - // todo: returning string.Empty for now + // TODO: returning string.Empty for now // BUT the code bits that calls this method cannot deal with string.Empty so we // should either throw, or fix these code bits... var attr = type.FirstAttribute(); diff --git a/src/Umbraco.Core/Persistence/Querying/ExpressionVisitorBase.cs b/src/Umbraco.Core/Persistence/Querying/ExpressionVisitorBase.cs index 64b3c91e50..b6f5401bec 100644 --- a/src/Umbraco.Core/Persistence/Querying/ExpressionVisitorBase.cs +++ b/src/Umbraco.Core/Persistence/Querying/ExpressionVisitorBase.cs @@ -10,7 +10,7 @@ using Umbraco.Core.Composing; namespace Umbraco.Core.Persistence.Querying { - // todo - are we basically duplicating entire parts of NPoco just because of SqlSyntax ?! + // TODO: are we basically duplicating entire parts of NPoco just because of SqlSyntax ?! // try to use NPoco's version ! /// diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs index 8057c87578..821f0941fc 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs @@ -43,7 +43,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement protected ILanguageRepository LanguageRepository { get; } - protected PropertyEditorCollection PropertyEditors => Current.PropertyEditors; // todo inject + protected PropertyEditorCollection PropertyEditors => Current.PropertyEditors; // TODO: inject #region Versions @@ -73,7 +73,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // deletes a specific version public virtual void DeleteVersion(int versionId) { - // todo test object node type? + // TODO: test object node type? // get the version we want to delete var template = SqlContext.Templates.Get("Umbraco.Core.VersionableRepository.GetVersion", tsql => @@ -95,7 +95,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // deletes all versions of an entity, older than a date. public virtual void DeleteVersions(int nodeId, DateTime versionDate) { - // todo test object node type? + // TODO: test object node type? // get the versions we want to delete, excluding the current one var template = SqlContext.Templates.Get("Umbraco.Core.VersionableRepository.GetVersions", tsql => @@ -240,7 +240,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement } } - // todo should we do it when un-publishing? or? + // TODO: should we do it when un-publishing? or? /// /// Clears tags for an item. /// @@ -374,7 +374,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement return GetAliasedField(SqlSyntax.GetFieldName(x => x.Text), sql); // "variantName" alias is defined in DocumentRepository.GetBaseQuery - // todo - what if it is NOT a document but a ... media or whatever? + // TODO: what if it is NOT a document but a ... media or whatever? // previously, we inserted the join+select *here* so we were sure to have it, // but now that's not the case anymore! return "variantName"; @@ -620,7 +620,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement #region UnitOfWork Events - // todo: The reason these events are in the repository is for legacy, the events should exist at the service + // TODO: The reason these events are in the repository is for legacy, the events should exist at the service // level now since we can fire these events within the transaction... so move the events to service level public class ScopedEntityEventArgs : EventArgs diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs index 3bc730d5d0..92ade18204 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs @@ -343,8 +343,7 @@ AND umbracoNode.id <> @id", List orphanPropertyTypeIds = null; if (entity.IsPropertyDirty("PropertyGroups")) { - // todo - // we used to try to propagate tabs renaming downstream, relying on ParentId, but + // TODO: we used to try to propagate tabs renaming downstream, relying on ParentId, but // 1) ParentId makes no sense (if a tab can be inherited from multiple composition // types) so we would need to figure things out differently, visiting downstream // content types and looking for tabs with the same name... diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs index 8bee55060b..dcac7f4ff4 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs @@ -148,7 +148,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement .On((left, right) => left.Id == right.Id && right.Published, "pcv", "pdv"), "pcv") .On((left, right) => left.NodeId == right.NodeId, aliasRight: "pcv") - // todo - should we be joining this when the query type is not single/many? + // TODO: should we be joining this when the query type is not single/many? // left join on optional culture variation //the magic "[[[ISOCODE]]]" parameter value will be replaced in ContentRepositoryBase.GetPage() by the actual ISO code .LeftJoin(nested => @@ -277,7 +277,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement SanitizeNames(content, publishing); // ensure that strings don't contain characters that are invalid in xml - // todo - do we really want to keep doing this here? + // TODO: do we really want to keep doing this here? entity.SanitizeEntityPropertiesForXmlStorage(); // create the dto @@ -466,7 +466,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement SanitizeNames(content, publishing); // ensure that strings don't contain characters that are invalid in xml - // todo - do we really want to keep doing this here? + // TODO: do we really want to keep doing this here? entity.SanitizeEntityPropertiesForXmlStorage(); // if parent has changed, get path, level and sort order @@ -545,7 +545,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement edited = true; (editedCultures ?? (editedCultures = new HashSet(StringComparer.OrdinalIgnoreCase))).Add(culture); - // todo - change tracking + // TODO: change tracking // at the moment, we don't do any dirty tracking on property values, so we don't know whether the // culture has just been edited or not, so we don't update its update date - that date only changes // when the name is set, and it all works because the controller does it - but, if someone uses a @@ -561,7 +561,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var deleteDocumentVariations = Sql().Delete().Where(x => x.NodeId == content.Id); Database.Execute(deleteDocumentVariations); - // todo NPoco InsertBulk issue? + // TODO: NPoco InsertBulk issue? // we should use the native NPoco InsertBulk here but it causes problems (not sure exactly all scenarios) // but by using SQL Server and updating a variants name will cause: Unable to cast object of type // 'Umbraco.Core.Persistence.FaultHandling.RetryDbConnection' to type 'System.Data.SqlClient.SqlConnection'. @@ -622,8 +622,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement ClearEntityTags(entity, _tagRepository); } - // note re. tags: explicitly unpublished entities have cleared tags, - // but masked or trashed entities *still* have tags in the db todo so what? + // TODO: note re. tags: explicitly unpublished entities have cleared tags, but masked or trashed entities *still* have tags in the db - so what? entity.ResetDirtyProperties(); @@ -837,7 +836,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement } // reading repository purely for looking up by GUID - // todo - ugly and to fix we need to decouple the IRepositoryQueryable -> IRepository -> IReadRepository which should all be separate things! + // TODO: ugly and to fix we need to decouple the IRepositoryQueryable -> IRepository -> IReadRepository which should all be separate things! private class ContentByGuidReadRepository : NPocoRepositoryBase { private readonly DocumentRepository _outerRepo; @@ -1124,7 +1123,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // get properties - indexed by version id var versionId = dto.DocumentVersionDto.Id; - // todo - shall we get published properties or not? + // TODO: shall we get published properties or not? //var publishedVersionId = dto.Published ? dto.PublishedVersionDto.Id : 0; var publishedVersionId = dto.PublishedVersionDto != null ? dto.PublishedVersionDto.Id : 0; diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/EntityRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/EntityRepository.cs index c531b991a9..85912694f0 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/EntityRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/EntityRepository.cs @@ -62,7 +62,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement ApplyOrdering(ref sql, ordering); } - //todo - we should be able to do sql = sql.OrderBy(x => Alias(x.NodeId, "NodeId")); but we can't because the OrderBy extension don't support Alias currently + // TODO: we should be able to do sql = sql.OrderBy(x => Alias(x.NodeId, "NodeId")); but we can't because the OrderBy extension don't support Alias currently //no matter what we always must have node id ordered at the end sql = ordering.Direction == Direction.Ascending ? sql.OrderBy("NodeId") : sql.OrderByDescending("NodeId"); @@ -73,7 +73,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement if (isContent) BuildVariants(entities.Cast()); - //todo - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media + // TODO: see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media if (isMedia) BuildProperties(entities, dtos); @@ -166,7 +166,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var entities = dtos.Select(x => BuildEntity(false, isMedia, x)).ToArray(); - //todo- see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media + // TODO: See https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media if (isMedia && loadMediaProperties) BuildProperties(entities, dtos); @@ -227,7 +227,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement return GetEntities(sql, isContent, isMedia, true); } - //todo- see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media + // TODO: See https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media internal IEnumerable GetMediaByQueryWithoutPropertyData(IQuery query) { var isContent = false; @@ -266,7 +266,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement return Database.ExecuteScalar(sql) > 0; } - //todo - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media + // TODO: see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media private void BuildProperties(EntitySlim entity, BaseDto dto) { var pdtos = Database.Fetch(GetPropertyData(dto.VersionId)); @@ -274,7 +274,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement BuildProperty(entity, pdto); } - //todo - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media + // TODO: see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media private void BuildProperties(EntitySlim[] entities, List dtos) { var versionIds = dtos.Select(x => x.VersionId).Distinct().ToList(); @@ -290,7 +290,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement } } - //todo - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media + // TODO: see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media private void BuildProperty(EntitySlim entity, PropertyDataDto pdto) { // explain ?! @@ -539,7 +539,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement if (sql == null) throw new ArgumentNullException(nameof(sql)); if (ordering == null) throw new ArgumentNullException(nameof(ordering)); - //todo - although this works for name, it probably doesn't work for others without an alias of some sort + // TODO: although this works for name, it probably doesn't work for others without an alias of some sort var orderBy = ordering.OrderBy; if (ordering.Direction == Direction.Ascending) diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs index 94714d6ded..38558e1ca5 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs @@ -225,7 +225,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement entity.Name = EnsureUniqueNodeName(entity.ParentId, entity.Name); // ensure that strings don't contain characters that are invalid in xml - // todo - do we really want to keep doing this here? + // TODO: do we really want to keep doing this here? entity.SanitizeEntityPropertiesForXmlStorage(); // create the dto @@ -304,7 +304,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement entity.Name = EnsureUniqueNodeName(entity.ParentId, entity.Name, entity.Id); // ensure that strings don't contain characters that are invalid in xml - // todo - do we really want to keep doing this here? + // TODO: do we really want to keep doing this here? entity.SanitizeEntityPropertiesForXmlStorage(); // if parent has changed, get path, level and sort order diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberGroupRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberGroupRepository.cs index e6ee79470c..ff7a79f98e 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberGroupRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberGroupRepository.cs @@ -298,7 +298,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement public int MemberGroupId { get; set; } } - // todo - understand why we need these two repository-level events, move them back to service + // TODO: understand why we need these two repository-level events, move them back to service /// /// Occurs before Save diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs index 9d7556f356..18dc16cbce 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs @@ -66,7 +66,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { var baseQuery = GetBaseQuery(false); - // todo why is this different from content/media?! + // TODO: why is this different from content/media?! // check if the query is based on properties or not var wheres = query.GetWhereClauses(); @@ -103,7 +103,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { var sql = SqlContext.Sql(); - switch (queryType) // todo pretend we still need these queries for now + switch (queryType) // TODO: pretend we still need these queries for now { case QueryType.Count: sql = sql.SelectCount(); @@ -143,18 +143,18 @@ namespace Umbraco.Core.Persistence.Repositories.Implement return sql; } - // todo - move that one up to Versionable! or better: kill it! + // TODO: move that one up to Versionable! or better: kill it! protected override Sql GetBaseQuery(bool isCount) { return GetBaseQuery(isCount ? QueryType.Count : QueryType.Single); } - protected override string GetBaseWhereClause() // todo - can we kill / refactor this? + protected override string GetBaseWhereClause() // TODO: can we kill / refactor this? { return "umbracoNode.id = @id"; } - // todo document/understand that one + // TODO: document/understand that one protected Sql GetNodeIdQueryWithPropertyData() { return Sql() @@ -237,7 +237,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement member.AddingEntity(); // ensure that strings don't contain characters that are invalid in xml - // todo - do we really want to keep doing this here? + // TODO: do we really want to keep doing this here? entity.SanitizeEntityPropertiesForXmlStorage(); // create the dto @@ -329,7 +329,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement member.UpdatingEntity(); // ensure that strings don't contain characters that are invalid in xml - // todo - do we really want to keep doing this here? + // TODO: do we really want to keep doing this here? entity.SanitizeEntityPropertiesForXmlStorage(); // if parent has changed, get path, level and sort order diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/NPocoRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/NPocoRepositoryBase.cs index a0ba2d5aa3..23236ec9f0 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/NPocoRepositoryBase.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/NPocoRepositoryBase.cs @@ -42,7 +42,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement #region Abstract Methods - protected abstract Sql GetBaseQuery(bool isCount); // todo obsolete, use QueryType instead everywhere + protected abstract Sql GetBaseQuery(bool isCount); // TODO: obsolete, use QueryType instead everywhere protected abstract string GetBaseWhereClause(); protected abstract IEnumerable GetDeleteClauses(); protected abstract Guid NodeObjectTypeId { get; } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs index 84e8ffc172..fb45a79e43 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs @@ -78,7 +78,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement } } - // todo - but now that we have 1 unique repository? + // TODO: but now that we have 1 unique repository? // this is a *bad* idea because PerformCount captures the current repository and its UOW // //private static RepositoryCachePolicyOptions _defaultOptions; diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ServerRegistrationRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ServerRegistrationRepository.cs index b4aa9c27f9..2bad7229f2 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ServerRegistrationRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ServerRegistrationRepository.cs @@ -20,7 +20,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement protected override IRepositoryCachePolicy CreateCachePolicy() { - // todo - wtf are we doing with cache here? + // TODO: wtf are we doing with cache here? // why are we using disabled cache helper up there? // // 7.6 says: diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs index 2242c65256..fdd5fb0d86 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs @@ -65,7 +65,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement if (_passwordConfigInitialized) return _passwordConfigJson; - // todo - this is bad + // TODO: this is bad // because the membership provider we're trying to get has a dependency on the user service // and we should not depend on services in repositories - need a way better way to do this @@ -238,7 +238,7 @@ ORDER BY colName"; public void ClearLoginSession(Guid sessionId) { - // todo why is that one updating and not deleting? + // TODO: why is that one updating and not deleting? Database.Execute(Sql() .Update(u => u.Set(x => x.LoggedOutUtc, DateTime.UtcNow)) .Where(x => x.SessionId == sessionId)); diff --git a/src/Umbraco.Core/Persistence/SqlSyntaxExtensions.cs b/src/Umbraco.Core/Persistence/SqlSyntaxExtensions.cs index 43ef03327b..2fba8e7d49 100644 --- a/src/Umbraco.Core/Persistence/SqlSyntaxExtensions.cs +++ b/src/Umbraco.Core/Persistence/SqlSyntaxExtensions.cs @@ -13,7 +13,7 @@ namespace Umbraco.Core.Persistence { private static string GetTableName(this Type type) { - // todo: returning string.Empty for now + // TODO: returning string.Empty for now // BUT the code bits that calls this method cannot deal with string.Empty so we // should either throw, or fix these code bits... var attr = type.FirstAttribute(); diff --git a/src/Umbraco.Core/Persistence/UmbracoDatabase.cs b/src/Umbraco.Core/Persistence/UmbracoDatabase.cs index 4e795d3a78..51e0172f35 100644 --- a/src/Umbraco.Core/Persistence/UmbracoDatabase.cs +++ b/src/Umbraco.Core/Persistence/UmbracoDatabase.cs @@ -159,7 +159,7 @@ namespace Umbraco.Core.Persistence #region OnSomething - // todo - has new interceptors to replace OnSomething? + // TODO: has new interceptors to replace OnSomething? protected override DbConnection OnConnectionOpened(DbConnection connection) { @@ -218,7 +218,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 aec49b8eb5..eab0ae5509 100644 --- a/src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs +++ b/src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs @@ -22,8 +22,8 @@ namespace Umbraco.Core.Persistence /// It wraps an NPoco UmbracoDatabaseFactory which is initializes with a proper IPocoDataFactory to ensure /// that NPoco's plumbing is cached appropriately for the whole application. /// - //todo these comments are not true anymore - //todo this class needs not be disposable! + // TODO: these comments are not true anymore + // TODO: this class needs not be disposable! internal class UmbracoDatabaseFactory : DisposableObject, IUmbracoDatabaseFactory { private readonly Lazy _mappers; @@ -288,7 +288,7 @@ namespace Umbraco.Core.Persistence // thread, so we don't really know what we are disposing here... // besides, we don't really want to dispose the factory, which is a singleton... - // todo - the class does not need be disposable + // TODO: the class does not need be disposable //var db = _umbracoDatabaseAccessor.UmbracoDatabase; //_umbracoDatabaseAccessor.UmbracoDatabase = null; //db?.Dispose(); @@ -299,7 +299,7 @@ namespace Umbraco.Core.Persistence // this method provides a way to force-reset the variable internal void ResetForTests() { - // todo remove all this eventually + // TODO: remove all this eventually //var db = _umbracoDatabaseAccessor.UmbracoDatabase; //_umbracoDatabaseAccessor.UmbracoDatabase = null; //db?.Dispose(); diff --git a/src/Umbraco.Core/PropertyEditors/DataEditor.cs b/src/Umbraco.Core/PropertyEditors/DataEditor.cs index 0db6dcb0dd..ae6ace996e 100644 --- a/src/Umbraco.Core/PropertyEditors/DataEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/DataEditor.cs @@ -89,7 +89,7 @@ namespace Umbraco.Core.PropertyEditors /// Technically, it could be cached by datatype but let's keep things /// simple enough for now. /// - // todo point of that one? shouldn't we always configure? + // TODO: point of that one? shouldn't we always configure? public IDataValueEditor GetValueEditor() => ExplicitValueEditor ?? CreateValueEditor(); /// @@ -113,7 +113,7 @@ namespace Umbraco.Core.PropertyEditors return ExplicitValueEditor; var editor = CreateValueEditor(); - ((DataValueEditor) editor).Configuration = configuration; // todo casting is bad + ((DataValueEditor) editor).Configuration = configuration; // TODO: casting is bad return editor; } diff --git a/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs b/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs index 153039dedb..096b80de1f 100644 --- a/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs @@ -283,7 +283,7 @@ namespace Umbraco.Core.PropertyEditors } } - // todo - the methods below should be replaced by proper property value convert ToXPath usage! + // TODO: the methods below should be replaced by proper property value convert ToXPath usage! /// /// Converts a property to Xml fragments. diff --git a/src/Umbraco.Core/PropertyEditors/IDataEditor.cs b/src/Umbraco.Core/PropertyEditors/IDataEditor.cs index 16aa4d6d5c..e7aa68459e 100644 --- a/src/Umbraco.Core/PropertyEditors/IDataEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/IDataEditor.cs @@ -46,7 +46,7 @@ namespace Umbraco.Core.PropertyEditors /// /// Gets a value editor. /// - IDataValueEditor GetValueEditor(); // todo - should be configured?! + IDataValueEditor GetValueEditor(); // TODO: should be configured?! /// /// Gets a configured value editor. diff --git a/src/Umbraco.Core/PropertyEditors/IDataValueEditor.cs b/src/Umbraco.Core/PropertyEditors/IDataValueEditor.cs index c92b6fa0d3..cb68531cc7 100644 --- a/src/Umbraco.Core/PropertyEditors/IDataValueEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/IDataValueEditor.cs @@ -47,7 +47,7 @@ namespace Umbraco.Core.PropertyEditors /// /// /// Use this property to add validators, not to validate. Use instead. - /// todo replace with AddValidator? WithValidator? + /// TODO: replace with AddValidator? WithValidator? /// List Validators { get; } @@ -61,7 +61,7 @@ namespace Umbraco.Core.PropertyEditors /// object ToEditor(Property property, IDataTypeService dataTypeService, string culture = null, string segment = null); - // todo / deal with this when unplugging the xml cache + // TODO: / deal with this when unplugging the xml cache // why property vs propertyType? services should be injected! etc... IEnumerable ConvertDbToXml(Property property, IDataTypeService dataTypeService, ILocalizationService localizationService, bool published); XNode ConvertDbToXml(PropertyType propertyType, object value, IDataTypeService dataTypeService); diff --git a/src/Umbraco.Core/PropertyEditors/ManifestValueValidatorCollection.cs b/src/Umbraco.Core/PropertyEditors/ManifestValueValidatorCollection.cs index 204dff6f19..62f2e0ca1d 100644 --- a/src/Umbraco.Core/PropertyEditors/ManifestValueValidatorCollection.cs +++ b/src/Umbraco.Core/PropertyEditors/ManifestValueValidatorCollection.cs @@ -17,7 +17,7 @@ namespace Umbraco.Core.PropertyEditors if (v == null) throw new InvalidOperationException($"Could not find a validator named \"{name}\"."); - // todo - what is this exactly? + // TODO: what is this exactly? // we cannot return this instance, need to clone it? return (IManifestValueValidator) Activator.CreateInstance(v.GetType()); // ouch } diff --git a/src/Umbraco.Core/PropertyEditors/TagsPropertyEditorAttribute.cs b/src/Umbraco.Core/PropertyEditors/TagsPropertyEditorAttribute.cs index e1f99083e8..2439c7c02e 100644 --- a/src/Umbraco.Core/PropertyEditors/TagsPropertyEditorAttribute.cs +++ b/src/Umbraco.Core/PropertyEditors/TagsPropertyEditorAttribute.cs @@ -43,7 +43,7 @@ namespace Umbraco.Core.PropertyEditors /// /// Gets or sets a value indicating whether to replace the tags entirely. /// - // todo: what's the usage? + // TODO: what's the usage? public bool ReplaceTags { get; set; } /// diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/SliderValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/SliderValueConverter.cs index 12594eb842..31ab47223f 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/SliderValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/SliderValueConverter.cs @@ -67,7 +67,7 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters // GetPreValuesCollectionByDataTypeId is cached at repository level; // still, the collection is deep-cloned so this is kinda expensive, // better to cache here + trigger refresh in DataTypeCacheRefresher - // todo: this is cheap now, remove the caching + // TODO: this is cheap now, remove the caching return Storages.GetOrAdd(dataTypeId, id => { diff --git a/src/Umbraco.Core/Scoping/Scope.cs b/src/Umbraco.Core/Scoping/Scope.cs index 6aeee33c41..f9ea02b072 100644 --- a/src/Umbraco.Core/Scoping/Scope.cs +++ b/src/Umbraco.Core/Scoping/Scope.cs @@ -85,7 +85,7 @@ namespace Umbraco.Core.Scoping ParentScope = parent; // cannot specify a different mode! - // todo - means that it's OK to go from L2 to None for reading purposes, but writing would be BAD! + // TODO: means that it's OK to go from L2 to None for reading purposes, but writing would be BAD! // this is for XmlStore that wants to bypass caches when rebuilding XML (same for NuCache) if (repositoryCacheMode != RepositoryCacheMode.Unspecified && parent.RepositoryCacheMode > repositoryCacheMode) throw new ArgumentException($"Value '{repositoryCacheMode}' cannot be lower than parent value '{parent.RepositoryCacheMode}'.", nameof(repositoryCacheMode)); @@ -264,7 +264,7 @@ namespace Umbraco.Core.Scoping if (ParentScope != null) return ParentScope.Messages; return _messages ?? (_messages = new EventMessages()); - // todo - event messages? + // TODO: event messages? // this may be a problem: the messages collection will be cleared at the end of the scope // how shall we process it in controllers etc? if we don't want the global factory from v7? // it'd need to be captured by the controller @@ -323,7 +323,7 @@ namespace Umbraco.Core.Scoping if (_disposed) throw new ObjectDisposedException(GetType().FullName); - // todo - safer? + // TODO: safer? //if (Interlocked.CompareExchange(ref _disposed, 1, 0) != 0) // throw new ObjectDisposedException(GetType().FullName); } diff --git a/src/Umbraco.Core/Scoping/ScopeContext.cs b/src/Umbraco.Core/Scoping/ScopeContext.cs index 3f70f1791e..03a0da1a55 100644 --- a/src/Umbraco.Core/Scoping/ScopeContext.cs +++ b/src/Umbraco.Core/Scoping/ScopeContext.cs @@ -13,10 +13,7 @@ namespace Umbraco.Core.Scoping if (_enlisted == null) return; - // todo - // - can we create infinite loops? - // - what about nested events? will they just be plainly ignored = really bad? - + // TODO: - can we create infinite loops? - what about nested events? will they just be plainly ignored = really bad? List exceptions = null; List orderedEnlisted; while ((orderedEnlisted = _enlisted.Values.OrderBy(x => x.Priority).ToList()).Count > 0) diff --git a/src/Umbraco.Core/Services/IContentService.cs b/src/Umbraco.Core/Services/IContentService.cs index 3a3c43c6a0..7fb7450b46 100644 --- a/src/Umbraco.Core/Services/IContentService.cs +++ b/src/Umbraco.Core/Services/IContentService.cs @@ -242,7 +242,7 @@ namespace Umbraco.Core.Services /// /// Saves documents. /// - // todo why only 1 result not 1 per content?! + // TODO: why only 1 result not 1 per content?! OperationResult Save(IEnumerable contents, int userId = 0, bool raiseEvents = true); /// diff --git a/src/Umbraco.Core/Services/IEntityService.cs b/src/Umbraco.Core/Services/IEntityService.cs index 3f398cc1e9..9d0399f324 100644 --- a/src/Umbraco.Core/Services/IEntityService.cs +++ b/src/Umbraco.Core/Services/IEntityService.cs @@ -242,8 +242,9 @@ namespace Umbraco.Core.Services IEnumerable GetPagedDescendants(IEnumerable ids, UmbracoObjectTypes objectType, long pageIndex, int pageSize, out long totalRecords, IQuery filter = null, Ordering ordering = null); + // TODO: Do we really need this? why not just pass in -1 /// - /// Gets descendants of root. todo: Do we really need this? why not just pass in -1 + /// Gets descendants of root. /// IEnumerable GetPagedDescendants(UmbracoObjectTypes objectType, long pageIndex, int pageSize, out long totalRecords, IQuery filter = null, Ordering ordering = null, bool includeTrashed = true); diff --git a/src/Umbraco.Core/Services/IEntityXmlSerializer.cs b/src/Umbraco.Core/Services/IEntityXmlSerializer.cs index 1c58fc56b8..6feb31115c 100644 --- a/src/Umbraco.Core/Services/IEntityXmlSerializer.cs +++ b/src/Umbraco.Core/Services/IEntityXmlSerializer.cs @@ -14,7 +14,7 @@ namespace Umbraco.Core.Services /// XElement Serialize(IContent content, bool published, - bool withDescendants = false) //todo take care of usage! only used for the packager + bool withDescendants = false) // TODO: take care of usage! only used for the packager ; /// diff --git a/src/Umbraco.Core/Services/Implement/ContentService.cs b/src/Umbraco.Core/Services/Implement/ContentService.cs index e1304a324f..cbc2eeca7a 100644 --- a/src/Umbraco.Core/Services/Implement/ContentService.cs +++ b/src/Umbraco.Core/Services/Implement/ContentService.cs @@ -164,7 +164,7 @@ namespace Umbraco.Core.Services.Implement /// public IContent Create(string name, Guid parentId, string contentTypeAlias, int userId = 0) { - // todo - what about culture? + // TODO: what about culture? var parent = GetById(parentId); return Create(name, parent, contentTypeAlias, userId); @@ -184,7 +184,7 @@ namespace Umbraco.Core.Services.Implement /// The content object. public IContent Create(string name, int parentId, string contentTypeAlias, int userId = 0) { - // todo - what about culture? + // TODO: what about culture? var contentType = GetContentType(contentTypeAlias); if (contentType == null) @@ -217,7 +217,7 @@ namespace Umbraco.Core.Services.Implement /// The content object. public IContent Create(string name, IContent parent, string contentTypeAlias, int userId = 0) { - // todo - what about culture? + // TODO: what about culture? if (parent == null) throw new ArgumentNullException(nameof(parent)); @@ -248,7 +248,7 @@ namespace Umbraco.Core.Services.Implement /// The content object. public IContent CreateAndSave(string name, int parentId, string contentTypeAlias, int userId = 0) { - // todo - what about culture? + // TODO: what about culture? using (var scope = ScopeProvider.CreateScope()) { @@ -282,7 +282,7 @@ namespace Umbraco.Core.Services.Implement /// The content object. public IContent CreateAndSave(string name, IContent parent, string contentTypeAlias, int userId = 0) { - // todo - what about culture? + // TODO: what about culture? if (parent == null) throw new ArgumentNullException(nameof(parent)); diff --git a/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs b/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs index a9e75e6f29..0cac249cdf 100644 --- a/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs +++ b/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs @@ -353,7 +353,7 @@ namespace Umbraco.Core.Services.Implement public IEnumerable GetComposedOf(int id) { // GetAll is cheap, repository has a full dataset cache policy - // todo - still, because it uses the cache, race conditions! + // TODO: still, because it uses the cache, race conditions! var allContentTypes = GetAll(Array.Empty()); return GetComposedOf(id, allContentTypes); } diff --git a/src/Umbraco.Core/Services/Implement/DataTypeService.cs b/src/Umbraco.Core/Services/Implement/DataTypeService.cs index b97c3a3ee7..4c588157d0 100644 --- a/src/Umbraco.Core/Services/Implement/DataTypeService.cs +++ b/src/Umbraco.Core/Services/Implement/DataTypeService.cs @@ -204,7 +204,7 @@ namespace Umbraco.Core.Services.Implement _dataTypeContainerRepository.Save(container); scope.Complete(); - // todo - triggering SavedContainer with a different name?! + // TODO: triggering SavedContainer with a different name?! scope.Events.Dispatch(SavedContainer, this, new SaveEventArgs(container, evtMsgs), "RenamedContainer"); return OperationResult.Attempt.Succeed(OperationResultType.Success, evtMsgs, container); @@ -318,7 +318,7 @@ namespace Umbraco.Core.Services.Implement } catch (DataOperationException ex) { - scope.Complete(); // todo what are we doing here exactly? + scope.Complete(); // TODO: what are we doing here exactly? return OperationResult.Attempt.Fail(ex.Operation, evtMsgs); } } @@ -426,8 +426,8 @@ namespace Umbraco.Core.Services.Implement // find ContentTypes using this IDataTypeDefinition on a PropertyType, and delete - // todo - media and members?! - // todo - non-group properties?! + // TODO: media and members?! + // TODO: non-group properties?! var query = Query().Where(x => x.DataTypeId == dataType.Id); var contentTypes = _contentTypeRepository.GetByQuery(query); foreach (var contentType in contentTypes) diff --git a/src/Umbraco.Core/Services/Implement/EntityService.cs b/src/Umbraco.Core/Services/Implement/EntityService.cs index ee6bdeb46d..00edde48f3 100644 --- a/src/Umbraco.Core/Services/Implement/EntityService.cs +++ b/src/Umbraco.Core/Services/Implement/EntityService.cs @@ -388,7 +388,7 @@ namespace Umbraco.Core.Services.Implement { var query = Query().Where(x => x.ParentId == parentId); - //todo - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media + // TODO: see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media return ((EntityRepository)_entityRepository).GetMediaByQueryWithoutPropertyData(query); } } diff --git a/src/Umbraco.Core/Services/Implement/EntityXmlSerializer.cs b/src/Umbraco.Core/Services/Implement/EntityXmlSerializer.cs index 6b52dd4ac1..6a8514f0a0 100644 --- a/src/Umbraco.Core/Services/Implement/EntityXmlSerializer.cs +++ b/src/Umbraco.Core/Services/Implement/EntityXmlSerializer.cs @@ -47,7 +47,7 @@ namespace Umbraco.Core.Services.Implement /// public XElement Serialize(IContent content, bool published, - bool withDescendants = false) //todo take care of usage! only used for the packager + bool withDescendants = false) // TODO: take care of usage! only used for the packager { if (content == null) throw new ArgumentNullException(nameof(content)); diff --git a/src/Umbraco.Core/Services/Implement/FileService.cs b/src/Umbraco.Core/Services/Implement/FileService.cs index 888407c0d0..36b4af6d5e 100644 --- a/src/Umbraco.Core/Services/Implement/FileService.cs +++ b/src/Umbraco.Core/Services/Implement/FileService.cs @@ -349,7 +349,7 @@ namespace Umbraco.Core.Services.Implement var evtMsgs = EventMessagesFactory.Get(); - //todo: This isn't pretty because we we're required to maintain backwards compatibility so we could not change + // TODO: This isn't pretty because we we're required to maintain backwards compatibility so we could not change // the event args here. The other option is to create a different event with different event // args specifically for this method... which also isn't pretty. So fix this in v8! var additionalData = new Dictionary diff --git a/src/Umbraco.Core/Services/Implement/MediaService.cs b/src/Umbraco.Core/Services/Implement/MediaService.cs index 357352c182..9ca7892f62 100644 --- a/src/Umbraco.Core/Services/Implement/MediaService.cs +++ b/src/Umbraco.Core/Services/Implement/MediaService.cs @@ -882,7 +882,7 @@ namespace Umbraco.Core.Services.Implement { scope.WriteLock(Constants.Locks.MediaTree); - // todo - missing 7.6 "ensure valid path" thing here? + // TODO: missing 7.6 "ensure valid path" thing here? // but then should be in PerformMoveLocked on every moved item? var originalPath = media.Path; @@ -1031,7 +1031,7 @@ namespace Umbraco.Core.Services.Implement { var nodeObjectType = Constants.ObjectTypes.Media; var deleted = new List(); - var evtMsgs = EventMessagesFactory.Get(); // todo - and then? + var evtMsgs = EventMessagesFactory.Get(); // TODO: and then? using (var scope = ScopeProvider.CreateScope()) { diff --git a/src/Umbraco.Core/Services/Implement/MemberService.cs b/src/Umbraco.Core/Services/Implement/MemberService.cs index 5726c43fc7..b7afaea1be 100644 --- a/src/Umbraco.Core/Services/Implement/MemberService.cs +++ b/src/Umbraco.Core/Services/Implement/MemberService.cs @@ -1304,7 +1304,7 @@ namespace Umbraco.Core.Services.Implement Id = property.Id, Alias = property.Alias, Name = property.PropertyType.Name, - Value = property.GetValue(), // todo ignoring variants + Value = property.GetValue(), // TODO: ignoring variants CreateDate = property.CreateDate, UpdateDate = property.UpdateDate }; diff --git a/src/Umbraco.Core/Services/Implement/NotificationService.cs b/src/Umbraco.Core/Services/Implement/NotificationService.cs index a4aedec438..95353715e1 100644 --- a/src/Umbraco.Core/Services/Implement/NotificationService.cs +++ b/src/Umbraco.Core/Services/Implement/NotificationService.cs @@ -307,7 +307,7 @@ namespace Umbraco.Core.Services.Implement summary.Append(""); foreach (var p in content.Properties) { - //todo doesn't take into account variants + // TODO: doesn't take into account variants var newText = p.GetValue() != null ? p.GetValue().ToString() : ""; var oldText = newText; diff --git a/src/Umbraco.Core/Services/Implement/RelationService.cs b/src/Umbraco.Core/Services/Implement/RelationService.cs index dc9693766f..a316d04f8e 100644 --- a/src/Umbraco.Core/Services/Implement/RelationService.cs +++ b/src/Umbraco.Core/Services/Implement/RelationService.cs @@ -393,7 +393,7 @@ namespace Umbraco.Core.Services.Implement if (scope.Events.DispatchCancelable(SavingRelation, this, saveEventArgs)) { scope.Complete(); - return relation; // todo - returning sth that does not exist here?! + return relation; // TODO: returning sth that does not exist here?! } _relationRepository.Save(relation); diff --git a/src/Umbraco.Core/Services/Implement/ScopeRepositoryService.cs b/src/Umbraco.Core/Services/Implement/ScopeRepositoryService.cs index 784d18da4e..d7303991b5 100644 --- a/src/Umbraco.Core/Services/Implement/ScopeRepositoryService.cs +++ b/src/Umbraco.Core/Services/Implement/ScopeRepositoryService.cs @@ -4,7 +4,7 @@ using Umbraco.Core.Scoping; namespace Umbraco.Core.Services.Implement { - // todo that one does not add anything = kill + // TODO: that one does not add anything = kill public abstract class ScopeRepositoryService : RepositoryService { protected ScopeRepositoryService(IScopeProvider provider, ILogger logger, IEventMessagesFactory eventMessagesFactory) diff --git a/src/Umbraco.Core/Services/Implement/UserService.cs b/src/Umbraco.Core/Services/Implement/UserService.cs index 1a88464231..e2c64d2f29 100644 --- a/src/Umbraco.Core/Services/Implement/UserService.cs +++ b/src/Umbraco.Core/Services/Implement/UserService.cs @@ -200,7 +200,7 @@ namespace Umbraco.Core.Services.Implement } catch (DbException) { - // todo - refactor users/upgrade + // TODO: refactor users/upgrade // currently kinda accepting anything on upgrade, but that won't deal with all cases // so we need to do it differently, see the custom UmbracoPocoDataBuilder which should // be better BUT requires that the app restarts after the upgrade! @@ -705,7 +705,7 @@ namespace Umbraco.Core.Services.Implement } catch (DbException) { - // todo - refactor users/upgrade + // TODO: refactor users/upgrade // currently kinda accepting anything on upgrade, but that won't deal with all cases // so we need to do it differently, see the custom UmbracoPocoDataBuilder which should // be better BUT requires that the app restarts after the upgrade! diff --git a/src/Umbraco.Core/Services/OperationResult.cs b/src/Umbraco.Core/Services/OperationResult.cs index f6349a985d..d5cdcd79fc 100644 --- a/src/Umbraco.Core/Services/OperationResult.cs +++ b/src/Umbraco.Core/Services/OperationResult.cs @@ -3,8 +3,7 @@ using Umbraco.Core.Events; namespace Umbraco.Core.Services { - // todo - // no need for Attempt - the operation result SHOULD KNOW if it's a success or a failure! + // TODO: no need for Attempt - the operation result SHOULD KNOW if it's a success or a failure! // but then each WhateverResultType must /// @@ -119,7 +118,7 @@ namespace Umbraco.Core.Services return new OperationResult(OperationResultType.FailedCancelledByEvent, eventMessages); } - // todo - this exists to support services that still return Attempt + // TODO: this exists to support services that still return Attempt // these services should directly return an OperationResult, and then this static class should be deleted internal static class Attempt { diff --git a/src/Umbraco.Core/Services/OperationResultType.cs b/src/Umbraco.Core/Services/OperationResultType.cs index 8ad24aafb8..2998692c13 100644 --- a/src/Umbraco.Core/Services/OperationResultType.cs +++ b/src/Umbraco.Core/Services/OperationResultType.cs @@ -38,7 +38,7 @@ /// /// No operation has been executed because it was not needed (eg deleting an item that doesn't exist). /// - NoOperation = Failed | 6, // todo shouldn't it be a success? + NoOperation = Failed | 6, // TODO: shouldn't it be a success? //TODO: In the future, we might need to add more operations statuses, potentially like 'FailedByPermissions', etc... } diff --git a/src/Umbraco.Core/Services/PublishResultType.cs b/src/Umbraco.Core/Services/PublishResultType.cs index 418e5c0896..1a2b52f9c9 100644 --- a/src/Umbraco.Core/Services/PublishResultType.cs +++ b/src/Umbraco.Core/Services/PublishResultType.cs @@ -115,7 +115,7 @@ /// /// The document could not be published because it has no publishing flags or values. /// - FailedPublishNothingToPublish = FailedPublish | 9, // in ContentService.StrategyCanPublish - todo weird + FailedPublishNothingToPublish = FailedPublish | 9, // TODO: in ContentService.StrategyCanPublish - weird /// /// The document could not be published because some mandatory cultures are missing. diff --git a/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs b/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs index f5b4a1cff3..91dd5a7597 100644 --- a/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs +++ b/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs @@ -3337,8 +3337,7 @@ namespace Umbraco.Core.Strings // time for a T4 template? // also we should support extensibility so ppl can register more cases in external code - // todo - // transliterates Анастасия as Anastasiya, and not Anastasia + // TODO: transliterates Анастасия as Anastasiya, and not Anastasia // Ольга --> Ol'ga, Татьяна --> Tat'yana -- that's bad (?) // Note: should ä (German umlaut) become a or ae ? diff --git a/src/Umbraco.Core/Sync/ApplicationUrlHelper.cs b/src/Umbraco.Core/Sync/ApplicationUrlHelper.cs index d2b7903343..a10c967866 100644 --- a/src/Umbraco.Core/Sync/ApplicationUrlHelper.cs +++ b/src/Umbraco.Core/Sync/ApplicationUrlHelper.cs @@ -26,7 +26,7 @@ namespace Umbraco.Core.Sync /// in config files but is determined programmatically. /// Must be assigned before resolution is frozen. /// - // todo need another way to do it, eg an interface, injected! + // TODO: need another way to do it, eg an interface, injected! public static Func ApplicationUrlProvider { get; set; } internal static string GetApplicationUrl(ILogger logger, IGlobalSettings globalSettings, IUmbracoSettingsSection settings, IServerRegistrar serverRegistrar, HttpRequestBase request = null) diff --git a/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs b/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs index a34644e6a1..741cc2bab1 100644 --- a/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs +++ b/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs @@ -302,7 +302,7 @@ namespace Umbraco.Core.Sync // (depending on what the cache refreshers are doing). I think it's best we do the one time check, process them and continue, if there are // pending requests after being processed, they'll just be processed on the next poll. // - // todo not true if we're running on a background thread, assuming we can? + // TODO: not true if we're running on a background thread, assuming we can? var sql = Sql().SelectAll() .From() From 0b6ba5aa52980537c42ede478842e0fe3ce804ec Mon Sep 17 00:00:00 2001 From: Chris Houston Date: Sat, 26 Jan 2019 10:52:19 -0500 Subject: [PATCH 290/437] Temp8 - Fixing spelling / typos etc in Umbraco.Web (#4148) --- src/Umbraco.Web.UI.Client/package-lock.json | 4 +- src/Umbraco.Web.UI/Views/Web.config | 6 +- .../Cache/ContentCacheRefresher.cs | 2 +- src/Umbraco.Web/Cache/DistributedCache.cs | 4 +- .../Cache/DistributedCacheBinder_Handlers.cs | 4 +- .../Cache/LanguageCacheRefresher.cs | 2 +- ...aseServerRegistrarAndMessengerComponent.cs | 2 +- .../Composers/ControllersComposer.cs | 3 +- .../Editors/AuthenticationController.cs | 52 ++++++------- .../Editors/BackOfficeController.cs | 4 +- .../Editors/BackOfficeServerVariables.cs | 2 +- .../Editors/Binders/MemberBinder.cs | 4 +- src/Umbraco.Web/Editors/CodeFileController.cs | 4 +- src/Umbraco.Web/Editors/ContentController.cs | 24 +++--- .../Editors/ContentControllerBase.cs | 4 +- .../Editors/ContentTypeController.cs | 8 +- .../Editors/ContentTypeControllerBase.cs | 2 +- src/Umbraco.Web/Editors/DataTypeController.cs | 6 +- .../Editors/DictionaryController.cs | 10 +-- src/Umbraco.Web/Editors/EntityController.cs | 6 +- .../Editors/ExamineManagementController.cs | 2 +- .../Filters/ContentItemValidationHelper.cs | 2 +- .../Filters/ContentSaveValidationAttribute.cs | 2 +- src/Umbraco.Web/Editors/LanguageController.cs | 4 +- src/Umbraco.Web/Editors/LegacyController.cs | 6 +- .../Editors/MacroRenderingController.cs | 12 +-- src/Umbraco.Web/Editors/MediaController.cs | 8 +- .../Editors/MediaTypeController.cs | 4 +- src/Umbraco.Web/Editors/MemberController.cs | 12 +-- .../Editors/MemberTypeController.cs | 4 +- .../Editors/PackageInstallController.cs | 2 +- src/Umbraco.Web/Editors/PasswordChanger.cs | 2 +- src/Umbraco.Web/Editors/TemplateController.cs | 2 +- .../Editors/TemplateQueryController.cs | 1 + .../Editors/UserGroupsController.cs | 2 +- src/Umbraco.Web/Editors/UsersController.cs | 2 +- .../FolderAndFilePermissionsCheck.cs | 2 +- .../HealthCheck/Checks/Security/HstsCheck.cs | 2 +- .../Checks/Security/XssProtectionCheck.cs | 2 +- .../HealthCheck/HealthCheckResults.cs | 4 +- .../HealthCheck/HealthCheckStatus.cs | 2 +- src/Umbraco.Web/HtmlHelperRenderExtensions.cs | 4 +- src/Umbraco.Web/HtmlStringUtilities.cs | 14 ++-- src/Umbraco.Web/HttpCookieExtensions.cs | 2 +- .../ImageCropperTemplateExtensions.cs | 10 +-- .../Controllers/InstallApiController.cs | 2 +- .../Install/FilePermissionHelper.cs | 6 +- .../Install/HttpInstallAuthorizeAttribute.cs | 4 +- .../Install/InstallAuthorizeAttribute.cs | 2 +- .../Install/InstallSteps/NewInstallStep.cs | 2 +- .../InstallSteps/SetUmbracoVersionStep.cs | 2 +- .../InstallSteps/StarterKitCleanupStep.cs | 2 +- .../InstallSteps/StarterKitInstallStep.cs | 2 +- src/Umbraco.Web/Macros/MacroRenderer.cs | 6 +- src/Umbraco.Web/Macros/MacroTagParser.cs | 10 +-- .../Media/EmbedProviders/OEmbedResponse.cs | 2 +- .../Media/Exif/ExifBitConverter.cs | 4 +- src/Umbraco.Web/Media/Exif/ExifProperty.cs | 2 +- .../Media/Exif/ExifPropertyFactory.cs | 2 +- src/Umbraco.Web/Media/Exif/ExifTag.cs | 4 +- src/Umbraco.Web/Media/Exif/JPEGFile.cs | 12 +-- src/Umbraco.Web/Media/Exif/MathEx.cs | 4 +- src/Umbraco.Web/ModelStateExtensions.cs | 2 +- .../Models/ContentEditing/ContentSortOrder.cs | 2 +- .../ContentEditing/ContentVariationDisplay.cs | 2 +- .../DictionaryTranslationSave.cs | 2 +- .../Models/ContentEditing/EntityBasic.cs | 2 +- .../ContentEditing/RelationTypeDisplay.cs | 2 +- .../ContentEditing/SimpleNotificationModel.cs | 2 +- .../ContentEditing/TabbedContentItem.cs | 4 +- .../Models/ContentEditing/TreeSearchResult.cs | 2 +- src/Umbraco.Web/Models/ImageCropMode.cs | 2 +- .../ContentItemDisplayVariationResolver.cs | 6 +- .../Mapping/ContentTypeProfileExtensions.cs | 6 +- .../Models/Mapping/DictionaryMapperProfile.cs | 4 +- .../Models/Mapping/LanguageMapperProfile.cs | 4 +- .../Models/Mapping/MacroMapperProfile.cs | 2 +- .../MemberTabsAndPropertiesResolver.cs | 38 +++++----- .../Mapping/TabsAndPropertiesResolver.cs | 4 +- src/Umbraco.Web/Models/PackageInstallModel.cs | 2 +- .../Models/PublishedContentBase.cs | 2 +- src/Umbraco.Web/Models/RegisterModel.cs | 2 +- .../Models/Trees/TreeNodeExtensions.cs | 2 +- src/Umbraco.Web/Mvc/ControllerExtensions.cs | 2 +- .../Mvc/DisableBrowserCacheAttribute.cs | 2 +- .../EnsurePublishedContentRequestAttribute.cs | 4 +- .../Mvc/MasterControllerFactory.cs | 2 +- src/Umbraco.Web/Mvc/PluginController.cs | 2 +- src/Umbraco.Web/Mvc/RenderRouteHandler.cs | 4 +- src/Umbraco.Web/Mvc/Strings.Designer.cs | 10 +-- src/Umbraco.Web/Mvc/Strings.resx | 4 +- .../Mvc/UmbracoAuthorizeAttribute.cs | 2 +- src/Umbraco.Web/Mvc/UmbracoPageResult.cs | 2 +- .../Mvc/UmbracoVirtualNodeRouteHandler.cs | 15 ++-- .../Mvc/ViewDataContainerExtensions.cs | 2 +- src/Umbraco.Web/OwinExtensions.cs | 2 +- .../FileUploadPropertyEditor.cs | 4 +- .../PropertyEditors/GridConfiguration.cs | 2 +- .../GridConfigurationEditor.cs | 4 +- .../ImageCropperPropertyEditor.cs | 6 +- .../ImageCropperPropertyValueEditor.cs | 2 +- .../MultiNodePickerConfigurationEditor.cs | 2 +- .../MultipleTextStringConfigurationEditor.cs | 4 +- .../PropertyEditors/RichTextPropertyEditor.cs | 2 +- .../PropertyEditors/RteEmbedController.cs | 2 +- .../PropertyEditors/TagConfigurationEditor.cs | 2 +- .../PropertyEditors/TagsDataController.cs | 2 +- .../MarkdownEditorValueConverter.cs | 2 +- .../ValueListUniqueValueValidator.cs | 4 +- .../IPublishedSnapshotService.cs | 4 +- .../PublishedCache/NuCache/ContentCache.cs | 2 +- .../NuCache/DataSource/SerializerBase.cs | 2 +- .../NuCache/Navigable/NavigableContentType.cs | 2 +- .../PublishedCache/NuCache/NuCacheComposer.cs | 2 +- .../NuCache/PublishedContent.cs | 2 +- .../NuCache/PublishedSnapshotService.cs | 16 ++-- .../PublishedCache/NuCache/SnapDictionary.cs | 2 +- .../PublishedElementPropertyBase.cs | 2 +- .../DictionaryPublishedContent.cs | 2 +- .../XmlPublishedCache/PublishedMediaCache.cs | 12 +-- .../XmlPublishedCache/XmlStore.cs | 14 ++-- .../XmlStoreFilePersister.cs | 2 +- src/Umbraco.Web/PublishedElementExtensions.cs | 2 +- src/Umbraco.Web/RouteCollectionExtensions.cs | 4 +- .../Routing/ContentFinderByRedirectUrl.cs | 2 +- .../Routing/ContentFinderByUrlAlias.cs | 3 +- .../Routing/IContentLastChanceFinder.cs | 2 +- src/Umbraco.Web/Routing/PublishedRequest.cs | 11 +-- src/Umbraco.Web/Routing/PublishedRouter.cs | 4 +- .../Routing/RedirectTrackingComponent.cs | 2 +- .../Runtime/WebRuntimeComponent.cs | 2 +- .../Scheduling/BackgroundTaskRunner.cs | 12 +-- .../Scheduling/RecurringTaskBase.cs | 4 +- src/Umbraco.Web/Scheduling/ScheduledTasks.cs | 2 +- .../Scheduling/SchedulerComponent.cs | 2 +- src/Umbraco.Web/Search/ExamineComponent.cs | 10 +-- src/Umbraco.Web/Search/ExamineComposer.cs | 2 +- .../Security/AuthenticationExtensions.cs | 44 +++++------ .../Security/BackOfficeSignInManager.cs | 4 +- .../Security/BackOfficeUserManager.cs | 14 ++-- .../Security/GetUserSecondsMiddleWare.cs | 2 +- .../Security/IdentityAuditEventArgs.cs | 4 +- src/Umbraco.Web/Security/MembershipHelper.cs | 6 +- .../Providers/UmbracoMembershipProvider.cs | 6 +- .../Security/SessionIdValidator.cs | 2 +- .../UmbracoAuthTicketDataProtector.cs | 2 +- .../Security/UmbracoSecureDataFormat.cs | 2 +- src/Umbraco.Web/Security/WebAuthExtensions.cs | 4 +- src/Umbraco.Web/Security/WebSecurity.cs | 2 +- src/Umbraco.Web/Templates/TemplateRenderer.cs | 2 +- .../Trees/ApplicationTreeController.cs | 2 +- .../Trees/ContentBlueprintTreeController.cs | 2 +- .../Trees/ContentTreeController.cs | 2 +- .../Trees/ContentTreeControllerBase.cs | 2 +- .../Trees/ContentTypeTreeController.cs | 4 +- .../Trees/DataTypeTreeController.cs | 4 +- .../Trees/DictionaryTreeController.cs | 2 +- .../Trees/MediaTypeTreeController.cs | 16 ++-- src/Umbraco.Web/Trees/TreeControllerBase.cs | 6 +- src/Umbraco.Web/Trees/UrlHelperExtensions.cs | 2 +- .../UI/JavaScript/AssetInitialization.cs | 2 +- .../ClientDependencyConfiguration.cs | 4 +- .../UI/JavaScript/Resources.Designer.cs | 73 ++++++++++++------- src/Umbraco.Web/UI/JavaScript/Resources.resx | 4 +- src/Umbraco.Web/UI/Pages/BasePage.cs | 4 +- src/Umbraco.Web/UI/Pages/ClientTools.cs | 6 +- src/Umbraco.Web/UmbracoApplicationBase.cs | 2 +- src/Umbraco.Web/UmbracoComponentRenderer.cs | 2 +- src/Umbraco.Web/UmbracoContext.cs | 2 +- src/Umbraco.Web/UmbracoHelper.cs | 28 +++---- src/Umbraco.Web/UmbracoInjectedModule.cs | 10 +-- src/Umbraco.Web/UriUtility.cs | 2 +- src/Umbraco.Web/UrlHelperExtensions.cs | 2 +- src/Umbraco.Web/UrlHelperRenderExtensions.cs | 12 +-- .../Filters/DisableBrowserCacheAttribute.cs | 2 +- .../FileUploadCleanupFilterAttribute.cs | 4 +- .../OverridableAuthorizationAttribute.cs | 2 +- .../UmbracoApplicationAuthorizeAttribute.cs | 2 +- .../WebApi/HttpActionContextExtensions.cs | 2 +- .../WebApi/HttpRequestMessageExtensions.cs | 4 +- .../SessionHttpControllerRouteHandler.cs | 2 +- src/Umbraco.Web/_Legacy/Controls/TabPage.cs | 2 +- .../PackageActions/publishRootDocument.cs | 2 +- .../_Legacy/UI/LegacyDialogHandler.cs | 2 +- .../umbraco.presentation/default.aspx.cs | 2 +- src/Umbraco.Web/umbraco.presentation/item.cs | 6 +- src/Umbraco.Web/umbraco.presentation/page.cs | 2 +- .../umbraco/dashboard/FeedProxy.aspx.cs | 2 +- .../umbraco/masterpages/umbracoPage.Master.cs | 2 +- .../DisableEventValidation.cs | 2 +- .../umbraco/templateControls/Item.cs | 2 +- .../umbraco/templateControls/ItemRenderer.cs | 2 +- .../umbraco/templateControls/Macro.cs | 2 +- 193 files changed, 498 insertions(+), 480 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/package-lock.json b/src/Umbraco.Web.UI.Client/package-lock.json index fe657ae470..8afb0a17e3 100644 --- a/src/Umbraco.Web.UI.Client/package-lock.json +++ b/src/Umbraco.Web.UI.Client/package-lock.json @@ -13278,7 +13278,7 @@ }, "pretty-hrtime": { "version": "1.0.3", - "resolved": "http://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", "dev": true }, @@ -15838,7 +15838,7 @@ "dependencies": { "lru-cache": { "version": "2.2.4", - "resolved": "http://registry.npmjs.org/lru-cache/-/lru-cache-2.2.4.tgz", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.2.4.tgz", "integrity": "sha1-bGWGGb7PFAMdDQtZSxYELOTcBj0=", "dev": true } diff --git a/src/Umbraco.Web.UI/Views/Web.config b/src/Umbraco.Web.UI/Views/Web.config index c9a74eebb0..c137c3705e 100644 --- a/src/Umbraco.Web.UI/Views/Web.config +++ b/src/Umbraco.Web.UI/Views/Web.config @@ -54,16 +54,16 @@ Somehow, transitive dependencies are not working correctly, and either (a) NuGet fails to properly register this dependency, or (b) when reference assemblies are gathered before compiling views, this dependency is missed. In any case, the result is that the ICodeProvider is passed a list of referenced - assemblies that is missing netstandard. + assemblies that is missing .NET Standard. It may be a mix of both. NuGet registers the dependency well enough, that we can actually build the - whole application - but it is not doing something that is required in order to have netstandard + whole application - but it is not doing something that is required in order to have .NET Standard being a dependency when building views. See also: https://stackoverflow.com/questions/50165910 Funny enough, the CSharpCompiler already explicitly adds System.Runtime as a referenced assembly, - with a comment mentioning an issue. But it's not adding netstandard. So, for the time being, to be sure, + with a comment mentioning an issue. But it's not adding .NET Standard. So, for the time being, to be sure, we are adding both here. --> diff --git a/src/Umbraco.Web/Cache/ContentCacheRefresher.cs b/src/Umbraco.Web/Cache/ContentCacheRefresher.cs index a1942ed141..944157db9d 100644 --- a/src/Umbraco.Web/Cache/ContentCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/ContentCacheRefresher.cs @@ -75,7 +75,7 @@ namespace Umbraco.Web.Cache if (assignedDomains.Count > 0) { - // todo - this is duplicating the logic in DomainCacheRefresher BUT we cannot inject that into this because it it not registered explicitly in the container, + // TODO: this is duplicating the logic in DomainCacheRefresher BUT we cannot inject that into this because it it not registered explicitly in the container, // and we cannot inject the CacheRefresherCollection since that would be a circular reference, so what is the best way to call directly in to the // DomainCacheRefresher? diff --git a/src/Umbraco.Web/Cache/DistributedCache.cs b/src/Umbraco.Web/Cache/DistributedCache.cs index c445f66621..1e0e33ebd7 100644 --- a/src/Umbraco.Web/Cache/DistributedCache.cs +++ b/src/Umbraco.Web/Cache/DistributedCache.cs @@ -24,7 +24,7 @@ namespace Umbraco.Web.Cache #region Core notification methods /// - /// Notifies the distributed cache of specifieds item invalidation, for a specified . + /// Notifies the distributed cache of specified item invalidation, for a specified . /// /// The type of the invalidated items. /// The unique identifier of the ICacheRefresher. @@ -148,7 +148,7 @@ namespace Umbraco.Web.Cache } /// - /// Notifies the distributed cache of specifieds item removal, for a specified . + /// Notifies the distributed cache of specified item removal, for a specified . /// /// The type of the removed items. /// The unique identifier of the ICacheRefresher. diff --git a/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs b/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs index f75d8ead87..4f05abc9ee 100644 --- a/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs +++ b/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs @@ -267,7 +267,7 @@ namespace Umbraco.Web.Cache #region LocalizationService / Language /// - /// Fires when a langauge is deleted + /// Fires when a language is deleted /// /// /// @@ -278,7 +278,7 @@ namespace Umbraco.Web.Cache } /// - /// Fires when a langauge is saved + /// Fires when a language is saved /// /// /// diff --git a/src/Umbraco.Web/Cache/LanguageCacheRefresher.cs b/src/Umbraco.Web/Cache/LanguageCacheRefresher.cs index c5dfcfd1e7..9093124609 100644 --- a/src/Umbraco.Web/Cache/LanguageCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/LanguageCacheRefresher.cs @@ -57,7 +57,7 @@ namespace Umbraco.Web.Cache if (assignedDomains.Count > 0) { - // todo - this is duplicating the logic in DomainCacheRefresher BUT we cannot inject that into this because it it not registered explicitly in the container, + // TODO: this is duplicating the logic in DomainCacheRefresher BUT we cannot inject that into this because it it not registered explicitly in the container, // and we cannot inject the CacheRefresherCollection since that would be a circular reference, so what is the best way to call directly in to the // DomainCacheRefresher? diff --git a/src/Umbraco.Web/Components/DatabaseServerRegistrarAndMessengerComponent.cs b/src/Umbraco.Web/Components/DatabaseServerRegistrarAndMessengerComponent.cs index 589502e6a2..4ae371502f 100644 --- a/src/Umbraco.Web/Components/DatabaseServerRegistrarAndMessengerComponent.cs +++ b/src/Umbraco.Web/Components/DatabaseServerRegistrarAndMessengerComponent.cs @@ -34,7 +34,7 @@ namespace Umbraco.Web.Components [RuntimeLevel(MinLevel = RuntimeLevel.Run)] // during Initialize / Startup, we end up checking Examine, which needs to be initialized beforehand - // todo - should not be a strong dependency on "examine" but on an "indexing component" + // TODO: should not be a strong dependency on "examine" but on an "indexing component" [ComposeAfter(typeof(ExamineComposer))] public sealed class DatabaseServerRegistrarAndMessengerComposer : ComponentComposer, ICoreComposer diff --git a/src/Umbraco.Web/Composing/Composers/ControllersComposer.cs b/src/Umbraco.Web/Composing/Composers/ControllersComposer.cs index 377a6bdb86..0aa3c7f8a1 100644 --- a/src/Umbraco.Web/Composing/Composers/ControllersComposer.cs +++ b/src/Umbraco.Web/Composing/Composers/ControllersComposer.cs @@ -32,8 +32,7 @@ namespace Umbraco.Web.Composing.Composers // UmbracoApiController is fast-ish because they both are IDiscoverable. Scanning for IController or IHttpController // is a full, non-cached scan = expensive, we do it only for 1 assembly. // - // TODO - // find a way to scan for IController *and* IHttpController in one single pass + // TODO: find a way to scan for IController *and* IHttpController in one single pass // or, actually register them manually so don't require a full scan for these // 5 are IController but not PluginController // Umbraco.Web.Mvc.RenderMvcController diff --git a/src/Umbraco.Web/Editors/AuthenticationController.cs b/src/Umbraco.Web/Editors/AuthenticationController.cs index c11b64882a..5804a00a79 100644 --- a/src/Umbraco.Web/Editors/AuthenticationController.cs +++ b/src/Umbraco.Web/Editors/AuthenticationController.cs @@ -69,8 +69,8 @@ namespace Umbraco.Web.Editors [WebApi.UmbracoAuthorize(requireApproval: false)] public IDictionary GetMembershipProviderConfig() { - //TODO: Check if the current PasswordValidator is an IMembershipProviderPasswordValidator, if - //it's not than we should return some generic defaults + // TODO: Check if the current PasswordValidator is an IMembershipProviderPasswordValidator, if + // it's not than we should return some generic defaults var provider = Core.Security.MembershipProviderExtensions.GetUsersMembershipProvider(); return provider.GetConfiguration(Services.UserService); } @@ -194,7 +194,7 @@ namespace Umbraco.Web.Editors if (user.IsApproved) { - //if they are approved, than they are no longer invited and we can return an error + // if they are approved, than they are no longer invited and we can return an error throw new HttpResponseException(Request.CreateUserNoAccessResponse()); } @@ -202,14 +202,14 @@ namespace Umbraco.Web.Editors var httpContextAttempt = TryGetHttpContext(); if (httpContextAttempt.Success) { - //set their remaining seconds + // set their remaining seconds result.SecondsUntilTimeout = httpContextAttempt.Result.GetRemainingAuthSeconds(); } return result; } - //TODO: This should be on the CurrentUserController? + // TODO: This should be on the CurrentUserController? [WebApi.UmbracoAuthorize] [ValidateAngularAntiForgeryToken] public async Task> GetCurrentUserLinkedLogins() @@ -228,8 +228,8 @@ namespace Umbraco.Web.Editors var http = EnsureHttpContext(); var owinContext = TryGetOwinContext().Result; - //Sign the user in with username/password, this also gives a chance for developers to - //custom verify the credentials and auto-link user accounts with a custom IBackOfficePasswordChecker + // Sign the user in with username/password, this also gives a chance for developers to + // custom verify the credentials and auto-link user accounts with a custom IBackOfficePasswordChecker var result = await SignInManager.PasswordSignInAsync( loginModel.Username, loginModel.Password, isPersistent: true, shouldLockout: true); @@ -237,7 +237,7 @@ namespace Umbraco.Web.Editors { case SignInStatus.Success: - //get the user + // get the user var user = Services.UserService.GetByUsername(loginModel.Username); UserManager.RaiseLoginSuccessEvent(user.Id); @@ -268,7 +268,7 @@ namespace Umbraco.Web.Editors var attemptedUser = Services.UserService.GetByUsername(loginModel.Username); - //create a with information to display a custom two factor send code view + // create a with information to display a custom two factor send code view var verifyResponse = Request.CreateResponse(HttpStatusCode.PaymentRequired, new { twoFactorView = twofactorView, @@ -282,10 +282,10 @@ namespace Umbraco.Web.Editors case SignInStatus.LockedOut: case SignInStatus.Failure: default: - //return BadRequest (400), we don't want to return a 401 because that get's intercepted + // return BadRequest (400), we don't want to return a 401 because that get's intercepted // by our angular helper because it thinks that we need to re-perform the request once we are - // authorized and we don't want to return a 403 because angular will show a warning msg indicating - // that the user doesn't have access to perform this function, we just want to return a normal invalid msg. + // authorized and we don't want to return a 403 because angular will show a warning message indicating + // that the user doesn't have access to perform this function, we just want to return a normal invalid message. throw new HttpResponseException(HttpStatusCode.BadRequest); } } @@ -314,13 +314,13 @@ namespace Umbraco.Web.Editors var callbackUrl = ConstructCallbackUrl(identityUser.Id, code); var message = Services.TextService.Localize("resetPasswordEmailCopyFormat", - //Ensure the culture of the found user is used for the email! + // Ensure the culture of the found user is used for the email! UserExtensions.GetUserCulture(identityUser.Culture, Services.TextService, GlobalSettings), new[] { identityUser.UserName, callbackUrl }); await UserManager.SendEmailAsync(identityUser.Id, Services.TextService.Localize("login/resetPasswordEmailCopySubject", - //Ensure the culture of the found user is used for the email! + // Ensure the culture of the found user is used for the email! UserExtensions.GetUserCulture(identityUser.Culture, Services.TextService, GlobalSettings)), message); @@ -332,7 +332,7 @@ namespace Umbraco.Web.Editors } /// - /// Used to retrived the 2FA providers for code submission + /// Used to retrieve the 2FA providers for code submission /// /// [SetAngularAntiForgeryTokens] @@ -417,7 +417,7 @@ namespace Umbraco.Web.Editors { Logger.Info("User {UserId} is currently locked out, unlocking and resetting AccessFailedCount", model.UserId); - //var user = await UserManager.FindByIdAsync(model.UserId); + //// var user = await UserManager.FindByIdAsync(model.UserId); var unlockResult = await UserManager.SetLockoutEndDateAsync(model.UserId, DateTimeOffset.Now); if (unlockResult.Succeeded == false) { @@ -431,18 +431,18 @@ namespace Umbraco.Web.Editors } } - //They've successfully set their password, we can now update their user account to be confirmed - //if user was only invited, then they have not been approved - //but a successful forgot password flow (e.g. if their token had expired and they did a forgot password instead of request new invite) - //means we have verified their email + // They've successfully set their password, we can now update their user account to be confirmed + // if user was only invited, then they have not been approved + // but a successful forgot password flow (e.g. if their token had expired and they did a forgot password instead of request new invite) + // means we have verified their email if (!UserManager.IsEmailConfirmed(model.UserId)) { await UserManager.ConfirmEmailAsync(model.UserId, model.ResetCode); } - //if the user is invited, enable their account on forgot password + // if the user is invited, enable their account on forgot password var identityUser = await UserManager.FindByIdAsync(model.UserId); - //invited is not approved, never logged in, invited date present + // invited is not approved, never logged in, invited date present /* if (LastLoginDate == default && IsApproved == false && InvitedDate != null) return UserState.Invited; @@ -450,7 +450,7 @@ namespace Umbraco.Web.Editors if (identityUser != null && !identityUser.IsApproved) { var user = Services.UserService.GetByUsername(identityUser.UserName); - //also check InvitedDate and never logged in, otherwise this would allow a disabled user to reactivate their account with a forgot password + // also check InvitedDate and never logged in, otherwise this would allow a disabled user to reactivate their account with a forgot password if (user.LastLoginDate == default && user.InvitedDate != null) { user.IsApproved = true; @@ -505,13 +505,13 @@ namespace Umbraco.Web.Editors if (principal == null) throw new ArgumentNullException(nameof(principal)); var userDetail = Mapper.Map(user); - //update the userDetail and set their remaining seconds + // update the userDetail and set their remaining seconds userDetail.SecondsUntilTimeout = TimeSpan.FromMinutes(GlobalSettings.TimeOutInMinutes).TotalSeconds; - //create a response with the userDetail object + // create a response with the userDetail object var response = Request.CreateResponse(HttpStatusCode.OK, userDetail); - //ensure the user is set for the current request + // ensure the user is set for the current request Request.SetPrincipalForRequest(principal); return response; diff --git a/src/Umbraco.Web/Editors/BackOfficeController.cs b/src/Umbraco.Web/Editors/BackOfficeController.cs index 6dd5efecb1..7e45797107 100644 --- a/src/Umbraco.Web/Editors/BackOfficeController.cs +++ b/src/Umbraco.Web/Editors/BackOfficeController.cs @@ -176,7 +176,7 @@ namespace Umbraco.Web.Editors var textForCulture = Services.TextService.GetAllStoredValues(cultureInfo) //the dictionary returned is fine but the delimiter between an 'area' and a 'value' is a '/' but the javascript - // in the back office requres the delimiter to be a '_' so we'll just replace it + // in the back office requires the delimiter to be a '_' so we'll just replace it .ToDictionary(key => key.Key.Replace("/", "_"), val => val.Value); return new JsonNetResult { Data = textForCulture, Formatting = Formatting.Indented }; @@ -416,7 +416,7 @@ namespace Umbraco.Web.Editors { if (await AutoLinkAndSignInExternalAccount(loginInfo, autoLinkOptions) == false) { - ViewData[TokenExternalSignInError] = new[] { "The requested provider (" + loginInfo.Login.LoginProvider + ") has not been linked to to an account" }; + ViewData[TokenExternalSignInError] = new[] { "The requested provider (" + loginInfo.Login.LoginProvider + ") has not been linked to an account" }; } //Remove the cookie otherwise this message will keep appearing diff --git a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs index d6a6947eba..1d4113bb7d 100644 --- a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs +++ b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs @@ -426,7 +426,7 @@ namespace Umbraco.Web.Editors /// /// /// We are doing this because if we constantly resolve the tree controller types from the PluginManager it will re-scan and also re-log that - /// it's resolving which is unecessary and annoying. + /// it's resolving which is unnecessary and annoying. /// private static readonly Lazy> TreeControllerTypes = new Lazy>(() => Current.TypeLoader.GetAttributedTreeControllers().ToArray()); // todo inject diff --git a/src/Umbraco.Web/Editors/Binders/MemberBinder.cs b/src/Umbraco.Web/Editors/Binders/MemberBinder.cs index f50122bc9b..f54fd12c30 100644 --- a/src/Umbraco.Web/Editors/Binders/MemberBinder.cs +++ b/src/Umbraco.Web/Editors/Binders/MemberBinder.cs @@ -140,7 +140,7 @@ namespace Umbraco.Web.Editors.Binders var contentType = _services.MemberTypeService.Get(model.ContentTypeAlias); if (contentType == null) { - throw new InvalidOperationException("No member type found wth alias " + model.ContentTypeAlias); + throw new InvalidOperationException("No member type found with alias " + model.ContentTypeAlias); } //remove all membership properties, these values are set with the membership provider. @@ -176,7 +176,7 @@ namespace Umbraco.Web.Editors.Binders /// /// This will remove all of the special membership provider properties which were required to display the property editors - /// for editing - but the values have been mapped back ot the MemberSave object directly - we don't want to keep these properties + /// for editing - but the values have been mapped back to the MemberSave object directly - we don't want to keep these properties /// on the IMember because they will attempt to be persisted which we don't want since they might not even exist. /// /// diff --git a/src/Umbraco.Web/Editors/CodeFileController.cs b/src/Umbraco.Web/Editors/CodeFileController.cs index ec72ca3df4..6db0c6a8f9 100644 --- a/src/Umbraco.Web/Editors/CodeFileController.cs +++ b/src/Umbraco.Web/Editors/CodeFileController.cs @@ -82,7 +82,7 @@ namespace Umbraco.Web.Editors if (string.IsNullOrWhiteSpace(name)) throw new ArgumentException("Value cannot be null or whitespace.", "name"); // if the parentId is root (-1) then we just need an empty string as we are - // creating the path below and we don't wan't -1 in the path + // creating the path below and we don't want -1 in the path if (parentId == Core.Constants.System.Root.ToInvariantString()) { parentId = string.Empty; @@ -193,7 +193,7 @@ namespace Umbraco.Web.Editors } /// - /// Used to get a list of available templates/snippets to base a new Partial View og Partial View Macro from + /// Used to get a list of available templates/snippets to base a new Partial View or Partial View Macro from /// /// This is a string but will be 'partialViews', 'partialViewMacros' /// Returns a list of if a correct type is sent diff --git a/src/Umbraco.Web/Editors/ContentController.cs b/src/Umbraco.Web/Editors/ContentController.cs index b574dc8f29..841c60938a 100644 --- a/src/Umbraco.Web/Editors/ContentController.cs +++ b/src/Umbraco.Web/Editors/ContentController.cs @@ -104,14 +104,14 @@ namespace Umbraco.Web.Editors /// /// /// - /// Permission check is done for letter 'R' which is for which the user must have access to to update + /// Permission check is done for letter 'R' which is for which the user must have access to update /// [EnsureUserPermissionForContent("saveModel.ContentId", 'R')] public IEnumerable PostSaveUserGroupPermissions(UserGroupPermissionsSave saveModel) { if (saveModel.ContentId <= 0) throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.NotFound)); - //TODO: Should non-admins be alowed to set granular permissions? + // TODO: Should non-admins be allowed to set granular permissions? var content = Services.ContentService.GetById(saveModel.ContentId); if (content == null) throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.NotFound)); @@ -166,7 +166,7 @@ namespace Umbraco.Web.Editors /// /// /// - /// Permission check is done for letter 'R' which is for which the user must have access to to view + /// Permission check is done for letter 'R' which is for which the user must have access to view /// [EnsureUserPermissionForContent("contentId", 'R')] public IEnumerable GetDetailedPermissions(int contentId) @@ -457,7 +457,7 @@ namespace Umbraco.Web.Editors Direction orderDirection = Direction.Ascending, bool orderBySystemField = true, string filter = "", - string cultureName = "") // TODO it's not a NAME it's the ISO CODE + string cultureName = "") // TODO: it's not a NAME it's the ISO CODE { long totalChildren; List children; @@ -583,7 +583,7 @@ namespace Umbraco.Web.Editors private ContentItemDisplay PostSaveInternal(ContentItemSave contentItem, Func saveMethod) { - //Recent versions of IE/Edge may send in the full clientside file path instead of just the file name. + //Recent versions of IE/Edge may send in the full client side file path instead of just the file name. //To ensure similar behavior across all browsers no matter what they do - we strip the FileName property of all //uploaded files to being *only* the actual file name (as it should be). if (contentItem.UploadedFiles != null && contentItem.UploadedFiles.Any()) @@ -647,7 +647,7 @@ namespace Umbraco.Web.Editors .Any(x => x == false)) { //ok, so the absolute mandatory data is invalid and it's new, we cannot actually continue! - // add the modelstate to the outgoing object and throw a validation message + // add the model state to the outgoing object and throw a validation message var forDisplay = MapToDisplay(contentItem.PersistedContent); forDisplay.Errors = ModelState.ToErrorDictionary(); throw new HttpResponseException(Request.CreateValidationErrorResponse(forDisplay)); @@ -797,7 +797,7 @@ namespace Umbraco.Web.Editors v.Notifications.AddRange(n.Notifications); } - //lasty, if it is not valid, add the modelstate to the outgoing object and throw a 403 + //lastly, if it is not valid, add the model state to the outgoing object and throw a 403 HandleInvalidModelState(display); if (wasCancelled) @@ -1040,7 +1040,7 @@ namespace Umbraco.Web.Editors /// /// /// global notifications will be shown if all variant processing is successful and the save/publish dialog is closed, otherwise - /// variant specific notifications are used to show success messagse in the save/publish dialog. + /// variant specific notifications are used to show success messages in the save/publish dialog. /// private static void AddSuccessNotification(IDictionary notifications, string culture, string header, string msg) { @@ -1091,7 +1091,7 @@ namespace Umbraco.Web.Editors { //its invariant, proceed normally var publishStatus = Services.ContentService.SaveAndPublishBranch(contentItem.PersistedContent, force, userId: Security.CurrentUser.Id); - //TODO: Deal with multiple cancelations + //TODO: Deal with multiple cancellations wasCancelled = publishStatus.Any(x => x.Result == PublishResultType.FailedPublishCancelledByEvent); successfulCultures = Array.Empty(); return publishStatus; @@ -1124,7 +1124,7 @@ namespace Umbraco.Web.Editors { //proceed to publish if all validation still succeeds var publishStatus = Services.ContentService.SaveAndPublishBranch(contentItem.PersistedContent, force, culturesToPublish, Security.CurrentUser.Id); - //TODO: Deal with multiple cancelations + //TODO: Deal with multiple cancellations wasCancelled = publishStatus.Any(x => x.Result == PublishResultType.FailedPublishCancelledByEvent); successfulCultures = contentItem.Variants.Where(x => x.Publish).Select(x => x.Culture).ToArray(); return publishStatus; @@ -1732,7 +1732,7 @@ namespace Umbraco.Web.Editors /// private void MapValuesForPersistence(ContentItemSave contentSave) { - //inline method to determine if a property type varies + // inline method to determine if a property type varies bool Varies(Property property) => property.PropertyType.VariesByCulture(); var variantIndex = 0; @@ -1865,7 +1865,7 @@ namespace Umbraco.Web.Editors /// /// /// - /// This is null when dealing with invariant content, else it's the cultures that were succesfully published + /// This is null when dealing with invariant content, else it's the cultures that were successfully published /// private void AddMessageForPublishStatus(IEnumerable statuses, INotificationModel display, string[] successfulCultures = null) { diff --git a/src/Umbraco.Web/Editors/ContentControllerBase.cs b/src/Umbraco.Web/Editors/ContentControllerBase.cs index 1a8820c4a0..904e6911c9 100644 --- a/src/Umbraco.Web/Editors/ContentControllerBase.cs +++ b/src/Umbraco.Web/Editors/ContentControllerBase.cs @@ -101,7 +101,7 @@ namespace Umbraco.Web.Editors protected virtual void HandleInvalidModelState(IErrorModel display) { - //lastly, if it is not valid, add the modelstate to the outgoing object and throw a 403 + //lastly, if it is not valid, add the model state to the outgoing object and throw a 403 if (!ModelState.IsValid) { display.Errors = ModelState.ToErrorDictionary(); @@ -117,7 +117,7 @@ namespace Umbraco.Web.Editors /// /// /// - /// This is useful for when filters have alraedy looked up a persisted entity and we don't want to have + /// This is useful for when filters have already looked up a persisted entity and we don't want to have /// to look it up again. /// protected TPersisted GetObjectFromRequest(Func getFromService) diff --git a/src/Umbraco.Web/Editors/ContentTypeController.cs b/src/Umbraco.Web/Editors/ContentTypeController.cs index 9811c48801..b59e17d9e1 100644 --- a/src/Umbraco.Web/Editors/ContentTypeController.cs +++ b/src/Umbraco.Web/Editors/ContentTypeController.cs @@ -82,7 +82,7 @@ namespace Umbraco.Web.Editors } /// - /// Deletes a document type wth a given ID + /// Deletes a document type with a given ID /// /// /// @@ -128,7 +128,7 @@ namespace Umbraco.Web.Editors } /// - /// Returns the avilable compositions for this content type + /// Returns the available compositions for this content type /// This has been wrapped in a dto instead of simple parameters to support having multiple parameters in post request body /// /// @@ -187,7 +187,7 @@ namespace Umbraco.Web.Editors } /// - /// Deletes a document type container wth a given ID + /// Deletes a document type container with a given ID /// /// /// @@ -293,7 +293,7 @@ namespace Umbraco.Web.Editors saveContentType: type => Services.ContentTypeService.Save(type), beforeCreateNew: ctSave => { - //create a default template if it doesnt exist -but only if default template is == to the content type + //create a default template if it doesn't exist -but only if default template is == to the content type if (ctSave.DefaultTemplate.IsNullOrWhiteSpace() == false && ctSave.DefaultTemplate == ctSave.Alias) { var template = CreateTemplateForContentType(ctSave.Alias, ctSave.Name); diff --git a/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs b/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs index 9cfde94a3a..fe91f9fff6 100644 --- a/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs +++ b/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs @@ -259,7 +259,7 @@ namespace Umbraco.Web.Editors ModelState.AddModelError("Alias", Services.TextService.Localize("editcontenttype/aliasAlreadyExists")); } - // execute the externam validators + // execute the external validators EditorValidator.Validate(ModelState, contentTypeSave); if (ModelState.IsValid == false) diff --git a/src/Umbraco.Web/Editors/DataTypeController.cs b/src/Umbraco.Web/Editors/DataTypeController.cs index 335b609b0a..0af3a1cfe7 100644 --- a/src/Umbraco.Web/Editors/DataTypeController.cs +++ b/src/Umbraco.Web/Editors/DataTypeController.cs @@ -68,7 +68,7 @@ namespace Umbraco.Web.Editors } /// - /// Deletes a data type wth a given ID + /// Deletes a data type with a given ID /// /// /// @@ -120,7 +120,7 @@ namespace Umbraco.Web.Editors { var dt = Services.DataTypeService.GetDataType(Constants.Conventions.DataTypes.ListViewPrefix + contentTypeAlias); - //if it doesnt exist yet, we will create it. + //if it doesn't exist yet, we will create it. if (dt == null) { var editor = _propertyEditors[Constants.PropertyEditors.Aliases.ListView]; @@ -172,7 +172,7 @@ namespace Umbraco.Web.Editors } /// - /// Deletes a data type container wth a given ID + /// Deletes a data type container with a given ID /// /// /// diff --git a/src/Umbraco.Web/Editors/DictionaryController.cs b/src/Umbraco.Web/Editors/DictionaryController.cs index 9d01cc9d64..616317f7ba 100644 --- a/src/Umbraco.Web/Editors/DictionaryController.cs +++ b/src/Umbraco.Web/Editors/DictionaryController.cs @@ -22,7 +22,7 @@ namespace Umbraco.Web.Editors /// /// /// The security for this controller is defined to allow full CRUD access to dictionary if the user has access to either: - /// Dictionar + /// Dictionary /// [PluginController("UmbracoApi")] [UmbracoTreeAuthorize(Constants.Trees.Dictionary)] @@ -30,7 +30,7 @@ namespace Umbraco.Web.Editors public class DictionaryController : BackOfficeNotificationsController { /// - /// Deletes a data type wth a given ID + /// Deletes a data type with a given ID /// /// /// @@ -49,7 +49,7 @@ namespace Umbraco.Web.Editors } /// - /// Creates a new dictoinairy item + /// Creates a new dictionary item /// /// /// The parent id. @@ -65,7 +65,7 @@ namespace Umbraco.Web.Editors { if (string.IsNullOrEmpty(key)) return Request - .CreateNotificationValidationErrorResponse("Key can not be empty;"); // TODO translate + .CreateNotificationValidationErrorResponse("Key can not be empty;"); // TODO: translate if (Services.LocalizationService.DictionaryItemExists(key)) { @@ -108,7 +108,7 @@ namespace Umbraco.Web.Editors /// The . /// /// - /// Returrns a not found response when dictionary item does not exist + /// Returns a not found response when dictionary item does not exist /// public DictionaryDisplay GetById(int id) { diff --git a/src/Umbraco.Web/Editors/EntityController.cs b/src/Umbraco.Web/Editors/EntityController.cs index b25f3f5af1..6fcf5b0e2d 100644 --- a/src/Umbraco.Web/Editors/EntityController.cs +++ b/src/Umbraco.Web/Editors/EntityController.cs @@ -207,7 +207,7 @@ namespace Umbraco.Web.Editors /// Gets the url of an entity /// /// Int id of the entity to fetch URL for - /// The tpye of entity such as Document, Media, Member + /// The type of entity such as Document, Media, Member /// The URL or path to the item public HttpResponseMessage GetUrl(int id, UmbracoEntityTypes type) { @@ -256,7 +256,7 @@ namespace Umbraco.Web.Editors if (type != UmbracoEntityTypes.Document) - throw new ArgumentException("Get by query is only compatible with enitities of type Document"); + throw new ArgumentException("Get by query is only compatible with entities of type Document"); var q = ParseXPathQuery(query, nodeContextId); @@ -268,7 +268,7 @@ namespace Umbraco.Web.Editors return GetById(node.Id, type); } - //PP: wip in progress on the query parser + // PP: Work in progress on the query parser private string ParseXPathQuery(string query, int id) { return UmbracoXPathPathSyntaxParser.ParseXPathQuery( diff --git a/src/Umbraco.Web/Editors/ExamineManagementController.cs b/src/Umbraco.Web/Editors/ExamineManagementController.cs index b7392a1fa4..5f969cdd80 100644 --- a/src/Umbraco.Web/Editors/ExamineManagementController.cs +++ b/src/Umbraco.Web/Editors/ExamineManagementController.cs @@ -133,7 +133,7 @@ namespace Umbraco.Web.Editors _logger.Info("Rebuilding index '{IndexName}'", indexName); - //remove it in case there's a handler there alraedy + //remove it in case there's a handler there already index.IndexOperationComplete -= Indexer_IndexOperationComplete; //now add a single handler diff --git a/src/Umbraco.Web/Editors/Filters/ContentItemValidationHelper.cs b/src/Umbraco.Web/Editors/Filters/ContentItemValidationHelper.cs index 264dd049f5..e54bb3ef71 100644 --- a/src/Umbraco.Web/Editors/Filters/ContentItemValidationHelper.cs +++ b/src/Umbraco.Web/Editors/Filters/ContentItemValidationHelper.cs @@ -117,7 +117,7 @@ namespace Umbraco.Web.Editors.Filters /// /// /// - /// All property data validation goes into the modelstate with a prefix of "Properties" + /// All property data validation goes into the model state with a prefix of "Properties" /// public virtual bool ValidatePropertyData( TModelSave model, diff --git a/src/Umbraco.Web/Editors/Filters/ContentSaveValidationAttribute.cs b/src/Umbraco.Web/Editors/Filters/ContentSaveValidationAttribute.cs index 789dd1fdf2..64e1c76417 100644 --- a/src/Umbraco.Web/Editors/Filters/ContentSaveValidationAttribute.cs +++ b/src/Umbraco.Web/Editors/Filters/ContentSaveValidationAttribute.cs @@ -152,7 +152,7 @@ namespace Umbraco.Web.Editors.Filters case ContentSaveAction.PublishWithDescendantsNew: case ContentSaveAction.PublishWithDescendantsForceNew: //Publish new requires both ActionNew AND ActionPublish - //TODO: Shoudn't publish also require ActionUpdate since it will definitely perform an update to publish but maybe that's just implied + //TODO: Shouldn't publish also require ActionUpdate since it will definitely perform an update to publish but maybe that's just implied permissionToCheck.Add(ActionNew.ActionLetter); permissionToCheck.Add(ActionPublish.ActionLetter); diff --git a/src/Umbraco.Web/Editors/LanguageController.cs b/src/Umbraco.Web/Editors/LanguageController.cs index 8b6d8ec6ac..64132d3d8e 100644 --- a/src/Umbraco.Web/Editors/LanguageController.cs +++ b/src/Umbraco.Web/Editors/LanguageController.cs @@ -100,7 +100,7 @@ namespace Umbraco.Web.Editors if (!ModelState.IsValid) throw new HttpResponseException(Request.CreateValidationErrorResponse(ModelState)); - // this is prone to race conds but the service will not let us proceed anyways + // this is prone to race conditions but the service will not let us proceed anyways var existing = Services.LocalizationService.GetLanguageByIsoCode(language.IsoCode); if (existing != null && language.Id != existing.Id) @@ -150,7 +150,7 @@ namespace Umbraco.Web.Editors existing.FallbackLanguageId = language.FallbackLanguageId; // modifying an existing language can create a fallback, verify - // note that the service will check again, dealing with race conds + // note that the service will check again, dealing with race conditions if (existing.FallbackLanguageId.HasValue) { var languages = Services.LocalizationService.GetAllLanguages().ToDictionary(x => x.Id, x => x); diff --git a/src/Umbraco.Web/Editors/LegacyController.cs b/src/Umbraco.Web/Editors/LegacyController.cs index e2e22457c1..bc5b3b1a7a 100644 --- a/src/Umbraco.Web/Editors/LegacyController.cs +++ b/src/Umbraco.Web/Editors/LegacyController.cs @@ -24,7 +24,7 @@ namespace Umbraco.Web.Editors [HttpPost] public HttpResponseMessage DeleteLegacyItem(string nodeId, string alias, string nodeType) { - //U4-2686 - alias is html encoded, make sure to decode + //U4-2686 - alias is HTML encoded, make sure to decode alias = HttpUtility.HtmlDecode(alias); //In order to process this request we MUST have an HttpContext available @@ -45,8 +45,8 @@ namespace Umbraco.Web.Editors return Request.CreateResponse(HttpStatusCode.OK); } - //the way this legacy stuff used to work is that if the node id didn't parse, we would - //pass the node id as the alias with an id of zero = sure whatevs. + // the way this legacy stuff used to work is that if the node id didn't parse, we would + // pass the node id as the alias with an id of zero = sure whatevs. LegacyDialogHandler.Delete(httpContextAttempt.Result, Security.CurrentUser, nodeType, 0, nodeId); return Request.CreateResponse(HttpStatusCode.OK); } diff --git a/src/Umbraco.Web/Editors/MacroRenderingController.cs b/src/Umbraco.Web/Editors/MacroRenderingController.cs index 0b4a78e603..3ec25b1632 100644 --- a/src/Umbraco.Web/Editors/MacroRenderingController.cs +++ b/src/Umbraco.Web/Editors/MacroRenderingController.cs @@ -60,7 +60,7 @@ namespace Umbraco.Web.Editors } /// - /// Gets a rendered macro as html for rendering in the rich text editor + /// Gets a rendered macro as HTML for rendering in the rich text editor /// /// /// @@ -78,8 +78,8 @@ namespace Umbraco.Web.Editors } /// - /// Gets a rendered macro as html for rendering in the rich text editor. - /// Using HTTP POST instead of GET allows for more parameters to be passed as it's not dependant on URL-length limitations like GET. + /// Gets a rendered macro as HTML for rendering in the rich text editor. + /// Using HTTP POST instead of GET allows for more parameters to be passed as it's not dependent on URL-length limitations like GET. /// The method using GET is kept to maintain backwards compatibility /// /// @@ -116,14 +116,14 @@ namespace Umbraco.Web.Editors if (macro.RenderInEditor == false) { var response = Request.CreateResponse(); - //need to create a specific content result formatted as html since this controller has been configured + //need to create a specific content result formatted as HTML since this controller has been configured //with only json formatters. response.Content = new StringContent(string.Empty, Encoding.UTF8, "text/html"); return response; } - //because macro's are filled with insane legacy bits and pieces we need all sorts of wierdness to make them render. + //because macro's are filled with insane legacy bits and pieces we need all sorts of weirdness to make them render. //the 'easiest' way might be to create an IPublishedContent manually and populate the legacy 'page' object with that //and then set the legacy parameters. @@ -145,7 +145,7 @@ namespace Umbraco.Web.Editors var renderer = new UmbracoComponentRenderer(UmbracoContext); var result = Request.CreateResponse(); - //need to create a specific content result formatted as html since this controller has been configured + //need to create a specific content result formatted as HTML since this controller has been configured //with only json formatters. result.Content = new StringContent( renderer.RenderMacro(macro, macroParams, legacyPage).ToString(), diff --git a/src/Umbraco.Web/Editors/MediaController.cs b/src/Umbraco.Web/Editors/MediaController.cs index ce088e0caa..fe081c1cb4 100644 --- a/src/Umbraco.Web/Editors/MediaController.cs +++ b/src/Umbraco.Web/Editors/MediaController.cs @@ -457,7 +457,7 @@ namespace Umbraco.Web.Editors [ModelBinder(typeof(MediaItemBinder))] MediaItemSave contentItem) { - //Recent versions of IE/Edge may send in the full clientside file path instead of just the file name. + //Recent versions of IE/Edge may send in the full client side file path instead of just the file name. //To ensure similar behavior across all browsers no matter what they do - we strip the FileName property of all //uploaded files to being *only* the actual file name (as it should be). if (contentItem.UploadedFiles != null && contentItem.UploadedFiles.Any()) @@ -500,7 +500,7 @@ namespace Umbraco.Web.Editors && (contentItem.Action == ContentSaveAction.SaveNew)) { //ok, so the absolute mandatory data is invalid and it's new, we cannot actually continue! - // add the modelstate to the outgoing object and throw validation response + // add the model state to the outgoing object and throw validation response var forDisplay = Mapper.Map(contentItem.PersistedContent); forDisplay.Errors = ModelState.ToErrorDictionary(); throw new HttpResponseException(Request.CreateValidationErrorResponse(forDisplay)); @@ -513,7 +513,7 @@ namespace Umbraco.Web.Editors //return the updated model var display = Mapper.Map(contentItem.PersistedContent); - //lasty, if it is not valid, add the modelstate to the outgoing object and throw a 403 + //lastly, if it is not valid, add the model state to the outgoing object and throw a 403 HandleInvalidModelState(display); //put the correct msgs in @@ -928,7 +928,7 @@ namespace Umbraco.Web.Editors if (media == null && nodeId != Constants.System.Root && nodeId != Constants.System.RecycleBinMedia) { media = mediaService.GetById(nodeId); - //put the content item into storage so it can be retreived + //put the content item into storage so it can be retrieved // in the controller (saves a lookup) storage[typeof(IMedia).ToString()] = media; } diff --git a/src/Umbraco.Web/Editors/MediaTypeController.cs b/src/Umbraco.Web/Editors/MediaTypeController.cs index d6acc9331e..dd1f53f8af 100644 --- a/src/Umbraco.Web/Editors/MediaTypeController.cs +++ b/src/Umbraco.Web/Editors/MediaTypeController.cs @@ -92,7 +92,7 @@ namespace Umbraco.Web.Editors } /// - /// Returns the avilable compositions for this content type + /// Returns the available compositions for this content type /// This has been wrapped in a dto instead of simple parameters to support having multiple parameters in post request body /// /// @@ -154,7 +154,7 @@ namespace Umbraco.Web.Editors } /// - /// Deletes a media type container wth a given ID + /// Deletes a media type container with a given ID /// /// /// diff --git a/src/Umbraco.Web/Editors/MemberController.cs b/src/Umbraco.Web/Editors/MemberController.cs index 92ca648c3f..2211bea76b 100644 --- a/src/Umbraco.Web/Editors/MemberController.cs +++ b/src/Umbraco.Web/Editors/MemberController.cs @@ -307,7 +307,7 @@ namespace Umbraco.Web.Editors string generatedPassword = null; //Depending on the action we need to first do a create or update using the membership provider - // this ensures that passwords are formatted correclty and also performs the validation on the provider itself. + // this ensures that passwords are formatted correctly and also performs the validation on the provider itself. switch (contentItem.Action) { case ContentSaveAction.Save: @@ -360,7 +360,7 @@ namespace Umbraco.Web.Editors Roles.AddUserToRoles(contentItem.PersistedContent.Username, toAdd); } - //set the generated password (if there was one) - in order to do this we'll chuck the gen'd password into the + //set the generated password (if there was one) - in order to do this we'll chuck the generated password into the // additional data of the IUmbracoEntity of the persisted item - then we can retrieve this in the model mapper and set // the value to be given to the UI. Hooray for AdditionalData :) contentItem.PersistedContent.AdditionalData["GeneratedPassword"] = generatedPassword; @@ -368,11 +368,11 @@ namespace Umbraco.Web.Editors //return the updated model var display = Mapper.Map(contentItem.PersistedContent); - //lasty, if it is not valid, add the modelstate to the outgoing object and throw a 403 + //lastly, if it is not valid, add the model state to the outgoing object and throw a 403 HandleInvalidModelState(display); var localizedTextService = Services.TextService; - //put the correct msgs in + //put the correct messages in switch (contentItem.Action) { case ContentSaveAction.Save: @@ -603,7 +603,7 @@ namespace Umbraco.Web.Editors /// /// Following a refresh of member data called during an update if the membership provider has changed some underlying data, - /// we don't want to lose the provided, and potentiallly changed, username + /// we don't want to lose the provided, and potentially changed, username /// /// /// @@ -637,7 +637,7 @@ namespace Umbraco.Web.Editors /// we create an empty IMember instance first (of type 'Member'), this gives us a unique ID (GUID) /// that we then use to create the member in the custom membership provider. This acts as the link between Umbraco data and /// the custom membership provider data. This gives us the ability to eventually have custom membership properties but still use - /// a custom memberhip provider. If there is no 'Member' member type, then we will simply just create the membership provider member + /// a custom membership provider. If there is no 'Member' member type, then we will simply just create the membership provider member /// with no link to our data. /// /// If this is successful, it will go and re-fetch the IMember from the db because it will now have an ID because the Umbraco provider diff --git a/src/Umbraco.Web/Editors/MemberTypeController.cs b/src/Umbraco.Web/Editors/MemberTypeController.cs index f6bcbb727f..b200f17372 100644 --- a/src/Umbraco.Web/Editors/MemberTypeController.cs +++ b/src/Umbraco.Web/Editors/MemberTypeController.cs @@ -51,7 +51,7 @@ namespace Umbraco.Web.Editors } /// - /// Deletes a document type wth a given ID + /// Deletes a document type with a given ID /// /// /// @@ -71,7 +71,7 @@ namespace Umbraco.Web.Editors } /// - /// Returns the avilable compositions for this content type + /// Returns the available compositions for this content type /// /// /// diff --git a/src/Umbraco.Web/Editors/PackageInstallController.cs b/src/Umbraco.Web/Editors/PackageInstallController.cs index e38a2fdd26..658a28a79e 100644 --- a/src/Umbraco.Web/Editors/PackageInstallController.cs +++ b/src/Umbraco.Web/Editors/PackageInstallController.cs @@ -52,7 +52,7 @@ namespace Umbraco.Web.Editors } /// - /// This checks if this package & version is alraedy installed + /// This checks if this package & version is already installed /// /// /// diff --git a/src/Umbraco.Web/Editors/PasswordChanger.cs b/src/Umbraco.Web/Editors/PasswordChanger.cs index 6777ae1f56..e124f3a9a4 100644 --- a/src/Umbraco.Web/Editors/PasswordChanger.cs +++ b/src/Umbraco.Web/Editors/PasswordChanger.cs @@ -254,7 +254,7 @@ namespace Umbraco.Web.Editors if (passwordModel.OldPassword.IsNullOrWhiteSpace() == false) { - //if an old password is suplied try to change it + //if an old password is supplied try to change it try { diff --git a/src/Umbraco.Web/Editors/TemplateController.cs b/src/Umbraco.Web/Editors/TemplateController.cs index 5c0a746ee7..ac9341a095 100644 --- a/src/Umbraco.Web/Editors/TemplateController.cs +++ b/src/Umbraco.Web/Editors/TemplateController.cs @@ -52,7 +52,7 @@ namespace Umbraco.Web.Editors } /// - /// Deletes a template wth a given ID + /// Deletes a template with a given ID /// /// /// diff --git a/src/Umbraco.Web/Editors/TemplateQueryController.cs b/src/Umbraco.Web/Editors/TemplateQueryController.cs index 73ebdf3bc5..41f38679a9 100644 --- a/src/Umbraco.Web/Editors/TemplateQueryController.cs +++ b/src/Umbraco.Web/Editors/TemplateQueryController.cs @@ -120,6 +120,7 @@ namespace Umbraco.Web.Editors //x is passed in as the parameter alias for the linq where statement clause var operation = condition.BuildCondition("x", contents, Properties); + //for review - this uses a tonized query rather then the normal linq query. contents = contents.Where(operation.Compile()); queryExpression.Append(indent); queryExpression.AppendFormat(".Where({0})", operation); diff --git a/src/Umbraco.Web/Editors/UserGroupsController.cs b/src/Umbraco.Web/Editors/UserGroupsController.cs index 5069d99cfe..c8f7d2b0df 100644 --- a/src/Umbraco.Web/Editors/UserGroupsController.cs +++ b/src/Umbraco.Web/Editors/UserGroupsController.cs @@ -112,7 +112,7 @@ namespace Umbraco.Web.Editors if (onlyCurrentUserGroups == false) { - //this user is not an admin so in that case we need to exlude all admin users + //this user is not an admin so in that case we need to exclude all admin users allGroups.RemoveAt(allGroups.IndexOf(allGroups.Find(basic => basic.Alias == Constants.Security.AdminGroupAlias))); return allGroups; } diff --git a/src/Umbraco.Web/Editors/UsersController.cs b/src/Umbraco.Web/Editors/UsersController.cs index e7432c4828..c31d005ea6 100644 --- a/src/Umbraco.Web/Editors/UsersController.cs +++ b/src/Umbraco.Web/Editors/UsersController.cs @@ -200,7 +200,7 @@ namespace Umbraco.Web.Editors var isAdmin = Security.CurrentUser.IsAdmin(); if (isAdmin == false) { - //this user is not an admin so in that case we need to exlude all admin users + //this user is not an admin so in that case we need to exclude all admin users excludeUserGroups = new[] {Constants.Security.AdminGroupAlias}; } diff --git a/src/Umbraco.Web/HealthCheck/Checks/Permissions/FolderAndFilePermissionsCheck.cs b/src/Umbraco.Web/HealthCheck/Checks/Permissions/FolderAndFilePermissionsCheck.cs index 13e99fa886..273d19bae0 100644 --- a/src/Umbraco.Web/HealthCheck/Checks/Permissions/FolderAndFilePermissionsCheck.cs +++ b/src/Umbraco.Web/HealthCheck/Checks/Permissions/FolderAndFilePermissionsCheck.cs @@ -134,7 +134,7 @@ namespace Umbraco.Web.HealthCheck.Checks.Permissions bool optionalPathCheckResult, IEnumerable optionalFailedPaths, PermissionCheckFor checkingFor) { - // Return error if any required parths fail the check, or warning if any optional ones do + // Return error if any required paths fail the check, or warning if any optional ones do var resultType = StatusResultType.Success; var messageKey = string.Format("healthcheck/{0}PermissionsCheckMessage", checkingFor == PermissionCheckFor.Folder ? "folder" : "file"); diff --git a/src/Umbraco.Web/HealthCheck/Checks/Security/HstsCheck.cs b/src/Umbraco.Web/HealthCheck/Checks/Security/HstsCheck.cs index 61f56ec9d8..18827b0c81 100644 --- a/src/Umbraco.Web/HealthCheck/Checks/Security/HstsCheck.cs +++ b/src/Umbraco.Web/HealthCheck/Checks/Security/HstsCheck.cs @@ -12,7 +12,7 @@ namespace Umbraco.Web.HealthCheck.Checks.Security { // The check is mostly based on the instructions in the OWASP CheatSheet // (https://www.owasp.org/index.php/HTTP_Strict_Transport_Security_Cheat_Sheet) - // and the blogpost of Troy Hunt (https://www.troyhunt.com/understanding-http-strict-transport/) + // and the blog post of Troy Hunt (https://www.troyhunt.com/understanding-http-strict-transport/) // If you want do to it perfectly, you have to submit it https://hstspreload.appspot.com/, // but then you should include subdomains and I wouldn't suggest to do that for Umbraco-sites. public HstsCheck(IRuntimeState runtime, ILocalizedTextService textService) diff --git a/src/Umbraco.Web/HealthCheck/Checks/Security/XssProtectionCheck.cs b/src/Umbraco.Web/HealthCheck/Checks/Security/XssProtectionCheck.cs index 75595db992..dc25aa6a65 100644 --- a/src/Umbraco.Web/HealthCheck/Checks/Security/XssProtectionCheck.cs +++ b/src/Umbraco.Web/HealthCheck/Checks/Security/XssProtectionCheck.cs @@ -12,7 +12,7 @@ namespace Umbraco.Web.HealthCheck.Checks.Security { // The check is mostly based on the instructions in the OWASP CheatSheet // (https://www.owasp.org/index.php/HTTP_Strict_Transport_Security_Cheat_Sheet) - // and the blogpost of Troy Hunt (https://www.troyhunt.com/understanding-http-strict-transport/) + // and the blog post of Troy Hunt (https://www.troyhunt.com/understanding-http-strict-transport/) // If you want do to it perfectly, you have to submit it https://hstspreload.appspot.com/, // but then you should include subdomains and I wouldn't suggest to do that for Umbraco-sites. public XssProtectionCheck(IRuntimeState runtime, ILocalizedTextService textService) diff --git a/src/Umbraco.Web/HealthCheck/HealthCheckResults.cs b/src/Umbraco.Web/HealthCheck/HealthCheckResults.cs index f8c3708e2e..da906c30f9 100644 --- a/src/Umbraco.Web/HealthCheck/HealthCheckResults.cs +++ b/src/Umbraco.Web/HealthCheck/HealthCheckResults.cs @@ -62,7 +62,7 @@ namespace Umbraco.Web.HealthCheck var checkIsSuccess = result.Value.All(x => x.ResultType == StatusResultType.Success); if (checkIsSuccess) { - Logger.Info("Checks for '{HealthCheckName}' all completed succesfully.", checkName); + Logger.Info("Checks for '{HealthCheckName}' all completed successfully.", checkName); } else { @@ -96,7 +96,7 @@ namespace Umbraco.Web.HealthCheck if (checkIsSuccess) { - sb.AppendFormat("{0}Checks for '{1}' all completed succesfully.{2}", newItem, checkName, Environment.NewLine); + sb.AppendFormat("{0}Checks for '{1}' all completed successfully.{2}", newItem, checkName, Environment.NewLine); } else { diff --git a/src/Umbraco.Web/HealthCheck/HealthCheckStatus.cs b/src/Umbraco.Web/HealthCheck/HealthCheckStatus.cs index 445582788a..2db0b1f2e7 100644 --- a/src/Umbraco.Web/HealthCheck/HealthCheckStatus.cs +++ b/src/Umbraco.Web/HealthCheck/HealthCheckStatus.cs @@ -30,7 +30,7 @@ namespace Umbraco.Web.HealthCheck public string Description { get; set; } /// - /// This is optional but would allow a developer to specify a path to an angular html view + /// This is optional but would allow a developer to specify a path to an angular HTML view /// in order to either show more advanced information and/or to provide input for the admin /// to configure how an action is executed /// diff --git a/src/Umbraco.Web/HtmlHelperRenderExtensions.cs b/src/Umbraco.Web/HtmlHelperRenderExtensions.cs index 626a19a369..e18397dea2 100644 --- a/src/Umbraco.Web/HtmlHelperRenderExtensions.cs +++ b/src/Umbraco.Web/HtmlHelperRenderExtensions.cs @@ -140,7 +140,7 @@ namespace Umbraco.Web return htmlHelper.ValidationSummary(excludePropertyErrors, message, htmlAttributes); } - //if there's a prefix applied, we need to create a new html helper with a filtered ModelState collection so that it only looks for + //if there's a prefix applied, we need to create a new HTML helper with a filtered ModelState collection so that it only looks for //specific model state with the prefix. var filteredHtmlHelper = new HtmlHelper(htmlHelper.ViewContext, htmlHelper.ViewDataContainer.FilterContainer(prefix)); return filteredHtmlHelper.ValidationSummary(excludePropertyErrors, message, htmlAttributes); @@ -736,7 +736,7 @@ namespace Umbraco.Web object additionalRouteVals = null) { - //ensure that the multipart/form-data is added to the html attributes + //ensure that the multipart/form-data is added to the HTML attributes if (htmlAttributes.ContainsKey("enctype") == false) { htmlAttributes.Add("enctype", "multipart/form-data"); diff --git a/src/Umbraco.Web/HtmlStringUtilities.cs b/src/Umbraco.Web/HtmlStringUtilities.cs index be14df8e5a..6cf5092bb0 100644 --- a/src/Umbraco.Web/HtmlStringUtilities.cs +++ b/src/Umbraco.Web/HtmlStringUtilities.cs @@ -11,15 +11,15 @@ using Umbraco.Web.WebApi.Filters; namespace Umbraco.Web { /// - /// Provides utility methods for UmbracoHelper for working with strings and html in views. + /// Provides utility methods for UmbracoHelper for working with strings and HTML in views. /// public sealed class HtmlStringUtilities { /// - /// Replaces text line breaks with html line breaks + /// Replaces text line breaks with HTML line breaks /// /// The text. - /// The text with text line breaks replaced with html linebreaks (
)
+ /// The text with text line breaks replaced with HTML line breaks (
)
public HtmlString ReplaceLineBreaksForHtml(string text) { return new HtmlString(text.Replace("\r\n", @"
").Replace("\n", @"
").Replace("\r", @"
")); @@ -257,8 +257,8 @@ namespace Umbraco.Web string firstTrim = outputtr.ReadToEnd().Replace(" ", " ").Trim(); - //Check to see if there is an empty char between the hellip and the output string - //if there is, remove it + // Check to see if there is an empty char between the hellip and the output string + // if there is, remove it if (addElipsis && lengthReached && string.IsNullOrWhiteSpace(firstTrim) == false) { result = firstTrim[firstTrim.Length - hellip.Length - 1] == ' ' ? firstTrim.Remove(firstTrim.Length - hellip.Length - 1, 1) : firstTrim; @@ -275,9 +275,9 @@ namespace Umbraco.Web } /// - /// Returns the length of the words from a html block + /// Returns the length of the words from a HTML block /// - /// Html text + /// HTML text /// Amount of words you would like to measure /// /// diff --git a/src/Umbraco.Web/HttpCookieExtensions.cs b/src/Umbraco.Web/HttpCookieExtensions.cs index 0006227f58..5f520653f5 100644 --- a/src/Umbraco.Web/HttpCookieExtensions.cs +++ b/src/Umbraco.Web/HttpCookieExtensions.cs @@ -12,7 +12,7 @@ namespace Umbraco.Web /// Extension methods used to check/set cookie values /// /// - /// This should 100% supercede the StateManager.Cookies + /// This should 100% supersede the StateManager.Cookies /// internal static class HttpCookieExtensions { diff --git a/src/Umbraco.Web/ImageCropperTemplateExtensions.cs b/src/Umbraco.Web/ImageCropperTemplateExtensions.cs index 83e4b727b2..ed9903e07a 100644 --- a/src/Umbraco.Web/ImageCropperTemplateExtensions.cs +++ b/src/Umbraco.Web/ImageCropperTemplateExtensions.cs @@ -88,7 +88,7 @@ namespace Umbraco.Web /// Use crop dimensions to have the output image sized according to the predefined crop sizes, this will override the width and height parameters. /// /// - /// Add a serialised date of the last edit of the item to ensure client cache refresh when updated + /// Add a serialized date of the last edit of the item to ensure client cache refresh when updated /// /// /// These are any query string parameters (formatted as query strings) that ImageProcessor supports. For example: @@ -196,7 +196,7 @@ namespace Umbraco.Web /// Use crop dimensions to have the output image sized according to the predefined crop sizes, this will override the width and height parameters /// /// - /// Add a serialised date of the last edit of the item to ensure client cache refresh when updated + /// Add a serialized date of the last edit of the item to ensure client cache refresh when updated /// /// /// These are any query string parameters (formatted as query strings) that ImageProcessor supports. For example: @@ -275,7 +275,7 @@ namespace Umbraco.Web /// Use crop dimensions to have the output image sized according to the predefined crop sizes, this will override the width and height parameters /// /// - /// Add a serialised date of the last edit of the item to ensure client cache refresh when updated + /// Add a serialized date of the last edit of the item to ensure client cache refresh when updated /// /// /// These are any query string parameters (formatted as query strings) that ImageProcessor supports. For example: @@ -383,7 +383,7 @@ namespace Umbraco.Web if (ratioMode == ImageCropRatioMode.Width && height != null) { - // if only height specified then assume a sqaure + // if only height specified then assume a square if (width == null) { width = height; @@ -395,7 +395,7 @@ namespace Umbraco.Web if (ratioMode == ImageCropRatioMode.Height && width != null) { - // if only width specified then assume a sqaure + // if only width specified then assume a square if (height == null) { height = width; diff --git a/src/Umbraco.Web/Install/Controllers/InstallApiController.cs b/src/Umbraco.Web/Install/Controllers/InstallApiController.cs index c8e862abcb..bf371bacf0 100644 --- a/src/Umbraco.Web/Install/Controllers/InstallApiController.cs +++ b/src/Umbraco.Web/Install/Controllers/InstallApiController.cs @@ -58,7 +58,7 @@ namespace Umbraco.Web.Install.Controllers var installSteps = _installSteps.GetStepsForCurrentInstallType().ToArray(); - //only get the steps that are targetting the current install type + //only get the steps that are targeting the current install type steps.AddRange(installSteps); setup.Steps = steps; diff --git a/src/Umbraco.Web/Install/FilePermissionHelper.cs b/src/Umbraco.Web/Install/FilePermissionHelper.cs index 26e24bd966..6c166e734b 100644 --- a/src/Umbraco.Web/Install/FilePermissionHelper.cs +++ b/src/Umbraco.Web/Install/FilePermissionHelper.cs @@ -211,9 +211,9 @@ namespace Umbraco.Web.Install } catch (Exception) { - //This is not 100% accurate btw because it could turn out that the current user doesn't - //have access to read the current permissions but does have write access. - //I think this is an edge case however + // This is not 100% accurate because it could turn out that the current user doesn't + // have access to read the current permissions but does have write access. + // I think this is an edge case however return false; } diff --git a/src/Umbraco.Web/Install/HttpInstallAuthorizeAttribute.cs b/src/Umbraco.Web/Install/HttpInstallAuthorizeAttribute.cs index 83aa037097..e135a83e81 100644 --- a/src/Umbraco.Web/Install/HttpInstallAuthorizeAttribute.cs +++ b/src/Umbraco.Web/Install/HttpInstallAuthorizeAttribute.cs @@ -9,11 +9,11 @@ namespace Umbraco.Web.Install { /// /// Ensures authorization occurs for the installer if it has already completed. - /// If install has not yet occured then the authorization is successful. + /// If install has not yet occurred then the authorization is successful. /// internal class HttpInstallAuthorizeAttribute : AuthorizeAttribute { - // todo - cannot inject UmbracoContext nor RuntimeState in the attribute, read: + // TODO: cannot inject UmbracoContext nor RuntimeState in the attribute, read: // http://stackoverflow.com/questions/30096903/dependency-injection-inside-a-filterattribute-in-asp-net-mvc-6 // https://www.cuttingedge.it/blogs/steven/pivot/entry.php?id=98 - don't do it! // http://blog.ploeh.dk/2014/06/13/passive-attributes/ - passive attributes diff --git a/src/Umbraco.Web/Install/InstallAuthorizeAttribute.cs b/src/Umbraco.Web/Install/InstallAuthorizeAttribute.cs index 238bb7c6eb..2041228a3e 100644 --- a/src/Umbraco.Web/Install/InstallAuthorizeAttribute.cs +++ b/src/Umbraco.Web/Install/InstallAuthorizeAttribute.cs @@ -9,7 +9,7 @@ namespace Umbraco.Web.Install { /// /// Ensures authorization occurs for the installer if it has already completed. - /// If install has not yet occured then the authorization is successful + /// If install has not yet occurred then the authorization is successful /// internal class InstallAuthorizeAttribute : AuthorizeAttribute { diff --git a/src/Umbraco.Web/Install/InstallSteps/NewInstallStep.cs b/src/Umbraco.Web/Install/InstallSteps/NewInstallStep.cs index 9132f5cd49..7b53ecb966 100644 --- a/src/Umbraco.Web/Install/InstallSteps/NewInstallStep.cs +++ b/src/Umbraco.Web/Install/InstallSteps/NewInstallStep.cs @@ -21,7 +21,7 @@ namespace Umbraco.Web.Install.InstallSteps /// This is the first UI step for a brand new install /// /// - /// By default this will show the user view which is the most basic information to configure a new install, but if an install get's interupted because of an + /// By default this will show the user view which is the most basic information to configure a new install, but if an install get's interrupted because of an /// error, etc... and the end-user refreshes the installer then we cannot show the user screen because they've already entered that information so instead we'll /// display a simple continue installation view. /// diff --git a/src/Umbraco.Web/Install/InstallSteps/SetUmbracoVersionStep.cs b/src/Umbraco.Web/Install/InstallSteps/SetUmbracoVersionStep.cs index 3e836397fd..55d7d49ba9 100644 --- a/src/Umbraco.Web/Install/InstallSteps/SetUmbracoVersionStep.cs +++ b/src/Umbraco.Web/Install/InstallSteps/SetUmbracoVersionStep.cs @@ -35,7 +35,7 @@ namespace Umbraco.Web.Install.InstallSteps public override Task ExecuteAsync(object model) { //During a new install we'll log the default user in (which is id = 0). - // During an upgrade, the user will already need to be logged in in order to run the installer. + // During an upgrade, the user will already need to be logged in order to run the installer. var security = new WebSecurity(_httpContext, _userService, _globalSettings); //we do this check here because for upgrades the user will already be logged in, for brand new installs, diff --git a/src/Umbraco.Web/Install/InstallSteps/StarterKitCleanupStep.cs b/src/Umbraco.Web/Install/InstallSteps/StarterKitCleanupStep.cs index 80fda66661..3ddc675405 100644 --- a/src/Umbraco.Web/Install/InstallSteps/StarterKitCleanupStep.cs +++ b/src/Umbraco.Web/Install/InstallSteps/StarterKitCleanupStep.cs @@ -32,7 +32,7 @@ namespace Umbraco.Web.Install.InstallSteps public override bool RequiresExecution(object model) { var installSteps = InstallStatusTracker.GetStatus().ToArray(); - //this step relies on the preious one completed - because it has stored some information we need + //this step relies on the previous one completed - because it has stored some information we need if (installSteps.Any(x => x.Name == "StarterKitDownload" && x.AdditionalData.ContainsKey("packageId")) == false) { return false; diff --git a/src/Umbraco.Web/Install/InstallSteps/StarterKitInstallStep.cs b/src/Umbraco.Web/Install/InstallSteps/StarterKitInstallStep.cs index 8bd699f293..8a61f9230c 100644 --- a/src/Umbraco.Web/Install/InstallSteps/StarterKitInstallStep.cs +++ b/src/Umbraco.Web/Install/InstallSteps/StarterKitInstallStep.cs @@ -52,7 +52,7 @@ namespace Umbraco.Web.Install.InstallSteps public override bool RequiresExecution(object model) { var installSteps = InstallStatusTracker.GetStatus().ToArray(); - //this step relies on the preious one completed - because it has stored some information we need + //this step relies on the previous one completed - because it has stored some information we need if (installSteps.Any(x => x.Name == "StarterKitDownload" && x.AdditionalData.ContainsKey("packageId")) == false) { return false; diff --git a/src/Umbraco.Web/Macros/MacroRenderer.cs b/src/Umbraco.Web/Macros/MacroRenderer.cs index b7187da743..17c5859e91 100755 --- a/src/Umbraco.Web/Macros/MacroRenderer.cs +++ b/src/Umbraco.Web/Macros/MacroRenderer.cs @@ -29,7 +29,7 @@ namespace Umbraco.Web.Macros { private readonly IProfilingLogger _plogger; - // todo: there are many more things that would need to be injected in here + // TODO: there are many more things that would need to be injected in here public MacroRenderer(IProfilingLogger plogger) { @@ -226,7 +226,7 @@ namespace Umbraco.Web.Macros // still, this is ugly. The macro should have a Content property // referring to IPublishedContent we're rendering the macro against, - // this is all soooo convoluted ;-( + // this is all so convoluted ;-( public MacroContent Render(MacroModel macro, Hashtable pageElements, int pageId, Hashtable attributes) { @@ -547,7 +547,7 @@ namespace Umbraco.Web.Macros private static string EncodeMacroAttribute(string attributeContents) { - // replace linebreaks + // replace line breaks attributeContents = attributeContents.Replace("\n", "\\n").Replace("\r", "\\r"); // replace quotes diff --git a/src/Umbraco.Web/Macros/MacroTagParser.cs b/src/Umbraco.Web/Macros/MacroTagParser.cs index cbfc1ce0f7..8e3f116614 100644 --- a/src/Umbraco.Web/Macros/MacroTagParser.cs +++ b/src/Umbraco.Web/Macros/MacroTagParser.cs @@ -24,7 +24,7 @@ namespace Umbraco.Web.Macros /// persist all macro formats like {?UMBRACO_MACRO macroAlias=\"myMacro\" /} /// /// - /// The html attributes to be added to the div + /// The HTML attributes to be added to the div /// /// /// This converts the persisted macro format to this: @@ -77,11 +77,11 @@ namespace Umbraco.Web.Macros /// /// /// - /// This is required because when editors are using the rte, the html that is contained in the editor might actually be displaying + /// This is required because when editors are using the rte, the HTML that is contained in the editor might actually be displaying /// the entire macro content, when the data is submitted the editor will clear most of this data out but we'll still need to parse it properly - /// and ensure the correct sytnax is persisted to the db. + /// and ensure the correct syntax is persisted to the db. /// - /// When a macro is inserted into the rte editor, the html will be: + /// When a macro is inserted into the rte editor, the HTML will be: /// /// {div class='umb-macro-holder'} /// @@ -134,7 +134,7 @@ namespace Umbraco.Web.Macros } /// - /// This will accept a text block and seach/parse it for macro markup. + /// This will accept a text block and search/parse it for macro markup. /// When either a text block or a a macro is found, it will call the callback method. /// /// diff --git a/src/Umbraco.Web/Media/EmbedProviders/OEmbedResponse.cs b/src/Umbraco.Web/Media/EmbedProviders/OEmbedResponse.cs index 84164bc47f..e6577dea1f 100644 --- a/src/Umbraco.Web/Media/EmbedProviders/OEmbedResponse.cs +++ b/src/Umbraco.Web/Media/EmbedProviders/OEmbedResponse.cs @@ -47,7 +47,7 @@ namespace Umbraco.Web.Media.EmbedProviders /// /// Gets the HTML. /// - /// The response html + /// The response HTML public string GetHtml() { if (Type == "photo") diff --git a/src/Umbraco.Web/Media/Exif/ExifBitConverter.cs b/src/Umbraco.Web/Media/Exif/ExifBitConverter.cs index e116e1994f..86bd12c15e 100644 --- a/src/Umbraco.Web/Media/Exif/ExifBitConverter.cs +++ b/src/Umbraco.Web/Media/Exif/ExifBitConverter.cs @@ -99,7 +99,7 @@ namespace Umbraco.Web.Media.Exif /// Returns an unsigned rational number converted from the first /// eight bytes of the given byte array. The first four bytes are /// assumed to be the numerator and the next four bytes are the - /// denumerator. + /// denominator. /// Numbers are converted from the given byte-order to platform byte-order. /// public static MathEx.UFraction32 ToURational(byte[] data, ByteOrder frombyteorder) @@ -115,7 +115,7 @@ namespace Umbraco.Web.Media.Exif /// Returns a signed rational number converted from the first /// eight bytes of the given byte array. The first four bytes are /// assumed to be the numerator and the next four bytes are the - /// denumerator. + /// denominator. /// Numbers are converted from the given byte-order to platform byte-order. /// public static MathEx.Fraction32 ToSRational(byte[] data, ByteOrder frombyteorder) diff --git a/src/Umbraco.Web/Media/Exif/ExifProperty.cs b/src/Umbraco.Web/Media/Exif/ExifProperty.cs index 3a6efcab0b..588d3d9f92 100644 --- a/src/Umbraco.Web/Media/Exif/ExifProperty.cs +++ b/src/Umbraco.Web/Media/Exif/ExifProperty.cs @@ -17,7 +17,7 @@ namespace Umbraco.Web.Media.Exif /// public ExifTag Tag { get { return mTag; } } /// - /// Gets the IFD section contaning this property. + /// Gets the IFD section containing this property. /// public IFD IFD { get { return mIFD; } } /// diff --git a/src/Umbraco.Web/Media/Exif/ExifPropertyFactory.cs b/src/Umbraco.Web/Media/Exif/ExifPropertyFactory.cs index 08d1f40afd..68769eb1f3 100644 --- a/src/Umbraco.Web/Media/Exif/ExifPropertyFactory.cs +++ b/src/Umbraco.Web/Media/Exif/ExifPropertyFactory.cs @@ -17,7 +17,7 @@ namespace Umbraco.Web.Media.Exif /// Byte or component count. /// Field data as an array of bytes. /// Byte order of value. - /// IFD section containing this propery. + /// IFD section containing this property. /// The encoding to be used for text metadata when the source encoding is unknown. /// an ExifProperty initialized from the interoperability parameters. public static ExifProperty Get(ushort tag, ushort type, uint count, byte[] value, BitConverterEx.ByteOrder byteOrder, IFD ifd, Encoding encoding) diff --git a/src/Umbraco.Web/Media/Exif/ExifTag.cs b/src/Umbraco.Web/Media/Exif/ExifTag.cs index a65d75d7c7..5c85b9558d 100644 --- a/src/Umbraco.Web/Media/Exif/ExifTag.cs +++ b/src/Umbraco.Web/Media/Exif/ExifTag.cs @@ -95,7 +95,7 @@ namespace Umbraco.Web.Media.Exif // Rating Rating = IFD.Zeroth + 0x4746, RatingPercent = IFD.Zeroth + 0x4749, - // Microsoft specifing padding and offset tags + // Microsoft specifying padding and offset tags ZerothIFDPadding = IFD.Zeroth + 0xea1c, // **************************** // EXIF Tags @@ -157,7 +157,7 @@ namespace Umbraco.Web.Media.Exif SubjectDistanceRange = IFD.EXIF + 41996, ImageUniqueID = IFD.EXIF + 42016, InteroperabilityIFDPointer = IFD.EXIF + 40965, - // Microsoft specifing padding and offset tags + // Microsoft specifying padding and offset tags ExifIFDPadding = IFD.EXIF + 0xea1c, OffsetSchema = IFD.EXIF + 0xea1d, // **************************** diff --git a/src/Umbraco.Web/Media/Exif/JPEGFile.cs b/src/Umbraco.Web/Media/Exif/JPEGFile.cs index d7a5d322dc..35c3788abd 100644 --- a/src/Umbraco.Web/Media/Exif/JPEGFile.cs +++ b/src/Umbraco.Web/Media/Exif/JPEGFile.cs @@ -338,7 +338,7 @@ namespace Umbraco.Web.Media.Exif // Create a memory stream to write the APP0 section to MemoryStream ms = new MemoryStream(); - // JFIF identifer + // JFIF identifier ms.Write(Encoding.ASCII.GetBytes("JFIF\0"), 0, 5); // Write tags @@ -431,7 +431,7 @@ namespace Umbraco.Web.Media.Exif // Create a memory stream to write the APP0 section to MemoryStream ms = new MemoryStream(); - // JFIF identifer + // JFIF identifier ms.Write(Encoding.ASCII.GetBytes("JFXX\0"), 0, 5); // Write tags @@ -704,13 +704,13 @@ namespace Umbraco.Web.Media.Exif return false; } - // We will need these bitconverter to write byte-ordered data + // We will need these BitConverters to write byte-ordered data BitConverterEx bceExif = new BitConverterEx(BitConverterEx.SystemByteOrder, ByteOrder); // Create a memory stream to write the APP1 section to MemoryStream ms = new MemoryStream(); - // Exif identifer + // Exif identifier ms.Write(Encoding.ASCII.GetBytes("Exif\0\0"), 0, 6); // TIFF header @@ -812,7 +812,7 @@ namespace Umbraco.Web.Media.Exif currentdataoffset + interop.Data.Length > makerNoteOffset && ifd.ContainsKey(ExifTag.MakerNote)) { - // Delay writing this field until we write makernote data + // Delay writing this field until we write the creator's note data fieldqueue.Enqueue(field); continue; } @@ -847,7 +847,7 @@ namespace Umbraco.Web.Media.Exif } // Fields containing offsets to other IFDs - // Just store their offets, we will write the values later on when we know the lengths of IFDs + // Just store their offsets, we will write the values later on when we know the lengths of IFDs if (ifdtype == IFD.Zeroth && interop.TagID == 0x8769) exifIFDFieldOffset = stream.Position; else if (ifdtype == IFD.Zeroth && interop.TagID == 0x8825) diff --git a/src/Umbraco.Web/Media/Exif/MathEx.cs b/src/Umbraco.Web/Media/Exif/MathEx.cs index 508c5025f7..735358c40a 100644 --- a/src/Umbraco.Web/Media/Exif/MathEx.cs +++ b/src/Umbraco.Web/Media/Exif/MathEx.cs @@ -251,7 +251,7 @@ namespace Umbraco.Web.Media.Exif { return new Fraction32(f1.Numerator * f2.Numerator, f1.Denominator * f2.Denominator); } - // Divison + // Division public static Fraction32 operator /(Fraction32 f, int n) { return new Fraction32(f.Numerator / n, f.Denominator / System.Math.Abs(n)); @@ -893,7 +893,7 @@ namespace Umbraco.Web.Media.Exif { return new UFraction32(f1.Numerator * f2.Numerator, f1.Denominator * f2.Denominator); } - // Divison + // Division public static UFraction32 operator /(UFraction32 f, uint n) { return new UFraction32(f.Numerator / n, f.Denominator / n); diff --git a/src/Umbraco.Web/ModelStateExtensions.cs b/src/Umbraco.Web/ModelStateExtensions.cs index 48eb06c88a..a01958be01 100644 --- a/src/Umbraco.Web/ModelStateExtensions.cs +++ b/src/Umbraco.Web/ModelStateExtensions.cs @@ -87,7 +87,7 @@ namespace Umbraco.Web // if there are assigned member names, we combine the member name with the owner name // so that we can try to match it up to a real field. otherwise, we assume that the // validation message is for the overall owner. - // Owner = the component being validated, like a content property but could be just an html field on another editor + // Owner = the component being validated, like a content property but could be just an HTML field on another editor var withNames = false; var delimitedParts = string.Join(".", parts); diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentSortOrder.cs b/src/Umbraco.Web/Models/ContentEditing/ContentSortOrder.cs index 51352a5412..86b30652bb 100644 --- a/src/Umbraco.Web/Models/ContentEditing/ContentSortOrder.cs +++ b/src/Umbraco.Web/Models/ContentEditing/ContentSortOrder.cs @@ -24,7 +24,7 @@ namespace Umbraco.Web.Models.ContentEditing /// An array of integer Ids representing the sort order /// /// - /// Of course all of these Ids should be at the same level in the heirarchy!! + /// Of course all of these Ids should be at the same level in the hierarchy!! /// [DataMember(Name = "idSortOrder", IsRequired = true)] [Required] diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentVariationDisplay.cs b/src/Umbraco.Web/Models/ContentEditing/ContentVariationDisplay.cs index 5b986a0679..aff79d7b9d 100644 --- a/src/Umbraco.Web/Models/ContentEditing/ContentVariationDisplay.cs +++ b/src/Umbraco.Web/Models/ContentEditing/ContentVariationDisplay.cs @@ -72,7 +72,7 @@ namespace Umbraco.Web.Models.ContentEditing /// This is used to add custom localized messages/strings to the response for the app to use for localized UI purposes. /// /// - /// The notifications assigned to a variant are currently only used to show custom messagse in the save/publish dialogs. + /// The notifications assigned to a variant are currently only used to show custom messages in the save/publish dialogs. /// [DataMember(Name = "notifications")] [ReadOnly(true)] diff --git a/src/Umbraco.Web/Models/ContentEditing/DictionaryTranslationSave.cs b/src/Umbraco.Web/Models/ContentEditing/DictionaryTranslationSave.cs index a0ab02768c..72a28f633f 100644 --- a/src/Umbraco.Web/Models/ContentEditing/DictionaryTranslationSave.cs +++ b/src/Umbraco.Web/Models/ContentEditing/DictionaryTranslationSave.cs @@ -9,7 +9,7 @@ namespace Umbraco.Web.Models.ContentEditing public class DictionaryTranslationSave { /// - /// Gets or sets the iso code. + /// Gets or sets the ISO code. /// [DataMember(Name = "isoCode")] public string IsoCode { get; set; } diff --git a/src/Umbraco.Web/Models/ContentEditing/EntityBasic.cs b/src/Umbraco.Web/Models/ContentEditing/EntityBasic.cs index 0c633d0319..6cb2ccffaf 100644 --- a/src/Umbraco.Web/Models/ContentEditing/EntityBasic.cs +++ b/src/Umbraco.Web/Models/ContentEditing/EntityBasic.cs @@ -54,7 +54,7 @@ namespace Umbraco.Web.Models.ContentEditing /// This will only be populated for some entities like macros /// /// - /// This is overrideable to specify different validation attributes if required + /// It is possible to override this to specify different validation attributes if required /// [DataMember(Name = "alias")] public virtual string Alias { get; set; } diff --git a/src/Umbraco.Web/Models/ContentEditing/RelationTypeDisplay.cs b/src/Umbraco.Web/Models/ContentEditing/RelationTypeDisplay.cs index c443175260..55e140d6f3 100644 --- a/src/Umbraco.Web/Models/ContentEditing/RelationTypeDisplay.cs +++ b/src/Umbraco.Web/Models/ContentEditing/RelationTypeDisplay.cs @@ -34,7 +34,7 @@ namespace Umbraco.Web.Models.ContentEditing public string ParentObjectTypeName { get; set; } /// - /// Gets or sets the Childs object type id + /// Gets or sets the Child's object type id /// /// Corresponds to the NodeObjectType in the umbracoNode table [DataMember(Name = "childObjectType", IsRequired = true)] diff --git a/src/Umbraco.Web/Models/ContentEditing/SimpleNotificationModel.cs b/src/Umbraco.Web/Models/ContentEditing/SimpleNotificationModel.cs index 5394636bbf..af35412a49 100644 --- a/src/Umbraco.Web/Models/ContentEditing/SimpleNotificationModel.cs +++ b/src/Umbraco.Web/Models/ContentEditing/SimpleNotificationModel.cs @@ -23,7 +23,7 @@ namespace Umbraco.Web.Models.ContentEditing public List Notifications { get; private set; } /// - /// A default msg + /// A default message /// [DataMember(Name = "message")] public string Message { get; set; } diff --git a/src/Umbraco.Web/Models/ContentEditing/TabbedContentItem.cs b/src/Umbraco.Web/Models/ContentEditing/TabbedContentItem.cs index 604e726e6f..4c958656ef 100644 --- a/src/Umbraco.Web/Models/ContentEditing/TabbedContentItem.cs +++ b/src/Umbraco.Web/Models/ContentEditing/TabbedContentItem.cs @@ -22,13 +22,13 @@ namespace Umbraco.Web.Models.ContentEditing // note // once a [DataContract] has been defined on a class, with a [DataMember] property, - // one simply cannot ignore that property anymore - [IgnoreDataMember] on an overriden + // one simply cannot ignore that property anymore - [IgnoreDataMember] on an overridden // property is ignored, and 'newing' the property means that it's the base property // which is used // // OTOH, Json.NET is happy having [JsonIgnore] on overrides, even though the base // property is [JsonProperty]. so, forcing [JsonIgnore] here, but really, we should - // rething the whole thing. + // rethink the whole thing. /// /// Override the properties property to ensure we don't serialize this diff --git a/src/Umbraco.Web/Models/ContentEditing/TreeSearchResult.cs b/src/Umbraco.Web/Models/ContentEditing/TreeSearchResult.cs index 22c177190d..ce4c053099 100644 --- a/src/Umbraco.Web/Models/ContentEditing/TreeSearchResult.cs +++ b/src/Umbraco.Web/Models/ContentEditing/TreeSearchResult.cs @@ -24,7 +24,7 @@ namespace Umbraco.Web.Models.ContentEditing /// /// This is optional but if specified should be the name of a method on the jsSvc angular service to use, if not - /// specfied than it will expect the method to be called `format(searchResult, appAlias, treeAlias)` + /// specified than it will expect the method to be called `format(searchResult, appAlias, treeAlias)` /// [DataMember(Name = "jsMethod")] public string JsFormatterMethod { get; set; } diff --git a/src/Umbraco.Web/Models/ImageCropMode.cs b/src/Umbraco.Web/Models/ImageCropMode.cs index 03fe6676cb..1e168d03e0 100644 --- a/src/Umbraco.Web/Models/ImageCropMode.cs +++ b/src/Umbraco.Web/Models/ImageCropMode.cs @@ -8,7 +8,7 @@ namespace Umbraco.Web.Models Crop, /// - /// Resizes the image to the given dimensions. If the set dimensions do not match the aspect ratio of the original image then the output is resized to the maximum possible value in each direction while aintaining the original aspect ratio. + /// Resizes the image to the given dimensions. If the set dimensions do not match the aspect ratio of the original image then the output is resized to the maximum possible value in each direction while maintaining the original aspect ratio. /// Max, diff --git a/src/Umbraco.Web/Models/Mapping/ContentItemDisplayVariationResolver.cs b/src/Umbraco.Web/Models/Mapping/ContentItemDisplayVariationResolver.cs index 7db491ad2e..01e57bd872 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentItemDisplayVariationResolver.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentItemDisplayVariationResolver.cs @@ -34,7 +34,7 @@ namespace Umbraco.Web.Models.Mapping var langs = context.Mapper.Map, IEnumerable>(allLanguages, null, context).ToList(); - //create a variant for each lang, then we'll populate the values + //create a variant for each language, then we'll populate the values var variants = langs.Select(x => { //We need to set the culture in the mapping context since this is needed to ensure that the correct property values @@ -55,13 +55,13 @@ namespace Umbraco.Web.Models.Mapping //Put the default language first in the list & then sort rest by a-z var defaultLang = variants.SingleOrDefault(x => x.Language.IsDefault); - //Remove the default lang from the list for now + //Remove the default language from the list for now variants.Remove(defaultLang); //Sort the remaining languages a-z variants = variants.OrderBy(x => x.Name).ToList(); - //Insert the default lang as the first item + //Insert the default language as the first item variants.Insert(0, defaultLang); return variants; diff --git a/src/Umbraco.Web/Models/Mapping/ContentTypeProfileExtensions.cs b/src/Umbraco.Web/Models/Mapping/ContentTypeProfileExtensions.cs index ba8076b457..257a53cf1a 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentTypeProfileExtensions.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentTypeProfileExtensions.cs @@ -195,7 +195,7 @@ namespace Umbraco.Web.Models.Mapping { // handle property groups and property types // note that ContentTypeSave has - // - all groups, inherited and local; only *one* occurence per group *name* + // - all groups, inherited and local; only *one* occurrence per group *name* // - potentially including the generic properties group // - all properties, inherited and local // @@ -296,7 +296,7 @@ namespace Umbraco.Web.Models.Mapping PropertyType destProperty; if (sourceProperty.Id > 0) { - // updateg an existing property + // updating an existing property // ensure it is still there, then map/update destProperty = destOrigProperties.FirstOrDefault(x => x.Id == sourceProperty.Id); if (destProperty != null) @@ -310,7 +310,7 @@ namespace Umbraco.Web.Models.Mapping } // insert a new property, or update an existing property that has - // been deletedin the meantime and we need to re-create + // been deleted in the meantime and we need to re-create // map/create destProperty = Mapper.Map(sourceProperty); return destProperty; diff --git a/src/Umbraco.Web/Models/Mapping/DictionaryMapperProfile.cs b/src/Umbraco.Web/Models/Mapping/DictionaryMapperProfile.cs index b3af04603c..01fcfa6f13 100644 --- a/src/Umbraco.Web/Models/Mapping/DictionaryMapperProfile.cs +++ b/src/Umbraco.Web/Models/Mapping/DictionaryMapperProfile.cs @@ -47,7 +47,7 @@ namespace Umbraco.Web.Models.Mapping (src, dest) => { // build up the path to make it possible to set active item in tree - // TODO check if there is a better way + // TODO: check if there is a better way if (src.ParentId.HasValue) { var ids = new List { -1 }; @@ -112,7 +112,7 @@ namespace Umbraco.Web.Models.Mapping } /// - /// Goes up the dictoinary tree to get all parent ids + /// Goes up the dictionary tree to get all parent ids /// /// /// The parent id. diff --git a/src/Umbraco.Web/Models/Mapping/LanguageMapperProfile.cs b/src/Umbraco.Web/Models/Mapping/LanguageMapperProfile.cs index ea29b671a6..13c6af2fda 100644 --- a/src/Umbraco.Web/Models/Mapping/LanguageMapperProfile.cs +++ b/src/Umbraco.Web/Models/Mapping/LanguageMapperProfile.cs @@ -45,13 +45,13 @@ namespace Umbraco.Web.Models.Mapping //Put the default language first in the list & then sort rest by a-z var defaultLang = langs.SingleOrDefault(x => x.IsDefault); - //Remove the default lang from the list for now + //Remove the default language from the list for now langs.Remove(defaultLang); //Sort the remaining languages a-z langs = langs.OrderBy(x => x.Name).ToList(); - //Insert the default lang as the first item + //Insert the default language as the first item langs.Insert(0, defaultLang); return langs; diff --git a/src/Umbraco.Web/Models/Mapping/MacroMapperProfile.cs b/src/Umbraco.Web/Models/Mapping/MacroMapperProfile.cs index a50a4f190e..1be74ce583 100644 --- a/src/Umbraco.Web/Models/Mapping/MacroMapperProfile.cs +++ b/src/Umbraco.Web/Models/Mapping/MacroMapperProfile.cs @@ -35,7 +35,7 @@ namespace Umbraco.Web.Models.Mapping .AfterMap((property, parameter) => { //map the view and the config - // we need to show the depracated ones for backwards compatibility + // we need to show the deprecated ones for backwards compatibility var paramEditor = Current.ParameterEditors[property.EditorAlias]; // todo - include/filter deprecated?! if (paramEditor == null) { diff --git a/src/Umbraco.Web/Models/Mapping/MemberTabsAndPropertiesResolver.cs b/src/Umbraco.Web/Models/Mapping/MemberTabsAndPropertiesResolver.cs index e32531e61a..c8391abdb4 100644 --- a/src/Umbraco.Web/Models/Mapping/MemberTabsAndPropertiesResolver.cs +++ b/src/Umbraco.Web/Models/Mapping/MemberTabsAndPropertiesResolver.cs @@ -14,7 +14,7 @@ using Umbraco.Web.Models.ContentEditing; namespace Umbraco.Web.Models.Mapping { /// - /// A custom tab/property resolver for members which will ensure that the built-in membership properties are or arent' displayed + /// A custom tab/property resolver for members which will ensure that the built-in membership properties are or aren't displayed /// depending on if the member type has these properties /// /// @@ -38,7 +38,7 @@ namespace Umbraco.Web.Models.Mapping } /// - /// Overriden to deal with custom member properties and permissions. + /// Overridden to deal with custom member properties and permissions. public override IEnumerable> Resolve(IMember source, MemberDisplay destination, IEnumerable> destMember, ResolutionContext context) { var provider = Core.Security.MembershipProviderExtensions.GetMembersMembershipProvider(); @@ -52,7 +52,7 @@ namespace Umbraco.Web.Models.Mapping if (provider.IsUmbracoMembershipProvider() == false) { - //it's a generic provider so update the locked out property based on our known constant alias + // it's a generic provider so update the locked out property based on our known constant alias var isLockedOutProperty = resolved.SelectMany(x => x.Properties).FirstOrDefault(x => x.Alias == Constants.Conventions.Member.IsLockedOut); if (isLockedOutProperty?.Value != null && isLockedOutProperty.Value.ToString() != "1") { @@ -64,8 +64,8 @@ namespace Umbraco.Web.Models.Mapping { var umbracoProvider = (IUmbracoMemberTypeMembershipProvider)provider; - //This is kind of a hack because a developer is supposed to be allowed to set their property editor - would have been much easier - // if we just had all of the membeship provider fields on the member table :( + // This is kind of a hack because a developer is supposed to be allowed to set their property editor - would have been much easier + // if we just had all of the membership provider fields on the member table :( // TODO: But is there a way to map the IMember.IsLockedOut to the property ? i dunno. var isLockedOutProperty = resolved.SelectMany(x => x.Properties).FirstOrDefault(x => x.Alias == umbracoProvider.LockPropertyTypeAlias); if (isLockedOutProperty?.Value != null && isLockedOutProperty.Value.ToString() != "1") @@ -82,7 +82,7 @@ namespace Umbraco.Web.Models.Mapping { var memberTypeLink = string.Format("#/member/memberTypes/edit/{0}", source.ContentTypeId); - //Replace the doctype property + // Replace the doctype property var docTypeProperty = resolved.SelectMany(x => x.Properties) .First(x => x.Alias == string.Format("{0}doctype", Constants.PropertyEditors.InternalGenericPropertiesPrefix)); docTypeProperty.Value = new List @@ -135,7 +135,7 @@ namespace Umbraco.Web.Models.Mapping { Alias = $"{Constants.PropertyEditors.InternalGenericPropertiesPrefix}password", Label = _localizedTextService.Localize("password"), - //NOTE: The value here is a json value - but the only property we care about is the generatedPassword one if it exists, the newPassword exists + // NOTE: The value here is a json value - but the only property we care about is the generatedPassword one if it exists, the newPassword exists // only when creating a new member and we want to have a generated password pre-filled. Value = new Dictionary { @@ -143,12 +143,12 @@ namespace Umbraco.Web.Models.Mapping {"generatedPassword", member.GetAdditionalDataValueIgnoreCase("GeneratedPassword", null)}, {"newPassword", member.GetAdditionalDataValueIgnoreCase("NewPassword", null)}, }, - //TODO: Hard coding this because the changepassword doesn't necessarily need to be a resolvable (real) property editor + // TODO: Hard coding this because the changepassword doesn't necessarily need to be a resolvable (real) property editor View = "changepassword", - //initialize the dictionary with the configuration from the default membership provider + // initialize the dictionary with the configuration from the default membership provider Config = new Dictionary(membersProvider.GetConfiguration(_userService)) { - //the password change toggle will only be displayed if there is already a password assigned. + // the password change toggle will only be displayed if there is already a password assigned. {"hasPassword", member.RawPasswordValue.IsNullOrWhiteSpace() == false} } }, @@ -180,21 +180,21 @@ namespace Umbraco.Web.Models.Mapping var umbracoContext = _umbracoContextAccessor.UmbracoContext; - //now update the IsSensitive value + // now update the IsSensitive value foreach (var prop in result) { - //check if this property is flagged as sensitive + // check if this property is flagged as sensitive var isSensitiveProperty = memberType.IsSensitiveProperty(prop.Alias); - //check permissions for viewing sensitive data + // check permissions for viewing sensitive data if (isSensitiveProperty && (umbracoContext == null || umbracoContext.Security.CurrentUser.HasAccessToSensitiveData() == false)) { - //mark this property as sensitive + // mark this property as sensitive prop.IsSensitive = true; - //mark this property as readonly so that it does not post any data + // mark this property as readonly so that it does not post any data prop.Readonly = true; - //replace this editor with a sensitivevalue + // replace this editor with a sensitive value prop.View = "sensitivevalue"; - //clear the value + // clear the value prop.Value = null; } } @@ -211,7 +211,7 @@ namespace Umbraco.Web.Models.Mapping /// /// /// If the membership provider installed is the umbraco membership provider, then we will allow changing the username, however if - /// the membership provider is a custom one, we cannot allow chaning the username because MembershipProvider's do not actually natively + /// the membership provider is a custom one, we cannot allow changing the username because MembershipProvider's do not actually natively /// allow that. /// internal static ContentPropertyDisplay GetLoginProperty(IMemberService memberService, IMember member, ILocalizedTextService localizedText) @@ -225,7 +225,7 @@ namespace Umbraco.Web.Models.Mapping var scenario = memberService.GetMembershipScenario(); - //only allow editing if this is a new member, or if the membership provider is the umbraco one + // only allow editing if this is a new member, or if the membership provider is the Umbraco one if (member.HasIdentity == false || scenario == MembershipScenario.NativeUmbraco) { prop.View = "textbox"; diff --git a/src/Umbraco.Web/Models/Mapping/TabsAndPropertiesResolver.cs b/src/Umbraco.Web/Models/Mapping/TabsAndPropertiesResolver.cs index ab33c3886b..2f2af047f7 100644 --- a/src/Umbraco.Web/Models/Mapping/TabsAndPropertiesResolver.cs +++ b/src/Umbraco.Web/Models/Mapping/TabsAndPropertiesResolver.cs @@ -98,10 +98,10 @@ namespace Umbraco.Web.Models.Mapping //re-assign genericProps.Properties = contentProps; - //Show or hide properties tab based on wether it has or not any properties + //Show or hide properties tab based on whether it has or not any properties if (genericProps.Properties.Any() == false) { - //loop throug the tabs, remove the one with the id of zero and exit the loop + //loop through the tabs, remove the one with the id of zero and exit the loop for (var i = 0; i < tabs.Count; i++) { if (tabs[i].Id != 0) continue; diff --git a/src/Umbraco.Web/Models/PackageInstallModel.cs b/src/Umbraco.Web/Models/PackageInstallModel.cs index c4dbbfde2a..b489604261 100644 --- a/src/Umbraco.Web/Models/PackageInstallModel.cs +++ b/src/Umbraco.Web/Models/PackageInstallModel.cs @@ -19,7 +19,7 @@ namespace Umbraco.Web.Models public string ZipFileName { get; set; } /// - /// During installation this can be used to track any pending appdomain restarts + /// During installation this can be used to track any pending AppDomain restarts /// [DataMember(Name = "isRestarting")] public bool IsRestarting { get; set; } diff --git a/src/Umbraco.Web/Models/PublishedContentBase.cs b/src/Umbraco.Web/Models/PublishedContentBase.cs index 12acb6b0c8..c7e38ab7f0 100644 --- a/src/Umbraco.Web/Models/PublishedContentBase.cs +++ b/src/Umbraco.Web/Models/PublishedContentBase.cs @@ -10,7 +10,7 @@ namespace Umbraco.Web.Models /// /// Provide an abstract base class for IPublishedContent implementations. /// - /// This base class does which (a) consitently resolves and caches the Url, (b) provides an implementation + /// This base class does which (a) consistently resolves and caches the Url, (b) provides an implementation /// for this[alias], and (c) provides basic content set management. [DebuggerDisplay("Content Id: {Id}, Name: {Name}")] public abstract class PublishedContentBase : IPublishedContent diff --git a/src/Umbraco.Web/Models/RegisterModel.cs b/src/Umbraco.Web/Models/RegisterModel.cs index 44845bfd43..86a5459a74 100644 --- a/src/Umbraco.Web/Models/RegisterModel.cs +++ b/src/Umbraco.Web/Models/RegisterModel.cs @@ -77,7 +77,7 @@ namespace Umbraco.Web.Models public bool UsernameIsEmail { get; set; } /// - /// Specifies if the member should be logged in if they are succesfully created + /// Specifies if the member should be logged in if they are successfully created /// public bool LoginOnSuccess { get; set; } diff --git a/src/Umbraco.Web/Models/Trees/TreeNodeExtensions.cs b/src/Umbraco.Web/Models/Trees/TreeNodeExtensions.cs index 819d74f8e7..e25c317716 100644 --- a/src/Umbraco.Web/Models/Trees/TreeNodeExtensions.cs +++ b/src/Umbraco.Web/Models/Trees/TreeNodeExtensions.cs @@ -63,7 +63,7 @@ } /// - /// Sets the node style to show that it is is not published + /// Sets the node style to show that it is not published /// /// public static void SetNotPublishedStyle(this TreeNode treeNode) diff --git a/src/Umbraco.Web/Mvc/ControllerExtensions.cs b/src/Umbraco.Web/Mvc/ControllerExtensions.cs index 1906e6ba81..d7a693be2d 100644 --- a/src/Umbraco.Web/Mvc/ControllerExtensions.cs +++ b/src/Umbraco.Web/Mvc/ControllerExtensions.cs @@ -165,7 +165,7 @@ namespace Umbraco.Web.Mvc /// Normally in MVC the way that the View object gets assigned to the result is to Execute the ViewResult, this however /// will write to the Response output stream which isn't what we want. Instead, this method will use the same logic inside /// of MVC to assign the View object to the result but without executing it. - /// This is only relavent for view results of PartialViewResult or ViewResult. + /// This is only relevant for view results of PartialViewResult or ViewResult. /// /// /// diff --git a/src/Umbraco.Web/Mvc/DisableBrowserCacheAttribute.cs b/src/Umbraco.Web/Mvc/DisableBrowserCacheAttribute.cs index 380ec4cd4e..567e9ca145 100644 --- a/src/Umbraco.Web/Mvc/DisableBrowserCacheAttribute.cs +++ b/src/Umbraco.Web/Mvc/DisableBrowserCacheAttribute.cs @@ -13,7 +13,7 @@ namespace Umbraco.Web.Mvc { base.OnResultExecuting(filterContext); - // could happens if exception (but afaik this wouldn't happen in MVC) + // could happens if exception (but AFAIK this wouldn't happen in MVC) if (filterContext.HttpContext == null || filterContext.HttpContext.Response == null || filterContext.HttpContext.Response.Cache == null) { diff --git a/src/Umbraco.Web/Mvc/EnsurePublishedContentRequestAttribute.cs b/src/Umbraco.Web/Mvc/EnsurePublishedContentRequestAttribute.cs index a28afe1713..62a7c48d2b 100644 --- a/src/Umbraco.Web/Mvc/EnsurePublishedContentRequestAttribute.cs +++ b/src/Umbraco.Web/Mvc/EnsurePublishedContentRequestAttribute.cs @@ -73,7 +73,7 @@ namespace Umbraco.Web.Mvc /// protected UmbracoContext UmbracoContext => _umbracoContext ?? (_umbracoContext = UmbracoContext.Current); - // todo - try lazy property injection? + // TODO: try lazy property injection? private PublishedRouter PublishedRouter => Core.Composing.Current.Factory.GetInstance(); /// @@ -86,7 +86,7 @@ namespace Umbraco.Web.Mvc { base.OnActionExecuted(filterContext); - //First we need to check if the pcr has been set, if it has we're going to ignore this and not actually do anything + // First we need to check if the published content request has been set, if it has we're going to ignore this and not actually do anything if (UmbracoContext.Current.PublishedRequest != null) { return; diff --git a/src/Umbraco.Web/Mvc/MasterControllerFactory.cs b/src/Umbraco.Web/Mvc/MasterControllerFactory.cs index 6bc799baa5..6d2f1ce501 100644 --- a/src/Umbraco.Web/Mvc/MasterControllerFactory.cs +++ b/src/Umbraco.Web/Mvc/MasterControllerFactory.cs @@ -29,7 +29,7 @@ namespace Umbraco.Web.Mvc // ControllerBuilder.Current when setting up Mvc and WebApi, it cannot be ctored by // the IoC container - and yet we don't want that ctor to resolve the factories // as that happen before everything is configured - so, passing a factories - // accessor func. + // accessor function. _factoriesAccessor = factoriesAccessor; } diff --git a/src/Umbraco.Web/Mvc/PluginController.cs b/src/Umbraco.Web/Mvc/PluginController.cs index 03d6e2905c..e3f4b45ce6 100644 --- a/src/Umbraco.Web/Mvc/PluginController.cs +++ b/src/Umbraco.Web/Mvc/PluginController.cs @@ -27,7 +27,7 @@ namespace Umbraco.Web.Mvc // note // properties marked as [Inject] below will be property-injected (vs constructor-injected) in - // order to keep the constuctor as light as possible, so that ppl implementing eg a SurfaceController + // order to keep the constructor as light as possible, so that ppl implementing eg a SurfaceController // don't need to implement complex constructors + need to refactor them each time we change ours. // this means that these properties have a setter. // what can go wrong? diff --git a/src/Umbraco.Web/Mvc/RenderRouteHandler.cs b/src/Umbraco.Web/Mvc/RenderRouteHandler.cs index c9123175b1..10efb54552 100644 --- a/src/Umbraco.Web/Mvc/RenderRouteHandler.cs +++ b/src/Umbraco.Web/Mvc/RenderRouteHandler.cs @@ -49,7 +49,7 @@ namespace Umbraco.Web.Mvc #region IRouteHandler Members /// - /// Assigns the correct controller based on the Umbraco request and returns a standard MvcHandler to prcess the response, + /// Assigns the correct controller based on the Umbraco request and returns a standard MvcHandler to process the response, /// this also stores the render model into the data tokens for the current RouteData. /// /// @@ -428,7 +428,7 @@ namespace Umbraco.Web.Mvc // Set the session state requirements requestContext.HttpContext.SetSessionStateBehavior(GetSessionStateBehavior(requestContext, routeDef.ControllerName)); - // reset the friendly path so in the controllers and anything occuring after this point in time, + // reset the friendly path so in the controllers and anything occurring after this point in time, //the URL is reset back to the original request. requestContext.HttpContext.RewritePath(UmbracoContext.OriginalRequestUrl.PathAndQuery); diff --git a/src/Umbraco.Web/Mvc/Strings.Designer.cs b/src/Umbraco.Web/Mvc/Strings.Designer.cs index a897e5349c..40269241a5 100644 --- a/src/Umbraco.Web/Mvc/Strings.Designer.cs +++ b/src/Umbraco.Web/Mvc/Strings.Designer.cs @@ -62,12 +62,12 @@ namespace Umbraco.Web.Mvc { /// /// Looks up a localized string similar to <?xml version="1.0"?> - ///<configuration> /// - /// <configSections> - /// <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> - /// <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /> - /// <section name="page [rest of string was truncated]";. + ///<configuration> + /// <configSections> + /// <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> + /// <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /> + /// < [rest of string was truncated]";. /// internal static string WebConfigTemplate { get { diff --git a/src/Umbraco.Web/Mvc/Strings.resx b/src/Umbraco.Web/Mvc/Strings.resx index fd82fa3865..1d4028f594 100644 --- a/src/Umbraco.Web/Mvc/Strings.resx +++ b/src/Umbraco.Web/Mvc/Strings.resx @@ -37,7 +37,7 @@ mimetype set. The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not + ResXResourceReader how to stop persisting the object. This is currently not extensible. For a given mimetype the value must be set accordingly: Note - application/x-microsoft.net.object.binary.base64 is the format @@ -121,4 +121,4 @@ ..\..\umbraco.web.ui\views\web.config;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - \ No newline at end of file + diff --git a/src/Umbraco.Web/Mvc/UmbracoAuthorizeAttribute.cs b/src/Umbraco.Web/Mvc/UmbracoAuthorizeAttribute.cs index 8b76a2069d..fa0b1c5458 100644 --- a/src/Umbraco.Web/Mvc/UmbracoAuthorizeAttribute.cs +++ b/src/Umbraco.Web/Mvc/UmbracoAuthorizeAttribute.cs @@ -85,7 +85,7 @@ namespace Umbraco.Web.Mvc } /// - /// Override to to ensure no redirect occurs + /// Override to ensure no redirect occurs /// /// protected override void HandleUnauthorizedRequest(AuthorizationContext filterContext) diff --git a/src/Umbraco.Web/Mvc/UmbracoPageResult.cs b/src/Umbraco.Web/Mvc/UmbracoPageResult.cs index 9769945f37..36ec76b3d9 100644 --- a/src/Umbraco.Web/Mvc/UmbracoPageResult.cs +++ b/src/Umbraco.Web/Mvc/UmbracoPageResult.cs @@ -94,7 +94,7 @@ namespace Umbraco.Web.Mvc /// /// When POSTing to MVC but rendering in WebForms we need to do some trickery, we'll create a dummy viewcontext with all of the - /// current modelstate, tempdata, viewdata so that if we're rendering partial view macros within the webforms view, they will + /// current model state, tempdata, viewdata so that if we're rendering partial view macros within the webforms view, they will /// get all of this merged into them. /// /// diff --git a/src/Umbraco.Web/Mvc/UmbracoVirtualNodeRouteHandler.cs b/src/Umbraco.Web/Mvc/UmbracoVirtualNodeRouteHandler.cs index 164fb7acf7..0c95e1d446 100644 --- a/src/Umbraco.Web/Mvc/UmbracoVirtualNodeRouteHandler.cs +++ b/src/Umbraco.Web/Mvc/UmbracoVirtualNodeRouteHandler.cs @@ -11,7 +11,7 @@ namespace Umbraco.Web.Mvc { public abstract class UmbracoVirtualNodeRouteHandler : IRouteHandler { - // todo - try lazy property injection? + // TODO: - try lazy property injection? private PublishedRouter PublishedRouter => Core.Composing.Current.Factory.GetInstance(); /// @@ -54,20 +54,21 @@ namespace Umbraco.Web.Mvc request.PublishedContent = found; umbracoContext.PublishedRequest = request; - //allows inheritors to change the pcr + // allows inheritors to change the published content request PreparePublishedContentRequest(umbracoContext.PublishedRequest); - //create the render model + // create the render model var renderModel = new ContentModel(umbracoContext.PublishedRequest.PublishedContent); - //assigns the required tokens to the request + // assigns the required tokens to the request requestContext.RouteData.DataTokens.Add(Core.Constants.Web.UmbracoDataToken, renderModel); requestContext.RouteData.DataTokens.Add(Core.Constants.Web.PublishedDocumentRequestDataToken, umbracoContext.PublishedRequest); requestContext.RouteData.DataTokens.Add(Core.Constants.Web.UmbracoContextDataToken, umbracoContext); - //this is used just for a flag that this is an umbraco custom route + + // this is used just for a flag that this is an umbraco custom route requestContext.RouteData.DataTokens.Add(Core.Constants.Web.CustomRouteDataToken, true); - //Here we need to detect if a SurfaceController has posted + // Here we need to detect if a SurfaceController has posted var formInfo = RenderRouteHandler.GetFormInfo(requestContext); if (formInfo != null) { @@ -78,7 +79,7 @@ namespace Umbraco.Web.Mvc PublishedRequest = umbracoContext.PublishedRequest }; - //set the special data token to the current route definition + // set the special data token to the current route definition requestContext.RouteData.DataTokens[Core.Constants.Web.UmbracoRouteDefinitionDataToken] = def; return RenderRouteHandler.HandlePostedValues(requestContext, formInfo); diff --git a/src/Umbraco.Web/Mvc/ViewDataContainerExtensions.cs b/src/Umbraco.Web/Mvc/ViewDataContainerExtensions.cs index c1b6fee8eb..2852e80619 100644 --- a/src/Umbraco.Web/Mvc/ViewDataContainerExtensions.cs +++ b/src/Umbraco.Web/Mvc/ViewDataContainerExtensions.cs @@ -23,7 +23,7 @@ namespace Umbraco.Web.Mvc { var newContainer = new ViewDataContainer(); newContainer.ViewData.ModelState.Merge(container.ViewData.ModelState, prefix); - //change the html field name too + //change the HTML field name too newContainer.ViewData.TemplateInfo.HtmlFieldPrefix = prefix; return newContainer; } diff --git a/src/Umbraco.Web/OwinExtensions.cs b/src/Umbraco.Web/OwinExtensions.cs index e7e1e85b50..6961f5c915 100644 --- a/src/Umbraco.Web/OwinExtensions.cs +++ b/src/Umbraco.Web/OwinExtensions.cs @@ -44,7 +44,7 @@ namespace Umbraco.Web } /// - /// Nasty little hack to get httpcontextbase from an owin context + /// Nasty little hack to get HttpContextBase from an owin context /// /// /// diff --git a/src/Umbraco.Web/PropertyEditors/FileUploadPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/FileUploadPropertyEditor.cs index 2b32e9d774..6d87bfe495 100644 --- a/src/Umbraco.Web/PropertyEditors/FileUploadPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/FileUploadPropertyEditor.cs @@ -42,7 +42,7 @@ namespace Umbraco.Web.PropertyEditors /// Gets a value indicating whether a property is an upload field. /// /// The property. - /// A value indicating whether a property is an upload field, and (optionaly) has a non-empty value. + /// A value indicating whether a property is an upload field, and (optionally) has a non-empty value. private static bool IsUploadField(Property property) { return property.PropertyType.PropertyEditorAlias == Constants.PropertyEditors.Aliases.UploadField; @@ -61,7 +61,7 @@ namespace Umbraco.Web.PropertyEditors } /// - /// Look through all propery values stored against the property and resolve any file paths stored + /// Look through all property values stored against the property and resolve any file paths stored /// /// /// diff --git a/src/Umbraco.Web/PropertyEditors/GridConfiguration.cs b/src/Umbraco.Web/PropertyEditors/GridConfiguration.cs index c238f93467..8c2f7ac488 100644 --- a/src/Umbraco.Web/PropertyEditors/GridConfiguration.cs +++ b/src/Umbraco.Web/PropertyEditors/GridConfiguration.cs @@ -4,7 +4,7 @@ using Umbraco.Core.PropertyEditors; namespace Umbraco.Web.PropertyEditors { /// - /// Represents the configuration for the gid value editor. + /// Represents the configuration for the grid value editor. /// public class GridConfiguration { diff --git a/src/Umbraco.Web/PropertyEditors/GridConfigurationEditor.cs b/src/Umbraco.Web/PropertyEditors/GridConfigurationEditor.cs index 4a74925816..fe86bb9a6e 100644 --- a/src/Umbraco.Web/PropertyEditors/GridConfigurationEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/GridConfigurationEditor.cs @@ -3,8 +3,8 @@ namespace Umbraco.Web.PropertyEditors { /// - /// Represents the configuration for the gid value editor. + /// Represents the configuration for the grid value editor. /// public class GridConfigurationEditor : ConfigurationEditor { } -} \ No newline at end of file +} diff --git a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs index 2ca58b06e2..fff11a28a5 100644 --- a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs @@ -57,7 +57,7 @@ namespace Umbraco.Web.PropertyEditors /// Gets a value indicating whether a property is an image cropper field. /// /// The property. - /// A value indicating whether a property is an image cropper field, and (optionaly) has a non-empty value. + /// A value indicating whether a property is an image cropper field, and (optionally) has a non-empty value. private static bool IsCropperField(Property property) { return property.PropertyType.PropertyEditorAlias == Constants.PropertyEditors.Aliases.ImageCropper; @@ -69,7 +69,7 @@ namespace Umbraco.Web.PropertyEditors /// The property value. /// A value indicating whether to log the error. /// The json object corresponding to the property value. - /// In case of an error, optionaly logs the error and returns null. + /// In case of an error, optionally logs the error and returns null. private JObject GetJObject(string value, bool writeLog) { if (string.IsNullOrWhiteSpace(value)) @@ -100,7 +100,7 @@ namespace Umbraco.Web.PropertyEditors } /// - /// Look through all propery values stored against the property and resolve any file paths stored + /// Look through all property values stored against the property and resolve any file paths stored /// /// /// diff --git a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs index 6ee0d23d95..78f2189829 100644 --- a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs @@ -166,7 +166,7 @@ namespace Umbraco.Web.PropertyEditors if (value == null || string.IsNullOrEmpty(value.ToString())) return null; - // if we dont have a json structure, we will get it from the property type + // if we don't have a json structure, we will get it from the property type var val = value.ToString(); if (val.DetectIsJson()) return val; diff --git a/src/Umbraco.Web/PropertyEditors/MultiNodePickerConfigurationEditor.cs b/src/Umbraco.Web/PropertyEditors/MultiNodePickerConfigurationEditor.cs index a52ee2138e..75fe581d5b 100644 --- a/src/Umbraco.Web/PropertyEditors/MultiNodePickerConfigurationEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/MultiNodePickerConfigurationEditor.cs @@ -20,7 +20,7 @@ namespace Umbraco.Web.PropertyEditors /// public override Dictionary ToConfigurationEditor(MultiNodePickerConfiguration configuration) { - // sanitize configuraiton + // sanitize configuration var output = base.ToConfigurationEditor(configuration); output["multiPicker"] = configuration.MaxNumber > 1 ? true : false; diff --git a/src/Umbraco.Web/PropertyEditors/MultipleTextStringConfigurationEditor.cs b/src/Umbraco.Web/PropertyEditors/MultipleTextStringConfigurationEditor.cs index 59a96a0e41..a7d05799d9 100644 --- a/src/Umbraco.Web/PropertyEditors/MultipleTextStringConfigurationEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/MultipleTextStringConfigurationEditor.cs @@ -6,7 +6,7 @@ using Umbraco.Core.PropertyEditors.Validators; namespace Umbraco.Web.PropertyEditors { /// - /// Represents the configuration editor for a multiple testring value editor. + /// Represents the configuration editor for a multiple textstring value editor. /// internal class MultipleTextStringConfigurationEditor : ConfigurationEditor { @@ -35,7 +35,7 @@ namespace Umbraco.Web.PropertyEditors public override MultipleTextStringConfiguration FromConfigurationEditor(IDictionary editorValues, MultipleTextStringConfiguration configuration) { // todo this isn't pretty - //the values from the editor will be min/max fieds and we need to format to json in one field + //the values from the editor will be min/max fields and we need to format to json in one field // is the editor sending strings or ints or?! var min = (editorValues.ContainsKey("min") ? editorValues["min"].ToString() : "0").TryConvertTo(); var max = (editorValues.ContainsKey("max") ? editorValues["max"].ToString() : "0").TryConvertTo(); diff --git a/src/Umbraco.Web/PropertyEditors/RichTextPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/RichTextPropertyEditor.cs index 31b65c6357..207e914061 100644 --- a/src/Umbraco.Web/PropertyEditors/RichTextPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/RichTextPropertyEditor.cs @@ -101,7 +101,7 @@ namespace Umbraco.Web.PropertyEditors if (!(val is string strVal)) yield break; - //index the stripped html values + //index the stripped HTML values yield return new KeyValuePair>(property.Alias, new object[] { strVal.StripHtml() }); //store the raw value yield return new KeyValuePair>($"{UmbracoExamineIndex.RawFieldPrefix}{property.Alias}", new object[] { strVal }); diff --git a/src/Umbraco.Web/PropertyEditors/RteEmbedController.cs b/src/Umbraco.Web/PropertyEditors/RteEmbedController.cs index 9199707d10..4cebc5c829 100644 --- a/src/Umbraco.Web/PropertyEditors/RteEmbedController.cs +++ b/src/Umbraco.Web/PropertyEditors/RteEmbedController.cs @@ -22,7 +22,7 @@ namespace Umbraco.Web.PropertyEditors { var result = new Result(); - //todo cache embed doc + // TODO: cache embed doc var xmlConfig = new XmlDocument(); xmlConfig.Load(IOHelper.GetRootDirectorySafe() + Path.DirectorySeparatorChar + "config" + Path.DirectorySeparatorChar + "EmbeddedMedia.config"); diff --git a/src/Umbraco.Web/PropertyEditors/TagConfigurationEditor.cs b/src/Umbraco.Web/PropertyEditors/TagConfigurationEditor.cs index 1e671ba044..5d396980e3 100644 --- a/src/Umbraco.Web/PropertyEditors/TagConfigurationEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/TagConfigurationEditor.cs @@ -33,7 +33,7 @@ namespace Umbraco.Web.PropertyEditors public override TagConfiguration FromConfigurationEditor(IDictionary editorValues, TagConfiguration configuration) { - // the front-end editor retuns the string value of the storage type + // the front-end editor returns the string value of the storage type // pure Json could do with // [JsonConverter(typeof(StringEnumConverter))] // but here we're only deserializing to object and it's too late diff --git a/src/Umbraco.Web/PropertyEditors/TagsDataController.cs b/src/Umbraco.Web/PropertyEditors/TagsDataController.cs index bc0c281f98..15c39bf994 100644 --- a/src/Umbraco.Web/PropertyEditors/TagsDataController.cs +++ b/src/Umbraco.Web/PropertyEditors/TagsDataController.cs @@ -10,7 +10,7 @@ namespace Umbraco.Web.PropertyEditors /// /// /// DO NOT inherit from UmbracoAuthorizedJsonController since we don't want to use the angularized - /// json formatter as it causes probs. + /// json formatter as it causes problems. /// [PluginController("UmbracoApi")] public class TagsDataController : UmbracoAuthorizedApiController diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/MarkdownEditorValueConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/MarkdownEditorValueConverter.cs index 0612c85020..c96e9ff9a3 100644 --- a/src/Umbraco.Web/PropertyEditors/ValueConverters/MarkdownEditorValueConverter.cs +++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/MarkdownEditorValueConverter.cs @@ -34,7 +34,7 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters public override object ConvertIntermediateToObject(IPublishedElement owner, PublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object inter, bool preview) { - // convert markup to html for frontend rendering. + // convert markup to HTML for frontend rendering. // source should come from ConvertSource and be a string (or null) already var mark = new Markdown(); return new HtmlString(inter == null ? string.Empty : mark.Transform((string)inter)); diff --git a/src/Umbraco.Web/PropertyEditors/ValueListUniqueValueValidator.cs b/src/Umbraco.Web/PropertyEditors/ValueListUniqueValueValidator.cs index 88dd20c516..38dc6fb3ae 100644 --- a/src/Umbraco.Web/PropertyEditors/ValueListUniqueValueValidator.cs +++ b/src/Umbraco.Web/PropertyEditors/ValueListUniqueValueValidator.cs @@ -20,7 +20,7 @@ namespace Umbraco.Web.PropertyEditors if (!(value is JArray json)) yield break; // we ensure that values are unique - // (those are are not empty - empty values are removed when persisting anyways) + // (those are not empty - empty values are removed when persisting anyways) var groupedValues = json.OfType() .Where(x => x["value"] != null) @@ -38,4 +38,4 @@ namespace Umbraco.Web.PropertyEditors } } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Web/PublishedCache/IPublishedSnapshotService.cs b/src/Umbraco.Web/PublishedCache/IPublishedSnapshotService.cs index cf10ed5f3a..ccdac5664d 100644 --- a/src/Umbraco.Web/PublishedCache/IPublishedSnapshotService.cs +++ b/src/Umbraco.Web/PublishedCache/IPublishedSnapshotService.cs @@ -17,7 +17,7 @@ namespace Umbraco.Web.PublishedCache * to find out how to get that navigator. * * Because a cache such as NuCache is contextual i.e. it has a "snapshot" thing and remains - * consistent over the snapshot, the navigator has to come come from the "current" snapshot. + * consistent over the snapshot, the navigator has to come from the "current" snapshot. * * So although everything should be injected... we also need a notion of "the current published * snapshot". This is provided by the IPublishedSnapshotAccessor. @@ -105,7 +105,7 @@ namespace Umbraco.Web.PublishedCache * rely on cache refreshers CacheUpdated events to update itself, as these events are external * and the order-of-execution of the handlers cannot be guaranteed, which means that some * user code may run before Umbraco is finished updating itself. Instead, the cache refreshers - * explicitely notify the service of changes. + * explicitly notify the service of changes. * */ diff --git a/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs b/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs index 44d38c8f3a..d983a880cc 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs @@ -93,7 +93,7 @@ namespace Umbraco.Web.PublishedCache.NuCache // if in a domain then start with the root node of the domain // and follow the path // note: if domain has a path (eg example.com/en) which is not recommended anymore - // then then /en part of the domain is basically ignored here... + // then /en part of the domain is basically ignored here... content = GetById(preview, startNodeId); content = FollowRoute(content, parts, 0, culture); } diff --git a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/SerializerBase.cs b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/SerializerBase.cs index 01f0bbad9b..ed17420645 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/SerializerBase.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/SerializerBase.cs @@ -60,7 +60,7 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource case 'D': return PrimitiveSerializer.DateTime.ReadFrom(stream); default: - throw new NotSupportedException($"Cannot deserialize unknow type '{type}'."); + throw new NotSupportedException($"Cannot deserialize unknown type '{type}'."); } } diff --git a/src/Umbraco.Web/PublishedCache/NuCache/Navigable/NavigableContentType.cs b/src/Umbraco.Web/PublishedCache/NuCache/Navigable/NavigableContentType.cs index 068a1866ee..18bf3ead13 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/Navigable/NavigableContentType.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/Navigable/NavigableContentType.cs @@ -20,7 +20,7 @@ namespace Umbraco.Web.PublishedCache.NuCache.Navigable // note - PublishedContentType are immutable ie they do not _change_ when the actual IContentTypeComposition // changes, but they are replaced by a new instance, so our map here will clean itself automatically and - // we don't have to manage cache - ConditionalWeakTable does not prevent keys from beeing GCed + // we don't have to manage cache - ConditionalWeakTable does not prevent keys from being GCed private static readonly ConditionalWeakTable TypesMap = new ConditionalWeakTable(); diff --git a/src/Umbraco.Web/PublishedCache/NuCache/NuCacheComposer.cs b/src/Umbraco.Web/PublishedCache/NuCache/NuCacheComposer.cs index 0423084285..f4449008f9 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/NuCacheComposer.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/NuCacheComposer.cs @@ -19,7 +19,7 @@ namespace Umbraco.Web.PublishedCache.NuCache composition.SetPublishedSnapshotService(); // add the NuCache health check (hidden from type finder) - // todo - no NuCache health check yet + // TODO: no NuCache health check yet //composition.HealthChecks().Add(); } } diff --git a/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs b/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs index 69c672ab98..3dee81f1bb 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs @@ -370,7 +370,7 @@ namespace Umbraco.Web.PublishedCache.NuCache // notes: // _contentNode.ChildContentIds is an unordered int[] - // need needs to fetch & sort - do it only once, lazyily, though + // needs to fetch & sort - do it only once, lazily, though // Q: perfs-wise, is it better than having the store managed an ordered list } diff --git a/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs b/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs index 8675aefd1a..889ce72ce0 100755 --- a/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs @@ -58,18 +58,18 @@ namespace Umbraco.Web.PublishedCache.NuCache // define constant - determines whether to use cache when previewing // to store eg routes, property converted values, anything - caching // means faster execution, but uses memory - not sure if we want it - // so making it configureable. + // so making it configurable. public static readonly bool FullCacheWhenPreviewing = true; // define constant - determines whether to cache the published content // objects (in the elements cache, or snapshot cache, depending on preview) - // or to refetch them all the time. caching is faster but uses more + // or to re-fetch them all the time. caching is faster but uses more // memory. not sure what we want. public static readonly bool CachePublishedContentChildren = true; // define constant - determines whether to cache the content cache root // objects (in the elements cache, or snapshot cache, depending on preview) - // or to refecth them all the time. caching is faster but uses more + // or to re-fetch them all the time. caching is faster but uses more // memory - not sure what we want. public static readonly bool CacheContentCacheRoots = true; @@ -88,7 +88,7 @@ namespace Umbraco.Web.PublishedCache.NuCache : base(publishedSnapshotAccessor, variationContextAccessor) { //if (Interlocked.Increment(ref _singletonCheck) > 1) - // throw new Exception("Singleton must be instancianted only once!"); + // throw new Exception("Singleton must be instantiated only once!"); _serviceContext = serviceContext; _publishedContentTypeFactory = publishedContentTypeFactory; @@ -140,14 +140,14 @@ namespace Umbraco.Web.PublishedCache.NuCache var localMediaDbPath = IOHelper.MapPath("~/App_Data/NuCache.Media.db"); _localDbExists = System.IO.File.Exists(localContentDbPath) && System.IO.File.Exists(localMediaDbPath); - // if both local dbs exist then GetTree will open them, else new dbs will be created + // if both local databases exist then GetTree will open them, else new databases will be created _localContentDb = BTree.GetTree(localContentDbPath, _localDbExists); _localMediaDb = BTree.GetTree(localMediaDbPath, _localDbExists); } // stores are created with a db so they can write to it, but they do not read from it, // stores need to be populated, happens in OnResolutionFrozen which uses _localDbExists to - // figure out whether it can read the dbs or it should populate them from sql + // figure out whether it can read the databases or it should populate them from sql _contentStore = new ContentStore(publishedSnapshotAccessor, variationContextAccessor, logger, _localContentDb); _mediaStore = new ContentStore(publishedSnapshotAccessor, variationContextAccessor, logger, _localMediaDb); } @@ -194,7 +194,7 @@ namespace Umbraco.Web.PublishedCache.NuCache _logger.Fatal(ex, "Panic, exception while loading cache data."); } - // finaly, cache is ready! + // finally, cache is ready! _isReady = true; } } @@ -253,7 +253,7 @@ namespace Umbraco.Web.PublishedCache.NuCache // //// indicates that the snapshot cache should reuse the application request cache //// otherwise a new cache object would be created for the snapshot specifically, - //// which is the default - web boot manager uses this to optimze facades + //// which is the default - web boot manager uses this to optimize facades //public bool PublishedSnapshotCacheIsApplicationRequestCache; public bool IgnoreLocalDb; diff --git a/src/Umbraco.Web/PublishedCache/NuCache/SnapDictionary.cs b/src/Umbraco.Web/PublishedCache/NuCache/SnapDictionary.cs index b0231368af..30f6e7e638 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/SnapDictionary.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/SnapDictionary.cs @@ -58,7 +58,7 @@ namespace Umbraco.Web.PublishedCache.NuCache // // so when getting a read-lock, // either we are write-locked or not, but if not, we won't be write-locked - // otoh the write-lock may be released in the meantime + // on the other hand the write-lock may be released in the meantime // Lock has a 'forceGen' parameter: // used to start a set of changes that may not commit, to isolate the set from any pending diff --git a/src/Umbraco.Web/PublishedCache/PublishedElementPropertyBase.cs b/src/Umbraco.Web/PublishedCache/PublishedElementPropertyBase.cs index 6d69b96e0c..62f72a27aa 100644 --- a/src/Umbraco.Web/PublishedCache/PublishedElementPropertyBase.cs +++ b/src/Umbraco.Web/PublishedCache/PublishedElementPropertyBase.cs @@ -23,7 +23,7 @@ namespace Umbraco.Web.PublishedCache // define constant - determines whether to use cache when previewing // to store eg routes, property converted values, anything - caching // means faster execution, but uses memory - not sure if we want it - // so making it configureable. + // so making it configurable. private const bool FullCacheWhenPreviewing = true; public PublishedElementPropertyBase(PublishedPropertyType propertyType, IPublishedElement element, bool previewing, PropertyCacheLevel referenceCacheLevel, object sourceValue = null, IPublishedSnapshotAccessor publishedSnapshotAccessor = null) diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DictionaryPublishedContent.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DictionaryPublishedContent.cs index a395db1da5..4e206f73d7 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DictionaryPublishedContent.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DictionaryPublishedContent.cs @@ -124,7 +124,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache } /// - /// Flag to get/set if this was laoded from examine cache + /// Flag to get/set if this was loaded from examine cache /// internal bool LoadedFromExamine { get; } diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs index dadf40a33b..5521cabe76 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs @@ -119,7 +119,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache { if (ex is FileNotFoundException) { - //Currently examine is throwing FileNotFound exceptions when we have a loadbalanced filestore and a node is published in umbraco + //Currently examine is throwing FileNotFound exceptions when we have a load balanced filestore and a node is published in umbraco //See this thread: http://examine.cdodeplex.com/discussions/264341 //Catch the exception here for the time being, and just fallback to GetMedia //TODO: Need to fix examine in LB scenarios! @@ -245,7 +245,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache } catch (FileNotFoundException) { - //Currently examine is throwing FileNotFound exceptions when we have a loadbalanced filestore and a node is published in umbraco + //Currently examine is throwing FileNotFound exceptions when we have a load balanced filestore and a node is published in umbraco //See this thread: http://examine.cdodeplex.com/discussions/264341 //Catch the exception here for the time being, and just fallback to GetMedia //TODO: Need to fix examine in LB scenarios! @@ -302,7 +302,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache { if (ex is FileNotFoundException) { - //Currently examine is throwing FileNotFound exceptions when we have a loadbalanced filestore and a node is published in umbraco + //Currently examine is throwing FileNotFound exceptions when we have a load balanced filestore and a node is published in umbraco //See this thread: http://examine.cdodeplex.com/discussions/264341 //Catch the exception here for the time being, and just fallback to GetMedia //TODO: Need to fix examine in LB scenarios! @@ -485,7 +485,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache } /// - /// A Helper methods to return the children for media whther it is based on examine or xml + /// A Helper methods to return the children for media whether it is based on examine or xml /// /// /// @@ -532,14 +532,14 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache } //if there's no result then return null. Previously we defaulted back to library.GetMedia below - //but this will always get called for when we are getting descendents since many items won't have + //but this will always get called for when we are getting descendants since many items won't have //children and then we are hitting the database again! //So instead we're going to rely on Examine to have the correct results like it should. return Enumerable.Empty(); } catch (FileNotFoundException) { - //Currently examine is throwing FileNotFound exceptions when we have a loadbalanced filestore and a node is published in umbraco + //Currently examine is throwing FileNotFound exceptions when we have a load balanced filestore and a node is published in umbraco //See this thread: http://examine.cdodeplex.com/discussions/264341 //Catch the exception here for the time being, and just fallback to GetMedia } diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlStore.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlStore.cs index 0d7d188dac..0153cca18b 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlStore.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlStore.cs @@ -34,7 +34,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache /// Represents the Xml storage for the Xml published cache. /// /// - /// One instance of is instanciated by the and + /// One instance of is instantiated by the and /// then passed to all instances that are created (one per request). /// This class should *not* be public. /// @@ -751,7 +751,7 @@ AND (umbracoNode.id=@id)"; { // using that one method because we want to have proper indent // and in addition, writing async is never fully async because - // althouth the writer is async, xml.WriteTo() will not async + // although the writer is async, xml.WriteTo() will not async // that one almost works but... "The elements are indented as long as the element // does not contain mixed content. Once the WriteString or WriteWhitespace method @@ -918,7 +918,7 @@ ORDER BY umbracoNode.level, umbracoNode.sortOrder"; // assumes xml lock private void LoadXmlTreeFromDatabaseLocked(SafeXmlReaderWriter safeXml) { - // initialise the document ready for the composition of content + // initialize the document ready for the composition of content var xml = new XmlDocument(); InitializeXml(xml, GetDtd()); @@ -973,7 +973,7 @@ ORDER BY umbracoNode.level, umbracoNode.sortOrder"; var xmlDtos = scope.Database.Query(ReadMoreCmsContentXmlSql, new { /*@nodeObjectType =*/ nodeObjectType }); - // Initialise the document ready for the final composition of content + // Initialize the document ready for the final composition of content InitializeXml(xmlDoc, string.Empty); XmlNode parent = null; @@ -1102,7 +1102,7 @@ ORDER BY umbracoNode.level, umbracoNode.sortOrder"; id = content.Id }); - // 'using' the enumerator ensures that the enumeration is properly terminated even if abandonned + // 'using' the enumerator ensures that the enumeration is properly terminated even if abandoned // otherwise, it would leak an open reader & an un-released database connection // see PetaPoco.Query(Type[] types, Delegate cb, string sql, params object[] args) // and read http://blogs.msdn.com/b/oldnewthing/archive/2008/08/14/8862242.aspx @@ -1348,7 +1348,7 @@ ORDER BY umbracoNode.level, umbracoNode.sortOrder"; if (docNode.Name == currentNode.Name) { // name has not changed, safe to just update the current node - // by transfering values eg copying the attributes, and importing the data elements + // by transferring values eg copying the attributes, and importing the data elements TransferValuesFromDocumentXmlToPublishedXml(docNode, currentNode); // if moving, move the node to the new parent @@ -1819,7 +1819,7 @@ WHERE cmsPreviewXml.nodeId IN ( long total; do { - // .GetPagedResultsByQuery implicitely adds ({Constants.DatabaseSchema.Tables.Document}.newest = 1) which + // .GetPagedResultsByQuery implicitly adds ({Constants.DatabaseSchema.Tables.Document}.newest = 1) which // is what we want for preview (ie latest version of a content, published or not) var descendants = _documentRepository.GetPage(query, pageIndex++, groupSize, out total, null, Ordering.By("Path")); const bool published = true; // previewXml contains edit content! diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlStoreFilePersister.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlStoreFilePersister.cs index c656562236..83d25d3e49 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlStoreFilePersister.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlStoreFilePersister.cs @@ -72,7 +72,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache { // if _released is false then we're going to setup a timer // then the runner wants to shutdown & run immediately - // this sets _released to true & the timer will trigger eventualy & who cares? + // this sets _released to true & the timer will trigger eventually & who cares? // if _released is true, either it's a normal release, or // a runner shutdown, in which case we won't be able to // add a new task, and so we'll run immediately diff --git a/src/Umbraco.Web/PublishedElementExtensions.cs b/src/Umbraco.Web/PublishedElementExtensions.cs index 3250dbc2ce..f2a49f7f60 100644 --- a/src/Umbraco.Web/PublishedElementExtensions.cs +++ b/src/Umbraco.Web/PublishedElementExtensions.cs @@ -145,7 +145,7 @@ namespace Umbraco.Web } #endregion - + #region ToIndexedArray public static IndexedArrayItem[] ToIndexedArray(this IEnumerable source) diff --git a/src/Umbraco.Web/RouteCollectionExtensions.cs b/src/Umbraco.Web/RouteCollectionExtensions.cs index 7fe80db10d..08630820b7 100644 --- a/src/Umbraco.Web/RouteCollectionExtensions.cs +++ b/src/Umbraco.Web/RouteCollectionExtensions.cs @@ -84,7 +84,7 @@ namespace Umbraco.Web } /// - /// Extension method to manually regsiter an area + /// Extension method to manually register an area /// /// /// @@ -103,7 +103,7 @@ namespace Umbraco.Web } ///// - ///// Extension method to manually regsiter an area from the container + ///// Extension method to manually register an area from the container ///// ///// ///// diff --git a/src/Umbraco.Web/Routing/ContentFinderByRedirectUrl.cs b/src/Umbraco.Web/Routing/ContentFinderByRedirectUrl.cs index bd85d02dab..f20aa95c0d 100644 --- a/src/Umbraco.Web/Routing/ContentFinderByRedirectUrl.cs +++ b/src/Umbraco.Web/Routing/ContentFinderByRedirectUrl.cs @@ -52,7 +52,7 @@ namespace Umbraco.Web.Routing return false; } - // Apending any querystring from the incoming request to the redirect url. + // 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); diff --git a/src/Umbraco.Web/Routing/ContentFinderByUrlAlias.cs b/src/Umbraco.Web/Routing/ContentFinderByUrlAlias.cs index fc1712dfbd..ff629609d3 100644 --- a/src/Umbraco.Web/Routing/ContentFinderByUrlAlias.cs +++ b/src/Umbraco.Web/Routing/ContentFinderByUrlAlias.cs @@ -59,8 +59,7 @@ namespace Umbraco.Web.Routing // there may be spaces as in "/foo/bar, /foo/nil" // these should probably be taken care of earlier on - // TODO - // can we normalize the values so that they contain no whitespaces, and no leading slashes? + // TODO: can we normalize the values so that they contain no whitespaces, and no leading slashes? // and then the comparisons in IsMatch can be way faster - and allocate way less strings const string propertyAlias = Constants.Conventions.Content.UrlAlias; diff --git a/src/Umbraco.Web/Routing/IContentLastChanceFinder.cs b/src/Umbraco.Web/Routing/IContentLastChanceFinder.cs index 91343b7d49..259c6b5d41 100644 --- a/src/Umbraco.Web/Routing/IContentLastChanceFinder.cs +++ b/src/Umbraco.Web/Routing/IContentLastChanceFinder.cs @@ -4,7 +4,7 @@ /// Provides a method to try to find and assign an Umbraco document to a PublishedContentRequest /// when everything else has failed. /// - /// Identical to but required in order to differenciate them in ioc. + /// Identical to but required in order to differentiate them in ioc. public interface IContentLastChanceFinder : IContentFinder { } } diff --git a/src/Umbraco.Web/Routing/PublishedRequest.cs b/src/Umbraco.Web/Routing/PublishedRequest.cs index 6814761572..540f6d727d 100644 --- a/src/Umbraco.Web/Routing/PublishedRequest.cs +++ b/src/Umbraco.Web/Routing/PublishedRequest.cs @@ -93,7 +93,7 @@ namespace Umbraco.Web.Routing /// /// When the event triggers, no preparation has been done. It is still possible to /// modify the request's Uri property, for example to restore its original, public-facing value - /// that might have been modified by an in-between equipement such as a load-balancer. + /// that might have been modified by an in-between equipment such as a load-balancer. public static event EventHandler Preparing; /// @@ -274,7 +274,7 @@ namespace Umbraco.Web.Routing return true; } - // NOTE - can we stil get it with whitespaces in it due to old legacy bugs? + // NOTE - can we still get it with whitespaces in it due to old legacy bugs? alias = alias.Replace(" ", ""); var model = _publishedRouter.GetTemplate(alias); @@ -357,7 +357,7 @@ namespace Umbraco.Web.Routing } // note: do we want to have an ordered list of alternate cultures, - // to allow for fallbacks when doing dictionnary lookup and such? + // to allow for fallbacks when doing dictionary lookup and such? #endregion @@ -430,7 +430,7 @@ namespace Umbraco.Web.Routing } /// - /// Indicates that the content requet should trigger a redirect, with a specified status code. + /// Indicates that the content request should trigger a redirect, with a specified status code. /// /// The url to redirect to. /// The status code (300-308). @@ -507,7 +507,8 @@ namespace Umbraco.Web.Routing #region Legacy - // for legacy/webforms code - todo - get rid of it eventually + // for legacy/webforms code - + // TODO: get rid of it eventually internal page UmbracoPage { get diff --git a/src/Umbraco.Web/Routing/PublishedRouter.cs b/src/Umbraco.Web/Routing/PublishedRouter.cs index b95977c3a3..94980a7a10 100644 --- a/src/Umbraco.Web/Routing/PublishedRouter.cs +++ b/src/Umbraco.Web/Routing/PublishedRouter.cs @@ -55,7 +55,7 @@ namespace Umbraco.Web.Routing // todo // in 7.7 this is cached in the PublishedContentRequest, which ... makes little sense // killing it entirely, if we need cache, just implement it properly !! - // this is all soooo weird + // this is all so weird public Func> GetRolesForLogin { get; } public PublishedRequest CreateRequest(UmbracoContext umbracoContext, Uri uri = null) @@ -691,7 +691,7 @@ namespace Umbraco.Web.Routing // read the alternate template alias, from querystring, form, cookie or server vars, // only if the published content is the initial once, else the alternate template // does not apply - // + optionnally, apply the alternate template on internal redirects + // + optionally, apply the alternate template on internal redirects var useAltTemplate = request.IsInitialPublishedContent || (_webRoutingSection.InternalRedirectPreservesTemplate && request.IsInternalRedirectPublishedContent); var altTemplate = useAltTemplate diff --git a/src/Umbraco.Web/Routing/RedirectTrackingComponent.cs b/src/Umbraco.Web/Routing/RedirectTrackingComponent.cs index 669039f087..7795543320 100644 --- a/src/Umbraco.Web/Routing/RedirectTrackingComponent.cs +++ b/src/Umbraco.Web/Routing/RedirectTrackingComponent.cs @@ -92,7 +92,7 @@ namespace Umbraco.Web.Redirects // we cannot rely only on ContentCacheRefresher because when CacheUpdated triggers the old // route is gone // - // this is all verrrry weird but it seems to work + // this is all very weird but it seems to work ContentService.Publishing += ContentService_Publishing; ContentService.Published += ContentService_Published; diff --git a/src/Umbraco.Web/Runtime/WebRuntimeComponent.cs b/src/Umbraco.Web/Runtime/WebRuntimeComponent.cs index b7f4e13432..26c8faca58 100644 --- a/src/Umbraco.Web/Runtime/WebRuntimeComponent.cs +++ b/src/Umbraco.Web/Runtime/WebRuntimeComponent.cs @@ -255,7 +255,7 @@ namespace Umbraco.Web.Runtime { var appDomainHash = HttpRuntime.AppDomainAppId.ToSHA1(); var cachePath = Path.Combine(Environment.ExpandEnvironmentVariables("%temp%"), "UmbracoData", - //include the appdomain hash is just a safety check, for example if a website is moved from worker A to worker B and then back + //include the AppDomain hash is just a safety check, for example if a website is moved from worker A to worker B and then back // to worker A again, in theory the %temp% folder should already be empty but we really want to make sure that its not // utilizing an old path appDomainHash); diff --git a/src/Umbraco.Web/Scheduling/BackgroundTaskRunner.cs b/src/Umbraco.Web/Scheduling/BackgroundTaskRunner.cs index b4d122b64f..d9e3c3c980 100644 --- a/src/Umbraco.Web/Scheduling/BackgroundTaskRunner.cs +++ b/src/Umbraco.Web/Scheduling/BackgroundTaskRunner.cs @@ -434,12 +434,12 @@ namespace Umbraco.Web.Scheduling private async Task GetNextBackgroundTask2(CancellationToken shutdownToken) { - // exit if cancelling + // exit if canceling if (shutdownToken.IsCancellationRequested) return null; - // if keepalive is false then don't block, exit if there is - // no task in the buffer - yes, there is a race cond, which + // if KeepAlive is false then don't block, exit if there is + // no task in the buffer - yes, there is a race condition, which // we'll take care of if (_options.KeepAlive == false && _tasks.Count == 0) return null; @@ -482,7 +482,7 @@ namespace Umbraco.Web.Scheduling var latched = bgTask as ILatchedBackgroundTask; if (latched == null || latched.IsLatched == false) return bgTask; - // support cancelling awaiting + // support canceling awaiting // read https://github.com/dotnet/corefx/issues/2704 // read http://stackoverflow.com/questions/27238232/how-can-i-cancel-task-whenall var tokenTaskSource = new TaskCompletionSource(); @@ -519,7 +519,7 @@ namespace Umbraco.Web.Scheduling try { if (bgTask.IsAsync) - //configure await = false since we don't care about the context, we're on a background thread. + // configure await = false since we don't care about the context, we're on a background thread. await bgTask.RunAsync(token).ConfigureAwait(false); else bgTask.Run(); @@ -706,7 +706,7 @@ namespace Umbraco.Web.Scheduling // immediate parameter is true, the registered object must call the UnregisterObject method before returning; // otherwise, its registration will be removed by the application manager. - _logger.Info("{LogPrefix} Cancelling tasks", _logPrefix); + _logger.Info("{LogPrefix} Canceling tasks", _logPrefix); Shutdown(true, true); // cancel all tasks, wait for the current one to end Terminate(true); } diff --git a/src/Umbraco.Web/Scheduling/RecurringTaskBase.cs b/src/Umbraco.Web/Scheduling/RecurringTaskBase.cs index 7a51890c12..58df54a07e 100644 --- a/src/Umbraco.Web/Scheduling/RecurringTaskBase.cs +++ b/src/Umbraco.Web/Scheduling/RecurringTaskBase.cs @@ -9,9 +9,9 @@ namespace Umbraco.Web.Scheduling /// /// Implement by overriding PerformRun or PerformRunAsync and then IsAsync accordingly, /// depending on whether the task is implemented as a sync or async method. Run nor RunAsync are - /// sealed here as overriding them would break recurrence. And then optionnally override + /// sealed here as overriding them would break recurrence. And then optionally override /// RunsOnShutdown, in order to indicate whether the latched task should run immediately on - /// shutdown, or just be abandonned (default). + /// shutdown, or just be abandoned (default). public abstract class RecurringTaskBase : LatchedBackgroundTaskBase { private readonly IBackgroundTaskRunner _runner; diff --git a/src/Umbraco.Web/Scheduling/ScheduledTasks.cs b/src/Umbraco.Web/Scheduling/ScheduledTasks.cs index 115a28504c..66037a0456 100644 --- a/src/Umbraco.Web/Scheduling/ScheduledTasks.cs +++ b/src/Umbraco.Web/Scheduling/ScheduledTasks.cs @@ -44,7 +44,7 @@ namespace Umbraco.Web.Scheduling ScheduledTaskTimes.Add(t.Alias, DateTime.Now); } - // Add 1 second to timespan to compensate for differencies in timer + // Add 1 second to timespan to compensate for differences in timer else if ( new TimeSpan( DateTime.Now.Ticks - ((DateTime)ScheduledTaskTimes[t.Alias]).Ticks).TotalSeconds + 1 >= t.Interval) diff --git a/src/Umbraco.Web/Scheduling/SchedulerComponent.cs b/src/Umbraco.Web/Scheduling/SchedulerComponent.cs index cd4f5ac933..d400ccc077 100644 --- a/src/Umbraco.Web/Scheduling/SchedulerComponent.cs +++ b/src/Umbraco.Web/Scheduling/SchedulerComponent.cs @@ -65,7 +65,7 @@ namespace Umbraco.Web.Scheduling public void Terminate() { - // the appdomain / maindom / whatever takes care of stopping background task runners + // the AppDomain / maindom / whatever takes care of stopping background task runners } private void RegisterBackgroundTasksOnce(object sender, RoutableAttemptEventArgs e) diff --git a/src/Umbraco.Web/Search/ExamineComponent.cs b/src/Umbraco.Web/Search/ExamineComponent.cs index 4735780231..871f90a319 100644 --- a/src/Umbraco.Web/Search/ExamineComponent.cs +++ b/src/Umbraco.Web/Search/ExamineComponent.cs @@ -71,7 +71,7 @@ namespace Umbraco.Web.Search public void Initialize() { - //we want to tell examine to use a different fs lock instead of the default NativeFSFileLock which could cause problems if the appdomain + //we want to tell examine to use a different fs lock instead of the default NativeFSFileLock which could cause problems if the AppDomain //terminates and in some rare cases would only allow unlocking of the file if IIS is forcefully terminated. Instead we'll rely on the simplefslock //which simply checks the existence of the lock file DirectoryFactory.DefaultLockFactory = d => @@ -91,7 +91,7 @@ namespace Umbraco.Web.Search if (!examineShutdownRegistered) { - _logger.Debug("Examine shutdown not registered, this appdomain is not the MainDom, Examine will be disabled"); + _logger.Debug("Examine shutdown not registered, this AppDomain is not the MainDom, Examine will be disabled"); //if we could not register the shutdown examine ourselves, it means we are not maindom! in this case all of examine should be disabled! Suspendable.ExamineEvents.SuspendIndexers(_logger); @@ -174,7 +174,7 @@ namespace Umbraco.Web.Search lock (IsConfiguredLocker) { - //double chekc + //double check if (_isConfigured) return; _isConfigured = true; @@ -218,7 +218,7 @@ namespace Umbraco.Web.Search else // RefreshNode or RefreshBranch (maybe trashed) { // don't try to be too clever - refresh entirely - // there has to be race conds in there ;-( + // there has to be race conditions in there ;-( var content = contentService.GetById(payload.Id); if (content == null) @@ -585,7 +585,7 @@ namespace Umbraco.Web.Search } #endregion - #region Defered Actions + #region Deferred Actions private class DeferedActions { private readonly List _actions = new List(); diff --git a/src/Umbraco.Web/Search/ExamineComposer.cs b/src/Umbraco.Web/Search/ExamineComposer.cs index 7aab3cfd8f..5a897144f9 100644 --- a/src/Umbraco.Web/Search/ExamineComposer.cs +++ b/src/Umbraco.Web/Search/ExamineComposer.cs @@ -45,7 +45,7 @@ namespace Umbraco.Web.Search composition.RegisterUnique, MediaValueSetBuilder>(); composition.RegisterUnique, MemberValueSetBuilder>(); - //We want to manage Examine's appdomain shutdown sequence ourselves so first we'll disable Examine's default behavior + //We want to manage Examine's AppDomain shutdown sequence ourselves so first we'll disable Examine's default behavior //and then we'll use MainDom to control Examine's shutdown - this MUST be done in Compose ie before ExamineManager //is instantiated, as the value is used during instantiation ExamineManager.DisableDefaultHostingEnvironmentRegistration(); diff --git a/src/Umbraco.Web/Security/AuthenticationExtensions.cs b/src/Umbraco.Web/Security/AuthenticationExtensions.cs index 66fbd8e201..1fa75a214b 100644 --- a/src/Umbraco.Web/Security/AuthenticationExtensions.cs +++ b/src/Umbraco.Web/Security/AuthenticationExtensions.cs @@ -34,21 +34,21 @@ namespace Umbraco.Web.Security { if (http == null) throw new ArgumentNullException(nameof(http)); - //if there was a ticket, it's not expired, - it should not be renewed or its renewable + // if there was a ticket, it's not expired, - it should not be renewed or its renewable if (ticket?.Properties.ExpiresUtc != null && ticket.Properties.ExpiresUtc.Value > DateTimeOffset.UtcNow && (renewTicket == false || http.RenewUmbracoAuthTicket())) { try { - //get the Umbraco user identity + // get the Umbraco user identity if (!(ticket.Identity is UmbracoBackOfficeIdentity identity)) throw new InvalidOperationException("The AuthenticationTicket specified does not contain the correct Identity type"); - //set the principal object + // set the principal object var principal = new ClaimsPrincipal(identity); - //It is actually not good enough to set this on the current app Context and the thread, it also needs + // It is actually not good enough to set this on the current app Context and the thread, it also needs // to be set explicitly on the HttpContext.Current !! This is a strange web api thing that is actually - // an underlying fault of asp.net not propogating the User correctly. + // an underlying fault of asp.net not propagating the User correctly. if (HttpContext.Current != null) { HttpContext.Current.User = principal; @@ -56,7 +56,7 @@ namespace Umbraco.Web.Security http.User = principal; Thread.CurrentPrincipal = principal; - //This is a back office request, we will also set the culture/ui culture + // This is a back office request, we will also set the culture/ui culture Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(identity.Culture); @@ -67,7 +67,7 @@ namespace Umbraco.Web.Security { if (ex is FormatException || ex is JsonReaderException) { - //this will occur if the cookie data is invalid + // this will occur if the cookie data is invalid http.UmbracoLogout(); } else @@ -99,17 +99,17 @@ namespace Umbraco.Web.Security if (http == null) throw new ArgumentNullException(nameof(http)); if (http.User == null) return null; //there's no user at all so no identity - //If it's already a UmbracoBackOfficeIdentity + // If it's already a UmbracoBackOfficeIdentity var backOfficeIdentity = http.User.GetUmbracoIdentity(); if (backOfficeIdentity != null) return backOfficeIdentity; if (authenticateRequestIfNotFound == false) return null; - //even if authenticateRequestIfNotFound is true we cannot continue if the request is actually authenticated + // even if authenticateRequestIfNotFound is true we cannot continue if the request is actually authenticated // which would mean something strange is going on that it is not an umbraco identity. if (http.User.Identity.IsAuthenticated) return null; - //So the user is not authed but we've been asked to do the auth if authenticateRequestIfNotFound = true, + // So the user is not authed but we've been asked to do the auth if authenticateRequestIfNotFound = true, // which might occur in old webforms style things or for routes that aren't included as a back office request. // in this case, we are just reverting to authing using the cookie. @@ -237,8 +237,8 @@ namespace Umbraco.Web.Security /// private static void Logout(this HttpContextBase http, string cookieName) { - //We need to clear the sessionId from the database. This is legacy code to do any logging out and shouldn't really be used at all but in any case - //we need to make sure the session is cleared. Due to the legacy nature of this it means we need to use singletons + // We need to clear the sessionId from the database. This is legacy code to do any logging out and shouldn't really be used at all but in any case + // we need to make sure the session is cleared. Due to the legacy nature of this it means we need to use singletons if (http.User != null) { var claimsIdentity = http.User.Identity as ClaimsIdentity; @@ -254,23 +254,23 @@ namespace Umbraco.Web.Security } if (http == null) throw new ArgumentNullException("http"); - //clear the preview cookie and external login + // clear the preview cookie and external login var cookies = new[] { cookieName, Constants.Web.PreviewCookieName, Constants.Security.BackOfficeExternalCookieName }; foreach (var c in cookies) { - //remove from the request + // remove from the request http.Request.Cookies.Remove(c); - //expire from the response + // expire from the response var formsCookie = http.Response.Cookies[c]; if (formsCookie != null) { - //this will expire immediately and be removed from the browser + // this will expire immediately and be removed from the browser formsCookie.Expires = DateTime.Now.AddYears(-1); } else { - //ensure there's def an expired cookie + // ensure there's def an expired cookie http.Response.Cookies.Add(new HttpCookie(c) { Expires = DateTime.Now.AddYears(-1) }); } } @@ -287,7 +287,7 @@ namespace Umbraco.Web.Security var secureFormat = owinCtx.GetUmbracoAuthTicketDataProtector(); - //get the ticket + // get the ticket try { @@ -314,17 +314,17 @@ namespace Umbraco.Web.Security var owinCtx = http.GetOwinContext(); var secureFormat = owinCtx.GetUmbracoAuthTicketDataProtector(); - //will only happen in tests + // will only happen in tests if (secureFormat == null) return null; - //get the ticket + // get the ticket try { return GetAuthTicket(secureFormat, asDictionary, cookieName); } catch (Exception) { - //occurs when decryption fails + // occurs when decryption fails http.Logout(cookieName); return null; } @@ -341,7 +341,7 @@ namespace Umbraco.Web.Security { return null; } - //get the ticket + // get the ticket return secureDataFormat.Unprotect(formsCookie); } diff --git a/src/Umbraco.Web/Security/BackOfficeSignInManager.cs b/src/Umbraco.Web/Security/BackOfficeSignInManager.cs index b711fe76cf..4315d3a762 100644 --- a/src/Umbraco.Web/Security/BackOfficeSignInManager.cs +++ b/src/Umbraco.Web/Security/BackOfficeSignInManager.cs @@ -82,7 +82,7 @@ namespace Umbraco.Web.Security } /// - /// Borrowed from Micorosoft's underlying sign in manager which is not flexible enough to tell it to use a different cookie type + /// Borrowed from Microsoft's underlying sign in manager which is not flexible enough to tell it to use a different cookie type /// /// /// @@ -148,7 +148,7 @@ namespace Umbraco.Web.Security } /// - /// Borrowed from Micorosoft's underlying sign in manager which is not flexible enough to tell it to use a different cookie type + /// Borrowed from Microsoft's underlying sign in manager which is not flexible enough to tell it to use a different cookie type /// /// /// diff --git a/src/Umbraco.Web/Security/BackOfficeUserManager.cs b/src/Umbraco.Web/Security/BackOfficeUserManager.cs index ce51f82c43..a7256b257d 100644 --- a/src/Umbraco.Web/Security/BackOfficeUserManager.cs +++ b/src/Umbraco.Web/Security/BackOfficeUserManager.cs @@ -211,7 +211,7 @@ namespace Umbraco.Web.Security contentSectionConfig.NotificationEmailAddress, new EmailSender()); - //NOTE: Not implementing these, if people need custom 2 factor auth, they'll need to implement their own UserStore to suport it + //NOTE: Not implementing these, if people need custom 2 factor auth, they'll need to implement their own UserStore to support it //// Register two factor authentication providers. This application uses Phone and Emails as a step of receiving a code for verifying the user //// You can write your own provider and plug in here. @@ -250,7 +250,7 @@ namespace Umbraco.Web.Security /// protected virtual IPasswordHasher GetDefaultPasswordHasher(MembershipProviderBase provider) { - //if the current user membership provider is unkown (this would be rare), then return the default password hasher + //if the current user membership provider is unknown (this would be rare), then return the default password hasher if (provider.IsUmbracoUsersProvider() == false) return new PasswordHasher(); @@ -459,7 +459,7 @@ namespace Umbraco.Web.Security } /// - /// This is copied from the underlying .NET base class since they decied to not expose it + /// This is copied from the underlying .NET base class since they decided to not expose it /// /// /// @@ -471,7 +471,7 @@ namespace Umbraco.Web.Security } /// - /// This is copied from the underlying .NET base class since they decied to not expose it + /// This is copied from the underlying .NET base class since they decided to not expose it /// /// private IUserSecurityStampStore GetSecurityStore() @@ -483,7 +483,7 @@ namespace Umbraco.Web.Security } /// - /// This is copied from the underlying .NET base class since they decied to not expose it + /// This is copied from the underlying .NET base class since they decided to not expose it /// /// private static string NewSecurityStamp() @@ -534,14 +534,14 @@ namespace Umbraco.Web.Security /// - /// Overides the microsoft ASP.NET user managment method + /// Overrides the Microsoft ASP.NET user management method /// /// /// /// returns a Async Task /// /// - /// Doesnt set fail attempts back to 0 + /// Doesn't set fail attempts back to 0 /// public override async Task AccessFailedAsync(int userId) { diff --git a/src/Umbraco.Web/Security/GetUserSecondsMiddleWare.cs b/src/Umbraco.Web/Security/GetUserSecondsMiddleWare.cs index dace264996..dba7a8c33a 100644 --- a/src/Umbraco.Web/Security/GetUserSecondsMiddleWare.cs +++ b/src/Umbraco.Web/Security/GetUserSecondsMiddleWare.cs @@ -123,7 +123,7 @@ namespace Umbraco.Web.Security } } - //Hack! we need to suppress the stupid forms authentcation module but we can only do that by using non owin stuff + //Hack! we need to suppress the stupid forms authentication module but we can only do that by using non owin stuff if (HttpContext.Current != null && HttpContext.Current.Response != null) { HttpContext.Current.Response.SuppressFormsAuthenticationRedirect = true; diff --git a/src/Umbraco.Web/Security/IdentityAuditEventArgs.cs b/src/Umbraco.Web/Security/IdentityAuditEventArgs.cs index 4756390d06..81407afe50 100644 --- a/src/Umbraco.Web/Security/IdentityAuditEventArgs.cs +++ b/src/Umbraco.Web/Security/IdentityAuditEventArgs.cs @@ -5,7 +5,7 @@ using Umbraco.Core.Security; namespace Umbraco.Web.Security { /// - /// This class is used by events raised from hthe BackofficeUserManager + /// This class is used by events raised from the BackofficeUserManager /// public class IdentityAuditEventArgs : EventArgs { @@ -30,7 +30,7 @@ namespace Umbraco.Web.Security public int AffectedUser { get; private set; } /// - /// If a user is perfoming an action on a different user, then this will be set. Otherwise it will be -1 + /// If a user is performing an action on a different user, then this will be set. Otherwise it will be -1 /// public int PerformingUser { get; private set; } diff --git a/src/Umbraco.Web/Security/MembershipHelper.cs b/src/Umbraco.Web/Security/MembershipHelper.cs index db93df953f..79eb27bc3c 100644 --- a/src/Umbraco.Web/Security/MembershipHelper.cs +++ b/src/Umbraco.Web/Security/MembershipHelper.cs @@ -486,7 +486,7 @@ namespace Umbraco.Web.Security ////This is a rudimentary check to see what data template we should render //// if developers want to change the template they can do so dynamically in their views or controllers //// for a given property. - ////These are the default built-in MVC template types: “Boolean”, “Decimal”, “EmailAddress”, “HiddenInput”, “Html”, “Object”, “String”, “Text”, and “Url” + ////These are the default built-in MVC template types: “Boolean”, “Decimal”, “EmailAddress”, “HiddenInput”, “HTML”, “Object”, “String”, “Text”, and “Url” //// by default we'll render a text box since we've defined that metadata on the UmbracoProperty.Value property directly. //if (prop.DataTypeId == new Guid(Constants.PropertyEditors.TrueFalse)) //{ @@ -706,7 +706,7 @@ namespace Umbraco.Web.Security /// /// /// - /// Returns successful if the membershipuser required updating, otherwise returns failed if it didn't require updating. + /// Returns successful if the membership user required updating, otherwise returns failed if it didn't require updating. /// internal Attempt UpdateMember(MembershipUser member, MembershipProvider provider, string email = null, @@ -763,7 +763,7 @@ namespace Umbraco.Web.Security if (provider.IsUmbracoMembershipProvider() == false) { - throw new NotSupportedException("An IMember model can only be retreived when using the built-in Umbraco membership providers"); + throw new NotSupportedException("An IMember model can only be retrieved when using the built-in Umbraco membership providers"); } var username = provider.GetCurrentUserName(); var member = _memberService.GetByUsername(username); diff --git a/src/Umbraco.Web/Security/Providers/UmbracoMembershipProvider.cs b/src/Umbraco.Web/Security/Providers/UmbracoMembershipProvider.cs index 1b528c2ba9..413023c27c 100644 --- a/src/Umbraco.Web/Security/Providers/UmbracoMembershipProvider.cs +++ b/src/Umbraco.Web/Security/Providers/UmbracoMembershipProvider.cs @@ -82,7 +82,7 @@ namespace Umbraco.Web.Security.Providers /// protected override bool PerformChangePassword(string username, string oldPassword, string newPassword) { - //NOTE: due to backwards compatibilty reasons (and UX reasons), this provider doesn't care about the old password and + //NOTE: due to backwards compatibility reasons (and UX reasons), this provider doesn't care about the old password and // allows simply setting the password manually so we don't really care about the old password. // This is allowed based on the overridden AllowManuallyChangingPassword option. @@ -354,7 +354,7 @@ namespace Umbraco.Web.Security.Providers // cause all distributed cache to execute - which will clear out some caches we don't want. // http://issues.umbraco.org/issue/U4-3451 - // when upgrating from 7.2 to 7.3 trying to save will throw + // when upgrading from 7.2 to 7.3 trying to save will throw if (UmbracoVersion.Current >= new Version(7, 3, 0, 0)) MemberService.Save(member, false); } @@ -594,7 +594,7 @@ namespace Umbraco.Web.Security.Providers //TODO: In v8 we aren't going to have an overload to disable events, so we'll need to make a different method // for this type of thing (i.e. UpdateLastLogin or similar). - // when upgrating from 7.2 to 7.3 trying to save will throw + // when upgrading from 7.2 to 7.3 trying to save will throw if (UmbracoVersion.Current >= new Version(7, 3, 0, 0)) MemberService.Save(member, false); diff --git a/src/Umbraco.Web/Security/SessionIdValidator.cs b/src/Umbraco.Web/Security/SessionIdValidator.cs index e5e1394aea..58b6c6ad1c 100644 --- a/src/Umbraco.Web/Security/SessionIdValidator.cs +++ b/src/Umbraco.Web/Security/SessionIdValidator.cs @@ -19,7 +19,7 @@ namespace Umbraco.Web.Security /// /// /// This uses another cookie to track the last checked time which is done for a few reasons: - /// * We can't use the user's auth ticket to do thsi because we'd be re-issuing the auth ticket all of the time and it would never expire + /// * We can't use the user's auth ticket to do this because we'd be re-issuing the auth ticket all of the time and it would never expire /// plus the auth ticket size is much larger than this small value /// * This will execute quite often (every minute per user) and in some cases there might be several requests that end up re-issuing the cookie so the cookie value should be small /// * We want to avoid the user lookup if it's not required so that will only happen when the time diff is great enough in the cookie diff --git a/src/Umbraco.Web/Security/UmbracoAuthTicketDataProtector.cs b/src/Umbraco.Web/Security/UmbracoAuthTicketDataProtector.cs index c65c010204..3824935559 100644 --- a/src/Umbraco.Web/Security/UmbracoAuthTicketDataProtector.cs +++ b/src/Umbraco.Web/Security/UmbracoAuthTicketDataProtector.cs @@ -5,7 +5,7 @@ using Umbraco.Core; namespace Umbraco.Web.Security { /// - /// This is used so that we can retrive the auth ticket protector from an IOwinContext + /// This is used so that we can retrieve the auth ticket protector from an IOwinContext /// internal class UmbracoAuthTicketDataProtector : DisposableObjectSlim { diff --git a/src/Umbraco.Web/Security/UmbracoSecureDataFormat.cs b/src/Umbraco.Web/Security/UmbracoSecureDataFormat.cs index 0dc73f5214..19cd602657 100644 --- a/src/Umbraco.Web/Security/UmbracoSecureDataFormat.cs +++ b/src/Umbraco.Web/Security/UmbracoSecureDataFormat.cs @@ -38,7 +38,7 @@ namespace Umbraco.Web.Security } /// - /// Unprotects the cookie + /// Un-protects the cookie /// /// /// diff --git a/src/Umbraco.Web/Security/WebAuthExtensions.cs b/src/Umbraco.Web/Security/WebAuthExtensions.cs index d38345e48c..aa06616d90 100644 --- a/src/Umbraco.Web/Security/WebAuthExtensions.cs +++ b/src/Umbraco.Web/Security/WebAuthExtensions.cs @@ -23,7 +23,7 @@ namespace Umbraco.Web.Security { //It is actually not good enough to set this on the current app Context and the thread, it also needs // to be set explicitly on the HttpContext.Current !! This is a strange web api thing that is actually - // an underlying fault of asp.net not propogating the User correctly. + // an underlying fault of asp.net not propagating the User correctly. if (HttpContext.Current != null) { HttpContext.Current.User = principal; @@ -51,7 +51,7 @@ namespace Umbraco.Web.Security { //It is actually not good enough to set this on the current app Context and the thread, it also needs // to be set explicitly on the HttpContext.Current !! This is a strange web api thing that is actually - // an underlying fault of asp.net not propogating the User correctly. + // an underlying fault of asp.net not propagating the User correctly. if (HttpContext.Current != null) { HttpContext.Current.User = principal; diff --git a/src/Umbraco.Web/Security/WebSecurity.cs b/src/Umbraco.Web/Security/WebSecurity.cs index 18ef806ad1..54ff1bba3f 100644 --- a/src/Umbraco.Web/Security/WebSecurity.cs +++ b/src/Umbraco.Web/Security/WebSecurity.cs @@ -223,7 +223,7 @@ namespace Umbraco.Web.Security // Check for console access if (user == null || (requiresApproval && user.IsApproved == false) || (user.IsLockedOut && RequestIsInUmbracoApplication(_httpContext))) { - if (throwExceptions) throw new ArgumentException("You have no priviledges to the umbraco console. Please contact your administrator"); + if (throwExceptions) throw new ArgumentException("You have no privileges to the umbraco console. Please contact your administrator"); return ValidateRequestAttempt.FailedNoPrivileges; } return ValidateRequestAttempt.Success; diff --git a/src/Umbraco.Web/Templates/TemplateRenderer.cs b/src/Umbraco.Web/Templates/TemplateRenderer.cs index db786655b4..ff87719b12 100644 --- a/src/Umbraco.Web/Templates/TemplateRenderer.cs +++ b/src/Umbraco.Web/Templates/TemplateRenderer.cs @@ -177,7 +177,7 @@ namespace Umbraco.Web.Templates /// /// /// To achieve this we temporarily change the output text writer of the current HttpResponse, then - /// execute the controller via the handler which innevitably writes the result to the text writer + /// execute the controller via the handler which inevitably writes the result to the text writer /// that has been assigned to the response. Then we change the response textwriter back to the original /// before continuing . /// diff --git a/src/Umbraco.Web/Trees/ApplicationTreeController.cs b/src/Umbraco.Web/Trees/ApplicationTreeController.cs index c8b13562cd..b4a91f8ab8 100644 --- a/src/Umbraco.Web/Trees/ApplicationTreeController.cs +++ b/src/Umbraco.Web/Trees/ApplicationTreeController.cs @@ -137,7 +137,7 @@ namespace Umbraco.Web.Trees //If treeGroupName == null then its third party if (treeGroupName.IsNullOrWhiteSpace()) { - //This is used for the localisation key + //This is used for the localization key //treeHeaders/thirdPartyGroup treeGroupName = "thirdPartyGroup"; } diff --git a/src/Umbraco.Web/Trees/ContentBlueprintTreeController.cs b/src/Umbraco.Web/Trees/ContentBlueprintTreeController.cs index cce40eb047..ba851191b2 100644 --- a/src/Umbraco.Web/Trees/ContentBlueprintTreeController.cs +++ b/src/Umbraco.Web/Trees/ContentBlueprintTreeController.cs @@ -62,7 +62,7 @@ namespace Umbraco.Web.Trees var treeNode = CreateTreeNode(entity, Constants.ObjectTypes.DocumentBlueprint, id, queryStrings, "icon-item-arrangement", true); treeNode.Path = $"-1,{entity.Id}"; treeNode.NodeType = "document-type-blueprints"; - //TODO: This isn't the best way to ensure a noop process for clicking a node but it works for now. + // TODO: This isn't the best way to ensure a no operation process for clicking a node but it works for now. treeNode.AdditionalData["jsClickCallback"] = "javascript:void(0);"; return treeNode; })); diff --git a/src/Umbraco.Web/Trees/ContentTreeController.cs b/src/Umbraco.Web/Trees/ContentTreeController.cs index 8113a85690..b50f06e14e 100644 --- a/src/Umbraco.Web/Trees/ContentTreeController.cs +++ b/src/Umbraco.Web/Trees/ContentTreeController.cs @@ -58,7 +58,7 @@ namespace Umbraco.Web.Trees var allowedUserOptions = GetAllowedUserMenuItemsForNode(entity); if (CanUserAccessNode(entity, allowedUserOptions, culture)) { - //Special check to see if it ia a container, if so then we'll hide children. + //Special check to see if it is a container, if so then we'll hide children. var isContainer = entity.IsContainer; // && (queryStrings.Get("isDialog") != "true"); var node = CreateTreeNode( diff --git a/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs b/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs index c7420d8d9c..7c0e7c736d 100644 --- a/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs +++ b/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs @@ -429,7 +429,7 @@ namespace Umbraco.Web.Trees } /// - /// Determins if the user has access to view the node/document + /// Determines if the user has access to view the node/document /// /// The Document to check permissions against /// A list of MenuItems that the user has permissions to execute on the current document diff --git a/src/Umbraco.Web/Trees/ContentTypeTreeController.cs b/src/Umbraco.Web/Trees/ContentTypeTreeController.cs index 3c6b9c782c..65a2aa3fb5 100644 --- a/src/Umbraco.Web/Trees/ContentTypeTreeController.cs +++ b/src/Umbraco.Web/Trees/ContentTypeTreeController.cs @@ -43,7 +43,7 @@ namespace Umbraco.Web.Trees var node = CreateTreeNode(dt.Id.ToString(), id, queryStrings, dt.Name, "icon-folder", dt.HasChildren, ""); node.Path = dt.Path; node.NodeType = "container"; - //TODO: This isn't the best way to ensure a noop process for clicking a node but it works for now. + // TODO: This isn't the best way to ensure a no operation process for clicking a node but it works for now. node.AdditionalData["jsClickCallback"] = "javascript:void(0);"; return node; })); @@ -57,7 +57,7 @@ namespace Umbraco.Web.Trees .Select(dt => { // since 7.4+ child type creation is enabled by a config option. It defaults to on, but can be disabled if we decide to. - // need this check to keep supporting sites where childs have already been created. + // need this check to keep supporting sites where children have already been created. var hasChildren = dt.HasChildren; var node = CreateTreeNode(dt, Constants.ObjectTypes.DocumentType, id, queryStrings, "icon-item-arrangement", hasChildren); diff --git a/src/Umbraco.Web/Trees/DataTypeTreeController.cs b/src/Umbraco.Web/Trees/DataTypeTreeController.cs index 8b38bee865..e60bbe49ed 100644 --- a/src/Umbraco.Web/Trees/DataTypeTreeController.cs +++ b/src/Umbraco.Web/Trees/DataTypeTreeController.cs @@ -38,8 +38,8 @@ namespace Umbraco.Web.Trees var node = CreateTreeNode(dt, Constants.ObjectTypes.DataType, id, queryStrings, "icon-folder", dt.HasChildren); node.Path = dt.Path; node.NodeType = "container"; - //TODO: This isn't the best way to ensure a noop process for clicking a node but it works for now. - node.AdditionalData["jsClickCallback"] = "javascript:void(0);"; + // TODO: This isn't the best way to ensure a no operation process for clicking a node but it works for now. + node.AdditionalData["jsClickCallback"] = "javascript:void(0);"; return node; })); diff --git a/src/Umbraco.Web/Trees/DictionaryTreeController.cs b/src/Umbraco.Web/Trees/DictionaryTreeController.cs index 6c8f576732..4ff3697a17 100644 --- a/src/Umbraco.Web/Trees/DictionaryTreeController.cs +++ b/src/Umbraco.Web/Trees/DictionaryTreeController.cs @@ -45,7 +45,7 @@ namespace Umbraco.Web.Trees /// All of the query string parameters passed from jsTree /// /// - /// We are allowing an arbitrary number of query strings to be pased in so that developers are able to persist custom data from the front-end + /// We are allowing an arbitrary number of query strings to be passed in so that developers are able to persist custom data from the front-end /// to the back end to be used in the query for model data. /// protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) diff --git a/src/Umbraco.Web/Trees/MediaTypeTreeController.cs b/src/Umbraco.Web/Trees/MediaTypeTreeController.cs index b93c1ac9e3..8420126db4 100644 --- a/src/Umbraco.Web/Trees/MediaTypeTreeController.cs +++ b/src/Umbraco.Web/Trees/MediaTypeTreeController.cs @@ -36,12 +36,12 @@ namespace Umbraco.Web.Trees var node = CreateTreeNode(dt.Id.ToString(), id, queryStrings, dt.Name, "icon-folder", dt.HasChildren, ""); node.Path = dt.Path; node.NodeType = "container"; - //TODO: This isn't the best way to ensure a noop process for clicking a node but it works for now. + // TODO: This isn't the best way to ensure a no operation process for clicking a node but it works for now. node.AdditionalData["jsClickCallback"] = "javascript:void(0);"; return node; })); - //if the request is for folders only then just return + // if the request is for folders only then just return if (queryStrings["foldersonly"].IsNullOrWhiteSpace() == false && queryStrings["foldersonly"] == "1") return nodes; nodes.AddRange( @@ -50,7 +50,7 @@ namespace Umbraco.Web.Trees .Select(dt => { // since 7.4+ child type creation is enabled by a config option. It defaults to on, but can be disabled if we decide to. - // need this check to keep supporting sites where childs have already been created. + // need this check to keep supporting sites where children have already been created. var hasChildren = dt.HasChildren; var node = CreateTreeNode(dt, Constants.ObjectTypes.MediaType, id, queryStrings, "icon-thumbnails", hasChildren); @@ -69,7 +69,7 @@ namespace Umbraco.Web.Trees if (id == Constants.System.Root.ToInvariantString()) { - //set the default to create + // set the default to create menu.DefaultMenuAlias = ActionNew.ActionAlias; // root actions @@ -81,7 +81,7 @@ namespace Umbraco.Web.Trees var container = Services.EntityService.Get(int.Parse(id), UmbracoObjectTypes.MediaTypeContainer); if (container != null) { - //set the default to create + // set the default to create menu.DefaultMenuAlias = ActionNew.ActionAlias; menu.Items.Add(Services.TextService, opensDialog: true); @@ -93,7 +93,7 @@ namespace Umbraco.Web.Trees if (container.HasChildren == false) { - //can delete doc type + // can delete doc type menu.Items.Add(Services.TextService, opensDialog: true); } menu.Items.Add(new RefreshNode(Services.TextService, true)); @@ -107,7 +107,7 @@ namespace Umbraco.Web.Trees { menu.Items.Add(Services.TextService, opensDialog: true); - //no move action if this is a child doc type + // no move action if this is a child doc type if (parent == null) { menu.Items.Add(Services.TextService, true, opensDialog: true); @@ -116,7 +116,7 @@ namespace Umbraco.Web.Trees else { menu.Items.Add(Services.TextService, opensDialog: true); - //no move action if this is a child doc type + // no move action if this is a child doc type if (parent == null) { menu.Items.Add(Services.TextService, true, opensDialog: true); diff --git a/src/Umbraco.Web/Trees/TreeControllerBase.cs b/src/Umbraco.Web/Trees/TreeControllerBase.cs index d06d768f2d..7b4c049353 100644 --- a/src/Umbraco.Web/Trees/TreeControllerBase.cs +++ b/src/Umbraco.Web/Trees/TreeControllerBase.cs @@ -44,7 +44,7 @@ namespace Umbraco.Web.Trees /// All of the query string parameters passed from jsTree /// /// - /// We are allowing an arbitrary number of query strings to be pased in so that developers are able to persist custom data from the front-end + /// We are allowing an arbitrary number of query strings to be passed in so that developers are able to persist custom data from the front-end /// to the back end to be used in the query for model data. /// protected abstract TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings); @@ -115,7 +115,7 @@ namespace Umbraco.Web.Trees /// /// JSON markup for jsTree /// - /// We are allowing an arbitrary number of query strings to be pased in so that developers are able to persist custom data from the front-end + /// We are allowing an arbitrary number of query strings to be passed in so that developers are able to persist custom data from the front-end /// to the back end to be used in the query for model data. /// [HttpQueryStringFilter("queryStrings")] @@ -389,7 +389,7 @@ namespace Umbraco.Web.Trees } /// - /// An event that allows developers to modify the meun that is being rendered + /// An event that allows developers to modify the menu that is being rendered /// /// /// Developers can add/remove/replace/insert/update/etc... any of the tree items in the collection. diff --git a/src/Umbraco.Web/Trees/UrlHelperExtensions.cs b/src/Umbraco.Web/Trees/UrlHelperExtensions.cs index c794110d88..3221023ca2 100644 --- a/src/Umbraco.Web/Trees/UrlHelperExtensions.cs +++ b/src/Umbraco.Web/Trees/UrlHelperExtensions.cs @@ -39,7 +39,7 @@ namespace Umbraco.Web.Trees //to convert a filepath to a tree syncing path string. //removes the basepath from the path - //and normalises paths - / is used consistently between trees and editors + //and normalizes paths - / is used consistently between trees and editors basePath = basePath.TrimStart("~"); virtualPath = virtualPath.TrimStart("~"); virtualPath = virtualPath.Substring(basePath.Length); diff --git a/src/Umbraco.Web/UI/JavaScript/AssetInitialization.cs b/src/Umbraco.Web/UI/JavaScript/AssetInitialization.cs index cd7270ac62..9b6aa96e37 100644 --- a/src/Umbraco.Web/UI/JavaScript/AssetInitialization.cs +++ b/src/Umbraco.Web/UI/JavaScript/AssetInitialization.cs @@ -38,7 +38,7 @@ namespace Umbraco.Web.UI.JavaScript var dependencies = assets.Select(x => { // most declarations with be made relative to the /umbraco folder, so things - // ike lib/blah/blah.js so we need to turn them into absolutes here + // like lib/blah/blah.js so we need to turn them into absolutes here if (x.StartsWith("/") == false && Uri.IsWellFormedUriString(x, UriKind.Relative)) { return new BasicFile(assetType) { FilePath = new Uri(requestUrl, x).AbsolutePath }; diff --git a/src/Umbraco.Web/UI/JavaScript/ClientDependencyConfiguration.cs b/src/Umbraco.Web/UI/JavaScript/ClientDependencyConfiguration.cs index f1f57a03a7..b5235c7938 100644 --- a/src/Umbraco.Web/UI/JavaScript/ClientDependencyConfiguration.cs +++ b/src/Umbraco.Web/UI/JavaScript/ClientDependencyConfiguration.cs @@ -35,7 +35,7 @@ namespace Umbraco.Web.UI.JavaScript /// The version of Umbraco we're upgrading to /// A date value to use in the hash to prevent this method from updating the version on each startup /// Allows the developer to specify the date precision for the hash (i.e. "yyyyMMdd" would be a precision for the day) - /// Boolean to indicate succesful update of the ClientDependency.config file + /// Boolean to indicate successful update of the ClientDependency.config file public bool UpdateVersionNumber(SemVersion version, DateTime date, string dateFormat) { var byteContents = Encoding.Unicode.GetBytes(version + date.ToString(dateFormat)); @@ -56,7 +56,7 @@ namespace Umbraco.Web.UI.JavaScript //CDF requires an INT, and although this isn't fail safe, it will work for our purposes. We are not hashing for crypto purposes //so there could be some collisions with this conversion but it's not a problem for our purposes //It's also important to note that the long.GetHashCode() implementation in .NET is this: return (int) this ^ (int) (this >> 32); - //which means that this value will not change per appdomain like some GetHashCode implementations. + //which means that this value will not change per AppDomain like some GetHashCode implementations. intHash = longResult.GetHashCode(); } diff --git a/src/Umbraco.Web/UI/JavaScript/Resources.Designer.cs b/src/Umbraco.Web/UI/JavaScript/Resources.Designer.cs index 2f320ef839..f223fe5310 100644 --- a/src/Umbraco.Web/UI/JavaScript/Resources.Designer.cs +++ b/src/Umbraco.Web/UI/JavaScript/Resources.Designer.cs @@ -8,10 +8,11 @@ // //------------------------------------------------------------------------------ -namespace Umbraco.Web.UI.JavaScript { +namespace Umbraco.Web.UI.JavaScript +{ using System; - - + + /// /// A strongly-typed resource class, for looking up localized strings, etc. /// @@ -22,44 +23,52 @@ namespace Umbraco.Web.UI.JavaScript { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - + internal class Resources + { + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { + internal Resources() + { } - + /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if (object.ReferenceEquals(resourceMan, null)) + { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Umbraco.Web.UI.JavaScript.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } - + /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { + internal static global::System.Globalization.CultureInfo Culture + { + get + { return resourceCulture; } - set { + set + { resourceCulture = value; } } - + /// /// Looks up a localized string similar to [ /// 'lib/jquery/jquery.min.js', @@ -80,12 +89,14 @@ namespace Umbraco.Web.UI.JavaScript { /// 'lib/angular-animate/angular-animate.js', /// [rest of string was truncated]";. /// - internal static string JsInitialize { - get { + internal static string JsInitialize + { + get + { return ResourceManager.GetString("JsInitialize", resourceCulture); } } - + /// /// Looks up a localized string similar to LazyLoad.js("##JsInitialize##", function () { /// //we need to set the legacy UmbClientMgr path @@ -99,12 +110,14 @@ namespace Umbraco.Web.UI.JavaScript { ///}); ///. /// - internal static string Main { - get { + internal static string Main + { + get + { return ResourceManager.GetString("Main", resourceCulture); } } - + /// /// Looks up a localized string similar to [ /// '../lib/jquery/jquery.min.js', @@ -122,12 +135,14 @@ namespace Umbraco.Web.UI.JavaScript { ///] ///. /// - internal static string PreviewInitialize { - get { + internal static string PreviewInitialize + { + get + { return ResourceManager.GetString("PreviewInitialize", resourceCulture); } } - + /// /// Looks up a localized string similar to //TODO: This would be nicer as an angular module so it can be injected into stuff... that'd be heaps nicer, but ///// how to do that when this is not a regular JS file, it is a server side JS file and RequireJS seems to only want @@ -139,8 +154,10 @@ namespace Umbraco.Web.UI.JavaScript { /////define a global static object ///Umbraco.Sys.ServerVariables = ##Variables## ;. /// - internal static string ServerVariables { - get { + internal static string ServerVariables + { + get + { return ResourceManager.GetString("ServerVariables", resourceCulture); } } diff --git a/src/Umbraco.Web/UI/JavaScript/Resources.resx b/src/Umbraco.Web/UI/JavaScript/Resources.resx index 34cea3a2d4..95526f51e7 100644 --- a/src/Umbraco.Web/UI/JavaScript/Resources.resx +++ b/src/Umbraco.Web/UI/JavaScript/Resources.resx @@ -37,7 +37,7 @@ mimetype set. The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not + ResXResourceReader how to stop persisting the object. This is currently not extensible. For a given mimetype the value must be set accordingly: Note - application/x-microsoft.net.object.binary.base64 is the format @@ -130,4 +130,4 @@ servervariables.js;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 - \ No newline at end of file + diff --git a/src/Umbraco.Web/UI/Pages/BasePage.cs b/src/Umbraco.Web/UI/Pages/BasePage.cs index a8fbc92722..c0c266367a 100644 --- a/src/Umbraco.Web/UI/Pages/BasePage.cs +++ b/src/Umbraco.Web/UI/Pages/BasePage.cs @@ -40,9 +40,9 @@ namespace Umbraco.Web.UI.Pages public UrlHelper Url => _url ?? (_url = new UrlHelper(Context.Request.RequestContext)); /// - /// Gets the Html helper. + /// Gets the HTML helper. /// - /// This html helper is created with an empty context and page so it may not have all of the functionality expected. + /// This HTML helper is created with an empty context and page so it may not have all of the functionality expected. public HtmlHelper Html => _html ?? (_html = new HtmlHelper(new ViewContext(), new ViewPage())); /// diff --git a/src/Umbraco.Web/UI/Pages/ClientTools.cs b/src/Umbraco.Web/UI/Pages/ClientTools.cs index 6988877fa2..92b879dad1 100644 --- a/src/Umbraco.Web/UI/Pages/ClientTools.cs +++ b/src/Umbraco.Web/UI/Pages/ClientTools.cs @@ -126,10 +126,10 @@ namespace Umbraco.Web.UI.Pages } /// - /// A reference to the umbraco UI component "speechbubble". The speechbubble appears in the lower right corner of the screen, notifying users of events + /// A reference to the umbraco UI component "speechbubble". The speech bubble appears in the lower right corner of the screen, notifying users of events /// - /// The speechbubble icon. - /// The speechbubble header. + /// The speech bubble icon. + /// The speech bubble header. /// The body text public ClientTools ShowSpeechBubble(SpeechBubbleIcon i, string header, string body) { diff --git a/src/Umbraco.Web/UmbracoApplicationBase.cs b/src/Umbraco.Web/UmbracoApplicationBase.cs index d8d0d65b55..1ce518a653 100644 --- a/src/Umbraco.Web/UmbracoApplicationBase.cs +++ b/src/Umbraco.Web/UmbracoApplicationBase.cs @@ -86,7 +86,7 @@ namespace Umbraco.Web // which means that this will be called *many* times for different apps when Umbraco runs public override void Init() { - // note: base.Init() is what initializes all of the httpmodules, ties up a bunch of stuff with IIS, etc... + // note: base.Init() is what initializes all of the http modules, ties up a bunch of stuff with IIS, etc... // therefore, since OWIN is an HttpModule when running in IIS/ASP.Net the OWIN startup is not executed // until this method fires and by that time - Umbraco has booted already diff --git a/src/Umbraco.Web/UmbracoComponentRenderer.cs b/src/Umbraco.Web/UmbracoComponentRenderer.cs index e2d4ecfc39..48d0d571ee 100644 --- a/src/Umbraco.Web/UmbracoComponentRenderer.cs +++ b/src/Umbraco.Web/UmbracoComponentRenderer.cs @@ -132,7 +132,7 @@ namespace Umbraco.Web // looks for a lower case match. WTF. the whole macro concept needs to be rewritten. - //NOTE: the value could have html encoded values, so we need to deal with that + //NOTE: the value could have HTML encoded values, so we need to deal with that macroProps.Add(i.Key.ToLowerInvariant(), (i.Value is string) ? HttpUtility.HtmlDecode(i.Value.ToString()) : i.Value); } var renderer = new MacroRenderer(Current.ProfilingLogger); diff --git a/src/Umbraco.Web/UmbracoContext.cs b/src/Umbraco.Web/UmbracoContext.cs index 41ac309653..49a3832483 100644 --- a/src/Umbraco.Web/UmbracoContext.cs +++ b/src/Umbraco.Web/UmbracoContext.cs @@ -260,7 +260,7 @@ namespace Umbraco.Web /// ctor will have to have another parameter added only for this one method which is annoying and doesn't make a ton of sense /// since the UmbracoContext itself doesn't use this. /// - /// TODO The alternative is to have a IDomainHelperAccessor singleton which is cached per UmbracoContext + /// TODO: The alternative is to have a IDomainHelperAccessor singleton which is cached per UmbracoContext /// internal DomainHelper GetDomainHelper(ISiteDomainHelper siteDomainHelper) => _domainHelper ?? (_domainHelper = new DomainHelper(PublishedSnapshot.Domains, siteDomainHelper)); diff --git a/src/Umbraco.Web/UmbracoHelper.cs b/src/Umbraco.Web/UmbracoHelper.cs index ee57054dc9..110c3e84d0 100644 --- a/src/Umbraco.Web/UmbracoHelper.cs +++ b/src/Umbraco.Web/UmbracoHelper.cs @@ -770,10 +770,10 @@ namespace Umbraco.Web #region Strings /// - /// Replaces text line breaks with html line breaks + /// Replaces text line breaks with HTML line breaks /// /// The text. - /// The text with text line breaks replaced with html linebreaks (
)
+ /// The text with text line breaks replaced with HTML line breaks (
)
public IHtmlString ReplaceLineBreaksForHtml(string text) { return StringUtilities.ReplaceLineBreaksForHtml(text); @@ -791,7 +791,7 @@ namespace Umbraco.Web } /// - /// Strips all html tags from a given string, all contents of the tags will remain. + /// Strips all HTML tags from a given string, all contents of the tags will remain. /// public HtmlString StripHtml(IHtmlString html, params string[] tags) { @@ -799,7 +799,7 @@ namespace Umbraco.Web } /// - /// Strips all html tags from a given string, all contents of the tags will remain. + /// Strips all HTML tags from a given string, all contents of the tags will remain. /// public HtmlString StripHtml(string html, params string[] tags) { @@ -831,7 +831,7 @@ namespace Umbraco.Web } /// - /// Truncates a string to a given length, can add a elipsis at the end (...). Method checks for open html tags, and makes sure to close them + /// Truncates a string to a given length, can add a ellipsis at the end (...). Method checks for open HTML tags, and makes sure to close them /// public IHtmlString Truncate(IHtmlString html, int length) { @@ -839,7 +839,7 @@ namespace Umbraco.Web } /// - /// Truncates a string to a given length, can add a elipsis at the end (...). Method checks for open html tags, and makes sure to close them + /// Truncates a string to a given length, can add a ellipsis at the end (...). Method checks for open HTML tags, and makes sure to close them /// public IHtmlString Truncate(IHtmlString html, int length, bool addElipsis) { @@ -847,7 +847,7 @@ namespace Umbraco.Web } /// - /// Truncates a string to a given length, can add a elipsis at the end (...). Method checks for open html tags, and makes sure to close them + /// Truncates a string to a given length, can add a ellipsis at the end (...). Method checks for open HTML tags, and makes sure to close them /// public IHtmlString Truncate(IHtmlString html, int length, bool addElipsis, bool treatTagsAsContent) { @@ -855,7 +855,7 @@ namespace Umbraco.Web } /// - /// Truncates a string to a given length, can add a elipsis at the end (...). Method checks for open html tags, and makes sure to close them + /// Truncates a string to a given length, can add a ellipsis at the end (...). Method checks for open HTML tags, and makes sure to close them /// public IHtmlString Truncate(string html, int length) { @@ -863,7 +863,7 @@ namespace Umbraco.Web } /// - /// Truncates a string to a given length, can add a elipsis at the end (...). Method checks for open html tags, and makes sure to close them + /// Truncates a string to a given length, can add a ellipsis at the end (...). Method checks for open HTML tags, and makes sure to close them /// public IHtmlString Truncate(string html, int length, bool addElipsis) { @@ -871,7 +871,7 @@ namespace Umbraco.Web } /// - /// Truncates a string to a given length, can add a elipsis at the end (...). Method checks for open html tags, and makes sure to close them + /// Truncates a string to a given length, can add a ellipsis at the end (...). Method checks for open HTML tags, and makes sure to close them /// public IHtmlString Truncate(string html, int length, bool addElipsis, bool treatTagsAsContent) { @@ -881,7 +881,7 @@ namespace Umbraco.Web #region Truncate by Words /// - /// Truncates a string to a given amount of words, can add a elipsis at the end (...). Method checks for open html tags, and makes sure to close them + /// Truncates a string to a given amount of words, can add a ellipsis at the end (...). Method checks for open HTML tags, and makes sure to close them /// public IHtmlString TruncateByWords(string html, int words) { @@ -891,7 +891,7 @@ namespace Umbraco.Web } /// - /// Truncates a string to a given amount of words, can add a elipsis at the end (...). Method checks for open html tags, and makes sure to close them + /// Truncates a string to a given amount of words, can add a ellipsis at the end (...). Method checks for open HTML tags, and makes sure to close them /// public IHtmlString TruncateByWords(string html, int words, bool addElipsis) { @@ -901,7 +901,7 @@ namespace Umbraco.Web } /// - /// Truncates a string to a given amount of words, can add a elipsis at the end (...). Method checks for open html tags, and makes sure to close them + /// Truncates a string to a given amount of words, can add a ellipsis at the end (...). Method checks for open HTML tags, and makes sure to close them /// public IHtmlString TruncateByWords(IHtmlString html, int words) { @@ -911,7 +911,7 @@ namespace Umbraco.Web } /// - /// Truncates a string to a given amount of words, can add a elipsis at the end (...). Method checks for open html tags, and makes sure to close them + /// Truncates a string to a given amount of words, can add a ellipsis at the end (...). Method checks for open HTML tags, and makes sure to close them /// public IHtmlString TruncateByWords(IHtmlString html, int words, bool addElipsis) { diff --git a/src/Umbraco.Web/UmbracoInjectedModule.cs b/src/Umbraco.Web/UmbracoInjectedModule.cs index eb6fc54fbb..9c413402b8 100644 --- a/src/Umbraco.Web/UmbracoInjectedModule.cs +++ b/src/Umbraco.Web/UmbracoInjectedModule.cs @@ -107,7 +107,7 @@ namespace Umbraco.Web } /// - /// Processses the Umbraco Request + /// Processes the Umbraco Request /// /// /// @@ -150,9 +150,9 @@ namespace Umbraco.Web // note: requestModule.UmbracoRewrite also did some stripping of &umbPage // from the querystring... that was in v3.x to fix some issues with pre-forms - // auth. Paul Sterling confirmed in jan. 2013 that we can get rid of it. + // auth. Paul Sterling confirmed in Jan. 2013 that we can get rid of it. - // instanciate, prepare and process the published content request + // instantiate, prepare and process the published content request // important to use CleanedUmbracoUrl - lowercase path-only version of the current url var request = _publishedRouter.CreateRequest(umbracoContext); umbracoContext.PublishedRequest = request; @@ -347,7 +347,7 @@ namespace Umbraco.Web context.RewritePath(rewritePath, "", "", false); //if it is MVC we need to do something special, we are not using TransferRequest as this will - //require us to rewrite the path with query strings and then reparse the query strings, this would + //require us to rewrite the path with query strings and then re-parse the query strings, this would //also mean that we need to handle IIS 7 vs pre-IIS 7 differently. Instead we are just going to create //an instance of the UrlRoutingModule and call it's PostResolveRequestCache method. This does: // * Looks up the route based on the new rewritten URL @@ -380,7 +380,7 @@ namespace Umbraco.Web context.RewritePath(rewritePath, "", query, false); //if it is MVC we need to do something special, we are not using TransferRequest as this will - //require us to rewrite the path with query strings and then reparse the query strings, this would + //require us to rewrite the path with query strings and then re-parse the query strings, this would //also mean that we need to handle IIS 7 vs pre-IIS 7 differently. Instead we are just going to create //an instance of the UrlRoutingModule and call it's PostResolveRequestCache method. This does: // * Looks up the route based on the new rewritten URL diff --git a/src/Umbraco.Web/UriUtility.cs b/src/Umbraco.Web/UriUtility.cs index 9f90c803c6..a4de3c412e 100644 --- a/src/Umbraco.Web/UriUtility.cs +++ b/src/Umbraco.Web/UriUtility.cs @@ -223,7 +223,7 @@ namespace Umbraco.Web #endregion /// - /// Returns an faull url with the host, port, etc... + /// Returns an full url with the host, port, etc... /// /// An absolute path (i.e. starts with a '/' ) /// diff --git a/src/Umbraco.Web/UrlHelperExtensions.cs b/src/Umbraco.Web/UrlHelperExtensions.cs index 0a04539967..1397ffc818 100644 --- a/src/Umbraco.Web/UrlHelperExtensions.cs +++ b/src/Umbraco.Web/UrlHelperExtensions.cs @@ -177,7 +177,7 @@ namespace Umbraco.Web public static string GetCacheBustHash() { //make a hash of umbraco and client dependency version - //in case the user bypasses the installer and just bumps the web.config or clientdep config + //in case the user bypasses the installer and just bumps the web.config or client dependency config //if in debug mode, always burst the cache if (GlobalSettings.DebugMode) diff --git a/src/Umbraco.Web/UrlHelperRenderExtensions.cs b/src/Umbraco.Web/UrlHelperRenderExtensions.cs index 490ad9a6a7..2835bc02dc 100644 --- a/src/Umbraco.Web/UrlHelperRenderExtensions.cs +++ b/src/Umbraco.Web/UrlHelperRenderExtensions.cs @@ -32,7 +32,7 @@ namespace Umbraco.Web /// The crop alias e.g. thumbnail /// /// - /// Whether to HTML encode this URL - default is true - w3c standards require html attributes to be html encoded but this can be + /// Whether to HTML encode this URL - default is true - w3c standards require HTML attributes to be HTML encoded but this can be /// set to false if using the result of this method for CSS. /// /// @@ -56,7 +56,7 @@ namespace Umbraco.Web /// The crop alias e.g. thumbnail /// /// - /// Whether to HTML encode this URL - default is true - w3c standards require html attributes to be html encoded but this can be + /// Whether to HTML encode this URL - default is true - w3c standards require HTML attributes to be HTML encoded but this can be /// set to false if using the result of this method for CSS. /// /// @@ -102,7 +102,7 @@ namespace Umbraco.Web /// Use crop dimensions to have the output image sized according to the predefined crop sizes, this will override the width and height parameters /// /// - /// Add a serialised date of the last edit of the item to ensure client cache refresh when updated + /// Add a serialized date of the last edit of the item to ensure client cache refresh when updated /// /// /// These are any query string parameters (formatted as query strings) that ImageProcessor supports. For example: @@ -120,7 +120,7 @@ namespace Umbraco.Web /// /// /// - /// Whether to HTML encode this URL - default is true - w3c standards require html attributes to be html encoded but this can be + /// Whether to HTML encode this URL - default is true - w3c standards require HTML attributes to be HTML encoded but this can be /// set to false if using the result of this method for CSS. /// /// @@ -183,7 +183,7 @@ namespace Umbraco.Web /// Use crop dimensions to have the output image sized according to the predefined crop sizes, this will override the width and height parameters /// /// - /// Add a serialised date of the last edit of the item to ensure client cache refresh when updated + /// Add a serialized date of the last edit of the item to ensure client cache refresh when updated /// /// /// These are any query string parameters (formatted as query strings) that ImageProcessor supports. For example: @@ -201,7 +201,7 @@ namespace Umbraco.Web /// /// /// - /// Whether to HTML encode this URL - default is true - w3c standards require html attributes to be html encoded but this can be + /// Whether to HTML encode this URL - default is true - w3c standards require HTML attributes to be HTML encoded but this can be /// set to false if using the result of this method for CSS. /// /// diff --git a/src/Umbraco.Web/WebApi/Filters/DisableBrowserCacheAttribute.cs b/src/Umbraco.Web/WebApi/Filters/DisableBrowserCacheAttribute.cs index 99e08a4597..cfb7ddb6bc 100644 --- a/src/Umbraco.Web/WebApi/Filters/DisableBrowserCacheAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/DisableBrowserCacheAttribute.cs @@ -21,7 +21,7 @@ namespace Umbraco.Web.WebApi.Filters } //NOTE: Until we upgraded to WebApi 2, this didn't work correctly and we had to revert to using // HttpContext.Current responses. I've changed this back to what it should be now since it works - // and now with WebApi2, the HttpContext.Current responses dont! Anyways, all good now. + // and now with WebApi2, the HttpContext.Current responses don't! Anyways, all good now. actionExecutedContext.Response.Headers.CacheControl = new CacheControlHeaderValue() { NoCache = true, diff --git a/src/Umbraco.Web/WebApi/Filters/FileUploadCleanupFilterAttribute.cs b/src/Umbraco.Web/WebApi/Filters/FileUploadCleanupFilterAttribute.cs index 233ce39e52..6e6ec35b1b 100644 --- a/src/Umbraco.Web/WebApi/Filters/FileUploadCleanupFilterAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/FileUploadCleanupFilterAttribute.cs @@ -44,7 +44,7 @@ namespace Umbraco.Web.WebApi.Filters //cleanup any files associated foreach (var f in contentItem.UploadedFiles) { - //track all temp folders so we can remove old files afterwords + //track all temp folders so we can remove old files afterwards var dir = Path.GetDirectoryName(f.TempFilePath); if (tempFolders.Contains(dir) == false) { @@ -104,7 +104,7 @@ namespace Umbraco.Web.WebApi.Filters { if (f.TempFilePath.IsNullOrWhiteSpace() == false) { - //track all temp folders so we can remove old files afterwords + //track all temp folders so we can remove old files afterwards var dir = Path.GetDirectoryName(f.TempFilePath); if (tempFolders.Contains(dir) == false) { diff --git a/src/Umbraco.Web/WebApi/Filters/OverridableAuthorizationAttribute.cs b/src/Umbraco.Web/WebApi/Filters/OverridableAuthorizationAttribute.cs index d56411952d..522c3af8bb 100644 --- a/src/Umbraco.Web/WebApi/Filters/OverridableAuthorizationAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/OverridableAuthorizationAttribute.cs @@ -37,7 +37,7 @@ namespace Umbraco.Web.WebApi.Filters return; } - //if the controller is allowing overridable authorization at the action level and there are action level authorization attributes + //if the controller is allowing authorization to be overridden at the action level and there are action level authorization attributes // then exit and let the action level auth attribute(s) execute. if (actionContext.ActionDescriptor.ControllerDescriptor.GetCustomAttributes().Any() diff --git a/src/Umbraco.Web/WebApi/Filters/UmbracoApplicationAuthorizeAttribute.cs b/src/Umbraco.Web/WebApi/Filters/UmbracoApplicationAuthorizeAttribute.cs index bbb91efd64..37a8f8a4b4 100644 --- a/src/Umbraco.Web/WebApi/Filters/UmbracoApplicationAuthorizeAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/UmbracoApplicationAuthorizeAttribute.cs @@ -18,7 +18,7 @@ namespace Umbraco.Web.WebApi.Filters private readonly string[] _appNames; /// - /// Constructor to set any number of applications that the user needs access to to be authorized + /// Constructor to set any number of applications that the user needs access to be authorized /// /// /// If the user has access to any of the specified apps, they will be authorized. diff --git a/src/Umbraco.Web/WebApi/HttpActionContextExtensions.cs b/src/Umbraco.Web/WebApi/HttpActionContextExtensions.cs index 6390ead73e..c67ec2f6a7 100644 --- a/src/Umbraco.Web/WebApi/HttpActionContextExtensions.cs +++ b/src/Umbraco.Web/WebApi/HttpActionContextExtensions.cs @@ -74,7 +74,7 @@ namespace Umbraco.Web.WebApi // But it deadlocks. See https://stackoverflow.com/questions/15201255 for details, which // points to https://msdn.microsoft.com/en-us/magazine/jj991977.aspx which contains more // details under "Async All the Way" - see also https://olitee.com/2015/01/c-async-await-common-deadlock-scenario/ - // which contains a simplified explaination: ReadAsMultipartAsync is meant to be awaited, + // which contains a simplified explanation: ReadAsMultipartAsync is meant to be awaited, // not used in the non-async .Result way, and there is nothing we can do about it. // // Alas, model binders cannot be async "all the way", so we have to wrap in a task, to diff --git a/src/Umbraco.Web/WebApi/HttpRequestMessageExtensions.cs b/src/Umbraco.Web/WebApi/HttpRequestMessageExtensions.cs index 5bd429b598..96c9c0e9a0 100644 --- a/src/Umbraco.Web/WebApi/HttpRequestMessageExtensions.cs +++ b/src/Umbraco.Web/WebApi/HttpRequestMessageExtensions.cs @@ -62,7 +62,7 @@ namespace Umbraco.Web.WebApi } /// - /// Create a 403 (Forbidden) response indicating that hte current user doesn't have access to the resource + /// Create a 403 (Forbidden) response indicating that the current user doesn't have access to the resource /// requested or the action it needs to take. /// /// @@ -131,7 +131,7 @@ namespace Umbraco.Web.WebApi } /// - /// Creates a succressful response with notifications in the result to be displayed in the UI + /// Creates a successful response with notifications in the result to be displayed in the UI /// /// /// diff --git a/src/Umbraco.Web/WebApi/SessionHttpControllerRouteHandler.cs b/src/Umbraco.Web/WebApi/SessionHttpControllerRouteHandler.cs index 5dd641b25c..fac3a633a4 100644 --- a/src/Umbraco.Web/WebApi/SessionHttpControllerRouteHandler.cs +++ b/src/Umbraco.Web/WebApi/SessionHttpControllerRouteHandler.cs @@ -10,7 +10,7 @@ namespace Umbraco.Web.WebApi ///
/// /// WebApi controllers (and REST in general) shouldn't have session state enabled since it's stateless, - /// enabling session state puts additional locks on requests so only use this when absolutley needed + /// enabling session state puts additional locks on requests so only use this when absolutely needed /// internal class SessionHttpControllerRouteHandler : HttpControllerRouteHandler { diff --git a/src/Umbraco.Web/_Legacy/Controls/TabPage.cs b/src/Umbraco.Web/_Legacy/Controls/TabPage.cs index 4a5be34d7c..5be5bf1147 100644 --- a/src/Umbraco.Web/_Legacy/Controls/TabPage.cs +++ b/src/Umbraco.Web/_Legacy/Controls/TabPage.cs @@ -14,7 +14,7 @@ namespace Umbraco.Web._Legacy.Controls public class TabPage : WebControl { - // Ensure that a TabPage cannot be instatiated outside + // Ensure that a TabPage cannot be instantiated outside // this assembly -> New instances of a tabpage can only be retrieved through the tabview private bool _hasMenu = true; protected LiteralControl ErrorHeaderControl = new LiteralControl(); diff --git a/src/Umbraco.Web/_Legacy/PackageActions/publishRootDocument.cs b/src/Umbraco.Web/_Legacy/PackageActions/publishRootDocument.cs index f276afeca9..94e1b6e923 100644 --- a/src/Umbraco.Web/_Legacy/PackageActions/publishRootDocument.cs +++ b/src/Umbraco.Web/_Legacy/PackageActions/publishRootDocument.cs @@ -23,7 +23,7 @@ namespace Umbraco.Web._Legacy.PackageActions /// /// /// - /// true if executed successfully + /// True if executed succesfully public bool Execute(string packageName, XElement xmlData) { diff --git a/src/Umbraco.Web/_Legacy/UI/LegacyDialogHandler.cs b/src/Umbraco.Web/_Legacy/UI/LegacyDialogHandler.cs index cfa93dc0f6..5390d3d30a 100644 --- a/src/Umbraco.Web/_Legacy/UI/LegacyDialogHandler.cs +++ b/src/Umbraco.Web/_Legacy/UI/LegacyDialogHandler.cs @@ -197,7 +197,7 @@ namespace Umbraco.Web._Legacy.UI ITaskReturnUrl returnUrlTask = typeInstance as LegacyDialogTask; if (returnUrlTask != null) { - // if castable to LegacyDialogTask: add in additionalValues + // if it is possible to cast to LegacyDialogTask: add in additionalValues ((LegacyDialogTask) returnUrlTask).AdditionalValues = additionalValues; } else diff --git a/src/Umbraco.Web/umbraco.presentation/default.aspx.cs b/src/Umbraco.Web/umbraco.presentation/default.aspx.cs index 56d596e24d..1c2fdcb72b 100644 --- a/src/Umbraco.Web/umbraco.presentation/default.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/default.aspx.cs @@ -60,7 +60,7 @@ namespace umbraco }; FireBeforeRequestInit(args); - //if we are cancelling then return and don't proceed + //if we are canceling then return and don't proceed if (args.Cancel) return; // reset the friendly path so it's used by forms, etc. diff --git a/src/Umbraco.Web/umbraco.presentation/item.cs b/src/Umbraco.Web/umbraco.presentation/item.cs index 74cfb9bf25..bbbc67bb26 100644 --- a/src/Umbraco.Web/umbraco.presentation/item.cs +++ b/src/Umbraco.Web/umbraco.presentation/item.cs @@ -88,7 +88,7 @@ namespace umbraco } else { - //get the vaue the legacy way (this will not parse locallinks, etc... since that is handled with ipublishedcontent) + //get the value the legacy way (this will not parse locallinks, etc... since that is handled with ipublishedcontent) var elt = elements[_fieldName]; if (elt != null && string.IsNullOrEmpty(elt.ToString()) == false) _fieldContent = elt.ToString().Trim(); @@ -108,7 +108,7 @@ namespace umbraco } else { - //get the vaue the legacy way (this will not parse locallinks, etc... since that is handled with ipublishedcontent) + //get the value the legacy way (this will not parse locallinks, etc... since that is handled with ipublishedcontent) var elt = elements[altFieldName]; if (elt != null && string.IsNullOrEmpty(elt.ToString()) == false) _fieldContent = elt.ToString().Trim(); @@ -135,7 +135,7 @@ namespace umbraco /// private string GetRecursiveValueLegacy(IDictionary elements) { - using (Current.ProfilingLogger.DebugDuration("Checking recusively")) + using (Current.ProfilingLogger.DebugDuration("Checking recursively")) { var content = ""; diff --git a/src/Umbraco.Web/umbraco.presentation/page.cs b/src/Umbraco.Web/umbraco.presentation/page.cs index 0c9b0c6ff3..3b879c5b02 100644 --- a/src/Umbraco.Web/umbraco.presentation/page.cs +++ b/src/Umbraco.Web/umbraco.presentation/page.cs @@ -51,7 +51,7 @@ namespace umbraco /// /// The difference between creating the page with PublishedContentRequest vs an IPublishedContent item is /// that the PublishedContentRequest takes into account how a template is assigned during the routing process whereas - /// with an IPublishedContent item, the template id is asssigned purely based on the default. + /// with an IPublishedContent item, the template id is assigned purely based on the default. /// internal page(PublishedRequest frequest) { diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/FeedProxy.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/FeedProxy.aspx.cs index 58d219e0c6..0997d2675e 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/FeedProxy.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/FeedProxy.aspx.cs @@ -53,7 +53,7 @@ namespace dashboardUtilities } else { - Current.Logger.Debug("Access to unallowed feedproxy attempted: {RequestUrl}", requestUri); + Current.Logger.Debug("Access to unallowed feed proxy attempted: {RequestUrl}", requestUri); } } catch (Exception ex) diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/masterpages/umbracoPage.Master.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/masterpages/umbracoPage.Master.cs index 584ad4ca7f..b47f48804e 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/masterpages/umbracoPage.Master.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/masterpages/umbracoPage.Master.cs @@ -6,7 +6,7 @@ using System.Web.Mvc; using System.Web.UI; using System.Web.UI.WebControls; -//This is only in case an upgrade goes wrong and the the /masterpages/ files are not copied over +//This is only in case an upgrade goes wrong and the /masterpages/ files are not copied over //which would result in an error. so we have kept the old namespaces intact with references to new ones using StackExchange.Profiling; using Umbraco.Core.Configuration; diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/DisableEventValidation.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/DisableEventValidation.cs index 1672053023..f3552cdb4d 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/DisableEventValidation.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/DisableEventValidation.cs @@ -8,7 +8,7 @@ using System.ComponentModel; namespace umbraco.presentation.templateControls { /// - /// This control disables request validation (equalevant of setting validateRequest to false in page directive) + /// This control disables request validation (equivalent of setting validateRequest to false in page directive) /// [ToolboxData("<{0}:DisableRequestValidation runat=\"server\">")] [Designer("umbraco.presentation.templateControls.ItemDesigner, Umbraco.Web")] diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/Item.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/Item.cs index 8473341ca8..f6f2510818 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/Item.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/Item.cs @@ -145,7 +145,7 @@ namespace umbraco.presentation.templateControls #endregion - #region Overriden Control Methods + #region Overridden Control Methods /// /// Raises the event. diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/ItemRenderer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/ItemRenderer.cs index 67e82b3822..0b91be5faf 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/ItemRenderer.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/ItemRenderer.cs @@ -134,7 +134,7 @@ namespace umbraco.presentation.templateControls } /// - /// Inits the specified item. To be called from the OnInit method of Item. + /// Initializes the specified item. To be called from the OnInit method of Item. /// /// The item. public virtual void Init(Item item) diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/Macro.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/Macro.cs index 0d54ce2a02..a6aa51752e 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/Macro.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/Macro.cs @@ -159,7 +159,7 @@ namespace umbraco.presentation.templateControls if (int.TryParse(Attributes["Cache"], out cacheDuration)) tempMacro.CacheDuration = cacheDuration; else - Context.Trace.Warn("Template", "Cache attribute is in incorect format (should be an integer)."); + Context.Trace.Warn("Template", "Cache attribute is in incorrect format (should be an integer)."); } var renderer = new MacroRenderer(Current.ProfilingLogger); From 8d2c1332d3ba41f47c036ef8948afce9a0b43225 Mon Sep 17 00:00:00 2001 From: Chris Houston Date: Sat, 26 Jan 2019 10:56:30 -0500 Subject: [PATCH 291/437] Fixed a few typos I spotted in the last commit :) (#4215) --- src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs b/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs index 7b292307cc..6c266ced2a 100644 --- a/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs +++ b/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs @@ -5,11 +5,11 @@ using Umbraco.Core.Models; namespace Umbraco.Core.Deploy { /// - /// Defines methods that can convert a data type configurations to / from an environment-agnostic string. + /// Defines methods that can convert data type configuration to / from an environment-agnostic string. /// - /// Configurations may contain values such as content identifiers, that would be local + /// Configuration may contain values such as content identifiers, that would be local /// to one environment, and need to be converted in order to be deployed. - [SuppressMessage("ReSharper", "UnusedMember.Global", Justification = "This is actual only used by Deploy, but we dont want third parties to have references on deploy, thats why this interface is part of core.")] + [SuppressMessage("ReSharper", "UnusedMember.Global", Justification = "This is actual only used by Deploy, but we don't want third parties to have references on deploy, that's why this interface is part of core.")] public interface IDataTypeConfigurationConnector { /// From 32f228fa7c7e8b062b35db1c7f5dfd41c69e03f5 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Thu, 24 Jan 2019 11:48:39 +0100 Subject: [PATCH 292/437] Use the media file name as display name in the file link --- .../components/media/umbmedianodeinfo.directive.js | 9 ++++++++- .../src/views/components/media/umb-media-node-info.html | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/media/umbmedianodeinfo.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/media/umbmedianodeinfo.directive.js index ce816261d0..577ffe0176 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/media/umbmedianodeinfo.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/media/umbmedianodeinfo.directive.js @@ -40,6 +40,13 @@ function setMediaLink(){ scope.nodeUrl = scope.node.mediaLink; + // grab the file name from the URL and use it as the display name in the file link + var match = /.*\/(.*)/.exec(scope.nodeUrl); + if (match) { + scope.nodeFileName = match[1]; + } else { + scope.nodeFileName = scope.nodeUrl; + } } scope.openMediaType = function (mediaType) { @@ -92,4 +99,4 @@ angular.module('umbraco.directives').directive('umbMediaNodeInfo', MediaNodeInfoDirective); -})(); \ No newline at end of file +})(); diff --git a/src/Umbraco.Web.UI.Client/src/views/components/media/umb-media-node-info.html b/src/Umbraco.Web.UI.Client/src/views/components/media/umb-media-node-info.html index 4004c2b958..f411437b1d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/media/umb-media-node-info.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/media/umb-media-node-info.html @@ -14,7 +14,7 @@
  • - {{nodeUrl}} + {{nodeFileName}}
  • From 52a56c8852f0053fe293f5107902158302d30f30 Mon Sep 17 00:00:00 2001 From: Ronald Barendse Date: Thu, 24 Jan 2019 00:24:37 +0100 Subject: [PATCH 293/437] Only add TLS 1.2 if explicit protocols are defined --- src/Umbraco.Web/WebBootManager.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web/WebBootManager.cs b/src/Umbraco.Web/WebBootManager.cs index faf1418b42..950676355e 100644 --- a/src/Umbraco.Web/WebBootManager.cs +++ b/src/Umbraco.Web/WebBootManager.cs @@ -131,9 +131,9 @@ namespace Umbraco.Web InstallHelper insHelper = new InstallHelper(UmbracoContext.Current); insHelper.DeleteLegacyInstaller(); - // Tell .net 4.5 that we also want to try connecting over TLS 1.2, not just 1.1 - if (ServicePointManager.SecurityProtocol.HasFlag(SecurityProtocolType.Tls12) == false) - ServicePointManager.SecurityProtocol = ServicePointManager.SecurityProtocol | SecurityProtocolType.Tls12; + // Tell .NET 4.5 that we also want to try connecting over TLS 1.2, not just TLS 1.1 (but only if specific protocols are defined) + if (ServicePointManager.SecurityProtocol != 0) + ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12; return this; } From a2f0ad67ab904b52ea06ba14b5016bb96d39bb60 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Thu, 24 Jan 2019 22:52:45 +0100 Subject: [PATCH 294/437] Fix the flickering tooltip --- .../src/less/components/tooltip/umb-tooltip.less | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Umbraco.Web.UI.Client/src/less/components/tooltip/umb-tooltip.less b/src/Umbraco.Web.UI.Client/src/less/components/tooltip/umb-tooltip.less index 6528c2120e..77eba94b6d 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/tooltip/umb-tooltip.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/tooltip/umb-tooltip.less @@ -10,4 +10,5 @@ animation-timing-function: ease-in; animation: fadeIn; margin-top: 15px; + pointer-events: none; } From 0194ccdad78a23fbca989f632128c0e5c977a33e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Thu, 24 Jan 2019 11:58:08 +0100 Subject: [PATCH 295/437] corrected on-edit method for MultiUrlPicker, Fixes #4171 --- .../views/propertyeditors/multiurlpicker/multiurlpicker.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ca79c7faa0..0d1c736438 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 @@ -13,7 +13,7 @@ allow-remove="true" allow-edit="true" on-remove="remove($index)" - on-edit="openContentEditor(link, $index)"> + on-edit="openLinkPicker(link, $index)"> From a4c5b7118df15b0017bdc288d0f9e68ecaff1d0a Mon Sep 17 00:00:00 2001 From: Nathan Woulfe Date: Sat, 26 Jan 2019 20:50:19 +1000 Subject: [PATCH 296/437] check for editorstate.current before attempting to access properties object --- .../src/views/propertyeditors/rte/rte.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.controller.js index 212db4fc31..2b81521ca9 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.controller.js @@ -278,7 +278,7 @@ angular.module("umbraco") $scope.linkPickerOverlay = { view: "linkpicker", currentTarget: currentTarget, - anchors: tinyMceService.getAnchorNames(JSON.stringify(editorState.current.properties)), + anchors: editorState.current ? tinyMceService.getAnchorNames(JSON.stringify(editorState.current.properties)) : [], show: true, submit: function(model) { tinyMceService.insertLinkInEditor(editor, model.target, anchorElement); From 35a6d721eeb40d0c250532525e6793ff312db381 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Sat, 26 Jan 2019 13:03:21 +0100 Subject: [PATCH 297/437] Make sure to inform the content editor of an app change when split view is opened --- .../components/content/umbvariantcontenteditors.directive.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontenteditors.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontenteditors.directive.js index 99d6b939e0..af07925021 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontenteditors.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontenteditors.directive.js @@ -232,6 +232,10 @@ var app = editor.content.apps[i]; if (app.alias === "umbContent") { app.active = true; + // tell the world that the app has changed (but do it only once) + if (e === 0) { + selectApp(app); + } } else { app.active = false; From 9f2477ad75b1a637ae5752650c8044031eccd36a Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Thu, 24 Jan 2019 23:14:55 +0100 Subject: [PATCH 298/437] Remove the hover underline from grid items --- .../src/less/components/umb-content-grid.less | 2 +- .../src/views/components/umb-content-grid.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-content-grid.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-content-grid.less index 63a0856c84..399a367dc5 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-content-grid.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-content-grid.less @@ -53,7 +53,7 @@ display: inline-flex; } -.umb-content-grid__item-name:hover { +.umb-content-grid__item-name:hover span { text-decoration: underline; } diff --git a/src/Umbraco.Web.UI.Client/src/views/components/umb-content-grid.html b/src/Umbraco.Web.UI.Client/src/views/components/umb-content-grid.html index 760597fcab..490c94a79d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/umb-content-grid.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/umb-content-grid.html @@ -12,7 +12,7 @@
    - {{ item.name }} + {{ item.name }}
      From 54bb3384b232df89e91bfba61603699935890f7b Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Thu, 24 Jan 2019 13:19:41 +0100 Subject: [PATCH 299/437] Add "time" and "bigint" to value types --- .../src/views/prevalueeditors/valuetype.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/valuetype.html b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/valuetype.html index 4146ba0763..739ef11226 100644 --- a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/valuetype.html +++ b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/valuetype.html @@ -2,6 +2,8 @@ + + From 57fb9888a2c6d13358699dd854d73832d3c1ebe8 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Wed, 23 Jan 2019 22:56:00 +0100 Subject: [PATCH 300/437] Add localization to Flatpickr --- .../gulp/tasks/dependencies.js | 3 ++- .../components/umbflatpickr.directive.js | 25 +++++++++++++------ .../resources/javascriptlibrary.resource.js | 12 ++++----- .../src/common/services/assets.service.js | 25 ++++++++++++------- .../Editors/BackOfficeAssetsController.cs | 19 +++++++++++--- .../Editors/BackOfficeServerVariables.cs | 2 +- src/Umbraco.Web/UI/JavaScript/JsInitialize.js | 1 + 7 files changed, 58 insertions(+), 29 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/gulp/tasks/dependencies.js b/src/Umbraco.Web.UI.Client/gulp/tasks/dependencies.js index e9ada635e5..819c804a4f 100644 --- a/src/Umbraco.Web.UI.Client/gulp/tasks/dependencies.js +++ b/src/Umbraco.Web.UI.Client/gulp/tasks/dependencies.js @@ -141,7 +141,8 @@ gulp.task('dependencies', function () { "name": "flatpickr", "src": [ "./node_modules/flatpickr/dist/flatpickr.js", - "./node_modules/flatpickr/dist/flatpickr.css" + "./node_modules/flatpickr/dist/flatpickr.css", + "./node_modules/flatpickr/dist/l10n/*.js" ], "base": "./node_modules/flatpickr/dist" }, diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbflatpickr.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbflatpickr.directive.js index 1f396ab6c2..79b29b407b 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbflatpickr.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbflatpickr.directive.js @@ -92,20 +92,25 @@ Use this directive to render a date time picker } }; - function umbFlatpickrCtrl($element, $timeout, $scope, assetsService) { + function umbFlatpickrCtrl($element, $timeout, $scope, assetsService, userService) { var ctrl = this; var loaded = false; + var userLocale = null; ctrl.$onInit = function() { // load css file for the date picker - assetsService.loadCss('lib/flatpickr/flatpickr.css', $scope); + assetsService.loadCss('lib/flatpickr/flatpickr.css', $scope).then(function () { + userService.getCurrentUser().then(function (user) { + // init date picker + userLocale = user.locale; + if (userLocale.indexOf('-') > -1) { + userLocale = userLocale.split('-')[0]; + } + loaded = true; + grabElementAndRunFlatpickr(); - // load the js file for the date picker - assetsService.loadJs('lib/flatpickr/flatpickr.js', $scope).then(function () { - // init date picker - loaded = true; - grabElementAndRunFlatpickr(); + }); }); }; @@ -128,6 +133,10 @@ Use this directive to render a date time picker setUpCallbacks(); + if (!ctrl.options.locale) { + ctrl.options.locale = userLocale; + } + var fpInstance = new fpLib(element, ctrl.options); if (ctrl.onSetup) { @@ -228,4 +237,4 @@ Use this directive to render a date time picker angular.module('umbraco.directives').component('umbFlatpickr', umbFlatpickr); -})(); \ No newline at end of file +})(); diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/javascriptlibrary.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/javascriptlibrary.resource.js index fbd54433d7..15460a3356 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/javascriptlibrary.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/javascriptlibrary.resource.js @@ -8,17 +8,17 @@ **/ function javascriptLibraryResource($q, $http, umbRequestHelper) { - var existingLocales = []; + var existingLocales = null; - function getSupportedLocalesForMoment() { + function getSupportedLocales() { var deferred = $q.defer(); - if (existingLocales.length === 0) { + if (existingLocales === null) { umbRequestHelper.resourcePromise( $http.get( umbRequestHelper.getApiUrl( "backOfficeAssetsApiBaseUrl", - "GetSupportedMomentLocales")), + "GetSupportedLocales")), "Failed to get cultures").then(function(locales) { existingLocales = locales; deferred.resolve(existingLocales); @@ -29,9 +29,9 @@ return deferred.promise; } - + var service = { - getSupportedLocalesForMoment: getSupportedLocalesForMoment + getSupportedLocales: getSupportedLocales }; return service; diff --git a/src/Umbraco.Web.UI.Client/src/common/services/assets.service.js b/src/Umbraco.Web.UI.Client/src/common/services/assets.service.js index 27e055a7d3..81e439a9bb 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/assets.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/assets.service.js @@ -66,20 +66,26 @@ angular.module('umbraco.services') } function getMomentLocales(locales, supportedLocales) { + return getLocales(locales, supportedLocales, 'lib/moment/'); + } + function getFlatpickrLocales(locales, supportedLocales) { + return getLocales(locales, supportedLocales, 'lib/flatpickr/l10n/'); + } + + function getLocales(locales, supportedLocales, path) { var localeUrls = []; var locales = locales.split(','); for (var i = 0; i < locales.length; i++) { var locale = locales[i].toString().toLowerCase(); if (locale !== 'en-us') { - if (supportedLocales.indexOf(locale + '.js') > -1) { - localeUrls.push('lib/moment/' + locale + '.js'); + localeUrls.push(path + locale + '.js'); } if (locale.indexOf('-') > -1) { var majorLocale = locale.split('-')[0] + '.js'; if (supportedLocales.indexOf(majorLocale) > -1) { - localeUrls.push('lib/moment/' + majorLocale); + localeUrls.push(path + majorLocale); } } } @@ -89,12 +95,13 @@ angular.module('umbraco.services') } /** - * Loads specific Moment.js Locales. + * Loads specific Moment.js and Flatpickr Locales. * @param {any} locales * @param {any} supportedLocales */ function loadLocales(locales, supportedLocales) { - var localeUrls = getMomentLocales(locales, supportedLocales); + var localeUrls = getMomentLocales(locales, supportedLocales.moment); + localeUrls = localeUrls.concat(getFlatpickrLocales(locales, supportedLocales.flatpickr)); if (localeUrls.length >= 1) { return service.load(localeUrls, $rootScope); } @@ -104,12 +111,12 @@ angular.module('umbraco.services') } /** - * Loads in moment.js requirements during the _loadInitAssets call + * Loads in locale requirements during the _loadInitAssets call */ - function loadMomentLocaleForCurrentUser() { + function loadLocaleForCurrentUser() { userService.getCurrentUser().then(function (currentUser) { - return javascriptLibraryResource.getSupportedLocalesForMoment().then(function (supportedLocales) { + return javascriptLibraryResource.getSupportedLocales().then(function (supportedLocales) { return loadLocales(currentUser.locale, supportedLocales); }); }); @@ -141,7 +148,7 @@ angular.module('umbraco.services') var self = this; return self.loadJs(umbRequestHelper.getApiUrl("serverVarsJs", "", ""), $rootScope).then(function () { initAssetsLoaded = true; - return loadMomentLocaleForCurrentUser(); + return loadLocaleForCurrentUser(); }); } else { diff --git a/src/Umbraco.Web/Editors/BackOfficeAssetsController.cs b/src/Umbraco.Web/Editors/BackOfficeAssetsController.cs index cb23e88c9b..71aeb73d15 100644 --- a/src/Umbraco.Web/Editors/BackOfficeAssetsController.cs +++ b/src/Umbraco.Web/Editors/BackOfficeAssetsController.cs @@ -11,16 +11,27 @@ namespace Umbraco.Web.Editors public class BackOfficeAssetsController : UmbracoAuthorizedJsonController { private readonly IFileSystem _jsLibFileSystem = new PhysicalFileSystem(SystemDirectories.Umbraco + IOHelper.DirSepChar + "lib"); - + [HttpGet] - public IEnumerable GetSupportedMomentLocales() + public object GetSupportedLocales() { const string momentLocaleFolder = "moment"; - var cultures = _jsLibFileSystem.GetFiles(momentLocaleFolder, "*.js").ToList(); + const string flatpickrLocaleFolder = "flatpickr/l10n"; + + return new + { + moment = GetLocales(momentLocaleFolder), + flatpickr = GetLocales(flatpickrLocaleFolder) + }; + } + + private IEnumerable GetLocales(string path) + { + var cultures = _jsLibFileSystem.GetFiles(path, "*.js").ToList(); for (var i = 0; i < cultures.Count; i++) { cultures[i] = cultures[i] - .Substring(cultures[i].IndexOf(momentLocaleFolder, StringComparison.Ordinal) + momentLocaleFolder.Length + 1); + .Substring(cultures[i].IndexOf(path, StringComparison.Ordinal) + path.Length + 1); } return cultures; } diff --git a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs index 1d4113bb7d..66289a3c7c 100644 --- a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs +++ b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs @@ -302,7 +302,7 @@ namespace Umbraco.Web.Editors }, { "backOfficeAssetsApiBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl( - controller => controller.GetSupportedMomentLocales()) + controller => controller.GetSupportedLocales()) }, { "languageApiBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl( diff --git a/src/Umbraco.Web/UI/JavaScript/JsInitialize.js b/src/Umbraco.Web/UI/JavaScript/JsInitialize.js index 62d294ee6f..1ef6e74dfe 100644 --- a/src/Umbraco.Web/UI/JavaScript/JsInitialize.js +++ b/src/Umbraco.Web/UI/JavaScript/JsInitialize.js @@ -7,6 +7,7 @@ 'lib/underscore/underscore-min.js', 'lib/moment/moment.min.js', + 'lib/flatpickr/flatpickr.js', 'lib/animejs/anime.min.js', From b709ed4aa3d1b1aec21df204438f56b79bd7e6f3 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Wed, 23 Jan 2019 12:13:55 +0100 Subject: [PATCH 301/437] Don't attempt to resolve URLs for element types --- src/Umbraco.Web/Models/Mapping/ContentUrlResolver.cs | 5 +++++ src/Umbraco.Web/Routing/UrlProvider.cs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Models/Mapping/ContentUrlResolver.cs b/src/Umbraco.Web/Models/Mapping/ContentUrlResolver.cs index dd235bda75..f09638330b 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentUrlResolver.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentUrlResolver.cs @@ -35,6 +35,11 @@ namespace Umbraco.Web.Models.Mapping public UrlInfo[] Resolve(IContent source, ContentItemDisplay destination, UrlInfo[] destMember, ResolutionContext context) { + if (source.ContentType.IsElement) + { + return new UrlInfo[0]; + } + var umbracoContext = _umbracoContextAccessor.UmbracoContext; var urls = umbracoContext == null diff --git a/src/Umbraco.Web/Routing/UrlProvider.cs b/src/Umbraco.Web/Routing/UrlProvider.cs index 7ed530093c..4dd4820d26 100644 --- a/src/Umbraco.Web/Routing/UrlProvider.cs +++ b/src/Umbraco.Web/Routing/UrlProvider.cs @@ -185,7 +185,7 @@ namespace Umbraco.Web.Routing /// public string GetUrl(IPublishedContent content, UrlProviderMode mode, string culture = null, Uri current = null) { - if (content == null) + if (content == null || content.ItemType == PublishedItemType.Element) return "#"; // this the ONLY place where we deal with default culture - IUrlProvider always receive a culture From 19554095821038ffd45650d61042cfef25356894 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Wed, 23 Jan 2019 07:45:39 +0100 Subject: [PATCH 302/437] Don't allow creation of element types in the content tree --- src/Umbraco.Web/Editors/ContentTypeController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Editors/ContentTypeController.cs b/src/Umbraco.Web/Editors/ContentTypeController.cs index b59e17d9e1..d5a72a7378 100644 --- a/src/Umbraco.Web/Editors/ContentTypeController.cs +++ b/src/Umbraco.Web/Editors/ContentTypeController.cs @@ -413,7 +413,7 @@ namespace Umbraco.Web.Editors types = Services.ContentTypeService.GetAll(ids).ToList(); } - var basics = types.Select(Mapper.Map).ToList(); + var basics = types.Where(type => type.IsElement == false).Select(Mapper.Map).ToList(); var localizedTextService = Services.TextService; foreach (var basic in basics) From ae25e4564ea320faa37ccabc0f7835447540a363 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Sun, 27 Jan 2019 10:26:20 +0100 Subject: [PATCH 303/437] Fix the tests --- .../Web/HealthChecks/HealthCheckResultsTests.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Tests/Web/HealthChecks/HealthCheckResultsTests.cs b/src/Umbraco.Tests/Web/HealthChecks/HealthCheckResultsTests.cs index 9247cb92a0..39a9ca6211 100644 --- a/src/Umbraco.Tests/Web/HealthChecks/HealthCheckResultsTests.cs +++ b/src/Umbraco.Tests/Web/HealthChecks/HealthCheckResultsTests.cs @@ -84,8 +84,8 @@ namespace Umbraco.Tests.Web.HealthChecks Assert.IsTrue(results.AllChecksSuccessful); var resultAsMarkdown = results.ResultsAsMarkDown(HealthCheckNotificationVerbosity.Summary); - Assert.IsTrue(resultAsMarkdown.IndexOf("Checks for 'Stub check 1' all completed succesfully.") > -1); - Assert.IsTrue(resultAsMarkdown.IndexOf("Checks for 'Stub check 2' all completed succesfully.") > -1); + Assert.IsTrue(resultAsMarkdown.IndexOf("Checks for 'Stub check 1' all completed successfully.") > -1); + Assert.IsTrue(resultAsMarkdown.IndexOf("Checks for 'Stub check 2' all completed successfully.") > -1); } [Test] @@ -101,7 +101,7 @@ namespace Umbraco.Tests.Web.HealthChecks Assert.IsFalse(results.AllChecksSuccessful); var resultAsMarkdown = results.ResultsAsMarkDown(HealthCheckNotificationVerbosity.Summary); - Assert.IsTrue(resultAsMarkdown.IndexOf("Checks for 'Stub check 1' all completed succesfully.") > -1); + Assert.IsTrue(resultAsMarkdown.IndexOf("Checks for 'Stub check 1' all completed successfully.") > -1); Assert.IsTrue(resultAsMarkdown.IndexOf("Checks for 'Stub check 2' completed with errors.") > -1); } @@ -119,7 +119,7 @@ namespace Umbraco.Tests.Web.HealthChecks Assert.IsFalse(results.AllChecksSuccessful); var resultAsMarkdown = results.ResultsAsMarkDown(HealthCheckNotificationVerbosity.Summary); - Assert.IsTrue(resultAsMarkdown.IndexOf("Checks for 'Stub check 1' all completed succesfully.") > -1); + Assert.IsTrue(resultAsMarkdown.IndexOf("Checks for 'Stub check 1' all completed successfully.") > -1); Assert.IsTrue(resultAsMarkdown.IndexOf("Checks for 'Stub check 2' completed with errors.") > -1); Assert.IsTrue(resultAsMarkdown.IndexOf("Checks for 'Stub check 3' completed with errors.") > -1); } From df20feb70395a31addc6bb3e31493d2cf29e427b Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Tue, 8 Jan 2019 10:31:44 +0100 Subject: [PATCH 304/437] Make cache properties on PublishedContentRequest public --- src/Umbraco.Web/Routing/PublishedContentRequest.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web/Routing/PublishedContentRequest.cs b/src/Umbraco.Web/Routing/PublishedContentRequest.cs index 3598d5ff8d..ef55b51767 100644 --- a/src/Umbraco.Web/Routing/PublishedContentRequest.cs +++ b/src/Umbraco.Web/Routing/PublishedContentRequest.cs @@ -613,13 +613,13 @@ namespace Umbraco.Web.Routing // Note: we used to set a default value here but that would then be the default // for ALL requests, we shouldn't overwrite it though if people are using [OutputCache] for example // see: https://our.umbraco.com/forum/using-umbraco-and-getting-started/79715-output-cache-in-umbraco-752 - internal HttpCacheability Cacheability { get; set; } + public HttpCacheability Cacheability { get; set; } /// /// Gets or sets a list of Extensions to append to the Response.Cache object /// private List _cacheExtensions = new List(); - internal List CacheExtensions + public List CacheExtensions { get { return _cacheExtensions; } set { _cacheExtensions = value; } @@ -629,7 +629,7 @@ namespace Umbraco.Web.Routing /// Gets or sets a dictionary of Headers to append to the Response object ///
    private Dictionary _headers = new Dictionary(); - internal Dictionary Headers + public Dictionary Headers { get { return _headers; } set { _headers = value; } @@ -640,4 +640,4 @@ namespace Umbraco.Web.Routing ///
    public bool IgnorePublishedContentCollisions { get; set; } } -} \ No newline at end of file +} From d31e25281d4d5f3ec0e8ba859096c9d3aa13f016 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Sat, 26 Jan 2019 19:01:30 +0100 Subject: [PATCH 305/437] Fix infinite loop when saving multiple variants using list view --- .../common/directives/components/content/edit.controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js index 60d44abfa5..79701414f7 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js @@ -305,8 +305,8 @@ var fieldControl = item.control; var fieldErrorKeys = item.errorKeys; - for (var i = 0; i < fieldErrorKeys.length; i++) { - fieldControl.$setValidity(fieldErrorKeys[i], false); + for (var j = 0; j < fieldErrorKeys.length; j++) { + fieldControl.$setValidity(fieldErrorKeys[j], false); } } } From 193e24afd256b2994a0900c0e9739f3f3466c036 Mon Sep 17 00:00:00 2001 From: Chris Houston Date: Sun, 27 Jan 2019 01:17:32 -0500 Subject: [PATCH 306/437] Fixing all the TODO, FIXME & HACK comments so they all follow the same layout. --- build/NuSpecs/UmbracoCms.nuspec | 2 +- build/build.ps1 | 4 +-- src/Umbraco.Core/Cache/CacheKeys.cs | 2 +- src/Umbraco.Core/Cache/HttpRequestAppCache.cs | 2 +- .../Components/RelateOnCopyComponent.cs | 2 +- src/Umbraco.Core/Composing/TypeFinder.cs | 2 +- src/Umbraco.Core/Composing/TypeHelper.cs | 2 +- .../Configuration/Grid/GridEditorsConfig.cs | 2 +- .../UmbracoSettings/TourConfigElement.cs | 4 +-- .../Configuration/UmbracoVersion.cs | 4 +-- src/Umbraco.Core/Constants-Applications.cs | 2 +- src/Umbraco.Core/EmailSender.cs | 2 +- .../Events/ImportPackageEventArgs.cs | 2 +- src/Umbraco.Core/IO/FileSystemExtensions.cs | 2 +- src/Umbraco.Core/IO/IOHelper.cs | 3 +- src/Umbraco.Core/IO/PhysicalFileSystem.cs | 2 +- src/Umbraco.Core/Media/Result.cs | 2 +- .../Migrations/Install/DatabaseDataCreator.cs | 2 +- .../Models/ContentScheduleCollection.cs | 6 ++-- .../Models/ContentTypeBaseExtensions.cs | 2 +- src/Umbraco.Core/Models/GridValue.cs | 2 +- src/Umbraco.Core/Models/Member.cs | 12 ++++---- src/Umbraco.Core/Models/MemberType.cs | 2 +- .../Membership/UmbracoMembershipMember.cs | 2 +- src/Umbraco.Core/Models/Membership/User.cs | 2 +- .../Models/Packaging/PreInstallWarnings.cs | 2 +- src/Umbraco.Core/Models/Property.cs | 4 +-- .../Models/PropertyGroupCollection.cs | 2 +- .../Models/PropertyTypeCollection.cs | 4 +-- src/Umbraco.Core/Models/UserExtensions.cs | 2 +- src/Umbraco.Core/ObjectExtensions.cs | 4 +-- .../Packaging/PackageDataInstallation.cs | 4 +-- .../Packaging/PackageFileInstallation.cs | 2 +- .../Packaging/PackagesRepository.cs | 2 +- src/Umbraco.Core/Persistence/Dtos/LogDto.cs | 4 +-- .../Persistence/Dtos/MemberTypeReadOnlyDto.cs | 4 +-- .../Persistence/EntityNotFoundException.cs | 2 +- .../Querying/ExpressionVisitorBase.cs | 4 +-- .../Querying/ModelToSqlExpressionVisitor.cs | 2 +- .../Implement/ContentTypeRepositoryBase.cs | 14 +++++----- .../Implement/DataTypeRepository.cs | 4 +-- .../Implement/DomainRepository.cs | 2 +- .../Implement/MemberRepository.cs | 2 +- .../Implement/RepositoryBaseOfTIdTEntity.cs | 2 +- .../Repositories/Implement/TagRepository.cs | 3 +- .../Implement/TemplateRepository.cs | 20 ++++++------- .../Implement/UserGroupRepository.cs | 4 +-- .../Repositories/Implement/UserRepository.cs | 8 +++--- .../SqlSyntax/SqlSyntaxProviderBase.cs | 2 +- .../Validators/DelimitedValueValidator.cs | 2 +- .../ValueConverters/JsonValueConverter.cs | 2 +- .../Runtime/CoreRuntimeComposer.cs | 2 +- src/Umbraco.Core/Scoping/ScopeContext.cs | 2 +- .../Security/BackOfficeUserStore.cs | 8 +++--- .../Security/MembershipProviderExtensions.cs | 2 +- ...erAwareMembershipProviderPasswordHasher.cs | 4 +-- .../Services/Implement/AuditService.cs | 4 +-- .../Services/Implement/ContentService.cs | 9 +++--- ...peServiceBaseOfTRepositoryTItemTService.cs | 10 +++---- .../Services/Implement/DataTypeService.cs | 6 ++-- .../Services/Implement/FileService.cs | 2 +- .../Implement/LocalizedTextService.cs | 6 ++-- .../LocalizedTextServiceFileSources.cs | 8 +++--- .../Services/Implement/MediaService.cs | 5 ++-- .../Services/Implement/MemberService.cs | 10 +++---- .../Services/Implement/NotificationService.cs | 2 +- .../Services/Implement/UserService.cs | 4 +-- .../Services/OperationResultType.cs | 2 +- .../Strings/IUrlSegmentProvider.cs | 2 +- src/Umbraco.Core/Sync/IServerAddress.cs | 2 +- src/Umbraco.Core/TypeExtensions.cs | 2 +- src/Umbraco.Core/UdiEntityType.cs | 2 +- .../Xml/UmbracoXPathPathSyntaxParser.cs | 4 +-- .../Xml/XPath/INavigableContent.cs | 2 +- src/Umbraco.Examine/ContentValueSetBuilder.cs | 2 +- src/Umbraco.Examine/ExamineExtensions.cs | 2 +- .../BulkInsertBenchmarks.cs | 2 +- .../Cache/DistributedCacheBinderTests.cs | 2 +- .../Clr/ReflectionUtilitiesTests.cs | 4 +-- .../Components/ComponentTests.cs | 4 +-- .../Composing/ContainerConformingTests.cs | 5 ++-- src/Umbraco.Tests/CoreThings/UdiTests.cs | 2 +- .../FrontEnd/UmbracoHelperTests.cs | 2 +- src/Umbraco.Tests/IO/FileSystemsTests.cs | 2 +- src/Umbraco.Tests/Logging/LogviewerTests.cs | 2 +- .../Manifest/ManifestParserTests.cs | 6 ++-- .../Membership/MembershipProviderBaseTests.cs | 3 +- src/Umbraco.Tests/Misc/UriUtilityTests.cs | 2 +- src/Umbraco.Tests/Models/LightEntityTest.cs | 2 +- .../Mapping/ContentTypeModelMappingTests.cs | 22 +++++++-------- .../Models/Mapping/UserModelMapperTests.cs | 2 +- .../CreatedPackagesRepositoryTests.cs | 4 +-- .../Packaging/PackageInstallationTest.cs | 2 +- .../Persistence/DatabaseContextTests.cs | 2 +- .../NPocoTests/NPocoBulkInsertTests.cs | 2 +- .../Persistence/NPocoTests/NPocoFetchTests.cs | 2 +- .../NPocoTests/PetaPocoCachesTest.cs | 2 +- .../Repositories/ContentTypeRepositoryTest.cs | 2 +- .../PublicAccessRepositoryTest.cs | 2 +- .../RedirectUrlRepositoryTests.cs | 4 +-- .../Repositories/TagRepositoryTest.cs | 2 +- .../Repositories/UserRepositoryTest.cs | 3 +- .../PublishedContentLanguageVariantTests.cs | 2 +- .../PublishedContentTestBase.cs | 2 +- .../Publishing/PublishingStrategyTests.cs | 2 +- .../Routing/ContentFinderByAliasTests.cs | 2 +- .../ContentFinderByPageIdQueryTests.cs | 6 ++-- .../Routing/ContentFinderByUrlTests.cs | 2 +- .../Routing/GetContentUrlsTests.cs | 10 +++---- .../Routing/RenderRouteHandlerTests.cs | 4 +-- src/Umbraco.Tests/Routing/RoutesCacheTests.cs | 2 +- .../Routing/UmbracoModuleTests.cs | 4 +-- .../Runtimes/CoreRuntimeTests.cs | 2 +- src/Umbraco.Tests/Runtimes/StandaloneTests.cs | 8 +++--- .../PassThroughEventDispatcherTests.cs | 2 +- .../Scoping/ScopedNuCacheTests.cs | 2 +- .../Scoping/ScopedRepositoryTests.cs | 2 +- src/Umbraco.Tests/Scoping/ScopedXmlTests.cs | 2 +- .../Security/BackOfficeCookieManagerTests.cs | 2 +- .../Services/ContentServiceTagsTests.cs | 10 +++---- .../Services/ContentServiceTests.cs | 18 ++++++------ .../Services/MemberServiceTests.cs | 2 +- .../Services/PerformanceTests.cs | 2 +- .../Services/SectionServiceTests.cs | 2 +- .../Strings/DefaultShortStringHelperTests.cs | 10 +++---- .../TestControllerActivatorBase.cs | 2 +- .../ControllerTesting/TestStartup.cs | 2 +- .../TestHelpers/SettingsForTests.cs | 2 +- src/Umbraco.Tests/TestHelpers/TestHelper.cs | 2 +- .../TestHelpers/TestObjects-Mocks.cs | 6 ++-- src/Umbraco.Tests/TestHelpers/TestObjects.cs | 6 ++-- .../TestHelpers/TestWithDatabaseBase.cs | 12 ++++---- .../Testing/UmbracoTestAttribute.cs | 3 +- src/Umbraco.Tests/Testing/UmbracoTestBase.cs | 4 +-- .../ExamineDemoDataContentService.cs | 2 +- .../ExamineDemoDataMediaService.cs | 2 +- .../Web/Controllers/ContentControllerTests.cs | 2 +- .../Web/TemplateUtilitiesTests.cs | 4 +-- .../lib/bootstrap/less/forms.less | 2 +- .../lib/umbraco/LegacySpeechBubble.js | 2 +- .../application/umblogin.directive.js | 6 ++-- .../components/buttons/umbbutton.directive.js | 2 +- .../umbvariantcontenteditors.directive.js | 6 ++-- .../editor/umbeditorcontainer.directive.js | 2 +- .../components/grid/grid.rte.directive.js | 6 ++-- .../imaging/umbimagegravity.directive.js | 2 +- .../overlays/umboverlaybackdrop.directive.js | 2 +- .../components/tree/umbtree.directive.js | 6 ++-- .../components/tree/umbtreeitem.directive.js | 2 +- .../components/umbgroupsbuilder.directive.js | 4 +-- .../upload/umbpropertyfileupload.directive.js | 2 +- .../users/changepassword.directive.js | 2 +- .../validation/valpropertymsg.directive.js | 4 +-- .../validation/valsubview.directive.js | 2 +- .../common/mocks/resources/dashboard.mocks.js | 2 +- .../src/common/resources/auth.resource.js | 2 +- .../src/common/services/appstate.service.js | 2 +- .../services/contenteditinghelper.service.js | 4 +-- .../src/common/services/formhelper.service.js | 2 +- .../src/common/services/iconhelper.service.js | 2 +- .../common/services/localization.service.js | 2 +- .../common/services/mediahelper.service.js | 2 +- .../services/mediatypehelper.service.js | 2 +- .../src/common/services/search.service.js | 2 +- .../src/common/services/tinymce.service.js | 4 +-- .../src/common/services/tour.service.js | 2 +- .../services/umbdataformatter.service.js | 2 +- .../services/umbrequesthelper.service.js | 6 ++-- .../src/controllers/navigation.controller.js | 12 ++++---- .../src/installer/installer.controller.js | 2 +- .../src/less/components/tree/umb-tree.less | 2 +- .../src/less/components/umb-grid.less | 2 +- src/Umbraco.Web.UI.Client/src/less/forms.less | 2 +- .../treepicker/treepicker.controller.js | 4 +-- .../apps/content/content.controller.js | 2 +- .../content/content.delete.controller.js | 2 +- .../content/overlays/publish.controller.js | 2 +- .../overlays/publishdescendants.controller.js | 2 +- .../content/overlays/schedule.controller.js | 2 +- .../contentblueprints/delete.controller.js | 2 +- .../content/redirecturls.controller.js | 9 +++--- .../settings/examinemanagement.controller.js | 6 ++-- .../src/views/datatypes/create.controller.js | 2 +- .../datatypes/datatype.delete.controller.js | 4 +-- .../views/documenttypes/delete.controller.js | 4 +-- .../views/media/media.delete.controller.js | 2 +- .../src/views/mediatypes/delete.controller.js | 4 +-- .../views/membergroups/delete.controller.js | 2 +- .../views/membertypes/create.controller.js | 2 +- .../views/membertypes/delete.controller.js | 2 +- .../partialviewmacros/delete.controller.js | 2 +- .../views/partialviews/delete.controller.js | 2 +- .../colorpicker/colorpicker.controller.js | 4 +-- .../listview/listview.controller.js | 2 +- .../markdowneditor.controller.js | 2 +- .../nestedcontent/nestedcontent.controller.js | 4 +-- .../rte/codeeditor.controller.js | 2 +- .../propertyeditors/rte/rte.controller.js | 2 +- .../src/views/scripts/delete.controller.js | 2 +- .../src/views/scripts/edit.controller.js | 2 +- .../src/views/stylesheets/edit.controller.js | 2 +- .../src/views/templates/delete.controller.js | 2 +- .../src/views/templates/edit.controller.js | 2 +- .../template-editor-controller.spec.js | 2 +- .../unit/common/directives/val-email.spec.js | 2 +- .../server-validation-manager.spec.js | 2 +- .../Actions/ActionChangeDocType.cs | 2 +- .../Cache/ContentCacheRefresher.cs | 2 +- .../Cache/DataTypeCacheRefresher.cs | 2 +- .../Cache/DistributedCacheBinder.cs | 2 +- .../Cache/DistributedCacheBinder_Handlers.cs | 10 +++---- .../Composing/Composers/InstallerComposer.cs | 2 +- src/Umbraco.Web/Composing/Current.cs | 2 +- .../Controllers/UmbRegisterController.cs | 2 +- .../Editors/BackOfficeController.cs | 2 +- .../Editors/BackOfficeServerVariables.cs | 10 +++---- .../Binders/ContentModelBinderHelper.cs | 2 +- .../Editors/Binders/MemberBinder.cs | 2 +- src/Umbraco.Web/Editors/CodeFileController.cs | 2 +- src/Umbraco.Web/Editors/ContentController.cs | 18 ++++++------ .../Editors/ContentControllerBase.cs | 2 +- .../Editors/ContentTypeController.cs | 2 +- .../Editors/CurrentUserController.cs | 2 +- src/Umbraco.Web/Editors/DashboardSecurity.cs | 2 +- src/Umbraco.Web/Editors/DataTypeController.cs | 2 +- src/Umbraco.Web/Editors/EditorValidator.cs | 2 +- src/Umbraco.Web/Editors/EntityController.cs | 12 ++++---- .../Filters/ContentItemValidationHelper.cs | 2 +- .../Filters/ContentSaveValidationAttribute.cs | 2 +- .../Filters/UserGroupValidateAttribute.cs | 4 +-- src/Umbraco.Web/Editors/MediaController.cs | 2 +- .../Editors/MediaTypeController.cs | 2 +- src/Umbraco.Web/Editors/MemberController.cs | 28 +++++++++---------- .../Checks/Config/ConfigurationService.cs | 2 +- src/Umbraco.Web/HealthCheck/HealthCheck.cs | 2 +- .../HealthCheck/HealthCheckAttribute.cs | 2 +- .../HealthCheck/HealthCheckResults.cs | 2 +- .../HealthCheck/HealthCheckStatus.cs | 2 +- .../Controllers/InstallApiController.cs | 2 +- .../Install/InstallStepCollection.cs | 4 +-- .../Install/InstallSteps/NewInstallStep.cs | 2 +- .../InstallSteps/StarterKitCleanupStep.cs | 2 +- .../Install/InstallSteps/UpgradeStep.cs | 4 +-- .../Install/Models/InstallPackageModel.cs | 2 +- .../EmbedProviders/AbstractOEmbedProvider.cs | 2 +- .../MembershipProviderExtensions.cs | 2 +- .../Models/ContentEditing/MemberSave.cs | 2 +- .../UserGroupPermissionsSave.cs | 2 +- .../Models/Mapping/ActionButtonsResolver.cs | 2 +- .../ContentPropertyDisplayConverter.cs | 2 +- .../Mapping/ContentTypeBasicResolver.cs | 2 +- .../Mapping/ContentTypeProfileExtensions.cs | 8 +++--- .../Models/Mapping/DatabaseTypeResolver.cs | 2 +- .../Models/Mapping/EntityMapperProfile.cs | 4 +-- .../Models/Mapping/MacroMapperProfile.cs | 2 +- .../Models/Mapping/MemberMapperProfile.cs | 2 +- .../MemberTabsAndPropertiesResolver.cs | 2 +- .../Mapping/TabsAndPropertiesResolver.cs | 2 +- .../PublishedValueFallback.cs | 3 +- .../Models/PublishedContentBase.cs | 8 +++--- src/Umbraco.Web/Models/PublishedProperty.cs | 2 +- src/Umbraco.Web/Models/Trees/MenuItem.cs | 2 +- src/Umbraco.Web/Models/UmbracoProperty.cs | 2 +- src/Umbraco.Web/Mvc/RenderRouteHandler.cs | 2 +- .../Mvc/UmbracoViewPageOfTModel.cs | 3 +- .../Mvc/UmbracoVirtualNodeRouteHandler.cs | 4 +-- .../FileUploadPropertyValueEditor.cs | 2 +- .../PropertyEditors/GridConfiguration.cs | 4 +-- .../GridPropertyIndexValueFactory.cs | 2 +- .../ImageCropperPropertyEditor.cs | 2 +- .../ImageCropperPropertyValueEditor.cs | 4 +-- .../PropertyEditors/ListViewConfiguration.cs | 6 ++-- .../MacroContainerPropertyEditor.cs | 2 +- .../MultipleTextStringConfigurationEditor.cs | 2 +- .../PropertyEditors/RichTextConfiguration.cs | 2 +- .../PropertyEditors/TrueFalseConfiguration.cs | 2 +- .../MultiNodeTreePickerValueConverter.cs | 2 +- .../PublishedCache/IPublishedCache.cs | 2 +- .../PublishedCache/NuCache/ContentCache.cs | 2 +- .../PublishedCache/NuCache/ContentStore.cs | 4 +-- ....DictionaryOfCultureVariationSerializer.cs | 2 +- .../NuCache/DataSource/DatabaseDataSource.cs | 2 +- .../NuCache/DataSource/PropertyData.cs | 4 +-- .../NuCache/PublishedSnapshotService.cs | 8 +++--- .../PublishedCache/PublishedMember.cs | 4 +-- .../XmlPublishedCache/PublishedMediaCache.cs | 6 ++-- .../XmlPublishedCache/SafeXmlReaderWriter.cs | 2 +- .../XmlPublishedCache/XmlPublishedContent.cs | 2 +- .../XmlPublishedCache/XmlStore.cs | 14 +++++----- src/Umbraco.Web/PublishedContentExtensions.cs | 4 +-- .../Routing/ContentFinderByUrlAlias.cs | 2 +- .../Routing/CustomRouteUrlProvider.cs | 2 +- src/Umbraco.Web/Routing/DomainHelper.cs | 4 +-- .../Routing/NotFoundHandlerHelper.cs | 2 +- src/Umbraco.Web/Routing/PublishedRouter.cs | 7 ++--- .../Routing/RedirectTrackingComponent.cs | 2 +- src/Umbraco.Web/Routing/SiteDomainHelper.cs | 4 +-- src/Umbraco.Web/Runtime/WebRuntimeComposer.cs | 2 +- .../Scheduling/BackgroundTaskRunnerOptions.cs | 2 +- .../Scheduling/IBackgroundTaskRunner.cs | 2 +- .../Scheduling/ScheduledPublishing.cs | 3 +- src/Umbraco.Web/Scheduling/ScheduledTasks.cs | 4 +-- src/Umbraco.Web/Search/ExamineComponent.cs | 6 ++-- .../Search/UmbracoIndexesCreator.cs | 2 +- src/Umbraco.Web/Search/UmbracoTreeSearcher.cs | 2 +- ...eDirectoryBackOfficeUserPasswordChecker.cs | 4 +-- .../Security/BackOfficeSignInManager.cs | 2 +- .../Security/BackOfficeUserManager.cs | 10 +++---- .../Security/GetUserSecondsMiddleWare.cs | 4 +-- src/Umbraco.Web/Security/MembershipHelper.cs | 10 +++---- .../Providers/UmbracoMembershipProvider.cs | 4 +-- src/Umbraco.Web/Suspendable.cs | 2 +- src/Umbraco.Web/Templates/TemplateRenderer.cs | 4 +-- .../Trees/ApplicationTreeController.cs | 2 +- .../Trees/ContentTreeController.cs | 2 +- .../Trees/ContentTreeControllerBase.cs | 4 +-- .../Trees/FileSystemTreeController.cs | 2 +- src/Umbraco.Web/Trees/FilesTreeController.cs | 2 +- src/Umbraco.Web/Trees/ITree.cs | 2 +- .../Trees/LegacyTreeDataConverter.cs | 2 +- .../Trees/ScriptsTreeController.cs | 2 +- .../Trees/StylesheetsTreeController.cs | 2 +- .../Trees/TemplatesTreeController.cs | 4 +-- src/Umbraco.Web/UI/Controls/UmbracoControl.cs | 2 +- .../UI/Controls/UmbracoUserControl.cs | 2 +- .../UI/JavaScript/Resources.Designer.cs | 2 +- .../UI/JavaScript/ServerVariables.js | 2 +- src/Umbraco.Web/UmbracoComponentRenderer.cs | 2 +- src/Umbraco.Web/UmbracoContext.cs | 2 +- src/Umbraco.Web/UmbracoHelper.cs | 4 +-- src/Umbraco.Web/UmbracoHttpHandler.cs | 2 +- .../EnableOverrideAuthorizationAttribute.cs | 2 +- ...EnsureUserPermissionForContentAttribute.cs | 4 +-- .../EnsureUserPermissionForMediaAttribute.cs | 2 +- .../OverridableAuthorizationAttribute.cs | 2 +- .../WebApi/UmbracoAuthorizeAttribute.cs | 2 +- .../PackageActions/publishRootDocument.cs | 2 +- src/Umbraco.Web/umbraco.presentation/page.cs | 2 +- 338 files changed, 573 insertions(+), 586 deletions(-) diff --git a/build/NuSpecs/UmbracoCms.nuspec b/build/NuSpecs/UmbracoCms.nuspec index a188377c19..f642b2f4e8 100644 --- a/build/NuSpecs/UmbracoCms.nuspec +++ b/build/NuSpecs/UmbracoCms.nuspec @@ -55,7 +55,7 @@ - + diff --git a/build/build.ps1 b/build/build.ps1 index 65b4041e30..d811c2cc21 100644 --- a/build/build.ps1 +++ b/build/build.ps1 @@ -120,7 +120,7 @@ } finally { Pop-Location - # fixme - should we filter the log to find errors? + # FIXME: should we filter the log to find errors? #get-content .\build.tmp\belle.log | %{ if ($_ -match "build") { write $_}} # restore @@ -177,7 +177,7 @@ { Write-Host "Prepare Tests" - # fixme - idea is to avoid rebuilding everything for tests + # FIXME: - idea is to avoid rebuilding everything for tests # but because of our weird assembly versioning (with .* stuff) # everything gets rebuilt all the time... #Copy-Files "$tmp\bin" "." "$tmp\tests" diff --git a/src/Umbraco.Core/Cache/CacheKeys.cs b/src/Umbraco.Core/Cache/CacheKeys.cs index 50bd4ca0ac..e8f93d636a 100644 --- a/src/Umbraco.Core/Cache/CacheKeys.cs +++ b/src/Umbraco.Core/Cache/CacheKeys.cs @@ -7,7 +7,7 @@ { public const string ApplicationsCacheKey = "ApplicationCache"; // used by SectionService - // TODO this one can probably be removed + // TODO: this one can probably be removed public const string TemplateFrontEndCacheKey = "template"; public const string MacroContentCacheKey = "macroContent_"; // used in MacroRenderers diff --git a/src/Umbraco.Core/Cache/HttpRequestAppCache.cs b/src/Umbraco.Core/Cache/HttpRequestAppCache.cs index 0fdf70ac27..f1932f97ce 100644 --- a/src/Umbraco.Core/Cache/HttpRequestAppCache.cs +++ b/src/Umbraco.Core/Cache/HttpRequestAppCache.cs @@ -31,7 +31,7 @@ namespace Umbraco.Core.Cache /// /// /// Will use HttpContext.Current. - /// TODO - https://github.com/umbraco/Umbraco-CMS/issues/4239 - use IHttpContextAccessor NOT HttpContext.Current + /// TODO: https://github.com/umbraco/Umbraco-CMS/issues/4239 - use IHttpContextAccessor NOT HttpContext.Current /// public HttpRequestAppCache() { } diff --git a/src/Umbraco.Core/Components/RelateOnCopyComponent.cs b/src/Umbraco.Core/Components/RelateOnCopyComponent.cs index 404d385680..d38406f970 100644 --- a/src/Umbraco.Core/Components/RelateOnCopyComponent.cs +++ b/src/Umbraco.Core/Components/RelateOnCopyComponent.cs @@ -5,7 +5,7 @@ using Umbraco.Core.Services.Implement; namespace Umbraco.Core.Components { - //TODO: This should just exist in the content service/repo! + // TODO: This should just exist in the content service/repo! public sealed class RelateOnCopyComponent : IComponent { public void Initialize() diff --git a/src/Umbraco.Core/Composing/TypeFinder.cs b/src/Umbraco.Core/Composing/TypeFinder.cs index 4086eb394b..308d0ecfd7 100644 --- a/src/Umbraco.Core/Composing/TypeFinder.cs +++ b/src/Umbraco.Core/Composing/TypeFinder.cs @@ -614,7 +614,7 @@ namespace Umbraco.Core.Composing var type = BuildManager.GetType(typeName, false); if (type != null) return type; - //TODO: This isn't very elegant, and will have issues since the AppDomain.CurrentDomain + // TODO: This isn't very elegant, and will have issues since the AppDomain.CurrentDomain // doesn't actualy load in all assemblies, only the types that have been referenced so far. // However, in a web context, the BuildManager will have executed which will force all assemblies // to be loaded so it's fine for now. diff --git a/src/Umbraco.Core/Composing/TypeHelper.cs b/src/Umbraco.Core/Composing/TypeHelper.cs index c2746bef96..2f29ee09bc 100644 --- a/src/Umbraco.Core/Composing/TypeHelper.cs +++ b/src/Umbraco.Core/Composing/TypeHelper.cs @@ -278,7 +278,7 @@ namespace Umbraco.Core.Composing #region Match Type - //TODO: Need to determine if these methods should replace/combine/merge etc with IsTypeAssignableFrom, IsAssignableFromGeneric + // TODO: Need to determine if these methods should replace/combine/merge etc with IsTypeAssignableFrom, IsAssignableFromGeneric // readings: // http://stackoverflow.com/questions/2033912/c-sharp-variance-problem-assigning-listderived-as-listbase diff --git a/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs b/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs index 2862a98a0e..0e7ef62c58 100644 --- a/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs +++ b/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs @@ -31,7 +31,7 @@ namespace Umbraco.Core.Configuration.Grid { List GetResult() { - // TODO should use the common one somehow! + ignoring _appPlugins here! + // TODO: should use the common one somehow! + ignoring _appPlugins here! var parser = new ManifestParser(_appCaches, Current.ManifestValidators, _logger); var editors = new List(); diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/TourConfigElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/TourConfigElement.cs index ebb649ca3b..fb231ec0cf 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/TourConfigElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/TourConfigElement.cs @@ -5,13 +5,13 @@ namespace Umbraco.Core.Configuration.UmbracoSettings internal class TourConfigElement : UmbracoConfigurationElement, ITourSection { //disabled by default so that upgraders don't get it enabled by default - //TODO: we probably just want to disable the initial one from automatically loading ? + // TODO: we probably just want to disable the initial one from automatically loading ? [ConfigurationProperty("enable", DefaultValue = false)] public bool EnableTours { get { return (bool)this["enable"]; } } - //TODO: We could have additional filters, etc... defined here + // TODO: We could have additional filters, etc... defined here } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoVersion.cs b/src/Umbraco.Core/Configuration/UmbracoVersion.cs index bc5b6993e3..7ab97500f0 100644 --- a/src/Umbraco.Core/Configuration/UmbracoVersion.cs +++ b/src/Umbraco.Core/Configuration/UmbracoVersion.cs @@ -31,7 +31,7 @@ namespace Umbraco.Core.Configuration /// /// Gets the non-semantic version of the Umbraco code. /// - // TODO rename to Version + // TODO: rename to Version public static Version Current { get; } /// @@ -81,7 +81,7 @@ namespace Umbraco.Core.Configuration { try { - // TODO - https://github.com/umbraco/Umbraco-CMS/issues/4238 - stop having version in web.config appSettings + // TODO: https://github.com/umbraco/Umbraco-CMS/issues/4238 - stop having version in web.config appSettings var value = ConfigurationManager.AppSettings["umbracoConfigurationStatus"]; return value.IsNullOrWhiteSpace() ? null : SemVersion.TryParse(value, out var semver) ? semver : null; } diff --git a/src/Umbraco.Core/Constants-Applications.cs b/src/Umbraco.Core/Constants-Applications.cs index 415357aab3..2d4042fad0 100644 --- a/src/Umbraco.Core/Constants-Applications.cs +++ b/src/Umbraco.Core/Constants-Applications.cs @@ -156,7 +156,7 @@ public const string ThirdParty = "thirdPartyGroup"; } - //TODO: Fill in the rest! + // TODO: Fill in the rest! } } } diff --git a/src/Umbraco.Core/EmailSender.cs b/src/Umbraco.Core/EmailSender.cs index 1f2c6d8653..0fda5c40a4 100644 --- a/src/Umbraco.Core/EmailSender.cs +++ b/src/Umbraco.Core/EmailSender.cs @@ -17,7 +17,7 @@ namespace Umbraco.Core /// public class EmailSender : IEmailSender { - //TODO: This should encapsulate a BackgroundTaskRunner with a queue to send these emails! + // TODO: This should encapsulate a BackgroundTaskRunner with a queue to send these emails! private readonly bool _enableEvents; diff --git a/src/Umbraco.Core/Events/ImportPackageEventArgs.cs b/src/Umbraco.Core/Events/ImportPackageEventArgs.cs index 61369af59d..a044cd71b3 100644 --- a/src/Umbraco.Core/Events/ImportPackageEventArgs.cs +++ b/src/Umbraco.Core/Events/ImportPackageEventArgs.cs @@ -27,7 +27,7 @@ namespace Umbraco.Core.Events { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; - //TODO: MetaData for package metadata has no equality operators :/ + // TODO: MetaData for package metadata has no equality operators :/ return base.Equals(other) && PackageMetaData.Equals(other.PackageMetaData); } diff --git a/src/Umbraco.Core/IO/FileSystemExtensions.cs b/src/Umbraco.Core/IO/FileSystemExtensions.cs index ade2c58b38..e0f5af75c5 100644 --- a/src/Umbraco.Core/IO/FileSystemExtensions.cs +++ b/src/Umbraco.Core/IO/FileSystemExtensions.cs @@ -54,7 +54,7 @@ namespace Umbraco.Core.IO return Path.GetFileName(fs.GetFullPath(path)); } - //TODO: Currently this is the only way to do this + // TODO: Currently this is the only way to do this internal static void CreateFolder(this IFileSystem fs, string folderPath) { var path = fs.GetRelativePath(folderPath); diff --git a/src/Umbraco.Core/IO/IOHelper.cs b/src/Umbraco.Core/IO/IOHelper.cs index 76e7631482..a92b556240 100644 --- a/src/Umbraco.Core/IO/IOHelper.cs +++ b/src/Umbraco.Core/IO/IOHelper.cs @@ -155,8 +155,7 @@ namespace Umbraco.Core.IO // // except that for templates, filePath actually is a virtual path - //TODO - // what's below is dirty, there are too many ways to get the root dir, etc. + // TODO: what's below is dirty, there are too many ways to get the root dir, etc. // not going to fix everything today var mappedRoot = MapPath(SystemDirectories.Root); diff --git a/src/Umbraco.Core/IO/PhysicalFileSystem.cs b/src/Umbraco.Core/IO/PhysicalFileSystem.cs index acf5e796e4..66ef095b04 100644 --- a/src/Umbraco.Core/IO/PhysicalFileSystem.cs +++ b/src/Umbraco.Core/IO/PhysicalFileSystem.cs @@ -284,7 +284,7 @@ namespace Umbraco.Core.IO var opath = path; path = EnsureDirectorySeparatorChar(path); - // fixme - this part should go! + // FIXME: this part should go! // not sure what we are doing here - so if input starts with a (back) slash, // we assume it's not a FS relative path and we try to convert it... but it // really makes little sense? diff --git a/src/Umbraco.Core/Media/Result.cs b/src/Umbraco.Core/Media/Result.cs index 82894a5ef5..a8683d03d5 100644 --- a/src/Umbraco.Core/Media/Result.cs +++ b/src/Umbraco.Core/Media/Result.cs @@ -1,7 +1,7 @@ namespace Umbraco.Core.Media { - //TODO: Could definitely have done with a better name + // TODO: Could definitely have done with a better name public class Result { public Status Status { get; set; } diff --git a/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs b/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs index f32ea1cb6f..82ca5960ec 100644 --- a/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs +++ b/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs @@ -263,7 +263,7 @@ namespace Umbraco.Core.Migrations.Install const string listLayout = "{\"name\": \"List\",\"path\": \"views/propertyeditors/listview/layouts/list/list.html\",\"icon\": \"icon-list\", \"isSystem\": 1,\"selected\": true}"; const string layouts = "[" + cardLayout + "," + listLayout + "]"; - //TODO Check which of the DataTypeIds below doesn't exist in umbracoNode, which results in a foreign key constraint errors. + // TODO: Check which of the DataTypeIds below doesn't exist in umbracoNode, which results in a foreign key constraint errors. _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -49, EditorAlias = Constants.PropertyEditors.Aliases.Boolean, DbType = "Integer" }); _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -51, EditorAlias = Constants.PropertyEditors.Aliases.Integer, DbType = "Integer" }); _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -87, EditorAlias = Constants.PropertyEditors.Aliases.TinyMce, DbType = "Ntext", diff --git a/src/Umbraco.Core/Models/ContentScheduleCollection.cs b/src/Umbraco.Core/Models/ContentScheduleCollection.cs index 4c06f8927d..6c7dd79312 100644 --- a/src/Umbraco.Core/Models/ContentScheduleCollection.cs +++ b/src/Umbraco.Core/Models/ContentScheduleCollection.cs @@ -31,7 +31,7 @@ namespace Umbraco.Core.Models _schedule[schedule.Culture] = changes; } - //TODO: Below will throw if there are duplicate dates added, validate/return bool? + // TODO: Below will throw if there are duplicate dates added, validate/return bool? changes.Add(schedule.Date, schedule); OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, schedule)); @@ -62,7 +62,7 @@ namespace Umbraco.Core.Models if (!releaseDate.HasValue && !expireDate.HasValue) return false; - //TODO: Do we allow passing in a release or expiry date that is before now? + // TODO: Do we allow passing in a release or expiry date that is before now? if (!_schedule.TryGetValue(culture, out var changes)) { @@ -70,7 +70,7 @@ namespace Umbraco.Core.Models _schedule[culture] = changes; } - //TODO: Below will throw if there are duplicate dates added, should validate/return bool? + // TODO: Below will throw if there are duplicate dates added, should validate/return bool? // but the bool won't indicate which date was in error, maybe have 2 diff methods to schedule start/end? if (releaseDate.HasValue) diff --git a/src/Umbraco.Core/Models/ContentTypeBaseExtensions.cs b/src/Umbraco.Core/Models/ContentTypeBaseExtensions.cs index adbc3de54f..51c642c20d 100644 --- a/src/Umbraco.Core/Models/ContentTypeBaseExtensions.cs +++ b/src/Umbraco.Core/Models/ContentTypeBaseExtensions.cs @@ -48,7 +48,7 @@ namespace Umbraco.Core.Models throw new Exception("oops"); // skip new properties - //TODO: This used to be WasPropertyDirty("HasIdentity") but i don't think that actually worked for detecting new entities this does seem to work properly + // TODO: This used to be WasPropertyDirty("HasIdentity") but i don't think that actually worked for detecting new entities this does seem to work properly var isNewProperty = dirtyProperty.WasPropertyDirty("Id"); if (isNewProperty) return false; diff --git a/src/Umbraco.Core/Models/GridValue.cs b/src/Umbraco.Core/Models/GridValue.cs index 4f19576f17..157304463f 100644 --- a/src/Umbraco.Core/Models/GridValue.cs +++ b/src/Umbraco.Core/Models/GridValue.cs @@ -5,7 +5,7 @@ using Newtonsoft.Json.Linq; namespace Umbraco.Core.Models { - //TODO: Make a property value converter for this! + // TODO: Make a property value converter for this! /// /// A model representing the value saved for the grid diff --git a/src/Umbraco.Core/Models/Member.cs b/src/Umbraco.Core/Models/Member.cs index c47f68c930..0ef15ee413 100644 --- a/src/Umbraco.Core/Models/Member.cs +++ b/src/Umbraco.Core/Models/Member.cs @@ -189,7 +189,7 @@ namespace Umbraco.Core.Models [DataMember] public IEnumerable Groups { get; set; } - //TODO: When get/setting all of these properties we MUST: + // TODO: When get/setting all of these properties we MUST: // * Check if we are using the umbraco membership provider, if so then we need to use the configured fields - not the explicit fields below // * If any of the fields don't exist, what should we do? Currently it will throw an exception! @@ -338,7 +338,7 @@ namespace Umbraco.Core.Models return tryConvert.Result; } return false; - //TODO: Use TryConvertTo instead + // TODO: Use TryConvertTo instead } set { @@ -371,7 +371,7 @@ namespace Umbraco.Core.Models return tryConvert.Result; } return default(DateTime); - //TODO: Use TryConvertTo instead + // TODO: Use TryConvertTo instead } set { @@ -404,7 +404,7 @@ namespace Umbraco.Core.Models return tryConvert.Result; } return default(DateTime); - //TODO: Use TryConvertTo instead + // TODO: Use TryConvertTo instead } set { @@ -437,7 +437,7 @@ namespace Umbraco.Core.Models return tryConvert.Result; } return default(DateTime); - //TODO: Use TryConvertTo instead + // TODO: Use TryConvertTo instead } set { @@ -471,7 +471,7 @@ namespace Umbraco.Core.Models return tryConvert.Result; } return default(int); - //TODO: Use TryConvertTo instead + // TODO: Use TryConvertTo instead } set { diff --git a/src/Umbraco.Core/Models/MemberType.cs b/src/Umbraco.Core/Models/MemberType.cs index bcc7e14fd7..1ce883d9a7 100644 --- a/src/Umbraco.Core/Models/MemberType.cs +++ b/src/Umbraco.Core/Models/MemberType.cs @@ -66,7 +66,7 @@ namespace Umbraco.Core.Models // leading underscores which we don't want in this case. // see : http://issues.umbraco.org/issue/U4-3968 - //TODO: BUT, I'm pretty sure we could do this with regards to underscores now: + // TODO: BUT, I'm pretty sure we could do this with regards to underscores now: // .ToCleanString(CleanStringType.Alias | CleanStringType.UmbracoCase) // Need to ask Stephen diff --git a/src/Umbraco.Core/Models/Membership/UmbracoMembershipMember.cs b/src/Umbraco.Core/Models/Membership/UmbracoMembershipMember.cs index ed3422d4f9..debce3afe5 100644 --- a/src/Umbraco.Core/Models/Membership/UmbracoMembershipMember.cs +++ b/src/Umbraco.Core/Models/Membership/UmbracoMembershipMember.cs @@ -44,7 +44,7 @@ namespace Umbraco.Core.Models.Membership _isLockedOut = member.IsLockedOut; _creationDate = member.CreateDate.ToUniversalTime(); _lastLoginDate = member.LastLoginDate.ToUniversalTime(); - //TODO: We currently don't really have any place to store this data!! + // TODO: We currently don't really have any place to store this data!! _lastActivityDate = member.LastLoginDate.ToUniversalTime(); _lastPasswordChangedDate = member.LastPasswordChangeDate.ToUniversalTime(); _lastLockoutDate = member.LastLockoutDate.ToUniversalTime(); diff --git a/src/Umbraco.Core/Models/Membership/User.cs b/src/Umbraco.Core/Models/Membership/User.cs index 5e79967a94..7832390b92 100644 --- a/src/Umbraco.Core/Models/Membership/User.cs +++ b/src/Umbraco.Core/Models/Membership/User.cs @@ -242,7 +242,7 @@ namespace Umbraco.Core.Models.Membership set { SetPropertyValueAndDetectChanges(value, ref _failedLoginAttempts, Ps.Value.FailedPasswordAttemptsSelector); } } - //TODO: Figure out how to support all of this! - we cannot have NotImplementedExceptions because these get used by the IMembershipMemberService service so + // TODO: Figure out how to support all of this! - we cannot have NotImplementedExceptions because these get used by the IMembershipMemberService service so // we'll just have them as generic get/set which don't interact with the db. [IgnoreDataMember] diff --git a/src/Umbraco.Core/Models/Packaging/PreInstallWarnings.cs b/src/Umbraco.Core/Models/Packaging/PreInstallWarnings.cs index f0acb2a46b..69c7a5641d 100644 --- a/src/Umbraco.Core/Models/Packaging/PreInstallWarnings.cs +++ b/src/Umbraco.Core/Models/Packaging/PreInstallWarnings.cs @@ -10,7 +10,7 @@ namespace Umbraco.Core.Models.Packaging public IEnumerable UnsecureFiles { get; set; } = Enumerable.Empty(); public IEnumerable FilesReplaced { get; set; } = Enumerable.Empty(); - //TODO: Shouldn't we detect other conflicting entities too ? + // TODO: Shouldn't we detect other conflicting entities too ? public IEnumerable ConflictingMacros { get; set; } = Enumerable.Empty(); public IEnumerable ConflictingTemplates { get; set; } = Enumerable.Empty(); public IEnumerable ConflictingStylesheets { get; set; } = Enumerable.Empty(); diff --git a/src/Umbraco.Core/Models/Property.cs b/src/Umbraco.Core/Models/Property.cs index f5c475908d..11b5239a70 100644 --- a/src/Umbraco.Core/Models/Property.cs +++ b/src/Umbraco.Core/Models/Property.cs @@ -55,7 +55,7 @@ namespace Umbraco.Core.Models /// public class PropertyValue { - //TODO: Either we allow change tracking at this class level, or we add some special change tracking collections to the Property + // TODO: Either we allow change tracking at this class level, or we add some special change tracking collections to the Property // class to deal with change tracking which variants have changed private string _culture; @@ -103,7 +103,7 @@ namespace Umbraco.Core.Models // ReSharper disable once ClassNeverInstantiated.Local private class PropertySelectors { - //TODO: This allows us to track changes for an entire Property, but doesn't allow us to track changes at the variant level + // TODO: This allows us to track changes for an entire Property, but doesn't allow us to track changes at the variant level public readonly PropertyInfo ValuesSelector = ExpressionHelper.GetPropertyInfo(x => x.Values); public readonly DelegateEqualityComparer PropertyValueComparer = new DelegateEqualityComparer( diff --git a/src/Umbraco.Core/Models/PropertyGroupCollection.cs b/src/Umbraco.Core/Models/PropertyGroupCollection.cs index 2e9fb6520e..26e0fef178 100644 --- a/src/Umbraco.Core/Models/PropertyGroupCollection.cs +++ b/src/Umbraco.Core/Models/PropertyGroupCollection.cs @@ -14,7 +14,7 @@ namespace Umbraco.Core.Models /// [Serializable] [DataContract] - //TODO: Change this to ObservableDictionary so we can reduce the INotifyCollectionChanged implementation details + // TODO: Change this to ObservableDictionary so we can reduce the INotifyCollectionChanged implementation details public class PropertyGroupCollection : KeyedCollection, INotifyCollectionChanged, IDeepCloneable { private readonly ReaderWriterLockSlim _addLocker = new ReaderWriterLockSlim(); diff --git a/src/Umbraco.Core/Models/PropertyTypeCollection.cs b/src/Umbraco.Core/Models/PropertyTypeCollection.cs index f39918d5af..e79015d828 100644 --- a/src/Umbraco.Core/Models/PropertyTypeCollection.cs +++ b/src/Umbraco.Core/Models/PropertyTypeCollection.cs @@ -13,7 +13,7 @@ namespace Umbraco.Core.Models /// [Serializable] [DataContract] - //TODO: Change this to ObservableDictionary so we can reduce the INotifyCollectionChanged implementation details + // TODO: Change this to ObservableDictionary so we can reduce the INotifyCollectionChanged implementation details public class PropertyTypeCollection : KeyedCollection, INotifyCollectionChanged, IDeepCloneable { [IgnoreDataMember] @@ -76,7 +76,7 @@ namespace Umbraco.Core.Models OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset)); } - //TODO: Instead of 'new' this should explicitly implement one of the collection interfaces members + // TODO: Instead of 'new' this should explicitly implement one of the collection interfaces members internal new void Add(PropertyType item) { item.IsPublishing = IsPublishing; diff --git a/src/Umbraco.Core/Models/UserExtensions.cs b/src/Umbraco.Core/Models/UserExtensions.cs index e14d7ee2de..f9aa1113b3 100644 --- a/src/Umbraco.Core/Models/UserExtensions.cs +++ b/src/Umbraco.Core/Models/UserExtensions.cs @@ -136,7 +136,7 @@ namespace Umbraco.Core.Models try { var culture = CultureInfo.GetCultureInfo(userLanguage.Replace("_", "-")); - //TODO: This is a hack because we store the user language as 2 chars instead of the full culture + // TODO: This is a hack because we store the user language as 2 chars instead of the full culture // which is actually stored in the language files (which are also named with 2 chars!) so we need to attempt // to convert to a supported full culture var result = textService.ConvertToSupportedCultureWithRegionCode(culture); diff --git a/src/Umbraco.Core/ObjectExtensions.cs b/src/Umbraco.Core/ObjectExtensions.cs index 1a66cb96fb..68bc9c923d 100644 --- a/src/Umbraco.Core/ObjectExtensions.cs +++ b/src/Umbraco.Core/ObjectExtensions.cs @@ -143,7 +143,7 @@ namespace Umbraco.Core // Special case for empty strings for bools/dates which should return null if an empty string. if (input is string inputString) { - //TODO: Why the check against only bool/date when a string is null/empty? In what scenario can we convert to another type when the string is null or empty other than just being null? + // TODO: Why the check against only bool/date when a string is null/empty? In what scenario can we convert to another type when the string is null or empty other than just being null? if (string.IsNullOrEmpty(inputString) && (underlying == typeof(DateTime) || underlying == typeof(bool))) { return Attempt.Succeed(null); @@ -391,7 +391,7 @@ namespace Umbraco.Core } internal static void CheckThrowObjectDisposed(this IDisposable disposable, bool isDisposed, string objectname) { - //TODO: Localize this exception + // TODO: Localize this exception if (isDisposed) throw new ObjectDisposedException(objectname); } diff --git a/src/Umbraco.Core/Packaging/PackageDataInstallation.cs b/src/Umbraco.Core/Packaging/PackageDataInstallation.cs index 72dc0cb325..a569954629 100644 --- a/src/Umbraco.Core/Packaging/PackageDataInstallation.cs +++ b/src/Umbraco.Core/Packaging/PackageDataInstallation.cs @@ -100,7 +100,7 @@ namespace Umbraco.Core.Packaging //Order the DocumentTypes before removing them if (contentTypes.Any()) { - //TODO: I don't think this ordering is necessary + // TODO: I don't think this ordering is necessary var orderedTypes = (from contentType in contentTypes orderby contentType.ParentId descending, contentType.Id descending select contentType).ToList(); @@ -710,7 +710,7 @@ namespace Umbraco.Core.Packaging // This means that the property will not be created. if (dataTypeDefinition == null) { - //TODO: We should expose this to the UI during install! + // 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.", property.Element("Name").Value, dataTypeDefinitionId, property.Element("Type").Value.Trim()); diff --git a/src/Umbraco.Core/Packaging/PackageFileInstallation.cs b/src/Umbraco.Core/Packaging/PackageFileInstallation.cs index 7c0891175b..29afc11d83 100644 --- a/src/Umbraco.Core/Packaging/PackageFileInstallation.cs +++ b/src/Umbraco.Core/Packaging/PackageFileInstallation.cs @@ -65,7 +65,7 @@ namespace Umbraco.Core.Packaging var file = IOHelper.FindFile(item); if (file != null) { - //TODO: Surely this should be ~/ ? + // TODO: Surely this should be ~/ ? file = file.EnsureStartsWith("/"); var filePath = IOHelper.MapPath(file); diff --git a/src/Umbraco.Core/Packaging/PackagesRepository.cs b/src/Umbraco.Core/Packaging/PackagesRepository.cs index dcf3b62e55..05f67b3ed6 100644 --- a/src/Umbraco.Core/Packaging/PackagesRepository.cs +++ b/src/Umbraco.Core/Packaging/PackagesRepository.cs @@ -362,7 +362,7 @@ namespace Umbraco.Core.Packaging new XAttribute("importMode", "root"), contentXml))); - //TODO: I guess tags has been broken for a very long time for packaging, we should get this working again sometime + // TODO: I guess tags has been broken for a very long time for packaging, we should get this working again sometime ////Create the TagProperties node - this is used to store a definition for all //// document properties that are tags, this ensures that we can re-import tags properly //XmlNode tagProps = new XElement("TagProperties"); diff --git a/src/Umbraco.Core/Persistence/Dtos/LogDto.cs b/src/Umbraco.Core/Persistence/Dtos/LogDto.cs index 9a710c1fec..bfd96426e2 100644 --- a/src/Umbraco.Core/Persistence/Dtos/LogDto.cs +++ b/src/Umbraco.Core/Persistence/Dtos/LogDto.cs @@ -35,12 +35,12 @@ namespace Umbraco.Core.Persistence.Dtos [NullSetting(NullSetting = NullSettings.Null)] public string EntityType { get; set; } - //TODO: Should we have an index on this since we allow searching on it? + // TODO: Should we have an index on this since we allow searching on it? [Column("Datestamp")] [Constraint(Default = SystemMethods.CurrentDateTime)] public DateTime Datestamp { get; set; } - //TODO: Should we have an index on this since we allow searching on it? + // TODO: Should we have an index on this since we allow searching on it? [Column("logHeader")] [Length(50)] public string Header { get; set; } diff --git a/src/Umbraco.Core/Persistence/Dtos/MemberTypeReadOnlyDto.cs b/src/Umbraco.Core/Persistence/Dtos/MemberTypeReadOnlyDto.cs index f9e70cce18..c4ea6a10fd 100644 --- a/src/Umbraco.Core/Persistence/Dtos/MemberTypeReadOnlyDto.cs +++ b/src/Umbraco.Core/Persistence/Dtos/MemberTypeReadOnlyDto.cs @@ -66,13 +66,13 @@ namespace Umbraco.Core.Persistence.Dtos public bool AllowAtRoot { get; set; } /* PropertyTypes */ - //TODO Add PropertyTypeDto (+MemberTypeDto and DataTypeDto as one) ReadOnly list + // TODO: Add PropertyTypeDto (+MemberTypeDto and DataTypeDto as one) ReadOnly list [ResultColumn] [Reference(ReferenceType.Many, ReferenceMemberName = "ContentTypeId")] public List PropertyTypes { get; set; } /* PropertyTypeGroups */ - //TODO Add PropertyTypeGroupDto ReadOnly list + // TODO: Add PropertyTypeGroupDto ReadOnly list [ResultColumn] [Reference(ReferenceType.Many, ReferenceMemberName = "ContentTypeNodeId")] public List PropertyTypeGroups { get; set; } diff --git a/src/Umbraco.Core/Persistence/EntityNotFoundException.cs b/src/Umbraco.Core/Persistence/EntityNotFoundException.cs index 49e85046a0..e0fe778fa6 100644 --- a/src/Umbraco.Core/Persistence/EntityNotFoundException.cs +++ b/src/Umbraco.Core/Persistence/EntityNotFoundException.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; namespace Umbraco.Core.Persistence { - //TODO: Would be good to use this exception type anytime we cannot find an entity + // TODO: Would be good to use this exception type anytime we cannot find an entity /// /// An exception used to indicate that an umbraco entity could not be found diff --git a/src/Umbraco.Core/Persistence/Querying/ExpressionVisitorBase.cs b/src/Umbraco.Core/Persistence/Querying/ExpressionVisitorBase.cs index b6f5401bec..d04930fa92 100644 --- a/src/Umbraco.Core/Persistence/Querying/ExpressionVisitorBase.cs +++ b/src/Umbraco.Core/Persistence/Querying/ExpressionVisitorBase.cs @@ -269,7 +269,7 @@ namespace Umbraco.Core.Persistence.Querying protected virtual string VisitNew(NewExpression newExpression) { - // TODO : check ! + // TODO: check ! var member = Expression.Convert(newExpression, typeof(object)); var lambda = Expression.Lambda>(member); try @@ -662,7 +662,7 @@ namespace Umbraco.Core.Persistence.Querying // sql 'COALESCE(x,fb) = COALESCE(y,fb)' - of course, fb must be a value outside // of x and y range - and if that is not possible, then a manual comparison need // to be written - //TODO support SqlNullableEquals with 0 parameters, using the full syntax below + // TODO: support SqlNullableEquals with 0 parameters, using the full syntax below case "SqlNullableEquals": var compareTo = Visit(m.Arguments[1]); var fallback = Visit(m.Arguments[2]); diff --git a/src/Umbraco.Core/Persistence/Querying/ModelToSqlExpressionVisitor.cs b/src/Umbraco.Core/Persistence/Querying/ModelToSqlExpressionVisitor.cs index 9f57e61db9..a353f01f5b 100644 --- a/src/Umbraco.Core/Persistence/Querying/ModelToSqlExpressionVisitor.cs +++ b/src/Umbraco.Core/Persistence/Querying/ModelToSqlExpressionVisitor.cs @@ -79,7 +79,7 @@ namespace Umbraco.Core.Persistence.Querying return string.Empty; } - //TODO: When m.Expression.NodeType == ExpressionType.Constant and it's an expression like: content => aliases.Contains(content.ContentType.Alias); + // TODO: When m.Expression.NodeType == ExpressionType.Constant and it's an expression like: content => aliases.Contains(content.ContentType.Alias); // then an SQL parameter will be added for aliases as an array, however in SqlIn on the subclass it will manually add these SqlParameters anyways, // however the query will still execute because the SQL that is written will only contain the correct indexes of SQL parameters, this would be ignored, // I'm just unsure right now due to time constraints how to make it correct. It won't matter right now and has been working already with this bug but I've diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs index 92ade18204..7f41d2a456 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs @@ -271,7 +271,7 @@ AND umbracoNode.id <> @id", compositionBase.RemovedContentTypeKeyTracker != null && compositionBase.RemovedContentTypeKeyTracker.Any()) { - //TODO: Could we do the below with bulk SQL statements instead of looking everything up and then manipulating? + // TODO: Could we do the below with bulk SQL statements instead of looking everything up and then manipulating? // find Content based on the current ContentType var sql = Sql() @@ -291,7 +291,7 @@ AND umbracoNode.id <> @id", // based on the PropertyTypes that belong to the removed ContentType. foreach (var contentDto in contentDtos) { - //TODO: This could be done with bulk SQL statements + // TODO: This could be done with bulk SQL statements foreach (var propertyType in propertyTypes) { var nodeId = contentDto.NodeId; @@ -437,7 +437,7 @@ AND umbracoNode.id <> @id", case ContentVariation.CultureAndSegment: case ContentVariation.Segment: default: - throw new NotSupportedException(); //TODO: Support this + throw new NotSupportedException(); // TODO: Support this } } @@ -627,7 +627,7 @@ AND umbracoNode.id <> @id", /// private void ClearScheduledPublishing(IContentTypeComposition contentType) { - //TODO: Fill this in when scheduled publishing is enabled for variants + // TODO: Fill this in when scheduled publishing is enabled for variants } /// @@ -670,7 +670,7 @@ AND umbracoNode.id <> @id", case ContentVariation.CultureAndSegment: case ContentVariation.Segment: default: - throw new NotSupportedException(); //TODO: Support this + throw new NotSupportedException(); // TODO: Support this } } } @@ -753,7 +753,7 @@ AND umbracoNode.id <> @id", case ContentVariation.CultureAndSegment: case ContentVariation.Segment: default: - throw new NotSupportedException(); //TODO: Support this + throw new NotSupportedException(); // TODO: Support this } } @@ -1037,7 +1037,7 @@ AND umbracoNode.id <> @id", var dtos = Database.Fetch(sql); - //TODO Move this to a PropertyTypeFactory + // TODO: Move this to a PropertyTypeFactory var list = new List(); foreach (var dto in dtos.Where(x => x.PropertyTypeGroupId <= 0)) { diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs index 0e6ff0310d..3de9e3c99b 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs @@ -26,7 +26,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { private readonly Lazy _editors; - // TODO - https://github.com/umbraco/Umbraco-CMS/issues/4237 - get rid of Lazy injection and fix circular dependencies + // TODO: https://github.com/umbraco/Umbraco-CMS/issues/4237 - get rid of Lazy injection and fix circular dependencies public DataTypeRepository(IScopeAccessor scopeAccessor, AppCaches cache, Lazy editors, ILogger logger) : base(scopeAccessor, cache, logger) { @@ -111,7 +111,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement //ensure a datatype has a unique name before creating it entity.Name = EnsureUniqueNodeName(entity.Name); - //TODO: should the below be removed? + // TODO: should the below be removed? //Cannot add a duplicate data type var existsSql = Sql() .SelectCount() diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DomainRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DomainRepository.cs index fa06216f9b..01b8bdd66c 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/DomainRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DomainRepository.cs @@ -12,7 +12,7 @@ using Umbraco.Core.Scoping; namespace Umbraco.Core.Persistence.Repositories.Implement { - //TODO: We need to get a readonly ISO code for the domain assigned + // TODO: We need to get a readonly ISO code for the domain assigned internal class DomainRepository : NPocoRepositoryBase, IDomainRepository { diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs index 18dc16cbce..ba3526f1f0 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs @@ -460,7 +460,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var subQuery = Sql().Select("Member").From().Where(dto => dto.MemberGroup == memberGroup.Id); var sql = GetBaseQuery(false) - //TODO: An inner join would be better, though I've read that the query optimizer will always turn a + // TODO: An inner join would be better, though I've read that the query optimizer will always turn a // subquery with an IN clause into an inner join anyways. .Append("WHERE umbracoNode.id IN (" + subQuery.SQL + ")", subQuery.Arguments) .OrderByDescending(x => x.VersionDate) diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs index fb45a79e43..a7e366a94f 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs @@ -207,7 +207,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement //ensure they are de-duplicated, easy win if people don't do this as this can cause many excess queries ids = ids.Distinct() //don't query by anything that is a default of T (like a zero) - //TODO: I think we should enabled this in case accidental calls are made to get all with invalid ids + // TODO: I think we should enabled this in case accidental calls are made to get all with invalid ids //.Where(x => Equals(x, default(TId)) == false) .ToArray(); diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/TagRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/TagRepository.cs index 7dd3f03407..f26fcca81b 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/TagRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/TagRepository.cs @@ -254,8 +254,7 @@ WHERE r.tagId IS NULL"; #region Queries - // TODO - // consider caching implications + // TODO: consider caching implications // add lookups for parentId or path (ie get content in tag group, that are descendants of x) // ReSharper disable once ClassNeverInstantiated.Local diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/TemplateRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/TemplateRepository.cs index a183894462..b348317989 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/TemplateRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/TemplateRepository.cs @@ -407,13 +407,12 @@ namespace Umbraco.Core.Persistence.Repositories.Implement template.UpdateDate = fs.GetLastModified(filename).UtcDateTime; } - // TODO - // see if this could enable us to update UpdateDate without messing with change tracking - // and then we'd want to do it for scripts, stylesheets and partial views too (ie files) - //var xtemplate = template as Template; - //xtemplate.DisableChangeTracking(); - //template.UpdateDate = fs.GetLastModified(filename).UtcDateTime; - //xtemplate.EnableChangeTracking(); + // TODO: see if this could enable us to update UpdateDate without messing with change tracking + // and then we'd want to do it for scripts, stylesheets and partial views too (ie files) + // var xtemplate = template as Template; + // xtemplate.DisableChangeTracking(); + // template.UpdateDate = fs.GetLastModified(filename).UtcDateTime; + // xtemplate.EnableChangeTracking(); template.VirtualPath = fs.GetUrl(filename); @@ -580,9 +579,8 @@ namespace Umbraco.Core.Persistence.Repositories.Implement public bool ValidateTemplate(ITemplate template) { // get path - // TODO - // templates should have a real Path somehow - but anyways - // are we using Path for something else?! + // TODO: templates should have a real Path somehow - but anyways + // are we using Path for something else?! var path = template.VirtualPath; // get valid paths @@ -652,7 +650,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement private string EnsureUniqueAlias(ITemplate template, int attempts) { - //TODO: This is ported from the old data layer... pretty crap way of doing this but it works for now. + // TODO: This is ported from the old data layer... pretty crap way of doing this but it works for now. if (AliasAlreadExists(template)) return template.Alias + attempts; attempts++; diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/UserGroupRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/UserGroupRepository.cs index b42060b6cc..3935027ada 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/UserGroupRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/UserGroupRepository.cs @@ -128,7 +128,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { foreach (var nodeId in nodeIds) { - //TODO: We could/should change the EntityPermissionsCollection into a KeyedCollection and they key could be + // TODO: We could/should change the EntityPermissionsCollection into a KeyedCollection and they key could be // a struct of the nodeid + groupid so then we don't actually allocate this class just to check if it's not // going to be included in the result! @@ -444,7 +444,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement /// Ids of users private void AddUsersToGroup(int groupId, int[] userIds) { - //TODO: Check if the user exists? + // TODO: Check if the user exists? foreach (var userId in userIds) { var dto = new User2UserGroupDto diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs index fdd5fb0d86..07ad6bcba9 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs @@ -169,7 +169,7 @@ ORDER BY colName"; public Guid CreateLoginSession(int userId, string requestingIpAddress, bool cleanStaleSessions = true) { - //TODO: I know this doesn't follow the normal repository conventions which would require us to create a UserSessionRepository + // TODO: I know this doesn't follow the normal repository conventions which would require us to create a UserSessionRepository //and also business logic models for these objects but that's just so overkill for what we are doing //and now that everything is properly in a transaction (Scope) there doesn't seem to be much reason for using that anymore var now = DateTime.UtcNow; @@ -443,7 +443,7 @@ ORDER BY colName"; var userDto = UserFactory.BuildDto(entity); // check if we have a known config, we only want to store config for hashing - //TODO: This logic will need to be updated when we do http://issues.umbraco.org/issue/U4-10089 + // TODO: This logic will need to be updated when we do http://issues.umbraco.org/issue/U4-10089 if (PasswordConfigJson != null) userDto.PasswordConfig = PasswordConfigJson; @@ -538,7 +538,7 @@ ORDER BY colName"; } // check if we have a known config, we only want to store config for hashing - //TODO: This logic will need to be updated when we do http://issues.umbraco.org/issue/U4-10089 + // TODO: This logic will need to be updated when we do http://issues.umbraco.org/issue/U4-10089 if (PasswordConfigJson != null) { userDto.PasswordConfig = PasswordConfigJson; @@ -573,7 +573,7 @@ ORDER BY colName"; : Database.Fetch("SELECT * FROM umbracoUserGroup WHERE userGroupAlias IN (@aliases)", new { aliases = entity.Groups.Select(x => x.Alias) }); //first delete all - //TODO: We could do this a nicer way instead of "Nuke and Pave" + // TODO: We could do this a nicer way instead of "Nuke and Pave" Database.Delete("WHERE UserId = @UserId", new { UserId = entity.Id }); foreach (var groupDto in assigned) diff --git a/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs b/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs index d6ceeaa3e6..5b6a9afb04 100644 --- a/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs +++ b/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs @@ -500,7 +500,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax if (column.DefaultValue == null) return string.Empty; - //hack - probably not needed with latest changes + // HACK: probably not needed with latest changes if (column.DefaultValue.ToString().ToLower().Equals("getdate()".ToLower())) column.DefaultValue = SystemMethods.CurrentDateTime; diff --git a/src/Umbraco.Core/PropertyEditors/Validators/DelimitedValueValidator.cs b/src/Umbraco.Core/PropertyEditors/Validators/DelimitedValueValidator.cs index 3891d7952b..c3dca609d2 100644 --- a/src/Umbraco.Core/PropertyEditors/Validators/DelimitedValueValidator.cs +++ b/src/Umbraco.Core/PropertyEditors/Validators/DelimitedValueValidator.cs @@ -23,7 +23,7 @@ namespace Umbraco.Core.PropertyEditors.Validators /// public IEnumerable Validate(object value, string valueType, object dataTypeConfiguration) { - //TODO: localize these! + // TODO: localize these! if (value != null) { var delimiter = ","; diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/JsonValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/JsonValueConverter.cs index d4cee4762f..e04893716a 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/JsonValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/JsonValueConverter.cs @@ -65,6 +65,6 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters return sourceString; } - //TODO: Now to convert that to XPath! + // TODO: Now to convert that to XPath! } } diff --git a/src/Umbraco.Core/Runtime/CoreRuntimeComposer.cs b/src/Umbraco.Core/Runtime/CoreRuntimeComposer.cs index 83cc456127..8285b9b4fd 100644 --- a/src/Umbraco.Core/Runtime/CoreRuntimeComposer.cs +++ b/src/Umbraco.Core/Runtime/CoreRuntimeComposer.cs @@ -73,7 +73,7 @@ namespace Umbraco.Core.Runtime // register a server registrar, by default it's the db registrar composition.RegisterUnique(f => { - // TODO this is a hack, use proper configuration! + // TODO: this is a hack, use proper configuration! // also: we still register the full IServerMessenger because // even on 1 single server we can have 2 concurrent app domains var singleServer = "true".InvariantEquals(ConfigurationManager.AppSettings["umbracoDisableElectionForSingleServer"]); diff --git a/src/Umbraco.Core/Scoping/ScopeContext.cs b/src/Umbraco.Core/Scoping/ScopeContext.cs index 03a0da1a55..7b62c5c7a2 100644 --- a/src/Umbraco.Core/Scoping/ScopeContext.cs +++ b/src/Umbraco.Core/Scoping/ScopeContext.cs @@ -13,7 +13,7 @@ namespace Umbraco.Core.Scoping if (_enlisted == null) return; - // TODO: - can we create infinite loops? - what about nested events? will they just be plainly ignored = really bad? + // TODO: can we create infinite loops? - what about nested events? will they just be plainly ignored = really bad? List exceptions = null; List orderedEnlisted; while ((orderedEnlisted = _enlisted.Values.OrderBy(x => x.Priority).ToList()).Count > 0) diff --git a/src/Umbraco.Core/Security/BackOfficeUserStore.cs b/src/Umbraco.Core/Security/BackOfficeUserStore.cs index 2d9469180a..3d87482d60 100644 --- a/src/Umbraco.Core/Security/BackOfficeUserStore.cs +++ b/src/Umbraco.Core/Security/BackOfficeUserStore.cs @@ -30,9 +30,9 @@ namespace Umbraco.Core.Security IUserTwoFactorStore, IUserSessionStore - //TODO: This would require additional columns/tables for now people will need to implement this on their own + // TODO: This would require additional columns/tables for now people will need to implement this on their own //IUserPhoneNumberStore, - //TODO: To do this we need to implement IQueryable - we'll have an IQuerable implementation soon with the UmbracoLinqPadDriver implementation + // TODO: To do this we need to implement IQueryable - we'll have an IQuerable implementation soon with the UmbracoLinqPadDriver implementation //IQueryableUserStore { private readonly IUserService _userService; @@ -99,7 +99,7 @@ namespace Umbraco.Core.Security UpdateMemberProperties(userEntity, user); - //TODO: We should deal with Roles --> User Groups here which we currently are not doing + // TODO: We should deal with Roles --> User Groups here which we currently are not doing _userService.Save(userEntity); @@ -720,7 +720,7 @@ namespace Umbraco.Core.Security user.SecurityStamp = identityUser.SecurityStamp; } - //TODO: Fix this for Groups too + // TODO: Fix this for Groups too if (identityUser.IsPropertyDirty("Roles") || identityUser.IsPropertyDirty("Groups")) { var userGroupAliases = user.Groups.Select(x => x.Alias).ToArray(); diff --git a/src/Umbraco.Core/Security/MembershipProviderExtensions.cs b/src/Umbraco.Core/Security/MembershipProviderExtensions.cs index ff595a5d45..8fc2cb77e4 100644 --- a/src/Umbraco.Core/Security/MembershipProviderExtensions.cs +++ b/src/Umbraco.Core/Security/MembershipProviderExtensions.cs @@ -161,7 +161,7 @@ namespace Umbraco.Core.Security return (membershipProvider is UmbracoMembershipProviderBase); } - //TODO: Add role provider checks too + // TODO: Add role provider checks too public static UmbracoMembershipProviderBase AsUmbracoMembershipProvider(this MembershipProvider membershipProvider) { diff --git a/src/Umbraco.Core/Security/UserAwareMembershipProviderPasswordHasher.cs b/src/Umbraco.Core/Security/UserAwareMembershipProviderPasswordHasher.cs index 7fecb30fba..e09c861caa 100644 --- a/src/Umbraco.Core/Security/UserAwareMembershipProviderPasswordHasher.cs +++ b/src/Umbraco.Core/Security/UserAwareMembershipProviderPasswordHasher.cs @@ -15,14 +15,14 @@ namespace Umbraco.Core.Security public string HashPassword(BackOfficeIdentityUser user, string password) { - //TODO: Implement the logic for this, we need to lookup the password format for the user and hash accordingly: http://issues.umbraco.org/issue/U4-10089 + // TODO: Implement the logic for this, we need to lookup the password format for the user and hash accordingly: http://issues.umbraco.org/issue/U4-10089 //NOTE: For now this just falls back to the hashing we are currently using return base.HashPassword(password); } public PasswordVerificationResult VerifyHashedPassword(BackOfficeIdentityUser user, string hashedPassword, string providedPassword) { - //TODO: Implement the logic for this, we need to lookup the password format for the user and hash accordingly: http://issues.umbraco.org/issue/U4-10089 + // TODO: Implement the logic for this, we need to lookup the password format for the user and hash accordingly: http://issues.umbraco.org/issue/U4-10089 //NOTE: For now this just falls back to the hashing we are currently using return base.VerifyHashedPassword(hashedPassword, providedPassword); } diff --git a/src/Umbraco.Core/Services/Implement/AuditService.cs b/src/Umbraco.Core/Services/Implement/AuditService.cs index d02d7f541b..46c851a789 100644 --- a/src/Umbraco.Core/Services/Implement/AuditService.cs +++ b/src/Umbraco.Core/Services/Implement/AuditService.cs @@ -200,7 +200,7 @@ namespace Umbraco.Core.Services.Implement return entry; } - //TODO: Currently used in testing only, not part of the interface, need to add queryable methods to the interface instead + // TODO: Currently used in testing only, not part of the interface, need to add queryable methods to the interface instead internal IEnumerable GetAll() { if (_isAvailable.Value == false) return Enumerable.Empty(); @@ -211,7 +211,7 @@ namespace Umbraco.Core.Services.Implement } } - //TODO: Currently used in testing only, not part of the interface, need to add queryable methods to the interface instead + // TODO: Currently used in testing only, not part of the interface, need to add queryable methods to the interface instead internal IEnumerable GetPage(long pageIndex, int pageCount, out long records) { if (_isAvailable.Value == false) diff --git a/src/Umbraco.Core/Services/Implement/ContentService.cs b/src/Umbraco.Core/Services/Implement/ContentService.cs index cbc2eeca7a..266f34cc37 100644 --- a/src/Umbraco.Core/Services/Implement/ContentService.cs +++ b/src/Umbraco.Core/Services/Implement/ContentService.cs @@ -778,7 +778,7 @@ namespace Umbraco.Core.Services.Implement var culturesChanging = content.ContentType.VariesByCulture() ? content.CultureInfos.Where(x => x.Value.IsDirty()).Select(x => x.Key).ToList() : null; - //TODO: Currently there's no way to change track which variant properties have changed, we only have change + // TODO: Currently there's no way to change track which variant properties have changed, we only have change // tracking enabled on all values on the Property which doesn't allow us to know which variants have changed. // in this particular case, determining which cultures have changed works with the above with names since it will // have always changed if it's been saved in the back office but that's not really fail safe. @@ -1562,8 +1562,7 @@ namespace Umbraco.Core.Services.Implement DoDelete(content); } - //TODO: - // both DeleteVersions methods below have an issue. Sort of. They do NOT take care of files the way + //TODO: both DeleteVersions methods below have an issue. Sort of. They do NOT take care of files the way // Delete does - for a good reason: the file may be referenced by other, non-deleted, versions. BUT, // if that's not the case, then the file will never be deleted, because when we delete the content, // the version referencing the file will not be there anymore. SO, we can leak files. @@ -2001,7 +2000,7 @@ namespace Umbraco.Core.Services.Implement ? string.Join(",", content.CultureInfos.Where(x => x.Value.IsDirty()).Select(x => x.Key)) : null; - //TODO: Currently there's no way to change track which variant properties have changed, we only have change + // TODO: Currently there's no way to change track which variant properties have changed, we only have change // tracking enabled on all values on the Property which doesn't allow us to know which variants have changed. // in this particular case, determining which cultures have changed works with the above with names since it will // have always changed if it's been saved in the back office but that's not really fail safe. @@ -2553,7 +2552,7 @@ namespace Umbraco.Core.Services.Implement /// Optional Id of the user issuing the delete operation public void DeleteOfTypes(IEnumerable contentTypeIds, int userId = 0) { - //TODO: This currently this is called from the ContentTypeService but that needs to change, + // TODO: This currently this is called from the ContentTypeService but that needs to change, // if we are deleting a content type, we should just delete the data and do this operation slightly differently. // This method will recursively go lookup every content item, check if any of it's descendants are // of a different type, move them to the recycle bin, then permanently delete the content items. diff --git a/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs b/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs index 0cac249cdf..bf43693d3b 100644 --- a/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs +++ b/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs @@ -134,7 +134,7 @@ namespace Umbraco.Core.Services.Implement var dirty = (IRememberBeingDirty)contentType; // skip new content types - //TODO: This used to be WasPropertyDirty("HasIdentity") but i don't think that actually worked for detecting new entities this does seem to work properly + // TODO: This used to be WasPropertyDirty("HasIdentity") but i don't think that actually worked for detecting new entities this does seem to work properly var isNewContentType = dirty.WasPropertyDirty("Id"); if (isNewContentType) { @@ -152,7 +152,7 @@ namespace Umbraco.Core.Services.Implement throw new Exception("oops"); // skip new properties - //TODO: This used to be WasPropertyDirty("HasIdentity") but i don't think that actually worked for detecting new entities this does seem to work properly + // TODO: This used to be WasPropertyDirty("HasIdentity") but i don't think that actually worked for detecting new entities this does seem to work properly var isNewProperty = dirtyProperty.WasPropertyDirty("Id"); if (isNewProperty) return false; @@ -758,7 +758,7 @@ namespace Umbraco.Core.Services.Implement saveEventArgs.CanCancel = false; OnSavedContainer(scope, saveEventArgs); - //TODO: Audit trail ? + // TODO: Audit trail ? return OperationResult.Attempt.Succeed(evtMsgs, container); } @@ -805,7 +805,7 @@ namespace Umbraco.Core.Services.Implement OnSavedContainer(scope, args); } - //TODO: Audit trail ? + // TODO: Audit trail ? return OperationResult.Attempt.Succeed(evtMsgs); } @@ -897,7 +897,7 @@ namespace Umbraco.Core.Services.Implement OnDeletedContainer(scope, deleteEventArgs); return OperationResult.Attempt.Succeed(evtMsgs); - //TODO: Audit trail ? + // TODO: Audit trail ? } } diff --git a/src/Umbraco.Core/Services/Implement/DataTypeService.cs b/src/Umbraco.Core/Services/Implement/DataTypeService.cs index 4c588157d0..97368e9047 100644 --- a/src/Umbraco.Core/Services/Implement/DataTypeService.cs +++ b/src/Umbraco.Core/Services/Implement/DataTypeService.cs @@ -62,7 +62,7 @@ namespace Umbraco.Core.Services.Implement scope.Complete(); scope.Events.Dispatch(SavedContainer, this, new SaveEventArgs(container, evtMsgs)); - //TODO: Audit trail ? + // TODO: Audit trail ? return OperationResult.Attempt.Succeed(evtMsgs, container); } @@ -149,7 +149,7 @@ namespace Umbraco.Core.Services.Implement scope.Complete(); } - //TODO: Audit trail ? + // TODO: Audit trail ? return OperationResult.Attempt.Succeed(evtMsgs); } @@ -182,7 +182,7 @@ namespace Umbraco.Core.Services.Implement scope.Complete(); } - //TODO: Audit trail ? + // TODO: Audit trail ? return OperationResult.Attempt.Succeed(evtMsgs); } diff --git a/src/Umbraco.Core/Services/Implement/FileService.cs b/src/Umbraco.Core/Services/Implement/FileService.cs index 36b4af6d5e..f49395d73d 100644 --- a/src/Umbraco.Core/Services/Implement/FileService.cs +++ b/src/Umbraco.Core/Services/Implement/FileService.cs @@ -1039,7 +1039,7 @@ namespace Umbraco.Core.Services.Implement _auditRepository.Save(new AuditItem(objectId, type, userId, entityType)); } - //TODO Method to change name and/or alias of view template + // TODO: Method to change name and/or alias of view template #region Event Handlers diff --git a/src/Umbraco.Core/Services/Implement/LocalizedTextService.cs b/src/Umbraco.Core/Services/Implement/LocalizedTextService.cs index 9401cefa7d..4f5121def7 100644 --- a/src/Umbraco.Core/Services/Implement/LocalizedTextService.cs +++ b/src/Umbraco.Core/Services/Implement/LocalizedTextService.cs @@ -8,7 +8,7 @@ using Umbraco.Core.Logging; namespace Umbraco.Core.Services.Implement { - //TODO: Convert all of this over to Niels K's localization framework one day + // TODO: Convert all of this over to Niels K's localization framework one day public class LocalizedTextService : ILocalizedTextService { @@ -58,7 +58,7 @@ namespace Umbraco.Core.Services.Implement { if (culture == null) throw new ArgumentNullException(nameof(culture)); - //TODO: Hack, see notes on ConvertToSupportedCultureWithRegionCode + // TODO: Hack, see notes on ConvertToSupportedCultureWithRegionCode culture = ConvertToSupportedCultureWithRegionCode(culture); //This is what the legacy ui service did @@ -91,7 +91,7 @@ namespace Umbraco.Core.Services.Implement { if (culture == null) throw new ArgumentNullException("culture"); - //TODO: Hack, see notes on ConvertToSupportedCultureWithRegionCode + // TODO: Hack, see notes on ConvertToSupportedCultureWithRegionCode culture = ConvertToSupportedCultureWithRegionCode(culture); var result = new Dictionary(); diff --git a/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs b/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs index f19dd9f63e..a0b952a75a 100644 --- a/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs +++ b/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs @@ -21,7 +21,7 @@ namespace Umbraco.Core.Services.Implement private readonly IEnumerable _supplementFileSources; private readonly DirectoryInfo _fileSourceFolder; - //TODO: See other notes in this class, this is purely a hack because we store 2 letter culture file names that contain 4 letter cultures :( + // TODO: See other notes in this class, this is purely a hack because we store 2 letter culture file names that contain 4 letter cultures :( private readonly Dictionary _twoLetterCultureConverter = new Dictionary(); private readonly Lazy>> _xmlSources; @@ -60,7 +60,7 @@ namespace Umbraco.Core.Services.Implement var localCopy = fileInfo; var filename = Path.GetFileNameWithoutExtension(localCopy.FullName).Replace("_", "-"); - //TODO: Fix this nonsense... would have to wait until v8 to store the language files with their correct + // TODO: Fix this nonsense... would have to wait until v8 to store the language files with their correct // names instead of storing them as 2 letters but actually having a 4 letter culture. wtf. So now, we // need to check if the file is 2 letters, then open it to try to find it's 4 letter culture, then use that // if it's successful. We're going to assume (though it seems assuming in the legacy logic is never a great idea) @@ -150,7 +150,7 @@ namespace Umbraco.Core.Services.Implement return _xmlSources.Value; } - //TODO: See other notes in this class, this is purely a hack because we store 2 letter culture file names that contain 4 letter cultures :( + // TODO: See other notes in this class, this is purely a hack because we store 2 letter culture file names that contain 4 letter cultures :( public Attempt TryConvert2LetterCultureTo4Letter(string twoLetterCulture) { if (twoLetterCulture.Length != 2) return Attempt.Fail(); @@ -163,7 +163,7 @@ namespace Umbraco.Core.Services.Implement : Attempt.Fail(); } - //TODO: See other notes in this class, this is purely a hack because we store 2 letter culture file names that contain 4 letter cultures :( + // TODO: See other notes in this class, this is purely a hack because we store 2 letter culture file names that contain 4 letter cultures :( public Attempt TryConvert4LetterCultureTo2Letter(CultureInfo culture) { if (culture == null) throw new ArgumentNullException("culture"); diff --git a/src/Umbraco.Core/Services/Implement/MediaService.cs b/src/Umbraco.Core/Services/Implement/MediaService.cs index 9ca7892f62..e7a42e28e4 100644 --- a/src/Umbraco.Core/Services/Implement/MediaService.cs +++ b/src/Umbraco.Core/Services/Implement/MediaService.cs @@ -773,8 +773,7 @@ namespace Umbraco.Core.Services.Implement DoDelete(media); } - //TODO: - // both DeleteVersions methods below have an issue. Sort of. They do NOT take care of files the way + //TODO: both DeleteVersions methods below have an issue. Sort of. They do NOT take care of files the way // Delete does - for a good reason: the file may be referenced by other, non-deleted, versions. BUT, // if that's not the case, then the file will never be deleted, because when we delete the media, // the version referencing the file will not be there anymore. SO, we can leak files. @@ -1276,7 +1275,7 @@ namespace Umbraco.Core.Services.Implement /// Optional id of the user deleting the media public void DeleteMediaOfTypes(IEnumerable mediaTypeIds, int userId = 0) { - //TODO: This currently this is called from the ContentTypeService but that needs to change, + // TODO: This currently this is called from the ContentTypeService but that needs to change, // if we are deleting a content type, we should just delete the data and do this operation slightly differently. // This method will recursively go lookup every content item, check if any of it's descendants are // of a different type, move them to the recycle bin, then permanently delete the content items. diff --git a/src/Umbraco.Core/Services/Implement/MemberService.cs b/src/Umbraco.Core/Services/Implement/MemberService.cs index b7afaea1be..3b35896769 100644 --- a/src/Umbraco.Core/Services/Implement/MemberService.cs +++ b/src/Umbraco.Core/Services/Implement/MemberService.cs @@ -449,7 +449,7 @@ namespace Umbraco.Core.Services.Implement /// public IMember GetByUsername(string username) { - //TODO: Somewhere in here, whether at this level or the repository level, we need to add + // TODO: Somewhere in here, whether at this level or the repository level, we need to add // a caching mechanism since this method is used by all the membership providers and could be // called quite a bit when dealing with members. @@ -770,8 +770,8 @@ namespace Umbraco.Core.Services.Implement throw new ArgumentOutOfRangeException(nameof(matchType)); // causes rollback // causes rollback } - //TODO: Since this is by property value, we need a GetByPropertyQuery on the repo! - //TODO: Since this is by property value, we need a GetByPropertyQuery on the repo! + // TODO: Since this is by property value, we need a GetByPropertyQuery on the repo! + // TODO: Since this is by property value, we need a GetByPropertyQuery on the repo! return _memberRepository.Get(query); } } @@ -1330,8 +1330,8 @@ namespace Umbraco.Core.Services.Implement { scope.WriteLock(Constants.Locks.MemberTree); - //TODO: What about content that has the contenttype as part of its composition? - //TODO: What about content that has the contenttype as part of its composition? + // TODO: What about content that has the contenttype as part of its composition? + // TODO: What about content that has the contenttype as part of its composition? var query = Query().Where(x => x.ContentTypeId == memberTypeId); var members = _memberRepository.Get(query).ToArray(); diff --git a/src/Umbraco.Core/Services/Implement/NotificationService.cs b/src/Umbraco.Core/Services/Implement/NotificationService.cs index 95353715e1..d981809364 100644 --- a/src/Umbraco.Core/Services/Implement/NotificationService.cs +++ b/src/Umbraco.Core/Services/Implement/NotificationService.cs @@ -394,7 +394,7 @@ namespace Umbraco.Core.Services.Implement content.Id.ToString(CultureInfo.InvariantCulture), string.Format("{2}://{0}/{1}", string.Concat(siteUri.Authority), - //TODO: RE-enable this so we can have a nice url + // TODO: RE-enable this so we can have a nice url /*umbraco.library.NiceUrl(documentObject.Id))*/ string.Concat(content.Id, ".aspx"), protocol), diff --git a/src/Umbraco.Core/Services/Implement/UserService.cs b/src/Umbraco.Core/Services/Implement/UserService.cs index e2c64d2f29..0ea77dedcc 100644 --- a/src/Umbraco.Core/Services/Implement/UserService.cs +++ b/src/Umbraco.Core/Services/Implement/UserService.cs @@ -109,7 +109,7 @@ namespace Umbraco.Core.Services.Implement { if (string.IsNullOrWhiteSpace(username)) throw new ArgumentNullOrEmptyException(nameof(username)); - //TODO: PUT lock here!! + // TODO: PUT lock here!! User user; using (var scope = ScopeProvider.CreateScope()) @@ -1218,7 +1218,7 @@ namespace Umbraco.Core.Services.Implement /// public static event TypedEventHandler> DeletedUserGroup; - //TODO: still don't know if we need this yet unless we start caching permissions, but that also means we'll need another + // TODO: still don't know if we need this yet unless we start caching permissions, but that also means we'll need another // event on the ContentService since there's a method there to modify node permissions too, or we can proxy events if needed. internal static event TypedEventHandler> UserGroupPermissionsAssigned; } diff --git a/src/Umbraco.Core/Services/OperationResultType.cs b/src/Umbraco.Core/Services/OperationResultType.cs index 2998692c13..918f1c49fa 100644 --- a/src/Umbraco.Core/Services/OperationResultType.cs +++ b/src/Umbraco.Core/Services/OperationResultType.cs @@ -40,6 +40,6 @@ /// NoOperation = Failed | 6, // TODO: shouldn't it be a success? - //TODO: In the future, we might need to add more operations statuses, potentially like 'FailedByPermissions', etc... + // TODO: In the future, we might need to add more operations statuses, potentially like 'FailedByPermissions', etc... } } diff --git a/src/Umbraco.Core/Strings/IUrlSegmentProvider.cs b/src/Umbraco.Core/Strings/IUrlSegmentProvider.cs index b326a3cda6..12d2ef9a17 100644 --- a/src/Umbraco.Core/Strings/IUrlSegmentProvider.cs +++ b/src/Umbraco.Core/Strings/IUrlSegmentProvider.cs @@ -20,7 +20,7 @@ namespace Umbraco.Core.Strings /// url per culture. string GetUrlSegment(IContentBase content, string culture = null); - //TODO: For the 301 tracking, we need to add another extended interface to this so that + // TODO: For the 301 tracking, we need to add another extended interface to this so that // the RedirectTrackingEventHandler can ask the IUrlSegmentProvider if the URL is changing. // Currently the way it works is very hacky, see notes in: RedirectTrackingEventHandler.ContentService_Publishing } diff --git a/src/Umbraco.Core/Sync/IServerAddress.cs b/src/Umbraco.Core/Sync/IServerAddress.cs index 42567c67c1..be74b8483f 100644 --- a/src/Umbraco.Core/Sync/IServerAddress.cs +++ b/src/Umbraco.Core/Sync/IServerAddress.cs @@ -10,6 +10,6 @@ /// string ServerAddress { get; } - //TODO : Should probably add things like port, protocol, server name, app id + // TODO: Should probably add things like port, protocol, server name, app id } } diff --git a/src/Umbraco.Core/TypeExtensions.cs b/src/Umbraco.Core/TypeExtensions.cs index 56b2026afb..1582b603d3 100644 --- a/src/Umbraco.Core/TypeExtensions.cs +++ b/src/Umbraco.Core/TypeExtensions.cs @@ -55,7 +55,7 @@ namespace Umbraco.Core ? getMember(memberName.ToCleanString(CleanStringType.Ascii | CleanStringType.ConvertCase | CleanStringType.CamelCase)) : getMember(memberName.ToCleanString(CleanStringType.Ascii | CleanStringType.ConvertCase | CleanStringType.PascalCase)); - //TODO: If this still fails then we should get a list of properties from the object and then compare - doing the above without listing + // TODO: If this still fails then we should get a list of properties from the object and then compare - doing the above without listing // all properties will surely be faster than using reflection to get ALL properties first and then query against them. } diff --git a/src/Umbraco.Core/UdiEntityType.cs b/src/Umbraco.Core/UdiEntityType.cs index 07bde1ba93..86197ce6a8 100644 --- a/src/Umbraco.Core/UdiEntityType.cs +++ b/src/Umbraco.Core/UdiEntityType.cs @@ -78,7 +78,7 @@ namespace Umbraco.Core public const string DocumentType = "document-type"; public const string DocumentTypeContainer = "document-type-container"; - //TODO: What is this? This alias is only used for the blue print tree to render the blueprint's document type, it's not a real udi type + // TODO: What is this? This alias is only used for the blue print tree to render the blueprint's document type, it's not a real udi type public const string DocumentTypeBluePrints = "document-type-blueprints"; public const string MediaType = "media-type"; public const string MediaTypeContainer = "media-type-container"; diff --git a/src/Umbraco.Core/Xml/UmbracoXPathPathSyntaxParser.cs b/src/Umbraco.Core/Xml/UmbracoXPathPathSyntaxParser.cs index afe9831b72..b31fa6a8df 100644 --- a/src/Umbraco.Core/Xml/UmbracoXPathPathSyntaxParser.cs +++ b/src/Umbraco.Core/Xml/UmbracoXPathPathSyntaxParser.cs @@ -31,7 +31,7 @@ namespace Umbraco.Core.Xml Func publishedContentExists) { - //TODO: This should probably support some of the old syntax and token replacements, currently + // TODO: This should probably support some of the old syntax and token replacements, currently // it does not, there is a ticket raised here about it: http://issues.umbraco.org/issue/U4-6364 // previous tokens were: "$currentPage", "$ancestorOrSelf", "$parentPage" and I believe they were // allowed 'inline', not just at the beginning... whether or not we want to support that is up @@ -97,7 +97,7 @@ namespace Umbraco.Core.Xml }); } - //TODO: This used to just replace $root with string.Empty BUT, that would never work + // TODO: This used to just replace $root with string.Empty BUT, that would never work // the root is always "/root . Need to confirm with Per why this was string.Empty before! vars.Add("$root", q => q.Replace("$root", "/root")); diff --git a/src/Umbraco.Core/Xml/XPath/INavigableContent.cs b/src/Umbraco.Core/Xml/XPath/INavigableContent.cs index c48b91893a..eeb7891726 100644 --- a/src/Umbraco.Core/Xml/XPath/INavigableContent.cs +++ b/src/Umbraco.Core/Xml/XPath/INavigableContent.cs @@ -45,7 +45,7 @@ namespace Umbraco.Core.Xml.XPath /// object Value(int index); - // TODO implement the following one + // TODO: implement the following one ///// ///// Gets the value of a field of the navigable content, for a specified language. diff --git a/src/Umbraco.Examine/ContentValueSetBuilder.cs b/src/Umbraco.Examine/ContentValueSetBuilder.cs index a6262c53fc..5e0197765d 100644 --- a/src/Umbraco.Examine/ContentValueSetBuilder.cs +++ b/src/Umbraco.Examine/ContentValueSetBuilder.cs @@ -29,7 +29,7 @@ namespace Umbraco.Examine /// public override IEnumerable GetValueSets(params IContent[] content) { - //TODO: There is a lot of boxing going on here and ultimately all values will be boxed by Lucene anyways + // TODO: There is a lot of boxing going on here and ultimately all values will be boxed by Lucene anyways // but I wonder if there's a way to reduce the boxing that we have to do or if it will matter in the end since // Lucene will do it no matter what? One idea was to create a `FieldValue` struct which would contain `object`, `object[]`, `ValueType` and `ValueType[]` // references and then each array is an array of `FieldValue[]` and values are assigned accordingly. Not sure if it will make a difference or not. diff --git a/src/Umbraco.Examine/ExamineExtensions.cs b/src/Umbraco.Examine/ExamineExtensions.cs index 4fe6c359d7..19171ac6b1 100644 --- a/src/Umbraco.Examine/ExamineExtensions.cs +++ b/src/Umbraco.Examine/ExamineExtensions.cs @@ -48,7 +48,7 @@ namespace Umbraco.Examine internal static bool TryParseLuceneQuery(string query) { - //TODO: I'd assume there would be a more strict way to parse the query but not that i can find yet, for now we'll + // TODO: I'd assume there would be a more strict way to parse the query but not that i can find yet, for now we'll // also do this rudimentary check if (!query.Contains(":")) return false; diff --git a/src/Umbraco.Tests.Benchmarks/BulkInsertBenchmarks.cs b/src/Umbraco.Tests.Benchmarks/BulkInsertBenchmarks.cs index ee2e75cfad..d6dc1f8c73 100644 --- a/src/Umbraco.Tests.Benchmarks/BulkInsertBenchmarks.cs +++ b/src/Umbraco.Tests.Benchmarks/BulkInsertBenchmarks.cs @@ -22,7 +22,7 @@ namespace Umbraco.Tests.Benchmarks { private static byte[] _initDbBytes; - // fixme - should run on LocalDb same as NPoco tests! + // FIXME: should run on LocalDb same as NPoco tests! private IUmbracoDatabase GetSqlServerDatabase(ILogger logger) { diff --git a/src/Umbraco.Tests/Cache/DistributedCacheBinderTests.cs b/src/Umbraco.Tests/Cache/DistributedCacheBinderTests.cs index 3532a11c63..e9448bd0fc 100644 --- a/src/Umbraco.Tests/Cache/DistributedCacheBinderTests.cs +++ b/src/Umbraco.Tests/Cache/DistributedCacheBinderTests.cs @@ -32,7 +32,7 @@ namespace Umbraco.Tests.Cache [Test] public void Can_Find_All_Event_Handlers() { - // fixme - cannot work with mocks + // FIXME: cannot work with mocks // because the events are defined on actual static classes, not on the interfaces, so name matching fails // we should really refactor events entirely - in the meantime, let it be an UmbracoTestBase ;( //var testObjects = new TestObjects(null); diff --git a/src/Umbraco.Tests/Clr/ReflectionUtilitiesTests.cs b/src/Umbraco.Tests/Clr/ReflectionUtilitiesTests.cs index f40ca3f500..0431e7d69f 100644 --- a/src/Umbraco.Tests/Clr/ReflectionUtilitiesTests.cs +++ b/src/Umbraco.Tests/Clr/ReflectionUtilitiesTests.cs @@ -309,7 +309,7 @@ namespace Umbraco.Tests.Clr setterInt4(object4, 42); Assert.AreEqual(42, object4.IntValue); - // fixme the code below runs fine with ReSharper test running within VisualStudio + // FIXME: the code below runs fine with ReSharper test running within VisualStudio // but it crashes when running via vstest.console.exe - unless some settings are required? // converting works @@ -552,7 +552,7 @@ namespace Umbraco.Tests.Clr Assert.AreEqual(44, getter3(c)); } - // fixme - missing tests specifying 'returned' on method, property + // FIXME: missing tests specifying 'returned' on method, property [Test] public void DeconstructAnonymousType() diff --git a/src/Umbraco.Tests/Components/ComponentTests.cs b/src/Umbraco.Tests/Components/ComponentTests.cs index a04636f919..390bb018da 100644 --- a/src/Umbraco.Tests/Components/ComponentTests.cs +++ b/src/Umbraco.Tests/Components/ComponentTests.cs @@ -23,7 +23,7 @@ namespace Umbraco.Tests.Components private static IFactory MockFactory(Action> setup = null) { - // fixme use IUmbracoDatabaseFactory vs UmbracoDatabaseFactory, clean it all up! + // FIXME: use IUmbracoDatabaseFactory vs UmbracoDatabaseFactory, clean it all up! var mock = new Mock(); @@ -444,7 +444,7 @@ namespace Umbraco.Tests.Components #region TypeArray - // fixme - move to Testing + // FIXME: move to Testing private static Type[] TypeArray() { diff --git a/src/Umbraco.Tests/Composing/ContainerConformingTests.cs b/src/Umbraco.Tests/Composing/ContainerConformingTests.cs index 21ea961636..86226b82e7 100644 --- a/src/Umbraco.Tests/Composing/ContainerConformingTests.cs +++ b/src/Umbraco.Tests/Composing/ContainerConformingTests.cs @@ -143,12 +143,11 @@ namespace Umbraco.Tests.Composing } [Test] - public void SingletonServiceIsUnique() // fixme - but what is LightInject actually doing + public void SingletonServiceIsUnique() // FIXME: but what is LightInject actually doing { var register = GetRegister(); - // fixme - // LightInject is 'unique' per serviceType+serviceName + // FIXME: LightInject is 'unique' per serviceType+serviceName // but that's not how all containers work // and we should not rely on it // if we need unique, use RegisterUnique diff --git a/src/Umbraco.Tests/CoreThings/UdiTests.cs b/src/Umbraco.Tests/CoreThings/UdiTests.cs index 35080e8c24..c700b78c4b 100644 --- a/src/Umbraco.Tests/CoreThings/UdiTests.cs +++ b/src/Umbraco.Tests/CoreThings/UdiTests.cs @@ -22,7 +22,7 @@ namespace Umbraco.Tests.CoreThings [SetUp] public void SetUp() { - // fixme - bad in a unit test - but Udi has a static ctor that wants it?! + // FIXME: bad in a unit test - but Udi has a static ctor that wants it?! var container = new Mock(); var globalSettings = SettingsForTests.GenerateMockGlobalSettings(); container.Setup(x => x.GetInstance(typeof(TypeLoader))).Returns( diff --git a/src/Umbraco.Tests/FrontEnd/UmbracoHelperTests.cs b/src/Umbraco.Tests/FrontEnd/UmbracoHelperTests.cs index 088ef6b54b..1c0b407ac6 100644 --- a/src/Umbraco.Tests/FrontEnd/UmbracoHelperTests.cs +++ b/src/Umbraco.Tests/FrontEnd/UmbracoHelperTests.cs @@ -406,7 +406,7 @@ namespace Umbraco.Tests.FrontEnd private void SetUpDependencyContainer() { - // fixme - bad in a unit test - but Udi has a static ctor that wants it?! + // FIXME: bad in a unit test - but Udi has a static ctor that wants it?! var container = new Mock(); var globalSettings = SettingsForTests.GenerateMockGlobalSettings(); diff --git a/src/Umbraco.Tests/IO/FileSystemsTests.cs b/src/Umbraco.Tests/IO/FileSystemsTests.cs index 52de1bbcfa..1f98fd4443 100644 --- a/src/Umbraco.Tests/IO/FileSystemsTests.cs +++ b/src/Umbraco.Tests/IO/FileSystemsTests.cs @@ -122,7 +122,7 @@ namespace Umbraco.Tests.IO } - // fixme - don't make sense anymore + // FIXME: don't make sense anymore /* [Test] public void Cannot_Get_InvalidFileSystem() diff --git a/src/Umbraco.Tests/Logging/LogviewerTests.cs b/src/Umbraco.Tests/Logging/LogviewerTests.cs index 2feac2ae5f..75e2c66a61 100644 --- a/src/Umbraco.Tests/Logging/LogviewerTests.cs +++ b/src/Umbraco.Tests/Logging/LogviewerTests.cs @@ -199,7 +199,7 @@ namespace Umbraco.Tests.Logging Assert.IsNotNull(findItem, "We should have found the saved search, but get no results"); Assert.AreEqual(1, findItem.Count(), "Our list of searches should only contain one result"); - //TODO: Need someone to help me find out why these don't work + // TODO: Need someone to help me find out why these don't work //CollectionAssert.Contains(searches, savedSearch, "Can not find the new search that was saved"); //Assert.That(searches, Contains.Item(savedSearch)); diff --git a/src/Umbraco.Tests/Manifest/ManifestParserTests.cs b/src/Umbraco.Tests/Manifest/ManifestParserTests.cs index 4e791c0169..051c660c66 100644 --- a/src/Umbraco.Tests/Manifest/ManifestParserTests.cs +++ b/src/Umbraco.Tests/Manifest/ManifestParserTests.cs @@ -337,12 +337,12 @@ javascript: ['~/test.js',/*** some note about stuff asd09823-4**09234*/ '~/test2 Assert.AreEqual(2, config.Count); Assert.IsTrue(config.ContainsKey("image")); var c = config["image"]; - Assert.IsInstanceOf(c); // fixme - is this what we want? + Assert.IsInstanceOf(c); // FIXME: is this what we want? Assert.IsTrue(config.ContainsKey("link")); c = config["link"]; - Assert.IsInstanceOf(c); // fixme - is this what we want? + Assert.IsInstanceOf(c); // FIXME: is this what we want? - // fixme - should we resolveUrl in configs? + // FIXME: should we resolveUrl in configs? } [Test] diff --git a/src/Umbraco.Tests/Membership/MembershipProviderBaseTests.cs b/src/Umbraco.Tests/Membership/MembershipProviderBaseTests.cs index f1f46133c3..091ea6f9a0 100644 --- a/src/Umbraco.Tests/Membership/MembershipProviderBaseTests.cs +++ b/src/Umbraco.Tests/Membership/MembershipProviderBaseTests.cs @@ -120,8 +120,7 @@ namespace Umbraco.Tests.Membership Assert.Throws(() => provider.GetPassword("test", "test")); } - // fixme - // in v7 this test relies on ApplicationContext.Current being null, which makes little + // FIXME: in v7 this test relies on ApplicationContext.Current being null, which makes little // sense, not going to port the weird code in MembershipProviderBase.ResetPassword, so // what shall we do? [Test] diff --git a/src/Umbraco.Tests/Misc/UriUtilityTests.cs b/src/Umbraco.Tests/Misc/UriUtilityTests.cs index 42c69d3967..3dbd54c3a9 100644 --- a/src/Umbraco.Tests/Misc/UriUtilityTests.cs +++ b/src/Umbraco.Tests/Misc/UriUtilityTests.cs @@ -7,7 +7,7 @@ using Umbraco.Web; namespace Umbraco.Tests.Misc { - // fixme - not testing virtual directory! + // FIXME: not testing virtual directory! [TestFixture] public class UriUtilityTests diff --git a/src/Umbraco.Tests/Models/LightEntityTest.cs b/src/Umbraco.Tests/Models/LightEntityTest.cs index 1ec9f05822..f1752a7681 100644 --- a/src/Umbraco.Tests/Models/LightEntityTest.cs +++ b/src/Umbraco.Tests/Models/LightEntityTest.cs @@ -42,7 +42,7 @@ namespace Umbraco.Tests.Models var result = ss.ToStream(item); var json = result.ResultStream.ToJsonString(); - Debug.Print(json); // fixme compare with v7 + Debug.Print(json); // FIXME: compare with v7 } } } diff --git a/src/Umbraco.Tests/Models/Mapping/ContentTypeModelMappingTests.cs b/src/Umbraco.Tests/Models/Mapping/ContentTypeModelMappingTests.cs index b2d1440010..0de416ed72 100644 --- a/src/Umbraco.Tests/Models/Mapping/ContentTypeModelMappingTests.cs +++ b/src/Umbraco.Tests/Models/Mapping/ContentTypeModelMappingTests.cs @@ -32,7 +32,7 @@ namespace Umbraco.Tests.Models.Mapping { base.SetUp(); - // fixme - are we initializing mappers that... have already been? + // FIXME: are we initializing mappers that... have already been? Mapper.Reset(); Mapper.Initialize(configuration => { @@ -97,7 +97,7 @@ namespace Umbraco.Tests.Models.Mapping Assert.AreEqual(display.CreateDate, result.CreateDate); Assert.AreEqual(display.UpdateDate, result.UpdateDate); - //TODO: Now we need to assert all of the more complicated parts + // TODO: Now we need to assert all of the more complicated parts Assert.AreEqual(display.Groups.Count(), result.PropertyGroups.Count); for (var i = 0; i < display.Groups.Count(); i++) { @@ -157,7 +157,7 @@ namespace Umbraco.Tests.Models.Mapping Assert.AreEqual(display.CreateDate, result.CreateDate); Assert.AreEqual(display.UpdateDate, result.UpdateDate); - //TODO: Now we need to assert all of the more complicated parts + // TODO: Now we need to assert all of the more complicated parts Assert.AreEqual(display.Groups.Count(), result.PropertyGroups.Count); for (var i = 0; i < display.Groups.Count(); i++) { @@ -221,7 +221,7 @@ namespace Umbraco.Tests.Models.Mapping Assert.AreEqual(display.CreateDate, result.CreateDate); Assert.AreEqual(display.UpdateDate, result.UpdateDate); - //TODO: Now we need to assert all of the more complicated parts + // TODO: Now we need to assert all of the more complicated parts Assert.AreEqual(display.Groups.Count(), result.PropertyGroups.Count); for (var i = 0; i < display.Groups.Count(); i++) { @@ -276,7 +276,7 @@ namespace Umbraco.Tests.Models.Mapping //Assert - //TODO: Now we need to assert all of the more complicated parts + // TODO: Now we need to assert all of the more complicated parts Assert.AreEqual(display.Groups.Count(x => x.Inherited == false), result.PropertyGroups.Count); } @@ -303,7 +303,7 @@ namespace Umbraco.Tests.Models.Mapping //Assert - //TODO: Now we need to assert all of the more complicated parts + // TODO: Now we need to assert all of the more complicated parts Assert.AreEqual(display.Groups.Count(x => x.Inherited == false), result.PropertyGroups.Count); } @@ -337,7 +337,7 @@ namespace Umbraco.Tests.Models.Mapping Assert.AreEqual(memberType.CreateDate, result.CreateDate); Assert.AreEqual(memberType.UpdateDate, result.UpdateDate); - //TODO: Now we need to assert all of the more complicated parts + // TODO: Now we need to assert all of the more complicated parts Assert.AreEqual(memberType.PropertyGroups.Count(), result.Groups.Count()); for (var i = 0; i < memberType.PropertyGroups.Count(); i++) @@ -393,7 +393,7 @@ namespace Umbraco.Tests.Models.Mapping Assert.AreEqual(mediaType.CreateDate, result.CreateDate); Assert.AreEqual(mediaType.UpdateDate, result.UpdateDate); - //TODO: Now we need to assert all of the more complicated parts + // TODO: Now we need to assert all of the more complicated parts Assert.AreEqual(mediaType.PropertyGroups.Count(), result.Groups.Count()); for (var i = 0; i < mediaType.PropertyGroups.Count(); i++) @@ -447,7 +447,7 @@ namespace Umbraco.Tests.Models.Mapping Assert.AreEqual(contentType.UpdateDate, result.UpdateDate); Assert.AreEqual(contentType.DefaultTemplate.Alias, result.DefaultTemplate.Alias); - //TODO: Now we need to assert all of the more complicated parts + // TODO: Now we need to assert all of the more complicated parts Assert.AreEqual(contentType.PropertyGroups.Count, result.Groups.Count()); for (var i = 0; i < contentType.PropertyGroups.Count; i++) @@ -748,7 +748,7 @@ namespace Umbraco.Tests.Models.Mapping Assert.AreEqual(contentType.CreateDate, result.CreateDate); Assert.AreEqual(contentType.UpdateDate, result.UpdateDate); - //TODO: Now we need to assert all of the more complicated parts + // TODO: Now we need to assert all of the more complicated parts Assert.AreEqual(contentType.CompositionPropertyGroups.Select(x => x.Name).Distinct().Count(), result.Groups.Count(x => x.IsGenericProperties == false)); Assert.AreEqual(1, result.Groups.Count(x => x.IsGenericProperties)); @@ -830,7 +830,7 @@ namespace Umbraco.Tests.Models.Mapping Assert.AreEqual(contentType.UpdateDate, result.UpdateDate); Assert.AreEqual(contentType.DefaultTemplate.Alias, result.DefaultTemplate.Alias); - //TODO: Now we need to assert all of the more complicated parts + // TODO: Now we need to assert all of the more complicated parts Assert.AreEqual(contentType.CompositionPropertyGroups.Select(x => x.Name).Distinct().Count(), result.Groups.Count(x => x.IsGenericProperties == false)); Assert.AreEqual(1, result.Groups.Count(x => x.IsGenericProperties)); diff --git a/src/Umbraco.Tests/Models/Mapping/UserModelMapperTests.cs b/src/Umbraco.Tests/Models/Mapping/UserModelMapperTests.cs index f1dea9b587..bdab736cd1 100644 --- a/src/Umbraco.Tests/Models/Mapping/UserModelMapperTests.cs +++ b/src/Umbraco.Tests/Models/Mapping/UserModelMapperTests.cs @@ -28,7 +28,7 @@ namespace Umbraco.Tests.Models.Mapping var userGroupSave = JsonConvert.DeserializeObject(json.Replace("@@@ID@@@", userGroup.Id.ToString())); // failed, AutoMapper complained, "Unable to cast object of type 'WhereSelectArrayIterator`2[System.Char,System.String]' to type 'System.Collections.IList'". - // fixmed: added ToList() in UserGroupFactory + // FIXME: added ToList() in UserGroupFactory Mapper.Map(userGroupSave, userGroup); } } diff --git a/src/Umbraco.Tests/Packaging/CreatedPackagesRepositoryTests.cs b/src/Umbraco.Tests/Packaging/CreatedPackagesRepositoryTests.cs index 010572abec..df4071281c 100644 --- a/src/Umbraco.Tests/Packaging/CreatedPackagesRepositoryTests.cs +++ b/src/Umbraco.Tests/Packaging/CreatedPackagesRepositoryTests.cs @@ -137,7 +137,7 @@ namespace Umbraco.Tests.Packaging def = PackageBuilder.GetById(def.Id); Assert.AreEqual("updated", def.Name); Assert.AreEqual(2, def.Files.Count); - //TODO: There's a whole lot more assertions to be done + // TODO: There's a whole lot more assertions to be done } @@ -191,7 +191,7 @@ namespace Umbraco.Tests.Packaging Assert.AreEqual("", xml.Element("umbPackage").Element("Actions").ToString(SaveOptions.DisableFormatting)); - //TODO: There's a whole lot more assertions to be done + // TODO: There's a whole lot more assertions to be done } } } diff --git a/src/Umbraco.Tests/Packaging/PackageInstallationTest.cs b/src/Umbraco.Tests/Packaging/PackageInstallationTest.cs index 4256a66a2d..731ce73d3d 100644 --- a/src/Umbraco.Tests/Packaging/PackageInstallationTest.cs +++ b/src/Umbraco.Tests/Packaging/PackageInstallationTest.cs @@ -126,7 +126,7 @@ namespace Umbraco.Tests.Packaging Assert.AreEqual(1, preInstallWarnings.FilesReplaced.Count()); Assert.AreEqual("bin\\Auros.DocumentTypePicker.dll", preInstallWarnings.FilesReplaced.First()); - //TODO: More Asserts + // TODO: More Asserts } [Test] diff --git a/src/Umbraco.Tests/Persistence/DatabaseContextTests.cs b/src/Umbraco.Tests/Persistence/DatabaseContextTests.cs index 32689fe192..c276dc35ca 100644 --- a/src/Umbraco.Tests/Persistence/DatabaseContextTests.cs +++ b/src/Umbraco.Tests/Persistence/DatabaseContextTests.cs @@ -54,7 +54,7 @@ namespace Umbraco.Tests.Persistence } [Test] - public void CreateDatabase() // fixme - move to DatabaseBuilderTest! + public void CreateDatabase() // FIXME: move to DatabaseBuilderTest! { var path = TestHelper.CurrentAssemblyDirectory; AppDomain.CurrentDomain.SetData("DataDirectory", path); diff --git a/src/Umbraco.Tests/Persistence/NPocoTests/NPocoBulkInsertTests.cs b/src/Umbraco.Tests/Persistence/NPocoTests/NPocoBulkInsertTests.cs index 3503318888..2a6c1f4e12 100644 --- a/src/Umbraco.Tests/Persistence/NPocoTests/NPocoBulkInsertTests.cs +++ b/src/Umbraco.Tests/Persistence/NPocoTests/NPocoBulkInsertTests.cs @@ -12,7 +12,7 @@ using Umbraco.Tests.Testing; namespace Umbraco.Tests.Persistence.NPocoTests { - // fixme.npoco - is this still appropriate? + // FIXME: npoco - is this still appropriate? // [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests/Persistence/NPocoTests/NPocoFetchTests.cs b/src/Umbraco.Tests/Persistence/NPocoTests/NPocoFetchTests.cs index 64bc825c3e..9ee50d1230 100644 --- a/src/Umbraco.Tests/Persistence/NPocoTests/NPocoFetchTests.cs +++ b/src/Umbraco.Tests/Persistence/NPocoTests/NPocoFetchTests.cs @@ -370,7 +370,7 @@ namespace Umbraco.Tests.Persistence.NPocoTests var sql = scope.SqlContext.Sql() .Select() - .Append(", COUNT(zbThing2Group.groupId) AS groupCount") // fixme + .Append(", COUNT(zbThing2Group.groupId) AS groupCount") // FIXME: .From() .InnerJoin().On((t, t2g) => t.Id == t2g.ThingId) .GroupBy(x => x.Id, x => x.Name); diff --git a/src/Umbraco.Tests/Persistence/NPocoTests/PetaPocoCachesTest.cs b/src/Umbraco.Tests/Persistence/NPocoTests/PetaPocoCachesTest.cs index db3b02bacf..f558a64499 100644 --- a/src/Umbraco.Tests/Persistence/NPocoTests/PetaPocoCachesTest.cs +++ b/src/Umbraco.Tests/Persistence/NPocoTests/PetaPocoCachesTest.cs @@ -15,7 +15,7 @@ using Umbraco.Tests.Testing; namespace Umbraco.Tests.Persistence.NPocoTests { - // fixme.npoco - what shall we do with those tests? + // FIXME: npoco - what shall we do with those tests? // [TestFixture, Ignore("fixme - ignored test")] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests/Persistence/Repositories/ContentTypeRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/ContentTypeRepositoryTest.cs index 03701dd3b5..96809c7bf6 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/ContentTypeRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/ContentTypeRepositoryTest.cs @@ -59,7 +59,7 @@ namespace Umbraco.Tests.Persistence.Repositories return new EntityContainerRepository(scopeAccessor, AppCaches.Disabled, Logger, containerEntityType); } - //TODO Add test to verify SetDefaultTemplates updates both AllowedTemplates and DefaultTemplate(id). + // TODO: Add test to verify SetDefaultTemplates updates both AllowedTemplates and DefaultTemplate(id). [Test] public void Maps_Templates_Correctly() diff --git a/src/Umbraco.Tests/Persistence/Repositories/PublicAccessRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/PublicAccessRepositoryTest.cs index b7f354a2fb..b140aa078e 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/PublicAccessRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/PublicAccessRepositoryTest.cs @@ -230,7 +230,7 @@ namespace Umbraco.Tests.Persistence.Repositories //now remove a few rules from a few of the items and then add some more, this will put things 'out of order' which //we need to verify our sort order is working for the relator - // fixme - no "relator" in v8?! + // FIXME: no "relator" in v8?! for (int i = 0; i < allEntries.Count; i++) { //all the even ones diff --git a/src/Umbraco.Tests/Persistence/Repositories/RedirectUrlRepositoryTests.cs b/src/Umbraco.Tests/Persistence/Repositories/RedirectUrlRepositoryTests.cs index 66f6655c77..652209b65b 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/RedirectUrlRepositoryTests.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/RedirectUrlRepositoryTests.cs @@ -73,7 +73,7 @@ namespace Umbraco.Tests.Persistence.Repositories Assert.AreNotEqual(0, rurl.Id); - // fixme - too fast = same date = key violation? + // FIXME: too fast = same date = key violation? // and... can that happen in real life? // we don't really *care* about the IX, only supposed to make things faster... // BUT in realife we AddOrUpdate in a trx so it should be safe, always @@ -119,7 +119,7 @@ namespace Umbraco.Tests.Persistence.Repositories Assert.AreNotEqual(0, rurl.Id); - // fixme - goes too fast and bam, errors, first is blah + // FIXME: goes too fast and bam, errors, first is blah rurl = new RedirectUrl { diff --git a/src/Umbraco.Tests/Persistence/Repositories/TagRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/TagRepositoryTest.cs index b927d23740..6acd63b2b3 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/TagRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/TagRepositoryTest.cs @@ -454,7 +454,7 @@ namespace Umbraco.Tests.Persistence.Repositories contentType.PropertyTypes.First().Id, tags, false); - //TODO: This would be nice to be able to map the ids back but unfortunately we are not doing this + // TODO: This would be nice to be able to map the ids back but unfortunately we are not doing this //var result = repository.GetAll(new[] {tags[0].Id, tags[1].Id, tags[2].Id}); var all = repository.GetMany().ToArray(); diff --git a/src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs index 4ee6ecf9e3..779ec45a35 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs @@ -234,8 +234,7 @@ namespace Umbraco.Tests.Persistence.Repositories // Act var updatedItem = repository.Get(user.Id); - // fixme - // this test cannot work, user has 2 sections but the way it's created, + // FIXME: this test cannot work, user has 2 sections but the way it's created, // they don't show, so the comparison with updatedItem fails - fix! // Assert diff --git a/src/Umbraco.Tests/PublishedContent/PublishedContentLanguageVariantTests.cs b/src/Umbraco.Tests/PublishedContent/PublishedContentLanguageVariantTests.cs index 42703f9bae..ac1c57d409 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedContentLanguageVariantTests.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedContentLanguageVariantTests.cs @@ -335,7 +335,7 @@ namespace Umbraco.Tests.PublishedContent { var content = UmbracoContext.Current.ContentCache.GetAtRoot().First().Children.First(); - // hack the value, pretend the converter would return something + // HACK: the value, pretend the converter would return something var prop = content.GetProperty("welcomeText") as SolidPublishedPropertyWithLanguageVariants; Assert.IsNotNull(prop); prop.SetValue("nl", "nope"); // HasValue false but getting value returns this diff --git a/src/Umbraco.Tests/PublishedContent/PublishedContentTestBase.cs b/src/Umbraco.Tests/PublishedContent/PublishedContentTestBase.cs index d18c6b6668..c5bcd29589 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedContentTestBase.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedContentTestBase.cs @@ -20,7 +20,7 @@ namespace Umbraco.Tests.PublishedContent { base.Compose(); - // fixme - what about the if (PropertyValueConvertersResolver.HasCurrent == false) ?? + // FIXME: what about the if (PropertyValueConvertersResolver.HasCurrent == false) ?? // can we risk double - registering and then, what happens? Composition.WithCollectionBuilder() diff --git a/src/Umbraco.Tests/Publishing/PublishingStrategyTests.cs b/src/Umbraco.Tests/Publishing/PublishingStrategyTests.cs index 2d14aa1c08..0b98ec64b6 100644 --- a/src/Umbraco.Tests/Publishing/PublishingStrategyTests.cs +++ b/src/Umbraco.Tests/Publishing/PublishingStrategyTests.cs @@ -28,7 +28,7 @@ namespace Umbraco.Tests.Publishing [Test] public void Can_Publish_And_Update_Xml_Cache() { - //TODO Create new test + // TODO: Create new test } public IEnumerable CreateTestData() diff --git a/src/Umbraco.Tests/Routing/ContentFinderByAliasTests.cs b/src/Umbraco.Tests/Routing/ContentFinderByAliasTests.cs index 4059cb1858..2aa01916fb 100644 --- a/src/Umbraco.Tests/Routing/ContentFinderByAliasTests.cs +++ b/src/Umbraco.Tests/Routing/ContentFinderByAliasTests.cs @@ -9,7 +9,7 @@ using Umbraco.Web.Routing; namespace Umbraco.Tests.Routing { - //TODO: We should be able to decouple this from the base db tests since we're just mocking the services now + // TODO: We should be able to decouple this from the base db tests since we're just mocking the services now [TestFixture] public class ContentFinderByAliasTests : UrlRoutingTestBase diff --git a/src/Umbraco.Tests/Routing/ContentFinderByPageIdQueryTests.cs b/src/Umbraco.Tests/Routing/ContentFinderByPageIdQueryTests.cs index 8bbd7c6679..c1abb5a3a5 100644 --- a/src/Umbraco.Tests/Routing/ContentFinderByPageIdQueryTests.cs +++ b/src/Umbraco.Tests/Routing/ContentFinderByPageIdQueryTests.cs @@ -10,9 +10,9 @@ namespace Umbraco.Tests.Routing { [TestCase("/?umbPageId=1046", 1046)] [TestCase("/?UMBPAGEID=1046", 1046)] - [TestCase("/default.aspx?umbPageId=1046", 1046)] //TODO: Should this match?? - [TestCase("/some/other/page?umbPageId=1046", 1046)] //TODO: Should this match?? - [TestCase("/some/other/page.aspx?umbPageId=1046", 1046)] //TODO: Should this match?? + [TestCase("/default.aspx?umbPageId=1046", 1046)] // TODO: Should this match?? + [TestCase("/some/other/page?umbPageId=1046", 1046)] // TODO: Should this match?? + [TestCase("/some/other/page.aspx?umbPageId=1046", 1046)] // TODO: Should this match?? public void Lookup_By_Page_Id(string urlAsString, int nodeMatch) { var umbracoContext = GetUmbracoContext(urlAsString); diff --git a/src/Umbraco.Tests/Routing/ContentFinderByUrlTests.cs b/src/Umbraco.Tests/Routing/ContentFinderByUrlTests.cs index fa8beea2c2..85168e4490 100644 --- a/src/Umbraco.Tests/Routing/ContentFinderByUrlTests.cs +++ b/src/Umbraco.Tests/Routing/ContentFinderByUrlTests.cs @@ -39,7 +39,7 @@ namespace Umbraco.Tests.Routing Assert.IsTrue(Current.Configs.Global().HideTopLevelNodeFromPath); - // fixme debugging - going further down, the routes cache is NOT empty?! + // FIXME: debugging - going further down, the routes cache is NOT empty?! if (urlString == "/home/sub1") System.Diagnostics.Debugger.Break(); diff --git a/src/Umbraco.Tests/Routing/GetContentUrlsTests.cs b/src/Umbraco.Tests/Routing/GetContentUrlsTests.cs index 8e9e52258c..46b10929cf 100644 --- a/src/Umbraco.Tests/Routing/GetContentUrlsTests.cs +++ b/src/Umbraco.Tests/Routing/GetContentUrlsTests.cs @@ -45,7 +45,7 @@ namespace Umbraco.Tests.Routing { var contentType = MockedContentTypes.CreateBasicContentType(); var content = MockedContent.CreateBasicContent(contentType); - content.Id = 1046; //fixme: we are using this ID only because it's built into the test XML published cache + content.Id = 1046; // FIXME: we are using this ID only because it's built into the test XML published cache content.Path = "-1,1046"; var umbContext = GetUmbracoContext("http://localhost:8000"); @@ -66,7 +66,7 @@ namespace Umbraco.Tests.Routing { var contentType = MockedContentTypes.CreateBasicContentType(); var content = MockedContent.CreateBasicContent(contentType); - content.Id = 1046; //fixme: we are using this ID only because it's built into the test XML published cache + content.Id = 1046; // FIXME: we are using this ID only because it's built into the test XML published cache content.Path = "-1,1046"; content.Published = true; @@ -92,13 +92,13 @@ namespace Umbraco.Tests.Routing { var contentType = MockedContentTypes.CreateBasicContentType(); var parent = MockedContent.CreateBasicContent(contentType); - parent.Id = 1046; //fixme: we are using this ID only because it's built into the test XML published cache + parent.Id = 1046; // FIXME: we are using this ID only because it's built into the test XML published cache parent.Name = "home"; parent.Path = "-1,1046"; parent.Published = true; var child = MockedContent.CreateBasicContent(contentType); child.Name = "sub1"; - child.Id = 1173; //fixme: we are using this ID only because it's built into the test XML published cache + child.Id = 1173; // FIXME: we are using this ID only because it's built into the test XML published cache child.Path = "-1,1046,1173"; child.Published = true; @@ -119,7 +119,7 @@ namespace Umbraco.Tests.Routing Assert.IsTrue(urls[0].IsUrl); } - //TODO: We need a lot of tests here, the above was just to get started with being able to unit test this method + // TODO: We need a lot of tests here, the above was just to get started with being able to unit test this method // * variant URLs without domains assigned, what happens? // * variant URLs with domains assigned, but also having more languages installed than there are domains/cultures assigned // * variant URLs with an ancestor culture unpublished diff --git a/src/Umbraco.Tests/Routing/RenderRouteHandlerTests.cs b/src/Umbraco.Tests/Routing/RenderRouteHandlerTests.cs index e681c8556d..569f5382e8 100644 --- a/src/Umbraco.Tests/Routing/RenderRouteHandlerTests.cs +++ b/src/Umbraco.Tests/Routing/RenderRouteHandlerTests.cs @@ -57,7 +57,7 @@ namespace Umbraco.Tests.Routing base.Compose(); // set the default RenderMvcController - Current.DefaultRenderMvcControllerType = typeof(RenderMvcController); // fixme WRONG! + Current.DefaultRenderMvcControllerType = typeof(RenderMvcController); // FIXME: Wrong! var surfaceControllerTypes = new SurfaceControllerTypeCollection(Composition.TypeLoader.GetSurfaceControllers()); Composition.RegisterUnique(surfaceControllerTypes); @@ -110,7 +110,7 @@ namespace Umbraco.Tests.Routing //test all template name styles to match the ActionName - //[TestCase("home-\\234^^*32page")] //TODO: This fails! + //[TestCase("home-\\234^^*32page")] // TODO: This fails! [TestCase("home-page")] [TestCase("home-page")] [TestCase("home-page")] diff --git a/src/Umbraco.Tests/Routing/RoutesCacheTests.cs b/src/Umbraco.Tests/Routing/RoutesCacheTests.cs index 68e80076dd..76c2a45ab2 100644 --- a/src/Umbraco.Tests/Routing/RoutesCacheTests.cs +++ b/src/Umbraco.Tests/Routing/RoutesCacheTests.cs @@ -22,7 +22,7 @@ namespace Umbraco.Tests.Routing var cache = umbracoContext.PublishedSnapshot.Content as PublishedContentCache; if (cache == null) throw new Exception("Unsupported IPublishedContentCache, only the Xml one is supported."); - // fixme not sure? + // FIXME: not sure? //PublishedContentCache.UnitTesting = false; // else does not write to routes cache //Assert.IsFalse(PublishedContentCache.UnitTesting); diff --git a/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs b/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs index c87a02f43a..6d7668ceab 100644 --- a/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs +++ b/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs @@ -28,7 +28,7 @@ namespace Umbraco.Tests.Routing { base.SetUp(); - // fixme - be able to get the UmbracoModule from the container. any reason settings were from testobjects? + // FIXME: be able to get the UmbracoModule from the container. any reason settings were from testobjects? //create the module var logger = Mock.Of(); var globalSettings = TestObjects.GetGlobalSettings(); @@ -44,7 +44,7 @@ namespace Umbraco.Tests.Routing new UrlProviderCollection(new IUrlProvider[0]), runtime, logger, - null, // fixme - PublishedRouter complexities... + null, // FIXME: PublishedRouter complexities... Mock.Of() ); diff --git a/src/Umbraco.Tests/Runtimes/CoreRuntimeTests.cs b/src/Umbraco.Tests/Runtimes/CoreRuntimeTests.cs index c894659865..ee3bca42e9 100644 --- a/src/Umbraco.Tests/Runtimes/CoreRuntimeTests.cs +++ b/src/Umbraco.Tests/Runtimes/CoreRuntimeTests.cs @@ -110,7 +110,7 @@ namespace Umbraco.Tests.Runtimes return configs; } - // fixme so how the f* should we do it now? + // FIXME: so how the f* should we do it now? /* // pretend we have the proper migration // else BootFailedException because our mock IUmbracoDatabaseFactory does not provide databases diff --git a/src/Umbraco.Tests/Runtimes/StandaloneTests.cs b/src/Umbraco.Tests/Runtimes/StandaloneTests.cs index 3a52eea17c..3790a49cfc 100644 --- a/src/Umbraco.Tests/Runtimes/StandaloneTests.cs +++ b/src/Umbraco.Tests/Runtimes/StandaloneTests.cs @@ -53,13 +53,13 @@ namespace Umbraco.Tests.Runtimes // settings // reset the current version to 0.0.0, clear connection strings ConfigurationManager.AppSettings["umbracoConfigurationStatus"] = ""; - // fixme we need a better management of settings here (and, true config files?) + // FIXME: we need a better management of settings here (and, true config files?) // create the very basic and essential things we need var logger = new ConsoleLogger(); var profiler = new LogProfiler(logger); var profilingLogger = new ProfilingLogger(logger, profiler); - var appCaches = new AppCaches(); // fixme has HttpRuntime stuff? + var appCaches = new AppCaches(); // FIXME: has HttpRuntime stuff? var databaseFactory = new UmbracoDatabaseFactory(logger, new Lazy(() => factory.GetInstance())); var typeLoader = new TypeLoader(appCaches.RuntimeCache, LocalTempStorage.Default, profilingLogger); var mainDom = new SimpleMainDom(); @@ -87,7 +87,7 @@ namespace Umbraco.Tests.Runtimes composers.Compose(); // must registers stuff that WebRuntimeComponent would register otherwise - // fixme UmbracoContext creates a snapshot that it does not register with the accessor + // FIXME: UmbracoContext creates a snapshot that it does not register with the accessor // and so, we have to use the UmbracoContextPublishedSnapshotAccessor // the UmbracoContext does not know about the accessor // else that would be a catch-22 where they both know about each other? @@ -177,7 +177,7 @@ namespace Umbraco.Tests.Runtimes Assert.AreEqual("test", content.Name); // need an UmbracoCOntext to access the cache - // fixme - not exactly pretty, should not depend on HttpContext + // FIXME: not exactly pretty, should not depend on HttpContext var httpContext = Mock.Of(); var withUmbracoContext = UmbracoContext.EnsureContext(httpContext); var umbracoContext = Umbraco.Web.Composing.Current.UmbracoContext; diff --git a/src/Umbraco.Tests/Scoping/PassThroughEventDispatcherTests.cs b/src/Umbraco.Tests/Scoping/PassThroughEventDispatcherTests.cs index 68e69f4cd6..c955f88f67 100644 --- a/src/Umbraco.Tests/Scoping/PassThroughEventDispatcherTests.cs +++ b/src/Umbraco.Tests/Scoping/PassThroughEventDispatcherTests.cs @@ -11,7 +11,7 @@ namespace Umbraco.Tests.Scoping [NUnit.Framework.Ignore("Cannot dispatch events on NoScope!")] public class PassThroughEventDispatcherTests { - // fixme so... should we remove, or enable, these tests? + // FIXME: so... should we remove, or enable, these tests? // [Test] // public void TriggersCancelableEvents() diff --git a/src/Umbraco.Tests/Scoping/ScopedNuCacheTests.cs b/src/Umbraco.Tests/Scoping/ScopedNuCacheTests.cs index e8f3463ca7..d70b736bc2 100644 --- a/src/Umbraco.Tests/Scoping/ScopedNuCacheTests.cs +++ b/src/Umbraco.Tests/Scoping/ScopedNuCacheTests.cs @@ -43,7 +43,7 @@ namespace Umbraco.Tests.Scoping // the cache refresher component needs to trigger to refresh caches // but then, it requires a lot of plumbing ;( - // fixme - and we cannot inject a DistributedCache yet + // FIXME: and we cannot inject a DistributedCache yet // so doing all this mess Composition.RegisterUnique(); Composition.RegisterUnique(f => Mock.Of()); diff --git a/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs b/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs index dee7a99ad0..b85a79f326 100644 --- a/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs +++ b/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs @@ -29,7 +29,7 @@ namespace Umbraco.Tests.Scoping // the cache refresher component needs to trigger to refresh caches // but then, it requires a lot of plumbing ;( - // fixme - and we cannot inject a DistributedCache yet + // FIXME: and we cannot inject a DistributedCache yet // so doing all this mess Composition.RegisterUnique(); Composition.RegisterUnique(f => Mock.Of()); diff --git a/src/Umbraco.Tests/Scoping/ScopedXmlTests.cs b/src/Umbraco.Tests/Scoping/ScopedXmlTests.cs index 568bafa4e6..11479ea3eb 100644 --- a/src/Umbraco.Tests/Scoping/ScopedXmlTests.cs +++ b/src/Umbraco.Tests/Scoping/ScopedXmlTests.cs @@ -32,7 +32,7 @@ namespace Umbraco.Tests.Scoping // the cache refresher component needs to trigger to refresh caches // but then, it requires a lot of plumbing ;( - // fixme - and we cannot inject a DistributedCache yet + // FIXME: and we cannot inject a DistributedCache yet // so doing all this mess Composition.RegisterUnique(); Composition.RegisterUnique(f => Mock.Of()); diff --git a/src/Umbraco.Tests/Security/BackOfficeCookieManagerTests.cs b/src/Umbraco.Tests/Security/BackOfficeCookieManagerTests.cs index 23e5e472a3..f0409d8928 100644 --- a/src/Umbraco.Tests/Security/BackOfficeCookieManagerTests.cs +++ b/src/Umbraco.Tests/Security/BackOfficeCookieManagerTests.cs @@ -69,6 +69,6 @@ namespace Umbraco.Tests.Security Assert.IsTrue(result); } - //TODO : Write remaining tests for `ShouldAuthenticateRequest` + // TODO: Write remaining tests for `ShouldAuthenticateRequest` } } diff --git a/src/Umbraco.Tests/Services/ContentServiceTagsTests.cs b/src/Umbraco.Tests/Services/ContentServiceTagsTests.cs index 62a3526af5..5e97bea2c1 100644 --- a/src/Umbraco.Tests/Services/ContentServiceTagsTests.cs +++ b/src/Umbraco.Tests/Services/ContentServiceTagsTests.cs @@ -35,7 +35,7 @@ namespace Umbraco.Tests.Services { base.Compose(); - // fixme - do it differently + // FIXME: do it differently Composition.Register(factory => factory.GetInstance().TextService); } @@ -392,11 +392,11 @@ namespace Umbraco.Tests.Services propertyType.Variations = ContentVariation.Nothing; contentTypeService.Save(contentType); - //fixme: This throws due to index violations + // FIXME: This throws due to index violations propertyType.Variations = ContentVariation.Culture; contentTypeService.Save(contentType); - //TODO: Assert results + // TODO: Assert results } [Test] @@ -526,7 +526,7 @@ namespace Umbraco.Tests.Services tags = tagService.GetTagsForEntity(content1.Id); Assert.AreEqual(5, tags.Count()); - // fixme tag & tree issue + // FIXME: tag & tree issue // when we publish, we 'just' publish the top one and not the ones below = fails // what we should do is... NOT clear tags when unpublishing or trashing or... // and just update the tag service to NOT return anything related to trashed or @@ -593,7 +593,7 @@ namespace Umbraco.Tests.Services var tags = tagService.GetTagsForEntity(content1.Id); Assert.AreEqual(0, tags.Count()); - // fixme tag & tree issue + // FIXME: tag & tree issue // when we (un)publish, we 'just' publish the top one and not the ones below = fails // see similar note above tags = tagService.GetTagsForEntity(content2.Id); diff --git a/src/Umbraco.Tests/Services/ContentServiceTests.cs b/src/Umbraco.Tests/Services/ContentServiceTests.cs index 039bcaed24..75eb01e0e3 100644 --- a/src/Umbraco.Tests/Services/ContentServiceTests.cs +++ b/src/Umbraco.Tests/Services/ContentServiceTests.cs @@ -38,8 +38,8 @@ namespace Umbraco.Tests.Services Logger = UmbracoTestOptions.Logger.Console)] public class ContentServiceTests : TestWithSomeContentBase { - //TODO Add test to verify there is only ONE newest document/content in {Constants.DatabaseSchema.Tables.Document} table after updating. - //TODO Add test to delete specific version (with and without deleting prior versions) and versions by date. + // TODO: Add test to verify there is only ONE newest document/content in {Constants.DatabaseSchema.Tables.Document} table after updating. + // TODO: Add test to delete specific version (with and without deleting prior versions) and versions by date. public override void SetUp() { @@ -2422,13 +2422,13 @@ namespace Umbraco.Tests.Services Assert.IsFalse(content.Published); Assert.IsTrue(content.Edited); - // fixme - depending on 1 line in ContentBaseFactory.BuildEntity + // FIXME: depending on 1 line in ContentBaseFactory.BuildEntity // the published infos can be gone or not // if gone, it's not consistent with above Assert.AreEqual(vpk, ((Content) content).VersionId); Assert.AreEqual(ppk, ((Content) content).PublishedVersionId); // still there - // fixme - depending on 1 line in ContentRepository.MapDtoToContent + // FIXME: depending on 1 line in ContentRepository.MapDtoToContent // the published values can be null or not // if null, it's not consistent with above //Assert.IsNull(content.GetValue("title", published: true)); @@ -2444,7 +2444,7 @@ namespace Umbraco.Tests.Services // //contentService.SaveAndPublish(content); - // fixme - what shall we do of all this? + // FIXME: what shall we do of all this? /* // this basically republishes a content // what if it never was published? @@ -2455,11 +2455,11 @@ namespace Umbraco.Tests.Services Assert.IsTrue(content.Published); Assert.IsFalse(content.Edited); - // fixme - should it be 2 or 3 + // FIXME: should it be 2 or 3 versions = contentService.GetVersions(content.Id); Assert.AreEqual(2, versions.Count()); - // fixme - now test rollbacks + // FIXME: now test rollbacks var version = contentService.GetByVersion(content.Id); // test that it gets a version - should be GetVersion var previousVersion = contentService.GetVersions(content.Id).Skip(1).FirstOrDefault(); // need an optimized way to do this content.CopyValues(version); // copies the edited value - always @@ -2498,7 +2498,7 @@ namespace Umbraco.Tests.Services //the name will be set to the default culture variant name Assert.AreEqual("name-us", content.Name); - //fixme - should we always sync the invariant name even on update? see EnsureInvariantNameValues + // FIXME: should we always sync the invariant name even on update? see EnsureInvariantNameValues ////updating the default culture variant name should also update the invariant name so they stay in sync //content.SetName("name-us-2", langUk.IsoCode); //contentService.Save(content); @@ -2663,7 +2663,7 @@ namespace Umbraco.Tests.Services var contentType = contentTypeService.Get("umbTextpage"); contentType.Variations = ContentVariation.Culture; contentType.AddPropertyType(new PropertyType(Constants.PropertyEditors.Aliases.TextBox, ValueStorageType.Nvarchar, "prop") { Variations = ContentVariation.Culture }); - // fixme add test w/ an invariant prop + // FIXME: add test w/ an invariant prop contentTypeService.Save(contentType); var contentService = ServiceContext.ContentService; diff --git a/src/Umbraco.Tests/Services/MemberServiceTests.cs b/src/Umbraco.Tests/Services/MemberServiceTests.cs index 13cde1c659..0c9c543b0d 100644 --- a/src/Umbraco.Tests/Services/MemberServiceTests.cs +++ b/src/Umbraco.Tests/Services/MemberServiceTests.cs @@ -33,7 +33,7 @@ namespace Umbraco.Tests.Services { base.SetUp(); - //hack! but we have no choice until we remove the SavePassword method from IMemberService + // HACK: but we have no choice until we remove the SavePassword method from IMemberService var providerMock = new Mock(ServiceContext.MemberService, ServiceContext.MemberTypeService) { CallBase = true }; providerMock.Setup(@base => @base.AllowManuallyChangingPassword).Returns(false); providerMock.Setup(@base => @base.PasswordFormat).Returns(MembershipPasswordFormat.Hashed); diff --git a/src/Umbraco.Tests/Services/PerformanceTests.cs b/src/Umbraco.Tests/Services/PerformanceTests.cs index 09743b350f..7d73d95e74 100644 --- a/src/Umbraco.Tests/Services/PerformanceTests.cs +++ b/src/Umbraco.Tests/Services/PerformanceTests.cs @@ -31,7 +31,7 @@ namespace Umbraco.Tests.Services [NUnit.Framework.Ignore("These should not be run by the server, only directly as they are only benchmark tests")] public class PerformanceTests : TestWithDatabaseBase { - // fixme probably making little sense in places due to scope creating a transaction?! + // FIXME: probably making little sense in places due to scope creating a transaction?! protected override string GetDbConnectionString() { diff --git a/src/Umbraco.Tests/Services/SectionServiceTests.cs b/src/Umbraco.Tests/Services/SectionServiceTests.cs index 84eb0d1cbc..d6bf26184b 100644 --- a/src/Umbraco.Tests/Services/SectionServiceTests.cs +++ b/src/Umbraco.Tests/Services/SectionServiceTests.cs @@ -48,7 +48,7 @@ namespace Umbraco.Tests.Services }; userGroupA.AddAllowedSection("media"); userGroupA.AddAllowedSection("settings"); - //TODO: This is failing the test + // TODO: This is failing the test ServiceContext.UserService.Save(userGroupA, new[] { user.Id }, false); var userGroupB = new UserGroup diff --git a/src/Umbraco.Tests/Strings/DefaultShortStringHelperTests.cs b/src/Umbraco.Tests/Strings/DefaultShortStringHelperTests.cs index 0d39fcc9e5..5fd5710a79 100644 --- a/src/Umbraco.Tests/Strings/DefaultShortStringHelperTests.cs +++ b/src/Umbraco.Tests/Strings/DefaultShortStringHelperTests.cs @@ -68,7 +68,7 @@ namespace Umbraco.Tests.Strings BreakTermsOnUpper = true })); - // fixme - move to a "compose" thing? + // FIXME: move to a "compose" thing? Composition.RegisterUnique(f => _helper); } @@ -337,8 +337,8 @@ namespace Umbraco.Tests.Strings })); Assert.AreEqual("house*2", helper.CleanString("house (2)", CleanStringType.Alias)); - // FIXME but for a filename we want to keep them! - // FIXME and what about a url? + // FIXME: but for a filename we want to keep them! + // FIXME: and what about a url? } [Test] @@ -442,8 +442,8 @@ namespace Umbraco.Tests.Strings // E is a word (too short to be an acronym) // FF is an acronym - // FIXME "C" can't be an acronym - // FIXME "DBXreview" = acronym?! + // FIXME: "C" can't be an acronym + // FIXME: "DBXreview" = acronym?! Assert.AreEqual("aaa BBB CCc Ddd E FF", helper.CleanString("aaa BBB CCc Ddd E FF", CleanStringType.Alias)); // unchanged Assert.AreEqual("aaa Bbb Ccc Ddd E FF", helper.CleanString("aaa BBB CCc Ddd E FF", CleanStringType.Alias | CleanStringType.CamelCase)); diff --git a/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestControllerActivatorBase.cs b/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestControllerActivatorBase.cs index 5978820601..602b5907d8 100644 --- a/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestControllerActivatorBase.cs +++ b/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestControllerActivatorBase.cs @@ -64,7 +64,7 @@ namespace Umbraco.Tests.TestHelpers.ControllerTesting var globalSettings = SettingsForTests.GenerateMockGlobalSettings(); - // fixme v8? + // FIXME: v8? ////new app context //var dbCtx = new Mock(Mock.Of(), Mock.Of(), Mock.Of(), "test"); ////ensure these are set so that the appctx is 'Configured' diff --git a/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestStartup.cs b/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestStartup.cs index 6ba6b672db..95b5a3bfeb 100644 --- a/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestStartup.cs +++ b/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestStartup.cs @@ -29,7 +29,7 @@ namespace Umbraco.Tests.TestHelpers.ControllerTesting { var httpConfig = new HttpConfiguration(); - //TODO: Enable this if you can't see the errors produced + // TODO: Enable this if you can't see the errors produced //var traceWriter = httpConfig.EnableSystemDiagnosticsTracing(); //traceWriter.IsVerbose = true; //traceWriter.MinimumLevel = TraceLevel.Debug; diff --git a/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs b/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs index cfd935cd82..37be4aea6d 100644 --- a/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs +++ b/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs @@ -129,7 +129,7 @@ namespace Umbraco.Tests.TestHelpers { if (_defaultUmbracoSettings == null) { - //TODO: Just make this mocks instead of reading from the config + // TODO: Just make this mocks instead of reading from the config var config = new FileInfo(TestHelper.MapPathForTest("~/Configurations/UmbracoSettings/web.config")); diff --git a/src/Umbraco.Tests/TestHelpers/TestHelper.cs b/src/Umbraco.Tests/TestHelpers/TestHelper.cs index b6f597bf46..dc692af36a 100644 --- a/src/Umbraco.Tests/TestHelpers/TestHelper.cs +++ b/src/Umbraco.Tests/TestHelpers/TestHelper.cs @@ -98,7 +98,7 @@ namespace Umbraco.Tests.TestHelpers File.Delete(umbracoSettingsFile); } - // fixme obsolete the dateTimeFormat thing and replace with dateDelta + // FIXME: obsolete the dateTimeFormat thing and replace with dateDelta public static void AssertPropertyValuesAreEqual(object actual, object expected, string dateTimeFormat = null, Func sorter = null, string[] ignoreProperties = null) { const int dateDeltaMilliseconds = 500; // .5s diff --git a/src/Umbraco.Tests/TestHelpers/TestObjects-Mocks.cs b/src/Umbraco.Tests/TestHelpers/TestObjects-Mocks.cs index c56eae9cd8..660d0f201e 100644 --- a/src/Umbraco.Tests/TestHelpers/TestObjects-Mocks.cs +++ b/src/Umbraco.Tests/TestHelpers/TestObjects-Mocks.cs @@ -55,7 +55,7 @@ namespace Umbraco.Tests.TestHelpers /// A ServiceContext. public ServiceContext GetServiceContextMock(IFactory container = null) { - // fixme - else some tests break - figure it out + // FIXME: else some tests break - figure it out container = null; return ServiceContext.CreatePartial( @@ -125,8 +125,8 @@ namespace Umbraco.Tests.TestHelpers public IUmbracoSettingsSection GetUmbracoSettings() { - //fixme Why not use the SettingsForTest.GenerateMock ... ? - //fixme Shouldn't we use the default ones so they are the same instance for each test? + // FIXME: Why not use the SettingsForTest.GenerateMock ... ? + // FIXME: Shouldn't we use the default ones so they are the same instance for each test? var umbracoSettingsMock = new Mock(); var webRoutingSectionMock = new Mock(); diff --git a/src/Umbraco.Tests/TestHelpers/TestObjects.cs b/src/Umbraco.Tests/TestHelpers/TestObjects.cs index 109860146c..7a9702031b 100644 --- a/src/Umbraco.Tests/TestHelpers/TestObjects.cs +++ b/src/Umbraco.Tests/TestHelpers/TestObjects.cs @@ -236,9 +236,9 @@ namespace Umbraco.Tests.TestHelpers { if (databaseFactory == null) { - //var mappersBuilder = new MapperCollectionBuilder(Current.Container); // fixme - //mappersBuilder.AddCore(); - //var mappers = mappersBuilder.CreateCollection(); + // var mappersBuilder = new MapperCollectionBuilder(Current.Container); // FIXME: + // mappersBuilder.AddCore(); + // var mappers = mappersBuilder.CreateCollection(); var mappers = Current.Factory.GetInstance(); databaseFactory = new UmbracoDatabaseFactory(Constants.System.UmbracoConnectionName, logger, new Lazy(() => mappers)); } diff --git a/src/Umbraco.Tests/TestHelpers/TestWithDatabaseBase.cs b/src/Umbraco.Tests/TestHelpers/TestWithDatabaseBase.cs index 2deb30bbdd..35085ddd85 100644 --- a/src/Umbraco.Tests/TestHelpers/TestWithDatabaseBase.cs +++ b/src/Umbraco.Tests/TestHelpers/TestWithDatabaseBase.cs @@ -102,10 +102,10 @@ namespace Umbraco.Tests.TestHelpers public override void TearDown() { var profilingLogger = Factory.TryGetInstance(); - var timer = profilingLogger?.TraceDuration("teardown"); // fixme move that one up + var timer = profilingLogger?.TraceDuration("teardown"); // FIXME: move that one up try { - // fixme - should we first kill all scopes? + // FIXME: should we first kill all scopes? if (Options.Database == UmbracoTestOptions.Database.NewSchemaPerTest) RemoveDatabaseFile(); @@ -127,7 +127,7 @@ namespace Umbraco.Tests.TestHelpers { using (ProfilingLogger.TraceDuration("Create database.")) { - CreateSqlCeDatabase(); // todo faster! + CreateSqlCeDatabase(); // TODO: faster! } // ensure the configuration matches the current version for tests @@ -136,7 +136,7 @@ namespace Umbraco.Tests.TestHelpers using (ProfilingLogger.TraceDuration("Initialize database.")) { - InitializeDatabase(); // todo faster! + InitializeDatabase(); // TODO: faster! } } @@ -229,7 +229,7 @@ namespace Umbraco.Tests.TestHelpers protected IPublishedSnapshotService PublishedSnapshotService { get; set; } - protected override void Initialize() // fixme - should NOT be here! + protected override void Initialize() // FIXME: should NOT be here! { base.Initialize(); @@ -313,7 +313,7 @@ namespace Umbraco.Tests.TestHelpers } } - // fixme is this needed? + // FIXME: is this needed? private void CloseDbConnections(IUmbracoDatabase database) { //Ensure that any database connections from a previous test is disposed. diff --git a/src/Umbraco.Tests/Testing/UmbracoTestAttribute.cs b/src/Umbraco.Tests/Testing/UmbracoTestAttribute.cs index 2bf4ba2716..4013d93cd3 100644 --- a/src/Umbraco.Tests/Testing/UmbracoTestAttribute.cs +++ b/src/Umbraco.Tests/Testing/UmbracoTestAttribute.cs @@ -24,8 +24,9 @@ namespace Umbraco.Tests.Testing public bool AutoMapper { get => _autoMapper.ValueOrDefault(WithApplication); set => _autoMapper.Set(value); } private readonly Settable _autoMapper = new Settable(); + // FIXME: to be completed /// - /// Gets or sets a value indicating ... FIXME to be completed + /// Gets or sets a value indicating ... /// public bool PublishedRepositoryEvents { get => _publishedRepositoryEvents.ValueOrDefault(false); set => _publishedRepositoryEvents.Set(value); } private readonly Settable _publishedRepositoryEvents = new Settable(); diff --git a/src/Umbraco.Tests/Testing/UmbracoTestBase.cs b/src/Umbraco.Tests/Testing/UmbracoTestBase.cs index 7cd7be240b..9616a26891 100644 --- a/src/Umbraco.Tests/Testing/UmbracoTestBase.cs +++ b/src/Umbraco.Tests/Testing/UmbracoTestBase.cs @@ -123,7 +123,7 @@ namespace Umbraco.Tests.Testing // get/merge the attributes marking the method and/or the classes Options = TestOptionAttributeBase.GetTestOptions(); - // fixme - align to runtimes & components - don't redo everything here + // FIXME: align to runtimes & components - don't redo everything here var (logger, profiler) = GetLoggers(Options.Logger); var proflogger = new ProfilingLogger(logger, profiler); @@ -427,7 +427,7 @@ namespace Umbraco.Tests.Testing // reset all other static things that should not be static ;( UriUtility.ResetAppDomainAppVirtualPath(); - SettingsForTests.Reset(); // fixme - should it be optional? + SettingsForTests.Reset(); // FIXME: should it be optional? Mapper.Reset(); diff --git a/src/Umbraco.Tests/UmbracoExamine/ExamineDemoDataContentService.cs b/src/Umbraco.Tests/UmbracoExamine/ExamineDemoDataContentService.cs index 5bc1fbfdaa..2c71d1fe3e 100644 --- a/src/Umbraco.Tests/UmbracoExamine/ExamineDemoDataContentService.cs +++ b/src/Umbraco.Tests/UmbracoExamine/ExamineDemoDataContentService.cs @@ -9,7 +9,7 @@ using Umbraco.Examine; namespace Umbraco.Tests.UmbracoExamine { - //TODO: This is ultra hack and still left over from legacy but still works for testing atm + // TODO: This is ultra hack and still left over from legacy but still works for testing atm public class ExamineDemoDataContentService { public const int ProtectedNode = 1142; diff --git a/src/Umbraco.Tests/UmbracoExamine/ExamineDemoDataMediaService.cs b/src/Umbraco.Tests/UmbracoExamine/ExamineDemoDataMediaService.cs index 8dcb170816..035a31b240 100644 --- a/src/Umbraco.Tests/UmbracoExamine/ExamineDemoDataMediaService.cs +++ b/src/Umbraco.Tests/UmbracoExamine/ExamineDemoDataMediaService.cs @@ -7,7 +7,7 @@ using System.Xml.XPath; namespace Umbraco.Tests.UmbracoExamine { - //TODO: This is ultra hack and still left over from legacy but still works for testing atm + // TODO: This is ultra hack and still left over from legacy but still works for testing atm internal class ExamineDemoDataMediaService { public ExamineDemoDataMediaService() diff --git a/src/Umbraco.Tests/Web/Controllers/ContentControllerTests.cs b/src/Umbraco.Tests/Web/Controllers/ContentControllerTests.cs index 7bd47bed66..cf0bf689a1 100644 --- a/src/Umbraco.Tests/Web/Controllers/ContentControllerTests.cs +++ b/src/Umbraco.Tests/Web/Controllers/ContentControllerTests.cs @@ -393,7 +393,7 @@ namespace Umbraco.Tests.Web.Controllers Assert.IsTrue(display.Errors.ContainsKey("_content_variant_en-US_")); } - //TODO: There are SOOOOO many more tests we should write - a lot of them to do with validation + // TODO: There are SOOOOO many more tests we should write - a lot of them to do with validation } } diff --git a/src/Umbraco.Tests/Web/TemplateUtilitiesTests.cs b/src/Umbraco.Tests/Web/TemplateUtilitiesTests.cs index e95ae7b785..4bcad4f4d3 100644 --- a/src/Umbraco.Tests/Web/TemplateUtilitiesTests.cs +++ b/src/Umbraco.Tests/Web/TemplateUtilitiesTests.cs @@ -30,13 +30,13 @@ namespace Umbraco.Tests.Web { Current.Reset(); - // fixme - now UrlProvider depends on EntityService for GetUrl(guid) - this is bad + // FIXME: now UrlProvider depends on EntityService for GetUrl(guid) - this is bad // should not depend on more than IdkMap maybe - fix this! var entityService = new Mock(); entityService.Setup(x => x.GetId(It.IsAny(), It.IsAny())).Returns(Attempt.Fail()); var serviceContext = ServiceContext.CreatePartial(entityService: entityService.Object); - // fixme - bad in a unit test - but Udi has a static ctor that wants it?! + // FIXME: bad in a unit test - but Udi has a static ctor that wants it?! var factory = new Mock(); factory.Setup(x => x.GetInstance(typeof(TypeLoader))).Returns( new TypeLoader(NoAppCache.Instance, LocalTempStorage.Default, new ProfilingLogger(Mock.Of(), Mock.Of()))); diff --git a/src/Umbraco.Web.UI.Client/lib/bootstrap/less/forms.less b/src/Umbraco.Web.UI.Client/lib/bootstrap/less/forms.less index 9f4ef4b8f9..6bbbacd1e3 100644 --- a/src/Umbraco.Web.UI.Client/lib/bootstrap/less/forms.less +++ b/src/Umbraco.Web.UI.Client/lib/bootstrap/less/forms.less @@ -239,7 +239,7 @@ textarea { } // Radios and checkboxes on same line -// TODO v3: Convert .inline to .control-inline +// TODO: v3: Convert .inline to .control-inline .radio.inline, .checkbox.inline { display: inline-block; diff --git a/src/Umbraco.Web.UI.Client/lib/umbraco/LegacySpeechBubble.js b/src/Umbraco.Web.UI.Client/lib/umbraco/LegacySpeechBubble.js index f973cbac49..05568354e6 100644 --- a/src/Umbraco.Web.UI.Client/lib/umbraco/LegacySpeechBubble.js +++ b/src/Umbraco.Web.UI.Client/lib/umbraco/LegacySpeechBubble.js @@ -1,5 +1,5 @@  -//TODO: WE NEED TO CONVERT ALL OF THESE METHODS TO PROXY TO OUR APPLICATION SINCE MANY CUSTOM APPS USE THIS! +// TODO: WE NEED TO CONVERT ALL OF THESE METHODS TO PROXY TO OUR APPLICATION SINCE MANY CUSTOM APPS USE THIS! Umbraco.Sys.registerNamespace("Umbraco.Application"); diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umblogin.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umblogin.directive.js index b92f8c0807..891e8f0e7b 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umblogin.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umblogin.directive.js @@ -178,7 +178,7 @@ function loginSubmit(login, password) { - //TODO: Do validation properly like in the invite password update + // TODO: Do validation properly like in the invite password update //if the login and password are not empty we need to automatically // validate them - this is because if there are validation errors on the server @@ -242,7 +242,7 @@ function requestPasswordResetSubmit(email) { - //TODO: Do validation properly like in the invite password update + // TODO: Do validation properly like in the invite password update if (email && email.length > 0) { vm.requestPasswordResetForm.email.$setValidity('auth', true); @@ -286,7 +286,7 @@ return; } - //TODO: All of this logic can/should be shared! We should do validation the nice way instead of all of this manual stuff, see: inviteSavePassword + // TODO: All of this logic can/should be shared! We should do validation the nice way instead of all of this manual stuff, see: inviteSavePassword authResource.performSetPassword(vm.resetPasswordCodeInfo.resetCodeModel.userId, password, confirmPassword, vm.resetPasswordCodeInfo.resetCodeModel.resetCode) .then(function () { vm.showSetPasswordConfirmation = true; diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js index 923cac80f5..8ad71226ba 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js @@ -99,7 +99,7 @@ Use this directive to render an umbraco button. The directive can be used to gen } }); - //TODO: This doesn't seem necessary? + // TODO: This doesn't seem necessary? UmbButtonController.$inject = ['$timeout', 'localizationService']; function UmbButtonController($timeout, localizationService) { diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontenteditors.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontenteditors.directive.js index af07925021..addbb3b11b 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontenteditors.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontenteditors.directive.js @@ -8,7 +8,7 @@ templateUrl: 'views/components/content/umb-variant-content-editors.html', bindings: { page: "<", - content: "<", //TODO: Not sure if this should be = since we are changing the 'active' property of a variant + content: "<", // TODO: Not sure if this should be = since we are changing the 'active' property of a variant culture: "<", onSelectApp: "&?" }, @@ -243,7 +243,7 @@ } } - //TODO: hacking animation states - these should hopefully be easier to do when we upgrade angular + // TODO: hacking animation states - these should hopefully be easier to do when we upgrade angular editor.collapsed = true; editor.loading = true; $timeout(function () { @@ -255,7 +255,7 @@ /** Closes the split view */ function closeSplitView(editorIndex) { - //TODO: hacking animation states - these should hopefully be easier to do when we upgrade angular + // TODO: hacking animation states - these should hopefully be easier to do when we upgrade angular var editor = vm.editors[editorIndex]; editor.loading = true; editor.collapsed = true; diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorcontainer.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorcontainer.directive.js index d4b0fb158e..b7bcfa9eb4 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorcontainer.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorcontainer.directive.js @@ -46,7 +46,7 @@ Use this directive to construct a main content area inside the main editor windo scope.numberOfOverlays = 0; - //TODO: this shouldn't be a watch, this should be based on an event handler + // TODO: this shouldn't be a watch, this should be based on an event handler scope.$watch(function () { return overlayHelper.getNumberOfOverlays(); }, function (newValue) { diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js index 372fb472fa..0a8846f975 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js @@ -10,7 +10,7 @@ angular.module("umbraco.directives") replace: true, link: function (scope, element, attrs) { - //TODO: A lot of the code below should be shared between the grid rte and the normal rte + // TODO: A lot of the code below should be shared between the grid rte and the normal rte var promises = []; @@ -73,7 +73,7 @@ angular.module("umbraco.directives") }); - //TODO: Perhaps we should pin the toolbar for the rte always, regardless of if it's in the grid or not? + // TODO: Perhaps we should pin the toolbar for the rte always, regardless of if it's in the grid or not? // this would mean moving this code into the tinyMceService.initializeEditor //when we leave the editor (maybe) @@ -116,7 +116,7 @@ angular.module("umbraco.directives") loadTinyMce(); - //TODO: This should probably be in place for all RTE, not just for the grid, which means + // TODO: This should probably be in place for all RTE, not just for the grid, which means // this code can live in tinyMceService.initializeEditor var tabShownListener = eventsService.on("app.tabChange", function (e, args) { diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/imaging/umbimagegravity.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/imaging/umbimagegravity.directive.js index a70b8ca33e..5732fa0eac 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/imaging/umbimagegravity.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/imaging/umbimagegravity.directive.js @@ -131,7 +131,7 @@ function onDestroy() { $(window).off('resize.umbImageGravity'); if (htmlOverlay) { - //TODO: This should be destroyed but this will throw an exception: + // TODO: This should be destroyed but this will throw an exception: // "cannot call methods on draggable prior to initialization; attempted to call method 'destroy'" // I've tried lots of things and cannot get this to work, we weren't destroying before so hopefully // there's no mem leaks? diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/overlays/umboverlaybackdrop.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/overlays/umboverlaybackdrop.directive.js index 927481952a..6c5fb86134 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/overlays/umboverlaybackdrop.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/overlays/umboverlaybackdrop.directive.js @@ -7,7 +7,7 @@ scope.numberOfOverlays = 0; - //TODO: this shouldn't be a watch, this should be based on an event handler + // TODO: this shouldn't be a watch, this should be based on an event handler scope.$watch(function () { return overlayHelper.getNumberOfOverlays(); }, function (newValue) { diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js index 052f497ee9..c3243993c1 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js @@ -80,7 +80,7 @@ function umbTreeDirective($q, $rootScope, treeService, notificationsService, use // entire tree again since we already still have it in memory. Of course if the section is different we will // reload it. This saves a lot on processing if someone is navigating in and out of the same section many times // since it saves on data retreival and DOM processing. - //TODO: This isn't used!? + // TODO: This isn't used!? var lastSection = ""; /** Helper function to emit tree events */ @@ -92,7 +92,7 @@ function umbTreeDirective($q, $rootScope, treeService, notificationsService, use } } - //TODO: This isn't used!? + // TODO: This isn't used!? function clearCache(section) { treeService.clearCache({ section: section }); } @@ -300,7 +300,7 @@ function umbTreeDirective($q, $rootScope, treeService, notificationsService, use return ''; } - //TODO: This is called constantly because as a method in a template it's re-evaluated pretty much all the time + // TODO: This is called constantly because as a method in a template it's re-evaluated pretty much all the time // it would be better if we could cache the processing. The problem is that some of these things are dynamic. var css = []; diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreeitem.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreeitem.directive.js index 4440ceeb4b..19ecdaf8d9 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreeitem.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreeitem.directive.js @@ -61,7 +61,7 @@ angular.module("umbraco.directives") return ''; } - //TODO: This is called constantly because as a method in a template it's re-evaluated pretty much all the time + // TODO: This is called constantly because as a method in a template it's re-evaluated pretty much all the time // it would be better if we could cache the processing. The problem is that some of these things are dynamic. var css = []; diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbgroupsbuilder.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbgroupsbuilder.directive.js index 11c94d04c0..15f5a1d46a 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbgroupsbuilder.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbgroupsbuilder.directive.js @@ -301,7 +301,7 @@ //based on the selection, we need to filter the available composite types list filterAvailableCompositions(selectedContentType, newSelection).then(function () { - //TODO: Here we could probably re-enable selection if we previously showed a throbber or something + // TODO: Here we could probably re-enable selection if we previously showed a throbber or something }); }); } @@ -311,7 +311,7 @@ //based on the selection, we need to filter the available composite types list filterAvailableCompositions(selectedContentType, newSelection).then(function () { - //TODO: Here we could probably re-enable selection if we previously showed a throbber or something + // TODO: Here we could probably re-enable selection if we previously showed a throbber or something }); } diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/upload/umbpropertyfileupload.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/upload/umbpropertyfileupload.directive.js index 7ace23a988..e5bdd3ca78 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/upload/umbpropertyfileupload.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/upload/umbpropertyfileupload.directive.js @@ -92,7 +92,7 @@ vm.culture = null; } - //TODO: need to figure out what we can do for things like Nested Content + // TODO: need to figure out what we can do for things like Nested Content var existingClientFiles = checkPendingClientFiles(); //create the property to show the list of files currently saved diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/users/changepassword.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/users/changepassword.directive.js index 7cc109a5c0..f8dbefa5d7 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/users/changepassword.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/users/changepassword.directive.js @@ -135,7 +135,7 @@ !$scope.config.enablePasswordRetrieval && !$scope.showReset; }; - //TODO: I don't think we need this or the cancel button, this can be up to the editor rendering this directive + // TODO: I don't think we need this or the cancel button, this can be up to the editor rendering this directive $scope.showCancelBtn = function () { return $scope.config.disableToggle !== true && $scope.config.hasPassword; }; 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 5568b4b276..9ee83dc2ba 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 @@ -42,12 +42,12 @@ function valPropertyMsg(serverValidationManager) { return err.errorMsg; } else { - //TODO: localize + // TODO: localize return scope.currentProperty.propertyErrorMessage ? scope.currentProperty.propertyErrorMessage : "Property has errors"; } } - //TODO: localize + // TODO: localize return "Property has errors"; } diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/validation/valsubview.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/validation/valsubview.directive.js index d5a21e0ba6..524b5f7efe 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/validation/valsubview.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/validation/valsubview.directive.js @@ -15,7 +15,7 @@ return { valStatusChanged: function (args) { - //TODO: Verify this is correct, does $scope.model ever exist? + // TODO: Verify this is correct, does $scope.model ever exist? if ($scope.model) { if (!args.form.$valid) { var subViewContent = $element.find(".ng-invalid"); diff --git a/src/Umbraco.Web.UI.Client/src/common/mocks/resources/dashboard.mocks.js b/src/Umbraco.Web.UI.Client/src/common/mocks/resources/dashboard.mocks.js index 7582db6740..e19fabfe61 100644 --- a/src/Umbraco.Web.UI.Client/src/common/mocks/resources/dashboard.mocks.js +++ b/src/Umbraco.Web.UI.Client/src/common/mocks/resources/dashboard.mocks.js @@ -8,7 +8,7 @@ angular.module('umbraco.mocks'). return [401, null, null]; } else { - //TODO: return real mocked data + // TODO: return real mocked data return [200, [], null]; } } diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/auth.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/auth.resource.js index 4f9b9a21f8..678cffe42e 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/auth.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/auth.resource.js @@ -130,7 +130,7 @@ function authResource($q, $http, umbRequestHelper, angularHelper) { }); } - //TODO: This validation shouldn't really be done here, the validation on the login dialog + // TODO: This validation shouldn't really be done here, the validation on the login dialog // is pretty hacky which is why this is here, ideally validation on the login dialog would // be done properly. var emailRegex = /\S+@\S+\.\S+/; diff --git a/src/Umbraco.Web.UI.Client/src/common/services/appstate.service.js b/src/Umbraco.Web.UI.Client/src/common/services/appstate.service.js index 86d5510ca4..9b1d92f2b0 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/appstate.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/appstate.service.js @@ -358,7 +358,7 @@ angular.module('umbraco.services').factory("editorState", function() { } }; - //TODO: This shouldn't be removed! use getCurrent() method instead of a hacked readonly property which is confusing. + // TODO: This shouldn't be removed! use getCurrent() method instead of a hacked readonly property which is confusing. //create a get/set property but don't allow setting Object.defineProperty(state, "current", { diff --git a/src/Umbraco.Web.UI.Client/src/common/services/contenteditinghelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/contenteditinghelper.service.js index 1258ec4099..b9bc4eb499 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/contenteditinghelper.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/contenteditinghelper.service.js @@ -35,7 +35,7 @@ function contentEditingHelper(fileManager, $q, $location, $routeParams, notifica return { /** Used by the content editor and mini content editor to perform saving operations */ - //TODO: Make this a more helpful/reusable method for other form operations! we can simplify this form most forms + // TODO: Make this a more helpful/reusable method for other form operations! we can simplify this form most forms // = this is already done in the formhelper service contentEditorPerformSave: function (args) { if (!angular.isObject(args)) { @@ -421,7 +421,7 @@ function contentEditingHelper(fileManager, $q, $location, $routeParams, notifica */ reBindChangedProperties: function (origContent, savedContent) { - //TODO: We should probably split out this logic to deal with media/members separately to content + // TODO: We should probably split out this logic to deal with media/members separately to content //a method to ignore built-in prop changes var shouldIgnore = function (propName) { diff --git a/src/Umbraco.Web.UI.Client/src/common/services/formhelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/formhelper.service.js index 191e0a22c0..b6bcafbddf 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/formhelper.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/formhelper.service.js @@ -121,7 +121,7 @@ function formHelper(angularHelper, serverValidationManager, notificationsService } else { - //TODO: All YSOD handling should be done with an interceptor + // TODO: All YSOD handling should be done with an interceptor overlayService.ysod(err); } diff --git a/src/Umbraco.Web.UI.Client/src/common/services/iconhelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/iconhelper.service.js index a57fd606aa..0fa2d0df1a 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/iconhelper.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/iconhelper.service.js @@ -56,7 +56,7 @@ function iconHelper($q, $timeout) { { oldIcon: ".sprTreeSettingDataType", newIcon: "icon-autofill" }, - //TODO: + // TODO: Something needs to be done with the old tree icons that are commented out. /* { oldIcon: ".sprTreeSettingAgent", newIcon: "" }, { oldIcon: ".sprTreeSettingCss", newIcon: "" }, diff --git a/src/Umbraco.Web.UI.Client/src/common/services/localization.service.js b/src/Umbraco.Web.UI.Client/src/common/services/localization.service.js index 1b7a6da764..2a9afdfa94 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/localization.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/localization.service.js @@ -24,7 +24,7 @@ angular.module('umbraco.services') .factory('localizationService', function ($http, $q, eventsService, $window, $filter, userService) { - //TODO: This should be injected as server vars + // TODO: This should be injected as server vars var url = "LocalizedText"; var resourceFileLoadStatus = "none"; var resourceLoadingPromise = []; diff --git a/src/Umbraco.Web.UI.Client/src/common/services/mediahelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/mediahelper.service.js index 5db9e9c77e..16c5b38a79 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/mediahelper.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/mediahelper.service.js @@ -66,7 +66,7 @@ function mediaHelper(umbRequestHelper) { }); //for now we'll just return the first image in the collection. - //TODO: we should enable returning many to be displayed in the picker if the uploader supports many. + // TODO: we should enable returning many to be displayed in the picker if the uploader supports many. if (mediaVal.length && mediaVal.length > 0) { if (!options.imageOnly || (options.imageOnly === true && mediaVal[0].isImage)) { return mediaVal[0].file; diff --git a/src/Umbraco.Web.UI.Client/src/common/services/mediatypehelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/mediatypehelper.service.js index 7e0e1db24f..a347279fdb 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/mediatypehelper.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/mediatypehelper.service.js @@ -22,7 +22,7 @@ function mediaTypeHelper(mediaTypeResource, $q) { getAllowedImagetypes: function (mediaId){ - //TODO: This is horribly inneficient - why make one request per type!? + // TODO: This is horribly inneficient - why make one request per type!? //This should make a call to c# to get exactly what it's looking for instead of returning every single media type and doing //some filtering on the client side. //This is also called multiple times when it's not needed! Example, when launching the media picker, this will be called twice diff --git a/src/Umbraco.Web.UI.Client/src/common/services/search.service.js b/src/Umbraco.Web.UI.Client/src/common/services/search.service.js index f0a3239602..04c431767c 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/search.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/search.service.js @@ -151,7 +151,7 @@ angular.module('umbraco.services') }, - //TODO: This doesn't do anything! + // TODO: This doesn't do anything! setCurrent: function (sectionAlias) { var currentSection = sectionAlias; diff --git a/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js b/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js index 97d939bac1..ffb9fe0f36 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js @@ -680,7 +680,7 @@ function tinyMceService($rootScope, $q, imageHelper, $locale, $http, $timeout, s //supported keys to move to the next or prev element (13-enter, 27-esc, 38-up, 40-down, 39-right, 37-left) //supported keys to remove the macro (8-backspace, 46-delete) - //TODO: Should we make the enter key insert a line break before or leave it as moving to the next element? + // TODO: Should we make the enter key insert a line break before or leave it as moving to the next element? if ($.inArray(e.keyCode, [13, 40, 39]) !== -1) { //move to next element moveSibling(macroElement, true); @@ -1358,7 +1358,7 @@ function tinyMceService($rootScope, $q, imageHelper, $locale, $http, $timeout, s self.createAceCodeEditor(args.editor, function () { - //TODO: CHECK TO SEE WHAT WE NEED TO DO WIT MACROS (See code block?) + // TODO: CHECK TO SEE WHAT WE NEED TO DO WIT MACROS (See code block?) /* var html = editor.getContent({source_view: true}); html = html.replace(/]*)>([^<]*)<\/span>/gm, String.fromCharCode(chr)); diff --git a/src/Umbraco.Web.UI.Client/src/common/services/tour.service.js b/src/Umbraco.Web.UI.Client/src/common/services/tour.service.js index 28ac7f6485..e102da5d34 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/tour.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/tour.service.js @@ -114,7 +114,7 @@ * @returns {Object} Returns the current tour */ function getCurrentTour() { - //TODO: This should be reset if a new user logs in + // TODO: This should be reset if a new user logs in return currentTour; } diff --git a/src/Umbraco.Web.UI.Client/src/common/services/umbdataformatter.service.js b/src/Umbraco.Web.UI.Client/src/common/services/umbdataformatter.service.js index 1e6fc5d643..cbe9b561a0 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/umbdataformatter.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/umbdataformatter.service.js @@ -66,7 +66,7 @@ 'alias', 'description', 'thumbnail', 'name', 'id', 'icon', 'trashed', 'key', 'parentId', 'alias', 'path', 'allowCultureVariant', 'isElement'); - //TODO: Map these + // TODO: Map these saveModel.allowedTemplates = _.map(displayModel.allowedTemplates, function (t) { return t.alias; }); saveModel.defaultTemplate = displayModel.defaultTemplate ? displayModel.defaultTemplate.alias : null; var realGroups = _.reject(displayModel.groups, function (g) { diff --git a/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js index fb1a1b8d5e..6991c5d386 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js @@ -177,7 +177,7 @@ function umbRequestHelper($http, $q, notificationsService, eventsService, formHe //show a ysod dialog if (Umbraco.Sys.ServerVariables["isDebuggingEnabled"] === true) { const error = { errorMsg: 'An error occured', data: response.data }; - //TODO: All YSOD handling should be done with an interceptor + // TODO: All YSOD handling should be done with an interceptor overlayService.ysod(error); } else { @@ -270,7 +270,7 @@ function umbRequestHelper($http, $q, notificationsService, eventsService, formHe formHelper.showNotifications(response.data); } - //TODO: Do we need to pass the result through umbDataFormatter.formatContentGetData? Right now things work so not sure but we should check + // TODO: Do we need to pass the result through umbDataFormatter.formatContentGetData? Right now things work so not sure but we should check //the data returned is the up-to-date data so the UI will refresh return $q.resolve(response.data); @@ -289,7 +289,7 @@ function umbRequestHelper($http, $q, notificationsService, eventsService, formHe else if (Umbraco.Sys.ServerVariables["isDebuggingEnabled"] === true) { //show a ysod dialog const error = { errorMsg: 'An error occured', data: response.data }; - //TODO: All YSOD handling should be done with an interceptor + // TODO: All YSOD handling should be done with an interceptor overlayService.ysod(error); } else { diff --git a/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js b/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js index e023c6d23c..96f3115185 100644 --- a/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js +++ b/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js @@ -137,7 +137,7 @@ function NavigationController($scope, $rootScope, $location, $log, $q, $routePar navigationService.showSearch(); }); - ////TODO: remove this it's not a thing + //// TODO: remove this it's not a thing //$scope.selectedId = navigationService.currentId; var evts = []; @@ -423,7 +423,7 @@ function NavigationController($scope, $rootScope, $location, $log, $q, $routePar var path = treeService.getPath(currNode); promises.push($scope.treeApi.syncTree({ path: path, activate: true })); } - //TODO: If we want to keep all paths expanded ... but we need more testing since we need to deal with unexpanding + // TODO: If we want to keep all paths expanded ... but we need more testing since we need to deal with unexpanding //for (var i = 0; i < expandedPaths.length; i++) { // promises.push($scope.treeApi.syncTree({ path: expandedPaths[i], activate: false, forceReload: true })); //} @@ -441,16 +441,16 @@ function NavigationController($scope, $rootScope, $location, $log, $q, $routePar }; //this reacts to the options item in the tree - //TODO: migrate to nav service - //TODO: is this used? + // TODO: migrate to nav service + // TODO: is this used? $scope.searchShowMenu = function (ev, args) { //always skip default args.skipDefault = true; navigationService.showMenu(args); }; - //TODO: migrate to nav service - //TODO: is this used? + // TODO: migrate to nav service + // TODO: is this used? $scope.searchHide = function () { navigationService.hideSearch(); }; diff --git a/src/Umbraco.Web.UI.Client/src/installer/installer.controller.js b/src/Umbraco.Web.UI.Client/src/installer/installer.controller.js index cdf5f8c980..3dbc4e119b 100644 --- a/src/Umbraco.Web.UI.Client/src/installer/installer.controller.js +++ b/src/Umbraco.Web.UI.Client/src/installer/installer.controller.js @@ -1,7 +1,7 @@ angular.module("umbraco.install").controller("Umbraco.InstallerController", function ($scope, installerService) { - //TODO: Decouple the service from the controller - the controller should be responsible + // TODO: Decouple the service from the controller - the controller should be responsible // for the model (state) and the service should be responsible for helping the controller, // the controller should be passing the model into it's methods for manipulation and not hold // state. We should not be assigning properties from a service to a controller's scope. diff --git a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less index bd493cf0d3..38860e6d22 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less @@ -15,7 +15,7 @@ outline: none; text-decoration: none; - // TODO => confirm not in use + // TODO: => confirm not in use // &.noSpr { // background-position: 0 // } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-grid.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-grid.less index a4c744bf7f..9dc6aa1906 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-grid.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-grid.less @@ -1,4 +1,4 @@ -// TODO General cleanup in !important (Round 2) +// TODO: General cleanup in !important (Round 2) // Gridview // ------------------------- diff --git a/src/Umbraco.Web.UI.Client/src/less/forms.less b/src/Umbraco.Web.UI.Client/src/less/forms.less index e3350b4956..f9bb860b5e 100644 --- a/src/Umbraco.Web.UI.Client/src/less/forms.less +++ b/src/Umbraco.Web.UI.Client/src/less/forms.less @@ -368,7 +368,7 @@ textarea { } // Radios and checkboxes on same line -// TODO v3: Convert .inline to .control-inline +// TODO: v3: Convert .inline to .control-inline .radio.inline, .checkbox.inline { display: inline-block; diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/treepicker/treepicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/treepicker/treepicker.controller.js index 346bddf00f..4a43c340db 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/treepicker/treepicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/treepicker/treepicker.controller.js @@ -63,7 +63,7 @@ angular.module("umbraco").controller("Umbraco.Editors.TreePickerController", function initDialogTree() { vm.dialogTreeApi.callbacks.treeLoaded(treeLoadedHandler); - //TODO: Also deal with unexpanding!! + // TODO: Also deal with unexpanding!! vm.dialogTreeApi.callbacks.treeNodeExpanded(nodeExpandedHandler); vm.dialogTreeApi.callbacks.treeNodeSelect(nodeSelectHandler); } @@ -111,7 +111,7 @@ angular.module("umbraco").controller("Umbraco.Editors.TreePickerController", } } - //TODO: Seems odd this logic is here, i don't think it needs to be and should just exist on the property editor using this + // TODO: Seems odd this logic is here, i don't think it needs to be and should just exist on the property editor using this if ($scope.model.minNumber) { $scope.model.minNumber = parseInt($scope.model.minNumber, 10); } diff --git a/src/Umbraco.Web.UI.Client/src/views/content/apps/content/content.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/apps/content/content.controller.js index 2bde680bf4..2a3f67a7e3 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/apps/content/content.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/content/apps/content/content.controller.js @@ -26,7 +26,7 @@ if (newVal !== oldVal) { vm.loading = true; - //TODO: Can we minimize the flicker? + // TODO: Can we minimize the flicker? $timeout(function () { onInit(); }, 100); diff --git a/src/Umbraco.Web.UI.Client/src/views/content/content.delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/content.delete.controller.js index e594bae2f4..56ce67a0dc 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/content.delete.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/content/content.delete.controller.js @@ -65,7 +65,7 @@ function ContentDeleteController($scope, $timeout, contentResource, treeService, //check if response is ysod if (err.status && err.status >= 500) { - //TODO: All YSOD handling should be done with an interceptor + // TODO: All YSOD handling should be done with an interceptor overlayService.ysod(err); } }); diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.controller.js index 9074834ee6..82432ba78d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.controller.js @@ -27,7 +27,7 @@ //and it's not publishable or not selected to be published //then we cannot continue - //TODO: Show a message when this occurs + // TODO: Show a message when this occurs return false; } diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.controller.js index c2ffbced04..0ca2fe65c9 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.controller.js @@ -69,7 +69,7 @@ //and not flagged for saving //then we cannot continue - //TODO: Show a message when this occurs + // TODO: Show a message when this occurs return false; } diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/schedule.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/overlays/schedule.controller.js index 6991a7b509..d97bfc77b1 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/schedule.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/schedule.controller.js @@ -333,7 +333,7 @@ //and it's not publishable or not selected to be published //then we cannot continue - //TODO: Show a message when this occurs + // TODO: Show a message when this occurs return false; } diff --git a/src/Umbraco.Web.UI.Client/src/views/contentblueprints/delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/contentblueprints/delete.controller.js index cc5e4b32a9..80c716732e 100644 --- a/src/Umbraco.Web.UI.Client/src/views/contentblueprints/delete.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/contentblueprints/delete.controller.js @@ -18,7 +18,7 @@ function ContentBlueprintDeleteController($scope, contentResource, treeService, $scope.currentNode.loading = false; //get the root node before we remove it var rootNode = treeService.getTreeRoot($scope.currentNode); - //TODO: Need to sync tree, etc... + // TODO: Need to sync tree, etc... treeService.removeNode($scope.currentNode); navigationService.hideMenu(); }); diff --git a/src/Umbraco.Web.UI.Client/src/views/dashboard/content/redirecturls.controller.js b/src/Umbraco.Web.UI.Client/src/views/dashboard/content/redirecturls.controller.js index 9cef913e79..8206d0a114 100644 --- a/src/Umbraco.Web.UI.Client/src/views/dashboard/content/redirecturls.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/dashboard/content/redirecturls.controller.js @@ -2,12 +2,11 @@ "use strict"; function RedirectUrlsController($scope, redirectUrlsResource, notificationsService, localizationService, $q) { - //...todo - //search by url or url part - //search by domain - //display domain in dashboard results? + // TODO: search by url or url part + // TODO: search by domain + // TODO: display domain in dashboard results? - //used to cancel any request in progress if another one needs to take it's place + // used to cancel any request in progress if another one needs to take it's place var vm = this; var canceler = null; diff --git a/src/Umbraco.Web.UI.Client/src/views/dashboard/settings/examinemanagement.controller.js b/src/Umbraco.Web.UI.Client/src/views/dashboard/settings/examinemanagement.controller.js index a5e4125742..10037db166 100644 --- a/src/Umbraco.Web.UI.Client/src/views/dashboard/settings/examinemanagement.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/dashboard/settings/examinemanagement.controller.js @@ -148,8 +148,8 @@ function ExamineManagementController($scope, umbRequestHelper, $http, $q, $timeo 'Failed to rebuild index') .then(function() { - //rebuilding has started, nothing is returned accept a 200 status code. - //lets poll to see if it is done. + // rebuilding has started, nothing is returned accept a 200 status code. + // lets poll to see if it is done. $timeout(() => { checkProcessing(index, "PostCheckRebuildIndex"), 1000 }); }); @@ -157,7 +157,7 @@ function ExamineManagementController($scope, umbRequestHelper, $http, $q, $timeo } function init() { - //go get the data + // go get the data //combine two promises and execute when they are both done $q.all([ diff --git a/src/Umbraco.Web.UI.Client/src/views/datatypes/create.controller.js b/src/Umbraco.Web.UI.Client/src/views/datatypes/create.controller.js index 6cce37943e..15e1a9402e 100644 --- a/src/Umbraco.Web.UI.Client/src/views/datatypes/create.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/datatypes/create.controller.js @@ -32,7 +32,7 @@ function DataTypeCreateController($scope, $location, navigationService, dataType }, function(err) { - //TODO: Handle errors + // TODO: Handle errors }); }; } diff --git a/src/Umbraco.Web.UI.Client/src/views/datatypes/datatype.delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/datatypes/datatype.delete.controller.js index 101d74b16b..470e9b5f1e 100644 --- a/src/Umbraco.Web.UI.Client/src/views/datatypes/datatype.delete.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/datatypes/datatype.delete.controller.js @@ -18,7 +18,7 @@ function DataTypeDeleteController($scope, dataTypeResource, treeService, navigat //get the root node before we remove it var rootNode = treeService.getTreeRoot($scope.currentNode); - //TODO: Need to sync tree, etc... + // TODO: Need to sync tree, etc... treeService.removeNode($scope.currentNode); navigationService.hideMenu(); }); @@ -35,7 +35,7 @@ function DataTypeDeleteController($scope, dataTypeResource, treeService, navigat //get the root node before we remove it var rootNode = treeService.getTreeRoot($scope.currentNode); - //TODO: Need to sync tree, etc... + // TODO: Need to sync tree, etc... treeService.removeNode($scope.currentNode); navigationService.hideMenu(); }); diff --git a/src/Umbraco.Web.UI.Client/src/views/documenttypes/delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/documenttypes/delete.controller.js index c920e05480..d7d8082048 100644 --- a/src/Umbraco.Web.UI.Client/src/views/documenttypes/delete.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/documenttypes/delete.controller.js @@ -18,7 +18,7 @@ function DocumentTypesDeleteController($scope, dataTypeResource, contentTypeReso //get the root node before we remove it var rootNode = treeService.getTreeRoot($scope.currentNode); - //TODO: Need to sync tree, etc... + // TODO: Need to sync tree, etc... treeService.removeNode($scope.currentNode); navigationService.hideMenu(); }); @@ -35,7 +35,7 @@ function DocumentTypesDeleteController($scope, dataTypeResource, contentTypeReso //get the root node before we remove it var rootNode = treeService.getTreeRoot($scope.currentNode); - //TODO: Need to sync tree, etc... + // TODO: Need to sync tree, etc... treeService.removeNode($scope.currentNode); navigationService.hideMenu(); }); diff --git a/src/Umbraco.Web.UI.Client/src/views/media/media.delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/media/media.delete.controller.js index 70b5120ebe..ab057f87a4 100644 --- a/src/Umbraco.Web.UI.Client/src/views/media/media.delete.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/media/media.delete.controller.js @@ -59,7 +59,7 @@ function MediaDeleteController($scope, mediaResource, treeService, navigationSer //check if response is ysod if (err.status && err.status >= 500) { - //TODO: All YSOD handling should be done with an interceptor + // TODO: All YSOD handling should be done with an interceptor overlayService.ysod(err); } diff --git a/src/Umbraco.Web.UI.Client/src/views/mediatypes/delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/mediatypes/delete.controller.js index 785550684b..f4b61d55dd 100644 --- a/src/Umbraco.Web.UI.Client/src/views/mediatypes/delete.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/mediatypes/delete.controller.js @@ -18,7 +18,7 @@ function MediaTypesDeleteController($scope, dataTypeResource, mediaTypeResource, //get the root node before we remove it var rootNode = treeService.getTreeRoot($scope.currentNode); - //TODO: Need to sync tree, etc... + // TODO: Need to sync tree, etc... treeService.removeNode($scope.currentNode); navigationService.hideMenu(); }); @@ -35,7 +35,7 @@ function MediaTypesDeleteController($scope, dataTypeResource, mediaTypeResource, //get the root node before we remove it var rootNode = treeService.getTreeRoot($scope.currentNode); - //TODO: Need to sync tree, etc... + // TODO: Need to sync tree, etc... treeService.removeNode($scope.currentNode); navigationService.hideMenu(); }); diff --git a/src/Umbraco.Web.UI.Client/src/views/membergroups/delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/membergroups/delete.controller.js index 22deb6df4b..7e434b6f3b 100644 --- a/src/Umbraco.Web.UI.Client/src/views/membergroups/delete.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/membergroups/delete.controller.js @@ -18,7 +18,7 @@ function MemberGroupsDeleteController($scope, memberGroupResource, treeService, //get the root node before we remove it var rootNode = treeService.getTreeRoot($scope.currentNode); - //TODO: Need to sync tree, etc... + // TODO: Need to sync tree, etc... treeService.removeNode($scope.currentNode); navigationService.hideMenu(); }); diff --git a/src/Umbraco.Web.UI.Client/src/views/membertypes/create.controller.js b/src/Umbraco.Web.UI.Client/src/views/membertypes/create.controller.js index af2457d099..adf6cbc8a6 100644 --- a/src/Umbraco.Web.UI.Client/src/views/membertypes/create.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/membertypes/create.controller.js @@ -35,7 +35,7 @@ function MemberTypesCreateController($scope, $location, navigationService, membe }, function(err) { - //TODO: Handle errors + // TODO: Handle errors }); }; } diff --git a/src/Umbraco.Web.UI.Client/src/views/membertypes/delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/membertypes/delete.controller.js index c0cd0c8598..8b8c966790 100644 --- a/src/Umbraco.Web.UI.Client/src/views/membertypes/delete.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/membertypes/delete.controller.js @@ -18,7 +18,7 @@ function MemberTypesDeleteController($scope, memberTypeResource, treeService, na //get the root node before we remove it var rootNode = treeService.getTreeRoot($scope.currentNode); - //TODO: Need to sync tree, etc... + // TODO: Need to sync tree, etc... treeService.removeNode($scope.currentNode); navigationService.hideMenu(); }); diff --git a/src/Umbraco.Web.UI.Client/src/views/partialviewmacros/delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/partialviewmacros/delete.controller.js index 02b89dd279..17e7fa1bd9 100644 --- a/src/Umbraco.Web.UI.Client/src/views/partialviewmacros/delete.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/partialviewmacros/delete.controller.js @@ -18,7 +18,7 @@ function PartialViewMacrosDeleteController($scope, codefileResource, treeService $scope.currentNode.loading = false; //get the root node before we remove it var rootNode = treeService.getTreeRoot($scope.currentNode); - //TODO: Need to sync tree, etc... + // TODO: Need to sync tree, etc... treeService.removeNode($scope.currentNode); navigationService.hideMenu(); }); diff --git a/src/Umbraco.Web.UI.Client/src/views/partialviews/delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/partialviews/delete.controller.js index 1e615ad0d4..a848b77a82 100644 --- a/src/Umbraco.Web.UI.Client/src/views/partialviews/delete.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/partialviews/delete.controller.js @@ -21,7 +21,7 @@ function PartialViewsDeleteController($scope, codefileResource, treeService, nav $scope.currentNode.loading = false; //get the root node before we remove it var rootNode = treeService.getTreeRoot($scope.currentNode); - //TODO: Need to sync tree, etc... + // TODO: Need to sync tree, etc... treeService.removeNode($scope.currentNode); navigationService.hideMenu(); }, function (err) { 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 79ae34ea21..d6fe709962 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 @@ -12,7 +12,7 @@ function ColorPickerController($scope) { //map back to the model $scope.model.config = config; - //TODO: This isn't used + // TODO: This isn't used function convertArrayToDictionaryArray(model) { //now we need to format the items in the dictionary because we always want to have an array var newItems = []; @@ -23,7 +23,7 @@ function ColorPickerController($scope) { return newItems; } - //TODO: This isn't used + // TODO: This isn't used function convertObjectToDictionaryArray(model) { //now we need to format the items in the dictionary because we always want to have an array var newItems = []; diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js index 1e7e3fa0ed..a3fc33d2ea 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js @@ -766,7 +766,7 @@ function listViewController($scope, $routeParams, $injector, $timeout, currentUs case "published": return "content_isPublished"; case "contentTypeAlias": - //TODO: Check for members + // TODO: Check for members return $scope.entityType === "content" ? "content_documentType" : "content_mediatype"; case "email": return "general_email"; diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/markdowneditor/markdowneditor.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/markdowneditor/markdowneditor.controller.js index 67a5630909..f05b1e31d8 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/markdowneditor/markdowneditor.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/markdowneditor/markdowneditor.controller.js @@ -69,7 +69,7 @@ function MarkdownEditorController($scope, $element, assetsService, editorService }, 200); }); - //load the seperat css for the editor to avoid it blocking our js loading TEMP HACK + // HACK: load the separate css for the editor to avoid it blocking our js loading TEMP HACK assetsService.loadCss("lib/markdown/markdown.css", $scope); }) } 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 d6cc35bacd..884b661beb 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 @@ -300,7 +300,7 @@ angular.module("umbraco").controller("Umbraco.PropertyEditors.NestedContent.Prop function (property) { if (_.find(notSupported, function (x) { return x === property.editor; })) { property.notSupported = true; - //TODO: Not supported message to be replaced with 'content_nestedContentEditorNotSupported' dictionary key. Currently not possible due to async/timing quirk. + // TODO: Not supported message to be replaced with 'content_nestedContentEditorNotSupported' dictionary key. Currently not possible due to async/timing quirk. property.notSupportedMessage = "Property " + property.label + " uses editor " + property.editor + " which is not supported by Nested Content."; } }); @@ -433,7 +433,7 @@ angular.module("umbraco").controller("Umbraco.PropertyEditors.NestedContent.Prop unsubscribe(); }); - //TODO: Move this into a shared location? + // TODO: Move this into a shared location? var UUID = (function () { var self = {}; var lut = []; for (var i = 0; i < 256; i++) { lut[i] = (i < 16 ? '0' : '') + (i).toString(16); } diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/codeeditor.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/codeeditor.controller.js index b795c49855..f455e99fe7 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/codeeditor.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/codeeditor.controller.js @@ -32,7 +32,7 @@ // set default title if(!$scope.model.title) { - // TODO localize + // TODO: localize $scope.model.title = "Edit source code"; } } diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.controller.js index 2181361470..960e66edfe 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.controller.js @@ -2,7 +2,7 @@ angular.module("umbraco") .controller("Umbraco.PropertyEditors.RTEController", function ($scope, $q, assetsService, $timeout, tinyMceService, angularHelper, editorService, macroService, editorState) { - //TODO: A lot of the code below should be shared between the grid rte and the normal rte + // TODO: A lot of the code below should be shared between the grid rte and the normal rte $scope.isLoading = true; diff --git a/src/Umbraco.Web.UI.Client/src/views/scripts/delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/scripts/delete.controller.js index 82c11a2242..4757399224 100644 --- a/src/Umbraco.Web.UI.Client/src/views/scripts/delete.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/scripts/delete.controller.js @@ -18,7 +18,7 @@ function ScriptsDeleteController($scope, codefileResource, treeService, navigati $scope.currentNode.loading = false; //get the root node before we remove it var rootNode = treeService.getTreeRoot($scope.currentNode); - //TODO: Need to sync tree, etc... + // TODO: Need to sync tree, etc... treeService.removeNode($scope.currentNode); navigationService.hideMenu(); }); diff --git a/src/Umbraco.Web.UI.Client/src/views/scripts/edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/scripts/edit.controller.js index 62c5ace83a..2ca93fba4c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/scripts/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/scripts/edit.controller.js @@ -145,7 +145,7 @@ //As conflicts with our own tree search shortcut _editor.commands.bindKey("ctrl-space", null); - //TODO: Move all these keybinding config out into some helper/service + // TODO: Move all these keybinding config out into some helper/service _editor.commands.addCommands([ //Disable (alt+shift+K) //Conflicts with our own show shortcuts dialog - this overrides it diff --git a/src/Umbraco.Web.UI.Client/src/views/stylesheets/edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/stylesheets/edit.controller.js index a05836be06..541d329e05 100644 --- a/src/Umbraco.Web.UI.Client/src/views/stylesheets/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/stylesheets/edit.controller.js @@ -205,7 +205,7 @@ //As conflicts with our own tree search shortcut _editor.commands.bindKey("ctrl-space", null); - //TODO: Move all these keybinding config out into some helper/service + // TODO: Move all these keybinding config out into some helper/service _editor.commands.addCommands([ //Disable (alt+shift+K) //Conflicts with our own show shortcuts dialog - this overrides it diff --git a/src/Umbraco.Web.UI.Client/src/views/templates/delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/templates/delete.controller.js index d019a44a10..32e9477133 100644 --- a/src/Umbraco.Web.UI.Client/src/views/templates/delete.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/templates/delete.controller.js @@ -22,7 +22,7 @@ function TemplatesDeleteController($scope, templateResource , treeService, navig //get the root node before we remove it var rootNode = treeService.getTreeRoot($scope.currentNode); - //TODO: Need to sync tree, etc... + // TODO: Need to sync tree, etc... treeService.removeNode($scope.currentNode); navigationService.hideMenu(); }, function (err) { diff --git a/src/Umbraco.Web.UI.Client/src/views/templates/edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/templates/edit.controller.js index 1f6fb8863a..dee2705638 100644 --- a/src/Umbraco.Web.UI.Client/src/views/templates/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/templates/edit.controller.js @@ -634,7 +634,7 @@ templateCode = templateCode.replace(layoutDefRegex, "$1\"" + newValue + "\"$3"); } else { // Declaration doesn't exist, so prepend to start of doc - //TODO: Maybe insert at the cursor position, rather than just at the top of the doc? + // TODO: Maybe insert at the cursor position, rather than just at the top of the doc? templateCode = "@{\n\tLayout = \"" + newValue + "\";\n}\n" + templateCode; } } else { diff --git a/src/Umbraco.Web.UI.Client/test/unit/app/templates/template-editor-controller.spec.js b/src/Umbraco.Web.UI.Client/test/unit/app/templates/template-editor-controller.spec.js index e939c25576..ac49709ee4 100644 --- a/src/Umbraco.Web.UI.Client/test/unit/app/templates/template-editor-controller.spec.js +++ b/src/Umbraco.Web.UI.Client/test/unit/app/templates/template-editor-controller.spec.js @@ -117,7 +117,7 @@ }, 1000); }); - ////TODO: THIS FAILED + //// TODO: THIS FAILED //it("changes layout value when masterpage is selected", function() { // var newTemplate; // ace.clearSelection = nada; diff --git a/src/Umbraco.Web.UI.Client/test/unit/common/directives/val-email.spec.js b/src/Umbraco.Web.UI.Client/test/unit/common/directives/val-email.spec.js index 9a6e884ff6..1a1c850b15 100644 --- a/src/Umbraco.Web.UI.Client/test/unit/common/directives/val-email.spec.js +++ b/src/Umbraco.Web.UI.Client/test/unit/common/directives/val-email.spec.js @@ -5,7 +5,7 @@ beforeEach(module('umbraco')); beforeEach(inject(function ($injector) { - //TODO: I have no idea why this doesn't work!!?? it freakin should + // TODO: I have no idea why this doesn't work!!?? it freakin should //valEmailExpression = $injector.get('valEmailExpression'); //in the meantime, i've had to hard code the regex statement here diff --git a/src/Umbraco.Web.UI.Client/test/unit/common/services/server-validation-manager.spec.js b/src/Umbraco.Web.UI.Client/test/unit/common/services/server-validation-manager.spec.js index 7510b766a8..3f953fffcd 100644 --- a/src/Umbraco.Web.UI.Client/test/unit/common/services/server-validation-manager.spec.js +++ b/src/Umbraco.Web.UI.Client/test/unit/common/services/server-validation-manager.spec.js @@ -268,7 +268,7 @@ expect(numCalled).toEqual(3); }); - //TODO: Finish testing the rest! + // TODO: Finish testing the rest! }); diff --git a/src/Umbraco.Web/Actions/ActionChangeDocType.cs b/src/Umbraco.Web/Actions/ActionChangeDocType.cs index 56868e9fb0..dcdff94037 100644 --- a/src/Umbraco.Web/Actions/ActionChangeDocType.cs +++ b/src/Umbraco.Web/Actions/ActionChangeDocType.cs @@ -5,7 +5,7 @@ using Umbraco.Web.UI.Pages; namespace Umbraco.Web.Actions { - //TODO: Add this back in when we support this functionality again + // TODO: Add this back in when we support this functionality again ///// ///// This action is invoked when the document type of a piece of content is changed ///// diff --git a/src/Umbraco.Web/Cache/ContentCacheRefresher.cs b/src/Umbraco.Web/Cache/ContentCacheRefresher.cs index 944157db9d..99a1e6c803 100644 --- a/src/Umbraco.Web/Cache/ContentCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/ContentCacheRefresher.cs @@ -92,7 +92,7 @@ namespace Umbraco.Web.Cache // content and when the PublishedCachesService is notified of changes it does not see // the new content... - // todo - what about this? + // TODO: what about this? // should rename it, and then, this is only for Deploy, and then, ??? //if (Suspendable.PageCacheRefresher.CanUpdateDocumentCache) // ... diff --git a/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs b/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs index 6916b40f2d..9bd275bc3e 100644 --- a/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs @@ -56,7 +56,7 @@ namespace Umbraco.Web.Cache _idkMap.ClearCache(payload.Id); } - // todo - not sure I like these? + // TODO: not sure I like these? TagsValueConverter.ClearCaches(); SliderValueConverter.ClearCaches(); diff --git a/src/Umbraco.Web/Cache/DistributedCacheBinder.cs b/src/Umbraco.Web/Cache/DistributedCacheBinder.cs index ce8267dfc8..c64951810a 100644 --- a/src/Umbraco.Web/Cache/DistributedCacheBinder.cs +++ b/src/Umbraco.Web/Cache/DistributedCacheBinder.cs @@ -71,7 +71,7 @@ namespace Umbraco.Web.Cache var handler = FindHandler(e); if (handler == null) { - // todo - should this be fatal (ie, an exception)? + // 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); continue; diff --git a/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs b/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs index 4f05abc9ee..951b7f79df 100644 --- a/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs +++ b/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs @@ -196,7 +196,7 @@ namespace Umbraco.Web.Cache _distributedCache.RefreshContentCache(args.Changes.ToArray()); } - // todo our weird events handling wants this for now + // TODO: our weird events handling wants this for now private void ContentService_Deleted(IContentService sender, DeleteEventArgs e) { } private void ContentService_Moved(IContentService sender, MoveEventArgs e) { } private void ContentService_Trashed(IContentService sender, MoveEventArgs e) { } @@ -307,7 +307,7 @@ namespace Umbraco.Web.Cache _distributedCache.RefreshContentTypeCache(args.Changes.ToArray()); } - // todo our weird events handling wants this for now + // TODO: our weird events handling wants this for now private void ContentTypeService_Saved(IContentTypeService sender, SaveEventArgs args) { } private void MediaTypeService_Saved(IMediaTypeService sender, SaveEventArgs args) { } private void MemberTypeService_Saved(IMemberTypeService sender, SaveEventArgs args) { } @@ -321,7 +321,7 @@ namespace Umbraco.Web.Cache private void UserService_UserGroupPermissionsAssigned(IUserService sender, SaveEventArgs e) { - //TODO: Not sure if we need this yet depends if we start caching permissions + // TODO: Not sure if we need this yet depends if we start caching permissions //var groupIds = e.SavedEntities.Select(x => x.UserGroupId).Distinct(); //foreach (var groupId in groupIds) //{ @@ -379,7 +379,7 @@ namespace Umbraco.Web.Cache _distributedCache.RefreshTemplateCache(entity.Id); } - // todo our weird events handling wants this for now + // TODO: our weird events handling wants this for now private void FileService_DeletedStylesheet(IFileService sender, DeleteEventArgs e) { } private void FileService_SavedStylesheet(IFileService sender, SaveEventArgs e) { } @@ -408,7 +408,7 @@ namespace Umbraco.Web.Cache _distributedCache.RefreshMediaCache(args.Changes.ToArray()); } - // todo our weird events handling wants this for now + // TODO: our weird events handling wants this for now private void MediaService_Saved(IMediaService sender, SaveEventArgs e) { } private void MediaService_Deleted(IMediaService sender, DeleteEventArgs e) { } private void MediaService_Moved(IMediaService sender, MoveEventArgs e) { } diff --git a/src/Umbraco.Web/Composing/Composers/InstallerComposer.cs b/src/Umbraco.Web/Composing/Composers/InstallerComposer.cs index b848425736..f73491f1fb 100644 --- a/src/Umbraco.Web/Composing/Composers/InstallerComposer.cs +++ b/src/Umbraco.Web/Composing/Composers/InstallerComposer.cs @@ -20,7 +20,7 @@ namespace Umbraco.Web.Composing.Composers composition.Register(Lifetime.Scope); composition.Register(Lifetime.Scope); - //TODO: Add these back once we have a compatible starter kit + // TODO: Add these back once we have a compatible starter kit //container.Register(Lifetime.Scope); //container.Register(Lifetime.Scope); //container.Register(Lifetime.Scope); diff --git a/src/Umbraco.Web/Composing/Current.cs b/src/Umbraco.Web/Composing/Current.cs index bd0e3d02dc..70b0927c43 100644 --- a/src/Umbraco.Web/Composing/Current.cs +++ b/src/Umbraco.Web/Composing/Current.cs @@ -63,7 +63,7 @@ namespace Umbraco.Web.Composing #region Temp & Special - // todo - have to keep this until tests are refactored + // TODO: have to keep this until tests are refactored // but then, it should all be managed properly in the container public static IUmbracoContextAccessor UmbracoContextAccessor { diff --git a/src/Umbraco.Web/Controllers/UmbRegisterController.cs b/src/Umbraco.Web/Controllers/UmbRegisterController.cs index 66c8a8143c..726797c26a 100644 --- a/src/Umbraco.Web/Controllers/UmbRegisterController.cs +++ b/src/Umbraco.Web/Controllers/UmbRegisterController.cs @@ -64,7 +64,7 @@ namespace Umbraco.Web.Controllers break; case MembershipCreateStatus.InvalidQuestion: case MembershipCreateStatus.InvalidAnswer: - //TODO: Support q/a http://issues.umbraco.org/issue/U4-3213 + // TODO: Support q/a http://issues.umbraco.org/issue/U4-3213 throw new NotImplementedException(status.ToString()); case MembershipCreateStatus.InvalidEmail: ModelState.AddModelError("registerModel.Email", "Email is invalid"); diff --git a/src/Umbraco.Web/Editors/BackOfficeController.cs b/src/Umbraco.Web/Editors/BackOfficeController.cs index 7e45797107..2665105120 100644 --- a/src/Umbraco.Web/Editors/BackOfficeController.cs +++ b/src/Umbraco.Web/Editors/BackOfficeController.cs @@ -390,7 +390,7 @@ namespace Umbraco.Web.Editors var user = await UserManager.FindAsync(loginInfo.Login); if (user != null) { - //TODO: It might be worth keeping some of the claims associated with the ExternalLoginInfo, in which case we + // TODO: It might be worth keeping some of the claims associated with the ExternalLoginInfo, in which case we // wouldn't necessarily sign the user in here with the standard login, instead we'd update the // UseUmbracoBackOfficeExternalCookieAuthentication extension method to have the correct provider and claims factory, // ticket format, etc.. to create our back office user including the claims assigned and in this method we'd just ensure diff --git a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs index 66289a3c7c..c499749591 100644 --- a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs +++ b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs @@ -87,7 +87,7 @@ namespace Umbraco.Web.Editors } } - //TODO: This is ultra confusing! this same key is used for different things, when returning the full app when authenticated it is this URL but when not auth'd it's actually the ServerVariables address + // TODO: This is ultra confusing! this same key is used for different things, when returning the full app when authenticated it is this URL but when not auth'd it's actually the ServerVariables address // so based on compat and how things are currently working we need to replace the serverVarsJs one ((Dictionary)defaults["umbracoUrls"])["serverVarsJs"] = _urlHelper.Action("ServerVariables", "BackOffice"); @@ -105,7 +105,7 @@ namespace Umbraco.Web.Editors { "umbracoUrls", new Dictionary { - //TODO: Add 'umbracoApiControllerBaseUrl' which people can use in JS + // TODO: Add 'umbracoApiControllerBaseUrl' which people can use in JS // to prepend their URL. We could then also use this in our own resources instead of // having each url defined here explicitly - we can do that in v8! for now // for umbraco services we'll stick to explicitly defining the endpoints. @@ -114,7 +114,7 @@ namespace Umbraco.Web.Editors {"externalLinkLoginsUrl", _urlHelper.Action("LinkLogin", "BackOffice")}, {"manifestAssetList", _urlHelper.Action("GetManifestAssetList", "BackOffice")}, {"gridConfig", _urlHelper.Action("GetGridConfig", "BackOffice")}, - //TODO: This is ultra confusing! this same key is used for different things, when returning the full app when authenticated it is this URL but when not auth'd it's actually the ServerVariables address + // TODO: This is ultra confusing! this same key is used for different things, when returning the full app when authenticated it is this URL but when not auth'd it's actually the ServerVariables address {"serverVarsJs", _urlHelper.Action("Application", "BackOffice")}, //API URLs { @@ -370,7 +370,7 @@ namespace Umbraco.Web.Editors .Select(p => new { authType = p.AuthenticationType, caption = p.Caption, - //TODO: Need to see if this exposes any sensitive data! + // TODO: Need to see if this exposes any sensitive data! properties = p.Properties }) .ToArray() @@ -429,7 +429,7 @@ namespace Umbraco.Web.Editors /// it's resolving which is unnecessary and annoying. /// private static readonly Lazy> TreeControllerTypes - = new Lazy>(() => Current.TypeLoader.GetAttributedTreeControllers().ToArray()); // todo inject + = new Lazy>(() => Current.TypeLoader.GetAttributedTreeControllers().ToArray()); // TODO: inject /// /// Returns the server variables regarding the application state diff --git a/src/Umbraco.Web/Editors/Binders/ContentModelBinderHelper.cs b/src/Umbraco.Web/Editors/Binders/ContentModelBinderHelper.cs index dd6d22a967..6fc0e123a5 100644 --- a/src/Umbraco.Web/Editors/Binders/ContentModelBinderHelper.cs +++ b/src/Umbraco.Web/Editors/Binders/ContentModelBinderHelper.cs @@ -50,7 +50,7 @@ namespace Umbraco.Web.Editors.Binders } } - //TODO: anything after 3 parts we can put in metadata + // TODO: anything after 3 parts we can put in metadata var fileName = file.Headers.ContentDisposition.FileName.Trim('\"'); diff --git a/src/Umbraco.Web/Editors/Binders/MemberBinder.cs b/src/Umbraco.Web/Editors/Binders/MemberBinder.cs index f54fd12c30..393fab98a9 100644 --- a/src/Umbraco.Web/Editors/Binders/MemberBinder.cs +++ b/src/Umbraco.Web/Editors/Binders/MemberBinder.cs @@ -82,7 +82,7 @@ namespace Umbraco.Web.Editors.Binders throw new InvalidOperationException("Could not find member with key " + model.Key); } - //TODO: Support this scenario! + // TODO: Support this scenario! //if (scenario == MembershipScenario.CustomProviderWithUmbracoLink) //{ // //if there's a 'Member' type then we should be able to just go get it from the db since it was created with a link diff --git a/src/Umbraco.Web/Editors/CodeFileController.cs b/src/Umbraco.Web/Editors/CodeFileController.cs index 6db0c6a8f9..63b6c173b5 100644 --- a/src/Umbraco.Web/Editors/CodeFileController.cs +++ b/src/Umbraco.Web/Editors/CodeFileController.cs @@ -23,7 +23,7 @@ using StylesheetRule = Umbraco.Web.Models.ContentEditing.StylesheetRule; namespace Umbraco.Web.Editors { - //TODO: Put some exception filters in our webapi to return 404 instead of 500 when we throw ArgumentNullException + // TODO: Put some exception filters in our webapi to return 404 instead of 500 when we throw ArgumentNullException // ref: https://www.exceptionnotfound.net/the-asp-net-web-api-exception-handling-pipeline-a-guided-tour/ [PluginController("UmbracoApi")] [PrefixlessBodyModelValidator] diff --git a/src/Umbraco.Web/Editors/ContentController.cs b/src/Umbraco.Web/Editors/ContentController.cs index 841c60938a..0fba76e84b 100644 --- a/src/Umbraco.Web/Editors/ContentController.cs +++ b/src/Umbraco.Web/Editors/ContentController.cs @@ -175,7 +175,7 @@ namespace Umbraco.Web.Editors var content = Services.ContentService.GetById(contentId); if (content == null) throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.NotFound)); - //TODO: Should non-admins be able to see detailed permissions? + // TODO: Should non-admins be able to see detailed permissions? var allUserGroups = Services.UserService.GetAllUserGroups(); @@ -271,7 +271,7 @@ namespace Umbraco.Web.Editors content.AllowedActions = new[] { "A" }; content.IsBlueprint = true; - //todo - exclude the content apps here + // TODO: exclude the content apps here //var excludeProps = new[] { "_umb_urls", "_umb_releasedate", "_umb_expiredate", "_umb_template" }; //var propsTab = content.Tabs.Last(); //propsTab.Properties = propsTab.Properties @@ -433,7 +433,7 @@ namespace Umbraco.Web.Editors [FilterAllowedOutgoingContent(typeof(IEnumerable>), "Items")] public PagedResult> GetChildren( int id, - int pageNumber = 0, //TODO: This should be '1' as it's not the index + int pageNumber = 0, // TODO: This should be '1' as it's not the index int pageSize = 0, string orderBy = "SortOrder", Direction orderDirection = Direction.Ascending, @@ -1091,7 +1091,7 @@ namespace Umbraco.Web.Editors { //its invariant, proceed normally var publishStatus = Services.ContentService.SaveAndPublishBranch(contentItem.PersistedContent, force, userId: Security.CurrentUser.Id); - //TODO: Deal with multiple cancellations + // TODO: Deal with multiple cancellations wasCancelled = publishStatus.Any(x => x.Result == PublishResultType.FailedPublishCancelledByEvent); successfulCultures = Array.Empty(); return publishStatus; @@ -1124,7 +1124,7 @@ namespace Umbraco.Web.Editors { //proceed to publish if all validation still succeeds var publishStatus = Services.ContentService.SaveAndPublishBranch(contentItem.PersistedContent, force, culturesToPublish, Security.CurrentUser.Id); - //TODO: Deal with multiple cancellations + // TODO: Deal with multiple cancellations wasCancelled = publishStatus.Any(x => x.Result == PublishResultType.FailedPublishCancelledByEvent); successfulCultures = contentItem.Variants.Where(x => x.Publish).Select(x => x.Culture).ToArray(); return publishStatus; @@ -1431,7 +1431,7 @@ namespace Umbraco.Web.Editors if (!sortResult.Success) { Logger.Warn("Content sorting failed, this was probably caused by an event being cancelled"); - //TODO: Now you can cancel sorting, does the event messages bubble up automatically? + // TODO: Now you can cancel sorting, does the event messages bubble up automatically? return Request.CreateValidationErrorResponse("Content sorting failed, this was probably caused by an event being cancelled"); } @@ -1907,7 +1907,7 @@ namespace Umbraco.Web.Editors { case PublishResultType.SuccessPublishAlready: { - //TODO: Here we should have messaging for when there are release dates specified like https://github.com/umbraco/Umbraco-CMS/pull/3507 + // TODO: Here we should have messaging for when there are release dates specified like https://github.com/umbraco/Umbraco-CMS/pull/3507 // but this will take a bit of effort because we need to deal with variants, different messaging, etc... A quick attempt was made here: // http://github.com/umbraco/Umbraco-CMS/commit/9b3de7b655e07c612c824699b48a533c0448131a @@ -1938,7 +1938,7 @@ namespace Umbraco.Web.Editors break; case PublishResultType.SuccessPublish: { - //TODO: Here we should have messaging for when there are release dates specified like https://github.com/umbraco/Umbraco-CMS/pull/3507 + // TODO: Here we should have messaging for when there are release dates specified like https://github.com/umbraco/Umbraco-CMS/pull/3507 // but this will take a bit of effort because we need to deal with variants, different messaging, etc... A quick attempt was made here: // http://github.com/umbraco/Umbraco-CMS/commit/9b3de7b655e07c612c824699b48a533c0448131a @@ -2148,7 +2148,7 @@ namespace Umbraco.Web.Editors default: notificationModel.AddErrorNotification( Services.TextService.Localize("speechBubbles/operationFailedHeader"), - null); //TODO: There is no specific failed to save error message AFAIK + null); // TODO: There is no specific failed to save error message AFAIK break; case OperationResultType.FailedCancelledByEvent: notificationModel.AddErrorNotification( diff --git a/src/Umbraco.Web/Editors/ContentControllerBase.cs b/src/Umbraco.Web/Editors/ContentControllerBase.cs index 904e6911c9..d7c4d4f7f7 100644 --- a/src/Umbraco.Web/Editors/ContentControllerBase.cs +++ b/src/Umbraco.Web/Editors/ContentControllerBase.cs @@ -148,7 +148,7 @@ namespace Umbraco.Web.Editors string[] messageParams = null) { //if there's already a default event message, don't add our default one - //todo inject + // TODO: inject var msgs = Current.EventMessages; if (msgs != null && msgs.GetAll().Any(x => x.IsDefaultEventMessage)) return; diff --git a/src/Umbraco.Web/Editors/ContentTypeController.cs b/src/Umbraco.Web/Editors/ContentTypeController.cs index d5a72a7378..3800871f88 100644 --- a/src/Umbraco.Web/Editors/ContentTypeController.cs +++ b/src/Umbraco.Web/Editors/ContentTypeController.cs @@ -35,7 +35,7 @@ using Notification = Umbraco.Web.Models.ContentEditing.Notification; namespace Umbraco.Web.Editors { - //TODO: We'll need to be careful about the security on this controller, when we start implementing + // TODO: We'll need to be careful about the security on this controller, when we start implementing // methods to modify content types we'll need to enforce security on the individual methods, we // cannot put security on the whole controller because things like // GetAllowedChildren, GetPropertyTypeScaffold, GetAllPropertyTypeAliases are required for content editing. diff --git a/src/Umbraco.Web/Editors/CurrentUserController.cs b/src/Umbraco.Web/Editors/CurrentUserController.cs index f759a9e604..30f3a431ad 100644 --- a/src/Umbraco.Web/Editors/CurrentUserController.cs +++ b/src/Umbraco.Web/Editors/CurrentUserController.cs @@ -177,7 +177,7 @@ namespace Umbraco.Web.Editors var userMgr = this.TryGetOwinContext().Result.GetBackOfficeUserManager(); //raise the reset event - //TODO: I don't think this is required anymore since from 7.7 we no longer display the reset password checkbox since that didn't make sense. + // TODO: I don't think this is required anymore since from 7.7 we no longer display the reset password checkbox since that didn't make sense. if (data.Reset.HasValue && data.Reset.Value) { userMgr.RaisePasswordResetEvent(Security.CurrentUser.Id); diff --git a/src/Umbraco.Web/Editors/DashboardSecurity.cs b/src/Umbraco.Web/Editors/DashboardSecurity.cs index fdbf5af7d9..2e3fc4123b 100644 --- a/src/Umbraco.Web/Editors/DashboardSecurity.cs +++ b/src/Umbraco.Web/Editors/DashboardSecurity.cs @@ -15,7 +15,7 @@ namespace Umbraco.Web.Editors /// internal class DashboardSecurity { - //TODO: Unit test all this!!! :/ + // TODO: Unit test all this!!! :/ public static bool AuthorizeAccess(ISection dashboardSection, IUser user, ISectionService sectionService) { diff --git a/src/Umbraco.Web/Editors/DataTypeController.cs b/src/Umbraco.Web/Editors/DataTypeController.cs index 0af3a1cfe7..4446373cd3 100644 --- a/src/Umbraco.Web/Editors/DataTypeController.cs +++ b/src/Umbraco.Web/Editors/DataTypeController.cs @@ -204,7 +204,7 @@ namespace Umbraco.Web.Editors { //If we've made it here, then everything has been wired up and validated by the attribute - //TODO: Check if the property editor has changed, if it has ensure we don't pass the + // TODO: Check if the property editor has changed, if it has ensure we don't pass the // existing values to the new property editor! // get the current configuration, diff --git a/src/Umbraco.Web/Editors/EditorValidator.cs b/src/Umbraco.Web/Editors/EditorValidator.cs index 537ae834d3..af355206a5 100644 --- a/src/Umbraco.Web/Editors/EditorValidator.cs +++ b/src/Umbraco.Web/Editors/EditorValidator.cs @@ -16,7 +16,7 @@ namespace Umbraco.Web.Editors { var modelType = model.GetType(); - var validationResults = Current.EditorValidators // todo inject + var validationResults = Current.EditorValidators // TODO: inject .Where(x => x.ModelType == modelType) .SelectMany(x => x.Validate(model)) .Where(x => !string.IsNullOrWhiteSpace(x.ErrorMessage) && x.MemberNames.Any()); diff --git a/src/Umbraco.Web/Editors/EntityController.cs b/src/Umbraco.Web/Editors/EntityController.cs index 6fcf5b0e2d..5cf248d2a6 100644 --- a/src/Umbraco.Web/Editors/EntityController.cs +++ b/src/Umbraco.Web/Editors/EntityController.cs @@ -107,7 +107,7 @@ namespace Umbraco.Web.Editors [HttpGet] public IEnumerable Search(string query, UmbracoEntityTypes type, string searchFrom = null) { - //TODO: Should we restrict search results based on what app the user has access to? + // TODO: Should we restrict search results based on what app the user has access to? // - Theoretically you shouldn't be able to see member data if you don't have access to members right? if (string.IsNullOrEmpty(query)) @@ -252,7 +252,7 @@ namespace Umbraco.Web.Editors /// public EntityBasic GetByQuery(string query, int nodeContextId, UmbracoEntityTypes type) { - //TODO: Rename this!!! It's misleading, it should be GetByXPath + // TODO: Rename this!!! It's misleading, it should be GetByXPath if (type != UmbracoEntityTypes.Document) @@ -628,7 +628,7 @@ namespace Umbraco.Web.Editors var objectType = ConvertToObjectType(entityType); if (objectType.HasValue) { - //TODO: Need to check for Object types that support hierarchic here, some might not. + // TODO: Need to check for Object types that support hierarchic here, some might not. return Services.EntityService.GetChildren(id, objectType.Value) .WhereNotNull() @@ -651,7 +651,7 @@ namespace Umbraco.Web.Editors var objectType = ConvertToObjectType(entityType); if (objectType.HasValue) { - //TODO: Need to check for Object types that support hierarchic here, some might not. + // TODO: Need to check for Object types that support hierarchic here, some might not. var ids = Services.EntityService.Get(id).Path.Split(',').Select(int.Parse).Distinct().ToArray(); @@ -880,7 +880,7 @@ namespace Umbraco.Web.Editors var objectType = ConvertToObjectType(entityType); if (objectType.HasValue) { - //TODO: Should we order this by something ? + // TODO: Should we order this by something ? var entities = Services.EntityService.GetAll(objectType.Value).WhereNotNull().Select(Mapper.Map); return ExecutePostFilter(entities, postFilter, postFilterParams); } @@ -957,7 +957,7 @@ namespace Umbraco.Web.Editors // if a post filter is assigned then try to execute it if (postFilter.IsNullOrWhiteSpace() == false) { - // fixme/task/critical - trouble is, we've killed the dynamic Where thing! + // FIXME: task/critical - trouble is, we've killed the dynamic Where thing! throw new NotImplementedException("oops"); //return postFilterParams == null // ? entities.AsQueryable().Where(postFilter).ToArray() diff --git a/src/Umbraco.Web/Editors/Filters/ContentItemValidationHelper.cs b/src/Umbraco.Web/Editors/Filters/ContentItemValidationHelper.cs index e54bb3ef71..eacc904d9b 100644 --- a/src/Umbraco.Web/Editors/Filters/ContentItemValidationHelper.cs +++ b/src/Umbraco.Web/Editors/Filters/ContentItemValidationHelper.cs @@ -96,7 +96,7 @@ namespace Umbraco.Web.Editors.Filters { if (persistedProperties.Any(property => property.Alias == p.Alias) == false) { - //TODO: Do we return errors here ? If someone deletes a property whilst their editing then should we just + // TODO: Do we return errors here ? If someone deletes a property whilst their editing then should we just //save the property data that remains? Or inform them they need to reload... not sure. This problem exists currently too i think. var message = $"property with alias: {p.Alias} was not found"; diff --git a/src/Umbraco.Web/Editors/Filters/ContentSaveValidationAttribute.cs b/src/Umbraco.Web/Editors/Filters/ContentSaveValidationAttribute.cs index 64e1c76417..a0565c1d2f 100644 --- a/src/Umbraco.Web/Editors/Filters/ContentSaveValidationAttribute.cs +++ b/src/Umbraco.Web/Editors/Filters/ContentSaveValidationAttribute.cs @@ -152,7 +152,7 @@ namespace Umbraco.Web.Editors.Filters case ContentSaveAction.PublishWithDescendantsNew: case ContentSaveAction.PublishWithDescendantsForceNew: //Publish new requires both ActionNew AND ActionPublish - //TODO: Shouldn't publish also require ActionUpdate since it will definitely perform an update to publish but maybe that's just implied + // TODO: Shouldn't publish also require ActionUpdate since it will definitely perform an update to publish but maybe that's just implied permissionToCheck.Add(ActionNew.ActionLetter); permissionToCheck.Add(ActionPublish.ActionLetter); diff --git a/src/Umbraco.Web/Editors/Filters/UserGroupValidateAttribute.cs b/src/Umbraco.Web/Editors/Filters/UserGroupValidateAttribute.cs index 3481c754d3..fe6a049768 100644 --- a/src/Umbraco.Web/Editors/Filters/UserGroupValidateAttribute.cs +++ b/src/Umbraco.Web/Editors/Filters/UserGroupValidateAttribute.cs @@ -27,7 +27,7 @@ namespace Umbraco.Web.Editors.Filters _userService = userService; } - private IUserService UserService => _userService ?? Current.Services.UserService; // todo inject + private IUserService UserService => _userService ?? Current.Services.UserService; // TODO: inject public override void OnActionExecuting(HttpActionContext actionContext) { @@ -70,7 +70,7 @@ namespace Umbraco.Web.Editors.Filters actionContext.ModelState.AddModelError("Alias", "A user group with this alias already exists"); } - //TODO: Validate the name is unique? + // TODO: Validate the name is unique? if (actionContext.ModelState.IsValid == false) { diff --git a/src/Umbraco.Web/Editors/MediaController.cs b/src/Umbraco.Web/Editors/MediaController.cs index fe081c1cb4..5441b80264 100644 --- a/src/Umbraco.Web/Editors/MediaController.cs +++ b/src/Umbraco.Web/Editors/MediaController.cs @@ -227,7 +227,7 @@ namespace Umbraco.Web.Editors [FilterAllowedOutgoingMedia(typeof(IEnumerable>))] public IEnumerable> GetRootMedia() { - //TODO: Add permissions check! + // TODO: Add permissions check! return Services.MediaService.GetRootMedia() .Select(Mapper.Map>); diff --git a/src/Umbraco.Web/Editors/MediaTypeController.cs b/src/Umbraco.Web/Editors/MediaTypeController.cs index dd1f53f8af..bb126ed1dd 100644 --- a/src/Umbraco.Web/Editors/MediaTypeController.cs +++ b/src/Umbraco.Web/Editors/MediaTypeController.cs @@ -24,7 +24,7 @@ using Umbraco.Web.Composing; namespace Umbraco.Web.Editors { - //TODO: We'll need to be careful about the security on this controller, when we start implementing + // TODO: We'll need to be careful about the security on this controller, when we start implementing // methods to modify content types we'll need to enforce security on the individual methods, we // cannot put security on the whole controller because things like GetAllowedChildren are required for content editing. diff --git a/src/Umbraco.Web/Editors/MemberController.cs b/src/Umbraco.Web/Editors/MemberController.cs index 2211bea76b..f4a8dfbd56 100644 --- a/src/Umbraco.Web/Editors/MemberController.cs +++ b/src/Umbraco.Web/Editors/MemberController.cs @@ -179,7 +179,7 @@ namespace Umbraco.Web.Editors return Mapper.Map(foundMember); case MembershipScenario.CustomProviderWithUmbracoLink: - //TODO: Support editing custom properties for members with a custom membership provider here. + // TODO: Support editing custom properties for members with a custom membership provider here. //foundMember = Services.MemberService.GetByKey(key); //if (foundMember == null) @@ -238,7 +238,7 @@ namespace Umbraco.Web.Editors emptyContent.AdditionalData["NewPassword"] = Membership.GeneratePassword(provider.MinRequiredPasswordLength, provider.MinRequiredNonAlphanumericCharacters); return Mapper.Map(emptyContent); case MembershipScenario.CustomProviderWithUmbracoLink: - //TODO: Support editing custom properties for members with a custom membership provider here. + // TODO: Support editing custom properties for members with a custom membership provider here. case MembershipScenario.StandaloneCustomProvider: default: @@ -275,7 +275,7 @@ namespace Umbraco.Web.Editors { ModelState.Remove("ContentTypeAlias"); - //TODO: We're removing this because we are not displaying it but when we support the CustomProviderWithUmbracoLink scenario + // TODO: We're removing this because we are not displaying it but when we support the CustomProviderWithUmbracoLink scenario // we will be able to have a real name associated so do not remove this state once that is implemented! ModelState.Remove("Name"); } @@ -291,7 +291,7 @@ namespace Umbraco.Web.Editors throw new HttpResponseException(Request.CreateValidationErrorResponse(forDisplay)); } - //TODO: WE need to support this! - requires UI updates, etc... + // TODO: WE need to support this! - requires UI updates, etc... if (_provider.RequiresQuestionAndAnswer) { throw new NotSupportedException("Currently the member editor does not support providers that have RequiresQuestionAndAnswer specified"); @@ -334,7 +334,7 @@ namespace Umbraco.Web.Editors } //save the IMember - - //TODO: When we support the CustomProviderWithUmbracoLink scenario, we'll need to save the custom properties for that here too + // TODO: When we support the CustomProviderWithUmbracoLink scenario, we'll need to save the custom properties for that here too if (MembershipScenario == MembershipScenario.NativeUmbraco) { //save the item @@ -584,7 +584,7 @@ namespace Umbraco.Web.Editors UpdateName(contentItem); - //re-assign the mapped values that are not part of the membership provider properties. + // re-assign the mapped values that are not part of the membership provider properties. var builtInAliases = Constants.Conventions.Member.GetStandardPropertyTypeStubs().Select(x => x.Key).ToArray(); foreach (var p in contentItem.PersistedContent.Properties) { @@ -593,10 +593,10 @@ namespace Umbraco.Web.Editors { p.SetValue(valueMapped.GetValue()); - // fixme/task - ok, I give up, at that point tags are dead here, until we figure it out - //p.TagChanges.Behavior = valueMapped.TagChanges.Behavior; - //p.TagChanges.Enable = valueMapped.TagChanges.Enable; - //p.TagChanges.Tags = valueMapped.TagChanges.Tags; + // FIXME: /task - ok, I give up, at that point tags are dead here, until we figure it out + // p.TagChanges.Behavior = valueMapped.TagChanges.Behavior; + // p.TagChanges.Enable = valueMapped.TagChanges.Enable; + // p.TagChanges.Tags = valueMapped.TagChanges.Tags; } } } @@ -652,7 +652,7 @@ namespace Umbraco.Web.Editors case MembershipScenario.NativeUmbraco: //We are using the umbraco membership provider, create the member using the membership provider first. var umbracoMembershipProvider = (UmbracoMembershipProviderBase)_provider; - //TODO: We are not supporting q/a - passing in empty here + // TODO: We are not supporting q/a - passing in empty here membershipUser = umbracoMembershipProvider.CreateUser( contentItem.ContentTypeAlias, contentItem.Username, contentItem.Password.NewPassword, @@ -668,7 +668,7 @@ namespace Umbraco.Web.Editors //create it - this persisted item has already been set in the MemberBinder based on the 'Member' member type: Services.MemberService.Save(contentItem.PersistedContent); - //TODO: We are not supporting q/a - passing in empty here + // TODO: We are not supporting q/a - passing in empty here membershipUser = _provider.CreateUser( contentItem.Username, contentItem.Password.NewPassword, @@ -685,7 +685,7 @@ namespace Umbraco.Web.Editors // link back to the umbraco data var newKey = Guid.NewGuid(); - //TODO: We are not supporting q/a - passing in empty here + // TODO: We are not supporting q/a - passing in empty here membershipUser = _provider.CreateUser( contentItem.Username, contentItem.Password.NewPassword, @@ -701,7 +701,7 @@ namespace Umbraco.Web.Editors throw new ArgumentOutOfRangeException(); } - //TODO: Localize these! + // TODO: Localize these! switch (status) { case MembershipCreateStatus.Success: diff --git a/src/Umbraco.Web/HealthCheck/Checks/Config/ConfigurationService.cs b/src/Umbraco.Web/HealthCheck/Checks/Config/ConfigurationService.cs index 8b080af88c..95b458b142 100644 --- a/src/Umbraco.Web/HealthCheck/Checks/Config/ConfigurationService.cs +++ b/src/Umbraco.Web/HealthCheck/Checks/Config/ConfigurationService.cs @@ -7,7 +7,7 @@ using Umbraco.Web.Composing; namespace Umbraco.Web.HealthCheck.Checks.Config { - //TODO: Add config transform for when config with specified XPath is not found + // TODO: Add config transform for when config with specified XPath is not found public class ConfigurationService { diff --git a/src/Umbraco.Web/HealthCheck/HealthCheck.cs b/src/Umbraco.Web/HealthCheck/HealthCheck.cs index 2c8b0c3c84..81aa1e47d4 100644 --- a/src/Umbraco.Web/HealthCheck/HealthCheck.cs +++ b/src/Umbraco.Web/HealthCheck/HealthCheck.cs @@ -50,6 +50,6 @@ namespace Umbraco.Web.HealthCheck /// public abstract HealthCheckStatus ExecuteAction(HealthCheckAction action); - //TODO: What else? + // TODO: What else? } } diff --git a/src/Umbraco.Web/HealthCheck/HealthCheckAttribute.cs b/src/Umbraco.Web/HealthCheck/HealthCheckAttribute.cs index 35a8e022fb..fe206f3186 100644 --- a/src/Umbraco.Web/HealthCheck/HealthCheckAttribute.cs +++ b/src/Umbraco.Web/HealthCheck/HealthCheckAttribute.cs @@ -21,6 +21,6 @@ namespace Umbraco.Web.HealthCheck public Guid Id { get; private set; } - //TODO: Do we need more metadata? + // TODO: Do we need more metadata? } } diff --git a/src/Umbraco.Web/HealthCheck/HealthCheckResults.cs b/src/Umbraco.Web/HealthCheck/HealthCheckResults.cs index da906c30f9..61028699f0 100644 --- a/src/Umbraco.Web/HealthCheck/HealthCheckResults.cs +++ b/src/Umbraco.Web/HealthCheck/HealthCheckResults.cs @@ -14,7 +14,7 @@ namespace Umbraco.Web.HealthCheck private readonly Dictionary> _results; public readonly bool AllChecksSuccessful; - private ILogger Logger => Current.Logger; // todo inject + private ILogger Logger => Current.Logger; // TODO: inject public HealthCheckResults(IEnumerable checks) { diff --git a/src/Umbraco.Web/HealthCheck/HealthCheckStatus.cs b/src/Umbraco.Web/HealthCheck/HealthCheckStatus.cs index 2db0b1f2e7..1d06f352c0 100644 --- a/src/Umbraco.Web/HealthCheck/HealthCheckStatus.cs +++ b/src/Umbraco.Web/HealthCheck/HealthCheckStatus.cs @@ -49,6 +49,6 @@ namespace Umbraco.Web.HealthCheck [DataMember(Name = "actions")] public IEnumerable Actions { get; set; } - //TODO: What else? + // TODO: What else? } } diff --git a/src/Umbraco.Web/Install/Controllers/InstallApiController.cs b/src/Umbraco.Web/Install/Controllers/InstallApiController.cs index bf371bacf0..dc315c571a 100644 --- a/src/Umbraco.Web/Install/Controllers/InstallApiController.cs +++ b/src/Umbraco.Web/Install/Controllers/InstallApiController.cs @@ -52,7 +52,7 @@ namespace Umbraco.Web.Install.Controllers { var setup = new InstallSetup(); - //TODO: Check for user/site token + // TODO: Check for user/site token var steps = new List(); diff --git a/src/Umbraco.Web/Install/InstallStepCollection.cs b/src/Umbraco.Web/Install/InstallStepCollection.cs index d5c32d0ce6..fd8f248325 100644 --- a/src/Umbraco.Web/Install/InstallStepCollection.cs +++ b/src/Umbraco.Web/Install/InstallStepCollection.cs @@ -14,7 +14,7 @@ namespace Umbraco.Web.Install { _installHelper = installHelper; - // todo this is ugly but I have a branch where it's nicely refactored - for now we just want to manage ordering + // TODO: this is ugly but I have a branch where it's nicely refactored - for now we just want to manage ordering var a = installerSteps.ToArray(); _orderedInstallerSteps = new InstallSetupStep[] { @@ -26,7 +26,7 @@ namespace Umbraco.Web.Install a.OfType().First(), a.OfType().First(), - //TODO: Add these back once we have a compatible starter kit + // TODO: Add these back once we have a compatible starter kit //orderedInstallerSteps.OfType().First(), //orderedInstallerSteps.OfType().First(), //orderedInstallerSteps.OfType().First(), diff --git a/src/Umbraco.Web/Install/InstallSteps/NewInstallStep.cs b/src/Umbraco.Web/Install/InstallSteps/NewInstallStep.cs index 7b53ecb966..151265f394 100644 --- a/src/Umbraco.Web/Install/InstallSteps/NewInstallStep.cs +++ b/src/Umbraco.Web/Install/InstallSteps/NewInstallStep.cs @@ -42,7 +42,7 @@ namespace Umbraco.Web.Install.InstallSteps _globalSettings = globalSettings; } - //TODO: Change all logic in this step to use ASP.NET Identity NOT MembershipProviders + // TODO: Change all logic in this step to use ASP.NET Identity NOT MembershipProviders private MembershipProvider CurrentProvider { get diff --git a/src/Umbraco.Web/Install/InstallSteps/StarterKitCleanupStep.cs b/src/Umbraco.Web/Install/InstallSteps/StarterKitCleanupStep.cs index 3ddc675405..6b90ff0a78 100644 --- a/src/Umbraco.Web/Install/InstallSteps/StarterKitCleanupStep.cs +++ b/src/Umbraco.Web/Install/InstallSteps/StarterKitCleanupStep.cs @@ -26,7 +26,7 @@ namespace Umbraco.Web.Install.InstallSteps { packageFile = HttpUtility.UrlDecode(packageFile); - //todo: When does the zip file get deleted? + // TODO: When does the zip file get deleted? } public override bool RequiresExecution(object model) diff --git a/src/Umbraco.Web/Install/InstallSteps/UpgradeStep.cs b/src/Umbraco.Web/Install/InstallSteps/UpgradeStep.cs index 1477105797..3cab550a87 100644 --- a/src/Umbraco.Web/Install/InstallSteps/UpgradeStep.cs +++ b/src/Umbraco.Web/Install/InstallSteps/UpgradeStep.cs @@ -20,7 +20,7 @@ namespace Umbraco.Web.Install.InstallSteps { get { - // todo- if UmbracoVersion.Local is null? + // TODO: if UmbracoVersion.Local is null? // it means that there is a database but the web.config version is cleared // that was a "normal" way to force the upgrader to execute, and we would detect the current // version via the DB like DatabaseSchemaResult.DetermineInstalledVersion - magic, do we really @@ -37,7 +37,7 @@ namespace Umbraco.Web.Install.InstallSteps return value; } - var state = Current.RuntimeState; // todo inject + var state = Current.RuntimeState; // TODO: inject var currentState = FormatGuidState(state.CurrentMigrationState); var newState = FormatGuidState(state.FinalMigrationState); diff --git a/src/Umbraco.Web/Install/Models/InstallPackageModel.cs b/src/Umbraco.Web/Install/Models/InstallPackageModel.cs index 10335c48fc..0c7d270033 100644 --- a/src/Umbraco.Web/Install/Models/InstallPackageModel.cs +++ b/src/Umbraco.Web/Install/Models/InstallPackageModel.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; namespace Umbraco.Web.Install.Models { - //todo : do we need this? + // TODO: do we need this? [Obsolete("This is only used for the obsolete controller InstallPackageController")] [DataContract(Name = "installPackage", Namespace = "")] public class InstallPackageModel diff --git a/src/Umbraco.Web/Media/EmbedProviders/AbstractOEmbedProvider.cs b/src/Umbraco.Web/Media/EmbedProviders/AbstractOEmbedProvider.cs index 921036c75a..c73e732268 100644 --- a/src/Umbraco.Web/Media/EmbedProviders/AbstractOEmbedProvider.cs +++ b/src/Umbraco.Web/Media/EmbedProviders/AbstractOEmbedProvider.cs @@ -10,7 +10,7 @@ using Umbraco.Core.Media; namespace Umbraco.Web.Media.EmbedProviders { - //TODO: Make all Http calls async + // TODO: Make all Http calls async public abstract class AbstractOEmbedProvider : IEmbedProvider { diff --git a/src/Umbraco.Web/MembershipProviderExtensions.cs b/src/Umbraco.Web/MembershipProviderExtensions.cs index b833028850..133e886e1f 100644 --- a/src/Umbraco.Web/MembershipProviderExtensions.cs +++ b/src/Umbraco.Web/MembershipProviderExtensions.cs @@ -30,7 +30,7 @@ namespace Umbraco.Web {"requiresQuestionAnswer", membershipProvider.RequiresQuestionAndAnswer}, {"allowManuallyChangingPassword", baseProvider != null && baseProvider.AllowManuallyChangingPassword}, {"minNonAlphaNumericChars", membershipProvider.MinRequiredNonAlphanumericCharacters} - //TODO: Inject the other parameters in here to change the behavior of this control - based on the membership provider settings. + // TODO: Inject the other parameters in here to change the behavior of this control - based on the membership provider settings. }; } diff --git a/src/Umbraco.Web/Models/ContentEditing/MemberSave.cs b/src/Umbraco.Web/Models/ContentEditing/MemberSave.cs index b25a210083..5132dbc3ec 100644 --- a/src/Umbraco.Web/Models/ContentEditing/MemberSave.cs +++ b/src/Umbraco.Web/Models/ContentEditing/MemberSave.cs @@ -37,6 +37,6 @@ namespace Umbraco.Web.Models.ContentEditing public bool IsApproved { get; set; } - //TODO: Need to add question / answer support + // TODO: Need to add question / answer support } } diff --git a/src/Umbraco.Web/Models/ContentEditing/UserGroupPermissionsSave.cs b/src/Umbraco.Web/Models/ContentEditing/UserGroupPermissionsSave.cs index e61f9debfa..4c9a751573 100644 --- a/src/Umbraco.Web/Models/ContentEditing/UserGroupPermissionsSave.cs +++ b/src/Umbraco.Web/Models/ContentEditing/UserGroupPermissionsSave.cs @@ -17,7 +17,7 @@ namespace Umbraco.Web.Models.ContentEditing AssignedPermissions = new Dictionary>(); } - //TODO: we should have an option to clear the permissions assigned to this node and instead just have them inherit - yes once we actually have inheritance! + // TODO: we should have an option to clear the permissions assigned to this node and instead just have them inherit - yes once we actually have inheritance! [DataMember(Name = "contentId", IsRequired = true)] [Required] diff --git a/src/Umbraco.Web/Models/Mapping/ActionButtonsResolver.cs b/src/Umbraco.Web/Models/Mapping/ActionButtonsResolver.cs index 6de0e704d5..c2f7abd487 100644 --- a/src/Umbraco.Web/Models/Mapping/ActionButtonsResolver.cs +++ b/src/Umbraco.Web/Models/Mapping/ActionButtonsResolver.cs @@ -35,7 +35,7 @@ namespace Umbraco.Web.Models.Mapping path = parent == null ? "-1" : parent.Path; } - //TODO: This is certainly not ideal usage here - perhaps the best way to deal with this in the future is + // TODO: This is certainly not ideal usage here - perhaps the best way to deal with this in the future is // with the IUmbracoContextAccessor. In the meantime, if used outside of a web app this will throw a null // reference exception :( return UserService.GetPermissionsForPath(UmbracoContext.Current.Security.CurrentUser, path).GetAllPermissions(); diff --git a/src/Umbraco.Web/Models/Mapping/ContentPropertyDisplayConverter.cs b/src/Umbraco.Web/Models/Mapping/ContentPropertyDisplayConverter.cs index 3c2dd01c9c..84eaabf52b 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentPropertyDisplayConverter.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentPropertyDisplayConverter.cs @@ -29,7 +29,7 @@ namespace Umbraco.Web.Models.Mapping var config = DataTypeService.GetDataType(originalProp.PropertyType.DataTypeId).Configuration; - // todo - IDataValueEditor configuration - general issue + // TODO: IDataValueEditor configuration - general issue // GetValueEditor() returns a non-configured IDataValueEditor // - for richtext and nested, configuration determines HideLabel, so we need to configure the value editor // - could configuration also determines ValueType, everywhere? diff --git a/src/Umbraco.Web/Models/Mapping/ContentTypeBasicResolver.cs b/src/Umbraco.Web/Models/Mapping/ContentTypeBasicResolver.cs index 01ff458bd5..cb745096ab 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentTypeBasicResolver.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentTypeBasicResolver.cs @@ -17,7 +17,7 @@ namespace Umbraco.Web.Models.Mapping { public ContentTypeBasic Resolve(TSource source, TDestination destination, ContentTypeBasic destMember, ResolutionContext context) { - //TODO: We can resolve the UmbracoContext from the IValueResolver options! + // TODO: We can resolve the UmbracoContext from the IValueResolver options! // OMG if (HttpContext.Current != null && UmbracoContext.Current != null && UmbracoContext.Current.Security.CurrentUser != null && UmbracoContext.Current.Security.CurrentUser.AllowedSections.Any(x => x.Equals(Constants.Applications.Settings))) diff --git a/src/Umbraco.Web/Models/Mapping/ContentTypeProfileExtensions.cs b/src/Umbraco.Web/Models/Mapping/ContentTypeProfileExtensions.cs index 257a53cf1a..0181fc25be 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentTypeProfileExtensions.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentTypeProfileExtensions.cs @@ -25,7 +25,7 @@ namespace Umbraco.Web.Models.Mapping where TPropertyTypeBasic : PropertyTypeBasic { return mapping - .ConstructUsing(x => new PropertyGroup(false)) // todo - we have NO idea of isPublishing here = wtf? + .ConstructUsing(x => new PropertyGroup(false)) // TODO: we have NO idea of isPublishing here = wtf? .IgnoreEntityCommonProperties() .ForMember(dest => dest.Id, map => map.Condition(src => src.Id > 0)) .ForMember(dest => dest.Key, map => map.Ignore()) @@ -66,7 +66,7 @@ namespace Umbraco.Web.Models.Mapping foreach (var a in add) { - //TODO: Remove N+1 lookup + // TODO: Remove N+1 lookup var addCt = contentTypeService.Get(a); if (addCt != null) dest.AddContentType(addCt); @@ -91,7 +91,7 @@ namespace Umbraco.Web.Models.Mapping foreach (var a in add) { - //TODO: Remove N+1 lookup + // TODO: Remove N+1 lookup var addCt = mediaTypeService.Get(a); if (addCt != null) dest.AddContentType(addCt); @@ -160,7 +160,7 @@ namespace Umbraco.Web.Models.Mapping where TDestination : IContentTypeComposition where TSourcePropertyType : PropertyTypeBasic { - // todo not so clean really + // TODO: not so clean really var isPublishing = typeof(IContentType).IsAssignableFrom(typeof(TDestination)); mapping = mapping diff --git a/src/Umbraco.Web/Models/Mapping/DatabaseTypeResolver.cs b/src/Umbraco.Web/Models/Mapping/DatabaseTypeResolver.cs index c8fc9ea4b2..35702719dc 100644 --- a/src/Umbraco.Web/Models/Mapping/DatabaseTypeResolver.cs +++ b/src/Umbraco.Web/Models/Mapping/DatabaseTypeResolver.cs @@ -16,7 +16,7 @@ namespace Umbraco.Web.Models.Mapping if (!Current.PropertyEditors.TryGet(source.EditorAlias, out var editor)) throw new InvalidOperationException($"Could not find property editor \"{source.EditorAlias}\"."); - // todo - what about source.PropertyEditor? can we get the configuration here? 'cos it may change the storage type?! + // TODO: what about source.PropertyEditor? can we get the configuration here? 'cos it may change the storage type?! var valueType = editor.GetValueEditor().ValueType; return ValueTypes.ToStorageType(valueType); } diff --git a/src/Umbraco.Web/Models/Mapping/EntityMapperProfile.cs b/src/Umbraco.Web/Models/Mapping/EntityMapperProfile.cs index 8f99fe03dc..90e98822b1 100644 --- a/src/Umbraco.Web/Models/Mapping/EntityMapperProfile.cs +++ b/src/Umbraco.Web/Models/Mapping/EntityMapperProfile.cs @@ -124,7 +124,7 @@ namespace Umbraco.Web.Models.Mapping .ForMember(dest => dest.AdditionalData, opt => opt.Ignore()) .AfterMap((src, dest) => { - //TODO: Properly map this (not aftermap) + // TODO: Properly map this (not aftermap) //get the icon if there is one dest.Icon = src.Values.ContainsKey(UmbracoExamineIndex.IconFieldName) @@ -204,7 +204,7 @@ namespace Umbraco.Web.Models.Mapping // if there's no culture here, the issue is somewhere else (UI, whatever) - throw! if (culture == null) //throw new InvalidOperationException("Missing culture in mapping options."); - // todo we should throw, but this is used in various places that won't set a culture yet + // TODO: we should throw, but this is used in various places that won't set a culture yet return source.Name; // if we don't have a name for a culture, it means the culture is not available, and diff --git a/src/Umbraco.Web/Models/Mapping/MacroMapperProfile.cs b/src/Umbraco.Web/Models/Mapping/MacroMapperProfile.cs index 1be74ce583..be1bcdefdc 100644 --- a/src/Umbraco.Web/Models/Mapping/MacroMapperProfile.cs +++ b/src/Umbraco.Web/Models/Mapping/MacroMapperProfile.cs @@ -36,7 +36,7 @@ namespace Umbraco.Web.Models.Mapping { //map the view and the config // we need to show the deprecated ones for backwards compatibility - var paramEditor = Current.ParameterEditors[property.EditorAlias]; // todo - include/filter deprecated?! + var paramEditor = Current.ParameterEditors[property.EditorAlias]; // TODO: include/filter deprecated?! if (paramEditor == null) { //we'll just map this to a text box diff --git a/src/Umbraco.Web/Models/Mapping/MemberMapperProfile.cs b/src/Umbraco.Web/Models/Mapping/MemberMapperProfile.cs index 62afdd88c7..dbdac1f91f 100644 --- a/src/Umbraco.Web/Models/Mapping/MemberMapperProfile.cs +++ b/src/Umbraco.Web/Models/Mapping/MemberMapperProfile.cs @@ -56,7 +56,7 @@ namespace Umbraco.Web.Models.Mapping .ForMember(dest => dest.FailedPasswordAttempts, opt => opt.Ignore()) .ForMember(dest => dest.DeleteDate, opt => opt.Ignore()) .ForMember(dest => dest.WriterId, opt => opt.Ignore()) - //TODO: Support these eventually + // TODO: Support these eventually .ForMember(dest => dest.PasswordQuestion, opt => opt.Ignore()) .ForMember(dest => dest.RawPasswordAnswerValue, opt => opt.Ignore()); diff --git a/src/Umbraco.Web/Models/Mapping/MemberTabsAndPropertiesResolver.cs b/src/Umbraco.Web/Models/Mapping/MemberTabsAndPropertiesResolver.cs index c8391abdb4..6134275c76 100644 --- a/src/Umbraco.Web/Models/Mapping/MemberTabsAndPropertiesResolver.cs +++ b/src/Umbraco.Web/Models/Mapping/MemberTabsAndPropertiesResolver.cs @@ -139,7 +139,7 @@ namespace Umbraco.Web.Models.Mapping // only when creating a new member and we want to have a generated password pre-filled. Value = new Dictionary { - // todo why ignoreCase, what are we doing here?! + // TODO: why ignoreCase, what are we doing here?! {"generatedPassword", member.GetAdditionalDataValueIgnoreCase("GeneratedPassword", null)}, {"newPassword", member.GetAdditionalDataValueIgnoreCase("NewPassword", null)}, }, diff --git a/src/Umbraco.Web/Models/Mapping/TabsAndPropertiesResolver.cs b/src/Umbraco.Web/Models/Mapping/TabsAndPropertiesResolver.cs index 2f2af047f7..e8d7fb38b2 100644 --- a/src/Umbraco.Web/Models/Mapping/TabsAndPropertiesResolver.cs +++ b/src/Umbraco.Web/Models/Mapping/TabsAndPropertiesResolver.cs @@ -27,7 +27,7 @@ namespace Umbraco.Web.Models.Mapping IgnoreProperties = ignoreProperties ?? throw new ArgumentNullException(nameof(ignoreProperties)); } - //TODO: This should deserialize to ListViewConfiguration + // TODO: This should deserialize to ListViewConfiguration private static int GetTabNumberFromConfig(IDictionary listViewConfig) { if (!listViewConfig.TryGetValue("displayAtTabNumber", out var displayTabNum)) diff --git a/src/Umbraco.Web/Models/PublishedContent/PublishedValueFallback.cs b/src/Umbraco.Web/Models/PublishedContent/PublishedValueFallback.cs index ae011c01f9..7b467b6d15 100644 --- a/src/Umbraco.Web/Models/PublishedContent/PublishedValueFallback.cs +++ b/src/Umbraco.Web/Models/PublishedContent/PublishedValueFallback.cs @@ -267,8 +267,7 @@ namespace Umbraco.Web.Models.PublishedContent var visited = new HashSet(); - // todo - // _localizationService.GetXxx() is expensive, it deep clones objects + // TODO: _localizationService.GetXxx() is expensive, it deep clones objects // we want _localizationService.GetReadOnlyXxx() returning IReadOnlyLanguage which cannot be saved back = no need to clone var language = _localizationService.GetLanguageByIsoCode(culture); diff --git a/src/Umbraco.Web/Models/PublishedContentBase.cs b/src/Umbraco.Web/Models/PublishedContentBase.cs index c7e38ab7f0..dd6afbd97f 100644 --- a/src/Umbraco.Web/Models/PublishedContentBase.cs +++ b/src/Umbraco.Web/Models/PublishedContentBase.cs @@ -15,7 +15,7 @@ namespace Umbraco.Web.Models [DebuggerDisplay("Content Id: {Id}, Name: {Name}")] public abstract class PublishedContentBase : IPublishedContent { - private string _url; // fixme/task - cannot cache urls, they depends on the current request + private string _url; // FIXME: task - cannot cache urls, they depends on the current request #region ContentType @@ -79,12 +79,12 @@ namespace Umbraco.Web.Models /// The url of documents are computed by the document url providers. The url of medias are, at the moment, /// computed here from the 'umbracoFile' property -- but we should move to media url providers at some point. /// - public virtual string GetUrl(string culture = null) // todo - consider .GetCulture("fr-FR").Url + public virtual string GetUrl(string culture = null) // TODO: consider .GetCulture("fr-FR").Url { switch (ItemType) { case PublishedItemType.Content: - // todo - consider injecting an umbraco context accessor + // TODO: consider injecting an umbraco context accessor if (UmbracoContext.Current == null) throw new InvalidOperationException("Cannot compute Url for a content item when UmbracoContext.Current is null."); if (UmbracoContext.Current.UrlProvider == null) @@ -103,7 +103,7 @@ namespace Umbraco.Web.Models var propType = ContentType.GetPropertyType(Constants.Conventions.Media.File); - // todo - consider implementing media url providers + // TODO: consider implementing media url providers // note: that one does not support variations //This is a hack - since we now have 2 properties that support a URL: upload and cropper, we need to detect this since we always // want to return the normal URL and the cropper stores data as json diff --git a/src/Umbraco.Web/Models/PublishedProperty.cs b/src/Umbraco.Web/Models/PublishedProperty.cs index 05d6b5cfe0..d32612c54c 100644 --- a/src/Umbraco.Web/Models/PublishedProperty.cs +++ b/src/Umbraco.Web/Models/PublishedProperty.cs @@ -25,7 +25,7 @@ namespace Umbraco.Web.Models var propertyEditors = Current.PropertyEditors; var dataTypeService = Current.Services.DataTypeService; - // todo not dealing with variants + // TODO: not dealing with variants // but the entire thing should die anyways return propertyTypes.Select(x => diff --git a/src/Umbraco.Web/Models/Trees/MenuItem.cs b/src/Umbraco.Web/Models/Trees/MenuItem.cs index 89239f43f7..9dd5524f76 100644 --- a/src/Umbraco.Web/Models/Trees/MenuItem.cs +++ b/src/Umbraco.Web/Models/Trees/MenuItem.cs @@ -106,7 +106,7 @@ namespace Umbraco.Web.Models.Trees /// internal const string ActionUrlKey = "actionUrl"; - //TODO: some action's want to launch a new window like live editing, we support this in the menu item's metadata with + // TODO: some action's want to launch a new window like live editing, we support this in the menu item's metadata with // a key called: "actionUrlMethod" which can be set to either: Dialog, BlankWindow. Normally this is always set to Dialog // if a URL is specified in the "actionUrl" metadata. For now I'm not going to implement launching in a blank window, // though would be v-easy, just not sure we want to ever support that? diff --git a/src/Umbraco.Web/Models/UmbracoProperty.cs b/src/Umbraco.Web/Models/UmbracoProperty.cs index 98ee9fd628..8b41141b95 100644 --- a/src/Umbraco.Web/Models/UmbracoProperty.cs +++ b/src/Umbraco.Web/Models/UmbracoProperty.cs @@ -28,7 +28,7 @@ namespace Umbraco.Web.Models [ReadOnly(true)] public string Name { get; set; } - //TODO: Perhaps one day we'll ship with our own EditorTempates but for now developers can just render their own inside the view + // TODO: Perhaps one day we'll ship with our own EditorTempates but for now developers can just render their own inside the view ///// ///// This can dynamically be set to a custom template name to change diff --git a/src/Umbraco.Web/Mvc/RenderRouteHandler.cs b/src/Umbraco.Web/Mvc/RenderRouteHandler.cs index 10efb54552..e88bab61e5 100644 --- a/src/Umbraco.Web/Mvc/RenderRouteHandler.cs +++ b/src/Umbraco.Web/Mvc/RenderRouteHandler.cs @@ -44,7 +44,7 @@ namespace Umbraco.Web.Mvc private UmbracoContext UmbracoContext => _umbracoContext ?? _umbracoContextAccessor.UmbracoContext; - private UmbracoFeatures Features => Current.Factory.GetInstance(); // todo inject + private UmbracoFeatures Features => Current.Factory.GetInstance(); // TODO: inject #region IRouteHandler Members diff --git a/src/Umbraco.Web/Mvc/UmbracoViewPageOfTModel.cs b/src/Umbraco.Web/Mvc/UmbracoViewPageOfTModel.cs index 806a4bd250..a16f9661aa 100644 --- a/src/Umbraco.Web/Mvc/UmbracoViewPageOfTModel.cs +++ b/src/Umbraco.Web/Mvc/UmbracoViewPageOfTModel.cs @@ -41,8 +41,7 @@ namespace Umbraco.Web.Mvc /// public AppCaches AppCaches { get; set; } - // todo - // previously, Services and ApplicationCache would derive from UmbracoContext.Application, which + // TODO: previously, Services and ApplicationCache would derive from UmbracoContext.Application, which // was an ApplicationContext - so that everything derived from UmbracoContext. // UmbracoContext is fetched from the data tokens, thus allowing the view to be rendered with a // custom context and NOT the Current.UmbracoContext - eg outside the normal Umbraco routing diff --git a/src/Umbraco.Web/Mvc/UmbracoVirtualNodeRouteHandler.cs b/src/Umbraco.Web/Mvc/UmbracoVirtualNodeRouteHandler.cs index 0c95e1d446..48e16b48d7 100644 --- a/src/Umbraco.Web/Mvc/UmbracoVirtualNodeRouteHandler.cs +++ b/src/Umbraco.Web/Mvc/UmbracoVirtualNodeRouteHandler.cs @@ -11,7 +11,7 @@ namespace Umbraco.Web.Mvc { public abstract class UmbracoVirtualNodeRouteHandler : IRouteHandler { - // TODO: - try lazy property injection? + // TODO: try lazy property injection? private PublishedRouter PublishedRouter => Core.Composing.Current.Factory.GetInstance(); /// @@ -28,7 +28,7 @@ namespace Umbraco.Web.Mvc /// //check if context is null, we know it will be null if we are dealing with a request that /// //has an extension and by default no Umb ctx is created for the request /// if (ctx == null) { - /// //TODO: Here you can EnsureContext , please note that the requestContext is passed in + /// // TODO: Here you can EnsureContext , please note that the requestContext is passed in /// //therefore your should refrain from using other singletons like HttpContext.Current since /// //you will already have a reference to it. Also if you need an ApplicationContext you should /// //pass this in via a ctor instead of using the ApplicationContext.Current singleton. diff --git a/src/Umbraco.Web/PropertyEditors/FileUploadPropertyValueEditor.cs b/src/Umbraco.Web/PropertyEditors/FileUploadPropertyValueEditor.cs index f36dd6bfa8..81239caec0 100644 --- a/src/Umbraco.Web/PropertyEditors/FileUploadPropertyValueEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/FileUploadPropertyValueEditor.cs @@ -108,7 +108,7 @@ namespace Umbraco.Web.PropertyEditors using (var filestream = File.OpenRead(file.TempFilePath)) { - //TODO: Here it would make sense to do the auto-fill properties stuff but the API doesn't allow us to do that right + // TODO: Here it would make sense to do the auto-fill properties stuff but the API doesn't allow us to do that right // since we'd need to be able to return values for other properties from these methods _mediaFileSystem.AddFile(filepath, filestream, true); // must overwrite! diff --git a/src/Umbraco.Web/PropertyEditors/GridConfiguration.cs b/src/Umbraco.Web/PropertyEditors/GridConfiguration.cs index 8c2f7ac488..e2b46b360d 100644 --- a/src/Umbraco.Web/PropertyEditors/GridConfiguration.cs +++ b/src/Umbraco.Web/PropertyEditors/GridConfiguration.cs @@ -8,11 +8,11 @@ namespace Umbraco.Web.PropertyEditors /// public class GridConfiguration { - //todo: Make these strongly typed, for now this works though + // TODO: Make these strongly typed, for now this works though [ConfigurationField("items", "Grid", "views/propertyeditors/grid/grid.prevalues.html", Description = "Grid configuration")] public JObject Items { get; set; } - //todo: Make these strongly typed, for now this works though + // TODO: Make these strongly typed, for now this works though [ConfigurationField("rte", "Rich text editor", "views/propertyeditors/rte/rte.prevalues.html", Description = "Rich text editor configuration")] public JObject Rte { get; set; } } diff --git a/src/Umbraco.Web/PropertyEditors/GridPropertyIndexValueFactory.cs b/src/Umbraco.Web/PropertyEditors/GridPropertyIndexValueFactory.cs index 83279ae975..085d66f3c6 100644 --- a/src/Umbraco.Web/PropertyEditors/GridPropertyIndexValueFactory.cs +++ b/src/Umbraco.Web/PropertyEditors/GridPropertyIndexValueFactory.cs @@ -41,7 +41,7 @@ namespace Umbraco.Web.PropertyEditors { var controlVal = control.Value; - //TODO: If it's not a string, then it's a json formatted value - + // TODO: If it's not a string, then it's a json formatted value - // we cannot really index this in a smart way since it could be 'anything' if (controlVal.Type == JTokenType.String) { diff --git a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs index fff11a28a5..86f3412593 100644 --- a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs @@ -37,7 +37,7 @@ namespace Umbraco.Web.PropertyEditors _contentSettings = contentSettings ?? throw new ArgumentNullException(nameof(contentSettings)); _dataTypeService = dataTypeService; - //todo: inject? + // TODO: inject? _autoFillProperties = new UploadAutoFillProperties(_mediaFileSystem, logger, _contentSettings); } diff --git a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs index 78f2189829..7bea542521 100644 --- a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs @@ -16,7 +16,7 @@ namespace Umbraco.Web.PropertyEditors /// /// The value editor for the image cropper property editor. /// - internal class ImageCropperPropertyValueEditor : DataValueEditor // todo core vs web? + internal class ImageCropperPropertyValueEditor : DataValueEditor // TODO: core vs web? { private readonly ILogger _logger; private readonly IMediaFileSystem _mediaFileSystem; @@ -151,7 +151,7 @@ namespace Umbraco.Web.PropertyEditors using (var filestream = File.OpenRead(file.TempFilePath)) { - //TODO: Here it would make sense to do the auto-fill properties stuff but the API doesn't allow us to do that right + // TODO: Here it would make sense to do the auto-fill properties stuff but the API doesn't allow us to do that right // since we'd need to be able to return values for other properties from these methods _mediaFileSystem.AddFile(filepath, filestream, true); // must overwrite! diff --git a/src/Umbraco.Web/PropertyEditors/ListViewConfiguration.cs b/src/Umbraco.Web/PropertyEditors/ListViewConfiguration.cs index 1b46a7a8a8..6448a3354c 100644 --- a/src/Umbraco.Web/PropertyEditors/ListViewConfiguration.cs +++ b/src/Umbraco.Web/PropertyEditors/ListViewConfiguration.cs @@ -62,7 +62,7 @@ namespace Umbraco.Web.PropertyEditors [ConfigurationField("bulkActionPermissions", "Bulk Action Permissions", "views/propertyeditors/listview/bulkactionpermissions.prevalues.html", Description = "The bulk actions that are allowed from the list view")] - public BulkActionPermissionSettings BulkActionPermissions { get; set; } = new BulkActionPermissionSettings(); // todomanaging defaults? + public BulkActionPermissionSettings BulkActionPermissions { get; set; } = new BulkActionPermissionSettings(); // TODO: managing defaults? [ConfigurationField("tabName", "Tab Name", "textstring", Description = "The name of the listview tab (default if empty: 'Child Items')")] public string TabName { get; set; } @@ -76,7 +76,7 @@ namespace Umbraco.Web.PropertyEditors public string Header { get; set; } [JsonProperty("isSystem")] - public int IsSystem { get; set; } // todo bool + public int IsSystem { get; set; } // TODO: bool } public class Layout @@ -91,7 +91,7 @@ namespace Umbraco.Web.PropertyEditors public string Icon { get; set; } [JsonProperty("isSystem")] - public int IsSystem { get; set; } // todo bool + public int IsSystem { get; set; } // TODO: bool [JsonProperty("selected")] public bool Selected { get; set; } diff --git a/src/Umbraco.Web/PropertyEditors/MacroContainerPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/MacroContainerPropertyEditor.cs index 77c5c04985..d4d23da3a4 100644 --- a/src/Umbraco.Web/PropertyEditors/MacroContainerPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/MacroContainerPropertyEditor.cs @@ -4,7 +4,7 @@ using Umbraco.Core.PropertyEditors; namespace Umbraco.Web.PropertyEditors { - // todo - MacroContainerPropertyEditor is deprecated, but what's the alternative? + // TODO: MacroContainerPropertyEditor is deprecated, but what's the alternative? [DataEditor(Constants.PropertyEditors.Aliases.MacroContainer, "(Obsolete) Macro Picker", "macrocontainer", ValueType = ValueTypes.Text, Group="rich content", Icon="icon-settings-alt", IsDeprecated = true)] public class MacroContainerPropertyEditor : DataEditor { diff --git a/src/Umbraco.Web/PropertyEditors/MultipleTextStringConfigurationEditor.cs b/src/Umbraco.Web/PropertyEditors/MultipleTextStringConfigurationEditor.cs index a7d05799d9..e7da4ca113 100644 --- a/src/Umbraco.Web/PropertyEditors/MultipleTextStringConfigurationEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/MultipleTextStringConfigurationEditor.cs @@ -34,7 +34,7 @@ namespace Umbraco.Web.PropertyEditors /// public override MultipleTextStringConfiguration FromConfigurationEditor(IDictionary editorValues, MultipleTextStringConfiguration configuration) { - // todo this isn't pretty + // TODO: this isn't pretty //the values from the editor will be min/max fields and we need to format to json in one field // is the editor sending strings or ints or?! var min = (editorValues.ContainsKey("min") ? editorValues["min"].ToString() : "0").TryConvertTo(); diff --git a/src/Umbraco.Web/PropertyEditors/RichTextConfiguration.cs b/src/Umbraco.Web/PropertyEditors/RichTextConfiguration.cs index df29687838..13bf269bcd 100644 --- a/src/Umbraco.Web/PropertyEditors/RichTextConfiguration.cs +++ b/src/Umbraco.Web/PropertyEditors/RichTextConfiguration.cs @@ -8,7 +8,7 @@ namespace Umbraco.Web.PropertyEditors /// public class RichTextConfiguration { - //todo: Make these strongly typed, for now this works though + // TODO: Make these strongly typed, for now this works though [ConfigurationField("editor", "Editor", "views/propertyeditors/rte/rte.prevalues.html", HideLabel = true)] public JObject Editor { get; set; } diff --git a/src/Umbraco.Web/PropertyEditors/TrueFalseConfiguration.cs b/src/Umbraco.Web/PropertyEditors/TrueFalseConfiguration.cs index 1089f3d5aa..c6b3953e8c 100644 --- a/src/Umbraco.Web/PropertyEditors/TrueFalseConfiguration.cs +++ b/src/Umbraco.Web/PropertyEditors/TrueFalseConfiguration.cs @@ -8,7 +8,7 @@ namespace Umbraco.Web.PropertyEditors public class TrueFalseConfiguration { [ConfigurationField("default", "Default Value", "boolean")] - public string Default { get; set; } // todo - well, true or false?! + public string Default { get; set; } // TODO: well, true or false?! [ConfigurationField("labelOn", "Write a label text", "textstring")] public string Label { get; set; } diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/MultiNodeTreePickerValueConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/MultiNodeTreePickerValueConverter.cs index ca5489ac1f..0f8b75f6b1 100644 --- a/src/Umbraco.Web/PropertyEditors/ValueConverters/MultiNodeTreePickerValueConverter.cs +++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/MultiNodeTreePickerValueConverter.cs @@ -66,7 +66,7 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters return null; } - //TODO: Inject an UmbracoHelper and create a GetUmbracoHelper method based on either injected or singleton + // TODO: Inject an UmbracoHelper and create a GetUmbracoHelper method based on either injected or singleton if (UmbracoContext.Current != null) { if (propertyType.EditorAlias.Equals(Constants.PropertyEditors.Aliases.MultiNodeTreePicker)) diff --git a/src/Umbraco.Web/PublishedCache/IPublishedCache.cs b/src/Umbraco.Web/PublishedCache/IPublishedCache.cs index 155e59133d..178d34cfa3 100644 --- a/src/Umbraco.Web/PublishedCache/IPublishedCache.cs +++ b/src/Umbraco.Web/PublishedCache/IPublishedCache.cs @@ -209,7 +209,7 @@ namespace Umbraco.Web.PublishedCache /// The alias is case-insensitive. PublishedContentType GetContentType(string alias); - // todo - can we implement this, now? maybe only with NuCache else will throw NotImplemented... + // TODO: can we implement this, now? maybe only with NuCache else will throw NotImplemented... IEnumerable GetByContentType(PublishedContentType contentType); } } diff --git a/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs b/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs index d983a880cc..cab6e7d759 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs @@ -29,7 +29,7 @@ namespace Umbraco.Web.PublishedCache.NuCache #region Constructor - // todo - figure this out + // TODO: figure this out // after the current snapshot has been resync-ed // it's too late for UmbracoContext which has captured previewDefault and stuff into these ctor vars // but, no, UmbracoContext returns snapshot.Content which comes from elements SO a resync should create a new cache diff --git a/src/Umbraco.Web/PublishedCache/NuCache/ContentStore.cs b/src/Umbraco.Web/PublishedCache/NuCache/ContentStore.cs index 0cf2c231b5..353ac83eda 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/ContentStore.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/ContentStore.cs @@ -38,7 +38,7 @@ namespace Umbraco.Web.PublishedCache.NuCache private volatile int _wlocked; private List> _wchanges; - // todo - collection trigger (ok for now) + // TODO: collection trigger (ok for now) // see SnapDictionary notes private const long CollectMinGenDelta = 8; @@ -104,7 +104,7 @@ namespace Umbraco.Web.PublishedCache.NuCache } // gets a scope contextual representing a locked writer to the dictionary - // todo GetScopedWriter? should the dict have a ref onto the scope provider? + // TODO: GetScopedWriter? should the dict have a ref onto the scope provider? public IDisposable GetWriter(IScopeProvider scopeProvider) { return ScopeContextualBase.Get(scopeProvider, _instanceId, scoped => new ContentStoreWriter(this, scoped)); diff --git a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/BTree.DictionaryOfCultureVariationSerializer.cs b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/BTree.DictionaryOfCultureVariationSerializer.cs index ddf9023d84..107e74b7c3 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/BTree.DictionaryOfCultureVariationSerializer.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/BTree.DictionaryOfCultureVariationSerializer.cs @@ -36,7 +36,7 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource // write each variation foreach (var (culture, variation) in variations) { - // todo - it's weird we're dealing with cultures here, and languageId in properties + // TODO: it's weird we're dealing with cultures here, and languageId in properties PrimitiveSerializer.String.WriteTo(culture, stream); // should never be null WriteObject(variation.Name, stream); // write an object in case it's null (though... should not happen) diff --git a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/DatabaseDataSource.cs b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/DatabaseDataSource.cs index 8e9e86b4fc..ca3abcca48 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/DatabaseDataSource.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/DatabaseDataSource.cs @@ -15,7 +15,7 @@ using static Umbraco.Core.Persistence.NPocoSqlExtensions.Statics; namespace Umbraco.Web.PublishedCache.NuCache.DataSource { - // todo - use SqlTemplate for these queries else it's going to be horribly slow! + // TODO: use SqlTemplate for these queries else it's going to be horribly slow! // provides efficient database access for NuCache internal class DatabaseDataSource : IDataSource diff --git a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/PropertyData.cs b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/PropertyData.cs index 9e50f50c86..e14426a2e2 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/PropertyData.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/PropertyData.cs @@ -12,14 +12,14 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource public string Culture { get => _culture; - set => _culture = value ?? throw new ArgumentNullException(nameof(value)); // todo or fallback to string.Empty? CANNOT be null + set => _culture = value ?? throw new ArgumentNullException(nameof(value)); // TODO: or fallback to string.Empty? CANNOT be null } [JsonProperty("seg")] public string Segment { get => _segment; - set => _segment = value ?? throw new ArgumentNullException(nameof(value)); // todo or fallback to string.Empty? CANNOT be null + set => _segment = value ?? throw new ArgumentNullException(nameof(value)); // TODO: or fallback to string.Empty? CANNOT be null } [JsonProperty("val")] diff --git a/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs b/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs index 889ce72ce0..e1cd1ec764 100755 --- a/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs @@ -201,7 +201,7 @@ namespace Umbraco.Web.PublishedCache.NuCache private void InitializeRepositoryEvents() { - //todo: The reason these events are in the repository is for legacy, the events should exist at the service + // TODO: The reason these events are in the repository is for legacy, the events should exist at the service // level now since we can fire these events within the transaction... so move the events to service level // plug repository event handlers @@ -584,7 +584,7 @@ namespace Umbraco.Web.PublishedCache.NuCache continue; } - // todo- should we do some RV check here? (later) + // TODO: should we do some RV check here? (later) var capture = payload; using (var scope = _scopeProvider.CreateScope()) @@ -674,7 +674,7 @@ namespace Umbraco.Web.PublishedCache.NuCache continue; } - // todo- should we do some RV checks here? (later) + // TODO: should we do some RV checks here? (later) var capture = payload; using (var scope = _scopeProvider.CreateScope()) @@ -773,7 +773,7 @@ namespace Umbraco.Web.PublishedCache.NuCache using (_contentStore.GetWriter(_scopeProvider)) using (_mediaStore.GetWriter(_scopeProvider)) { - // todo - need to add a datatype lock + // TODO: need to add a datatype lock // this is triggering datatypes reload in the factory, and right after we create some // content types by loading them ... there's a race condition here, which would require // some locking on datatypes diff --git a/src/Umbraco.Web/PublishedCache/PublishedMember.cs b/src/Umbraco.Web/PublishedCache/PublishedMember.cs index cbe2250920..906cc7a4ae 100644 --- a/src/Umbraco.Web/PublishedCache/PublishedMember.cs +++ b/src/Umbraco.Web/PublishedCache/PublishedMember.cs @@ -140,10 +140,10 @@ namespace Umbraco.Web.PublishedCache public override string UrlSegment => throw new NotSupportedException(); - //TODO: ARGH! need to fix this - this is not good because it uses ApplicationContext.Current + // TODO: ARGH! need to fix this - this is not good because it uses ApplicationContext.Current public override string WriterName => _member.GetCreatorProfile().Name; - //TODO: ARGH! need to fix this - this is not good because it uses ApplicationContext.Current + // TODO: ARGH! need to fix this - this is not good because it uses ApplicationContext.Current public override string CreatorName => _member.GetCreatorProfile().Name; public override int WriterId => _member.CreatorId; diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs index 5521cabe76..a3aad608d5 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs @@ -122,7 +122,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache //Currently examine is throwing FileNotFound exceptions when we have a load balanced filestore and a node is published in umbraco //See this thread: http://examine.cdodeplex.com/discussions/264341 //Catch the exception here for the time being, and just fallback to GetMedia - //TODO: Need to fix examine in LB scenarios! + // TODO: Need to fix examine in LB scenarios! Current.Logger.Error(ex, "Could not load data from Examine index for media"); } else if (ex is AlreadyClosedException) @@ -248,7 +248,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache //Currently examine is throwing FileNotFound exceptions when we have a load balanced filestore and a node is published in umbraco //See this thread: http://examine.cdodeplex.com/discussions/264341 //Catch the exception here for the time being, and just fallback to GetMedia - //TODO: Need to fix examine in LB scenarios! + // TODO: Need to fix examine in LB scenarios! } catch (NullReferenceException) { @@ -305,7 +305,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache //Currently examine is throwing FileNotFound exceptions when we have a load balanced filestore and a node is published in umbraco //See this thread: http://examine.cdodeplex.com/discussions/264341 //Catch the exception here for the time being, and just fallback to GetMedia - //TODO: Need to fix examine in LB scenarios! + // TODO: Need to fix examine in LB scenarios! Current.Logger.Error(ex, "Could not load data from Examine index for media"); } else if (ex is AlreadyClosedException) diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/SafeXmlReaderWriter.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/SafeXmlReaderWriter.cs index 672aad1e3e..37a6b666d4 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/SafeXmlReaderWriter.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/SafeXmlReaderWriter.cs @@ -5,7 +5,7 @@ using Umbraco.Core.Scoping; namespace Umbraco.Web.PublishedCache.XmlPublishedCache { - // todo should be a ScopeContextualBase + // TODO: should be a ScopeContextualBase internal class SafeXmlReaderWriter : IDisposable { private readonly bool _scoped; diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs index c3cf22559d..b1037759dc 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs @@ -377,7 +377,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache } catch (InvalidOperationException e) { - // todo - enable! + // TODO: enable! //content.Instance.RefreshContentFromDatabase(); throw new InvalidOperationException($"{e.Message}. This usually indicates that the content cache is corrupt; the content cache has been rebuilt in an attempt to self-fix the issue."); } diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlStore.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlStore.cs index 0153cca18b..36a8334782 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlStore.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlStore.cs @@ -69,7 +69,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache // internal for unit tests // no file nor db, no config check - // todo - er, we DO have a DB? + // TODO: er, we DO have a DB? internal XmlStore(IContentTypeService contentTypeService, IContentService contentService, IScopeProvider scopeProvider, RoutesCache routesCache, PublishedContentTypeCache contentTypeCache, IPublishedSnapshotAccessor publishedSnapshotAccessor, MainDom mainDom, bool testing, bool enableRepositoryEvents, IDocumentRepository documentRepository, IMediaRepository mediaRepository, IMemberRepository memberRepository, IGlobalSettings globalSettings, IEntityXmlSerializer entitySerializer) @@ -602,7 +602,7 @@ AND (umbracoNode.id=@id)"; // should we have async versions that would do: ? // var releaser = await _xmlLock.LockAsync(); // - // todo - not sure about the "resync current published snapshot" thing here, see 7.6... + // TODO: not sure about the "resync current published snapshot" thing here, see 7.6... // gets a locked safe read access to the main xml private SafeXmlReaderWriter GetSafeXmlReader() @@ -641,7 +641,7 @@ AND (umbracoNode.id=@id)"; public void EnsureFilePermission() { - // todo - but do we really have a store, initialized, at that point? + // TODO: but do we really have a store, initialized, at that point? var filename = _xmlFileName + ".temp"; File.WriteAllText(filename, "TEMP"); File.Delete(filename); @@ -1559,8 +1559,8 @@ ORDER BY umbracoNode.level, umbracoNode.sortOrder"; // need to update the published xml if we're saving the published version, // or having an impact on that version - we update the published xml even when masked - // todo - in the repo... either its 'unpublished' and 'publishing', or 'published' and 'published', this has changed! - // todo - what are we serializing really? which properties? + // TODO: in the repo... either its 'unpublished' and 'publishing', or 'published' and 'published', this has changed! + // TODO: what are we serializing really? which properties? // if not publishing, no change to published xml if (((Content) entity).PublishedState != PublishedState.Publishing) @@ -1669,7 +1669,7 @@ ORDER BY umbracoNode.level, umbracoNode.sortOrder"; // RepositoryCacheMode.Scoped because we do NOT want to use the L2 cache that may be out-of-sync // hopefully this does not cause issues and we're not nested in another scope w/different mode - // todo - well, guess what? + // TODO: well, guess what? // original code made sure the repository used no cache // now we're using the Scoped scope cache mode // and then? @@ -2027,7 +2027,7 @@ AND cmsPreviewXml.nodeId IS NULL OR cmsPreviewXml.xml NOT LIKE '% key=""' { // every non-trashed media item should have a corresponding row in cmsContentXml // and that row should have the key="..." attribute - // todo - where's the trashed test here? + // TODO: where's the trashed test here? var mediaObjectType = Constants.ObjectTypes.Media; var db = scope.Database; diff --git a/src/Umbraco.Web/PublishedContentExtensions.cs b/src/Umbraco.Web/PublishedContentExtensions.cs index c57d0249c1..e1bf60f558 100644 --- a/src/Umbraco.Web/PublishedContentExtensions.cs +++ b/src/Umbraco.Web/PublishedContentExtensions.cs @@ -251,7 +251,7 @@ namespace Umbraco.Web public static IEnumerable SearchDescendants(this IPublishedContent content, string term, string indexName = null) { - //todo inject examine manager + // TODO: inject examine manager indexName = string.IsNullOrEmpty(indexName) ? Constants.UmbracoIndexes.ExternalIndexName : indexName; if (!ExamineManager.Instance.TryGetIndex(indexName, out var index)) @@ -272,7 +272,7 @@ namespace Umbraco.Web public static IEnumerable SearchChildren(this IPublishedContent content, string term, string indexName = null) { - //todo inject examine manager + // TODO: inject examine manager indexName = string.IsNullOrEmpty(indexName) ? Constants.UmbracoIndexes.ExternalIndexName : indexName; if (!ExamineManager.Instance.TryGetIndex(indexName, out var index)) diff --git a/src/Umbraco.Web/Routing/ContentFinderByUrlAlias.cs b/src/Umbraco.Web/Routing/ContentFinderByUrlAlias.cs index ff629609d3..60124a96a2 100644 --- a/src/Umbraco.Web/Routing/ContentFinderByUrlAlias.cs +++ b/src/Umbraco.Web/Routing/ContentFinderByUrlAlias.cs @@ -95,7 +95,7 @@ namespace Umbraco.Web.Routing return v.InvariantContains(a1) || v.InvariantContains(a2); } - // todo - even with Linq, what happens below has to be horribly slow + // TODO: even with Linq, what happens below has to be horribly slow // but the only solution is to entirely refactor url providers to stop being dynamic if (rootNodeId > 0) diff --git a/src/Umbraco.Web/Routing/CustomRouteUrlProvider.cs b/src/Umbraco.Web/Routing/CustomRouteUrlProvider.cs index ae17ff6258..0c6998e7e1 100644 --- a/src/Umbraco.Web/Routing/CustomRouteUrlProvider.cs +++ b/src/Umbraco.Web/Routing/CustomRouteUrlProvider.cs @@ -25,7 +25,7 @@ namespace Umbraco.Web.Routing //If we get this far, it means it's a custom route with published content assigned, check if the id being requested for is the same id as the assigned published content //NOTE: This looks like it might cause an infinite loop because PublishedContentBase.Url calls into UmbracoContext.Current.UrlProvider.GetUrl which calls back into the IUrlProvider pipeline // but the specific purpose of this is that a developer is using their own IPublishedContent that returns a specific Url and doesn't go back into the UrlProvider pipeline. - //TODO: We could put a try/catch here just in case, else we could do some reflection checking to see if the implementation is PublishedContentBase and the Url property is not overridden. + // TODO: We could put a try/catch here just in case, else we could do some reflection checking to see if the implementation is PublishedContentBase and the Url property is not overridden. return UrlInfo.Url( content.Id == umbracoContext.PublishedRequest.PublishedContent.Id ? umbracoContext.PublishedRequest.PublishedContent.GetUrl(culture) diff --git a/src/Umbraco.Web/Routing/DomainHelper.cs b/src/Umbraco.Web/Routing/DomainHelper.cs index 8ba06363dc..88f2b17814 100644 --- a/src/Umbraco.Web/Routing/DomainHelper.cs +++ b/src/Umbraco.Web/Routing/DomainHelper.cs @@ -107,7 +107,7 @@ namespace Umbraco.Web.Routing /// An optional function to filter the list of domains, if more than one applies. /// The domain and its normalized uri, that best matches the specified uri and cultures. /// - /// todo - must document and explain this all + /// TODO: must document and explain this all /// If is null, pick the first domain that matches , /// else the first that matches , else the first one (ordered by id), else null. /// If is not null, look for domains that would be a base uri of the current uri, @@ -244,7 +244,7 @@ namespace Umbraco.Web.Routing /// The domains and their normalized uris, that match the specified uri. internal static IEnumerable SelectDomains(IEnumerable domains, Uri uri) { - // todo where are we matching ?!!? + // TODO: where are we matching ?!!? return domains .Where(d => d.IsWildcard == false) .Select(d => new DomainAndUri(d, uri)) diff --git a/src/Umbraco.Web/Routing/NotFoundHandlerHelper.cs b/src/Umbraco.Web/Routing/NotFoundHandlerHelper.cs index 1a0e5ef873..38ecb09b2b 100644 --- a/src/Umbraco.Web/Routing/NotFoundHandlerHelper.cs +++ b/src/Umbraco.Web/Routing/NotFoundHandlerHelper.cs @@ -74,7 +74,7 @@ namespace Umbraco.Web.Routing if (errorPage.HasContentKey) { //need to get the Id for the GUID - //TODO: When we start storing GUIDs into the IPublishedContent, then we won't have to look this up + // TODO: When we start storing GUIDs into the IPublishedContent, then we won't have to look this up // but until then we need to look it up in the db. For now we've implemented a cached service for // converting Int -> Guid and vice versa. var found = entityService.GetId(errorPage.ContentKey, UmbracoObjectTypes.Document); diff --git a/src/Umbraco.Web/Routing/PublishedRouter.cs b/src/Umbraco.Web/Routing/PublishedRouter.cs index 94980a7a10..63def7a1cd 100644 --- a/src/Umbraco.Web/Routing/PublishedRouter.cs +++ b/src/Umbraco.Web/Routing/PublishedRouter.cs @@ -19,7 +19,7 @@ using RenderingEngine = Umbraco.Core.RenderingEngine; namespace Umbraco.Web.Routing { - // todo - making sense to have an interface? + // TODO: making sense to have an interface? public class PublishedRouter { private readonly IWebRoutingSection _webRoutingSection; @@ -52,8 +52,7 @@ namespace Umbraco.Web.Routing GetRolesForLogin = s => Roles.Provider.GetRolesForUser(s); } - // todo - // in 7.7 this is cached in the PublishedContentRequest, which ... makes little sense + // TODO: in 7.7 this is cached in the PublishedContentRequest, which ... makes little sense // killing it entirely, if we need cache, just implement it properly !! // this is all so weird public Func> GetRolesForLogin { get; } @@ -380,7 +379,7 @@ namespace Umbraco.Web.Routing // NOTE: we could start with what's the current default? - // todo - bad - we probably should be using the appropriate filesystems! + // TODO: bad - we probably should be using the appropriate filesystems! if (FindTemplateRenderingEngineInDirectory(new DirectoryInfo(IOHelper.MapPath(SystemDirectories.MvcViews)), alias, new[] { ".cshtml", ".vbhtml" })) diff --git a/src/Umbraco.Web/Routing/RedirectTrackingComponent.cs b/src/Umbraco.Web/Routing/RedirectTrackingComponent.cs index 7795543320..4843dd5522 100644 --- a/src/Umbraco.Web/Routing/RedirectTrackingComponent.cs +++ b/src/Umbraco.Web/Routing/RedirectTrackingComponent.cs @@ -182,7 +182,7 @@ namespace Umbraco.Web.Redirects private static void ContentService_Moving(IContentService sender, MoveEventArgs e) { - //TODO: Use the new e.EventState to track state between Moving/Moved events! + // TODO: Use the new e.EventState to track state between Moving/Moved events! Moving = true; } diff --git a/src/Umbraco.Web/Routing/SiteDomainHelper.cs b/src/Umbraco.Web/Routing/SiteDomainHelper.cs index 7879b22402..6173dfb43c 100644 --- a/src/Umbraco.Web/Routing/SiteDomainHelper.cs +++ b/src/Umbraco.Web/Routing/SiteDomainHelper.cs @@ -181,7 +181,7 @@ namespace Umbraco.Web.Routing /// public virtual IEnumerable MapDomains(IReadOnlyCollection domainAndUris, Uri current, bool excludeDefault, string culture, string defaultCulture) { - // todo ignoring cultures entirely? + // TODO: ignoring cultures entirely? var currentAuthority = current.GetLeftPart(UriPartial.Authority); KeyValuePair[] candidateSites = null; @@ -279,7 +279,7 @@ namespace Umbraco.Web.Routing if (domainAndUris == null) throw new ArgumentNullException(nameof(domainAndUris)); if (domainAndUris.Count == 0) throw new ArgumentException("Cannot be empty.", nameof(domainAndUris)); - // todo how shall we deal with cultures? + // TODO: how shall we deal with cultures? // we do our best, but can't do the impossible // get the "default" domain ie the first one for the culture, else the first one (exists, length > 0) diff --git a/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs b/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs index 832699b5d7..de30590e92 100644 --- a/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs +++ b/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs @@ -80,7 +80,7 @@ namespace Umbraco.Web.Runtime // we should stop injecting UmbracoContext and always inject IUmbracoContextAccessor, however at the moment // there are tons of places (controllers...) which require UmbracoContext in their ctor - so let's register // a way to inject the UmbracoContext - and register it per-request to be more efficient - //TODO: stop doing this + // TODO: stop doing this composition.Register(factory => factory.GetInstance().UmbracoContext, Lifetime.Request); // register the umbraco helper diff --git a/src/Umbraco.Web/Scheduling/BackgroundTaskRunnerOptions.cs b/src/Umbraco.Web/Scheduling/BackgroundTaskRunnerOptions.cs index 5813799f05..bc0369fee8 100644 --- a/src/Umbraco.Web/Scheduling/BackgroundTaskRunnerOptions.cs +++ b/src/Umbraco.Web/Scheduling/BackgroundTaskRunnerOptions.cs @@ -5,7 +5,7 @@ /// public class BackgroundTaskRunnerOptions { - //TODO: Could add options for using a stack vs queue if required + // TODO: Could add options for using a stack vs queue if required /// /// Initializes a new instance of the class. diff --git a/src/Umbraco.Web/Scheduling/IBackgroundTaskRunner.cs b/src/Umbraco.Web/Scheduling/IBackgroundTaskRunner.cs index b478ed581c..9dd5722592 100644 --- a/src/Umbraco.Web/Scheduling/IBackgroundTaskRunner.cs +++ b/src/Umbraco.Web/Scheduling/IBackgroundTaskRunner.cs @@ -15,6 +15,6 @@ namespace Umbraco.Web.Scheduling void Add(T task); bool TryAdd(T task); - // todo - complete the interface? + // TODO: complete the interface? } } diff --git a/src/Umbraco.Web/Scheduling/ScheduledPublishing.cs b/src/Umbraco.Web/Scheduling/ScheduledPublishing.cs index 0d533a4da2..4326ac3287 100644 --- a/src/Umbraco.Web/Scheduling/ScheduledPublishing.cs +++ b/src/Umbraco.Web/Scheduling/ScheduledPublishing.cs @@ -56,8 +56,7 @@ namespace Umbraco.Web.Scheduling // ensure we run with an UmbracoContext, because this may run in a background task, // yet developers may be using the 'current' UmbracoContext in the event handlers // - // todo - // - or maybe not, CacheRefresherComponent already ensures a context when handling events + // TODO: or maybe not, CacheRefresherComponent already ensures a context when handling events // - UmbracoContext 'current' needs to be refactored and cleaned up // - batched messenger should not depend on a current HttpContext // but then what should be its "scope"? could we attach it to scopes? diff --git a/src/Umbraco.Web/Scheduling/ScheduledTasks.cs b/src/Umbraco.Web/Scheduling/ScheduledTasks.cs index 66037a0456..a26b8b23ac 100644 --- a/src/Umbraco.Web/Scheduling/ScheduledTasks.cs +++ b/src/Umbraco.Web/Scheduling/ScheduledTasks.cs @@ -11,7 +11,7 @@ using Umbraco.Core.Sync; namespace Umbraco.Web.Scheduling { - //TODO: No scheduled task (i.e. URL) would be secured, so if people are actually using these each task + // TODO: No scheduled task (i.e. URL) would be secured, so if people are actually using these each task // would need to be a publicly available task (URL) which isn't really very good :( // We should really be using the AdminTokenAuthorizeAttribute for this stuff @@ -72,7 +72,7 @@ namespace Umbraco.Web.Scheduling var request = new HttpRequestMessage(HttpMethod.Get, url); - //TODO: pass custom the authorization header, currently these aren't really secured! + // TODO: pass custom the authorization header, currently these aren't really secured! //request.Headers.Authorization = AdminTokenAuthorizeAttribute.GetAuthenticationHeaderValue(_appContext); try diff --git a/src/Umbraco.Web/Search/ExamineComponent.cs b/src/Umbraco.Web/Search/ExamineComponent.cs index 871f90a319..0db3f0b65e 100644 --- a/src/Umbraco.Web/Search/ExamineComponent.cs +++ b/src/Umbraco.Web/Search/ExamineComponent.cs @@ -122,7 +122,7 @@ namespace Umbraco.Web.Search EnsureUnlocked(_logger, _examineManager); - //TODO: Instead of waiting 5000 ms, we could add an event handler on to fulfilling the first request, then start? + // TODO: Instead of waiting 5000 ms, we could add an event handler on to fulfilling the first request, then start? RebuildIndexes(_indexRebuilder, _logger, true, 5000); } @@ -138,7 +138,7 @@ namespace Umbraco.Web.Search /// public static void RebuildIndexes(IndexRebuilder indexRebuilder, ILogger logger, bool onlyEmptyIndexes, int waitMilliseconds = 0) { - //TODO: need a way to disable rebuilding on startup + // TODO: need a way to disable rebuilding on startup lock(RebuildLocker) { @@ -213,7 +213,7 @@ namespace Umbraco.Web.Search // just ignore that payload // so what?! - //todo: Rebuild the index at this point? + // TODO: Rebuild the index at this point? } else // RefreshNode or RefreshBranch (maybe trashed) { diff --git a/src/Umbraco.Web/Search/UmbracoIndexesCreator.cs b/src/Umbraco.Web/Search/UmbracoIndexesCreator.cs index 99f4c4b453..5ac5529be5 100644 --- a/src/Umbraco.Web/Search/UmbracoIndexesCreator.cs +++ b/src/Umbraco.Web/Search/UmbracoIndexesCreator.cs @@ -14,7 +14,7 @@ namespace Umbraco.Web.Search /// public class UmbracoIndexesCreator : LuceneIndexCreator, IUmbracoIndexesCreator { - //TODO: we should inject the different IValueSetValidator so devs can just register them instead of overriding this class? + // TODO: we should inject the different IValueSetValidator so devs can just register them instead of overriding this class? public UmbracoIndexesCreator(IProfilingLogger profilingLogger, ILocalizationService languageService, diff --git a/src/Umbraco.Web/Search/UmbracoTreeSearcher.cs b/src/Umbraco.Web/Search/UmbracoTreeSearcher.cs index a60e5f1d1b..2bb093a659 100644 --- a/src/Umbraco.Web/Search/UmbracoTreeSearcher.cs +++ b/src/Umbraco.Web/Search/UmbracoTreeSearcher.cs @@ -64,7 +64,7 @@ namespace Umbraco.Web.Search var umbracoContext = _umbracoHelper.UmbracoContext; - //TODO: WE should try to allow passing in a lucene raw query, however we will still need to do some manual string + // TODO: WE should try to allow passing in a lucene raw query, however we will still need to do some manual string // manipulation for things like start paths, member types, etc... //if (Examine.ExamineExtensions.TryParseLuceneQuery(query)) //{ diff --git a/src/Umbraco.Web/Security/ActiveDirectoryBackOfficeUserPasswordChecker.cs b/src/Umbraco.Web/Security/ActiveDirectoryBackOfficeUserPasswordChecker.cs index 3ac74bd7c0..5b571f304e 100644 --- a/src/Umbraco.Web/Security/ActiveDirectoryBackOfficeUserPasswordChecker.cs +++ b/src/Umbraco.Web/Security/ActiveDirectoryBackOfficeUserPasswordChecker.cs @@ -6,7 +6,7 @@ using Umbraco.Core.Models.Identity; namespace Umbraco.Web.Security { - //TODO: This relies on an assembly that is not .NET Standard :( + // TODO: This relies on an assembly that is not .NET Standard :( public class ActiveDirectoryBackOfficeUserPasswordChecker : IBackOfficeUserPasswordChecker { public virtual string ActiveDirectoryDomain @@ -27,7 +27,7 @@ namespace Umbraco.Web.Security if (isValid && user.HasIdentity == false) { - //TODO: the user will need to be created locally (i.e. auto-linked) + // TODO: the user will need to be created locally (i.e. auto-linked) throw new NotImplementedException("The user " + user.UserName + " does not exist locally and currently the " + typeof(ActiveDirectoryBackOfficeUserPasswordChecker) + " doesn't support auto-linking, see http://issues.umbraco.org/issue/U4-10181"); } diff --git a/src/Umbraco.Web/Security/BackOfficeSignInManager.cs b/src/Umbraco.Web/Security/BackOfficeSignInManager.cs index 4315d3a762..3ce72852bf 100644 --- a/src/Umbraco.Web/Security/BackOfficeSignInManager.cs +++ b/src/Umbraco.Web/Security/BackOfficeSignInManager.cs @@ -14,7 +14,7 @@ using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Security { - //TODO: In v8 we need to change this to use an int? nullable TKey instead, see notes against overridden TwoFactorSignInAsync + // TODO: In v8 we need to change this to use an int? nullable TKey instead, see notes against overridden TwoFactorSignInAsync public class BackOfficeSignInManager : SignInManager { private readonly ILogger _logger; diff --git a/src/Umbraco.Web/Security/BackOfficeUserManager.cs b/src/Umbraco.Web/Security/BackOfficeUserManager.cs index a7256b257d..83cf06c6d9 100644 --- a/src/Umbraco.Web/Security/BackOfficeUserManager.cs +++ b/src/Umbraco.Web/Security/BackOfficeUserManager.cs @@ -125,13 +125,13 @@ namespace Umbraco.Web.Security #region What we support do not currently - //TODO: We could support this - but a user claims will mostly just be what is in the auth cookie + // TODO: We could support this - but a user claims will mostly just be what is in the auth cookie public override bool SupportsUserClaim { get { return false; } } - //TODO: Support this + // TODO: Support this public override bool SupportsQueryableUsers { get { return false; } @@ -145,7 +145,7 @@ namespace Umbraco.Web.Security get { return false; } } - //TODO: Support this + // TODO: Support this public override bool SupportsUserPhoneNumber { get { return false; } @@ -618,7 +618,7 @@ namespace Umbraco.Web.Security OnPasswordChanged(new IdentityAuditEventArgs(AuditEvent.PasswordChanged, GetCurrentRequestIpAddress(), affectedUser: userId)); } - //TODO: I don't think this is required anymore since from 7.7 we no longer display the reset password checkbox since that didn't make sense. + // TODO: I don't think this is required anymore since from 7.7 we no longer display the reset password checkbox since that didn't make sense. internal void RaisePasswordResetEvent(int userId) { OnPasswordReset(new IdentityAuditEventArgs(AuditEvent.PasswordReset, GetCurrentRequestIpAddress(), affectedUser: userId)); @@ -702,7 +702,7 @@ namespace Umbraco.Web.Security /// protected virtual string GetCurrentRequestIpAddress() { - //TODO: inject a service to get this value, we should not be relying on the old HttpContext.Current especially in the ASP.NET Identity world. + // TODO: inject a service to get this value, we should not be relying on the old HttpContext.Current especially in the ASP.NET Identity world. var httpContext = HttpContext.Current == null ? (HttpContextBase)null : new HttpContextWrapper(HttpContext.Current); return httpContext.GetCurrentRequestIpAddress(); } diff --git a/src/Umbraco.Web/Security/GetUserSecondsMiddleWare.cs b/src/Umbraco.Web/Security/GetUserSecondsMiddleWare.cs index dba7a8c33a..8da8ad23f8 100644 --- a/src/Umbraco.Web/Security/GetUserSecondsMiddleWare.cs +++ b/src/Umbraco.Web/Security/GetUserSecondsMiddleWare.cs @@ -84,7 +84,7 @@ namespace Umbraco.Web.Security //if it's time to renew, then do it if (timeRemaining < timeElapsed) { - //TODO: This would probably be simpler just to do: context.OwinContext.Authentication.SignIn(context.Properties, identity); + // TODO: This would probably be simpler just to do: context.OwinContext.Authentication.SignIn(context.Properties, identity); // this will invoke the default Cookie middleware to basically perform this logic for us. ticket.Properties.IssuedUtc = currentUtc; @@ -123,7 +123,7 @@ namespace Umbraco.Web.Security } } - //Hack! we need to suppress the stupid forms authentication module but we can only do that by using non owin stuff + // HACK: we need to suppress the stupid forms authentication module but we can only do that by using non owin stuff if (HttpContext.Current != null && HttpContext.Current.Response != null) { HttpContext.Current.Response.SuppressFormsAuthenticationRedirect = true; diff --git a/src/Umbraco.Web/Security/MembershipHelper.cs b/src/Umbraco.Web/Security/MembershipHelper.cs index 79eb27bc3c..e053617806 100644 --- a/src/Umbraco.Web/Security/MembershipHelper.cs +++ b/src/Umbraco.Web/Security/MembershipHelper.cs @@ -216,7 +216,7 @@ namespace Umbraco.Web.Security membershipUser = ((UmbracoMembershipProviderBase)provider).CreateUser( model.MemberTypeAlias, model.Username, model.Password, model.Email, - //TODO: Support q/a http://issues.umbraco.org/issue/U4-3213 + // TODO: Support q/a http://issues.umbraco.org/issue/U4-3213 null, null, true, null, out status); @@ -239,7 +239,7 @@ namespace Umbraco.Web.Security else { membershipUser = provider.CreateUser(model.Username, model.Password, model.Email, - //TODO: Support q/a http://issues.umbraco.org/issue/U4-3213 + // TODO: Support q/a http://issues.umbraco.org/issue/U4-3213 null, null, true, null, out status); @@ -326,7 +326,7 @@ namespace Umbraco.Web.Security switch (umbracoType) { case UmbracoObjectTypes.Member: - // todo - need to implement Get(guid)! + // TODO: need to implement Get(guid)! var memberAttempt = entityService.GetId(guidUdi.Guid, umbracoType); if (memberAttempt.Success) return GetById(memberAttempt.Result); @@ -422,7 +422,7 @@ namespace Umbraco.Web.Security } //we can try to look up an associated member by the provider user key - //TODO: Support this at some point! + // TODO: Support this at some point! throw new NotSupportedException("Currently a member profile cannot be edited unless using the built-in Umbraco membership providers"); } @@ -480,7 +480,7 @@ namespace Umbraco.Web.Security Value = value }; - //TODO: Perhaps one day we'll ship with our own EditorTempates but for now developers + // TODO: Perhaps one day we'll ship with our own EditorTempates but for now developers // can just render their own. ////This is a rudimentary check to see what data template we should render diff --git a/src/Umbraco.Web/Security/Providers/UmbracoMembershipProvider.cs b/src/Umbraco.Web/Security/Providers/UmbracoMembershipProvider.cs index 413023c27c..1f7e2c8084 100644 --- a/src/Umbraco.Web/Security/Providers/UmbracoMembershipProvider.cs +++ b/src/Umbraco.Web/Security/Providers/UmbracoMembershipProvider.cs @@ -414,7 +414,7 @@ namespace Umbraco.Web.Security.Providers /// The new password for the specified user. protected override string PerformResetPassword(string username, string answer, string generatedPassword) { - //TODO: This should be here - but how do we update failure count in this provider?? + // TODO: This should be here - but how do we update failure count in this provider?? //if (answer == null && RequiresQuestionAndAnswer) //{ // UpdateFailureCount(username, "passwordAnswer"); @@ -591,7 +591,7 @@ namespace Umbraco.Web.Security.Providers //don't raise events for this! It just sets the member dates, if we do raise events this will // cause all distributed cache to execute - which will clear out some caches we don't want. // http://issues.umbraco.org/issue/U4-3451 - //TODO: In v8 we aren't going to have an overload to disable events, so we'll need to make a different method + // TODO: In v8 we aren't going to have an overload to disable events, so we'll need to make a different method // for this type of thing (i.e. UpdateLastLogin or similar). // when upgrading from 7.2 to 7.3 trying to save will throw diff --git a/src/Umbraco.Web/Suspendable.cs b/src/Umbraco.Web/Suspendable.cs index 0ca43ff595..86c83120ea 100644 --- a/src/Umbraco.Web/Suspendable.cs +++ b/src/Umbraco.Web/Suspendable.cs @@ -79,7 +79,7 @@ namespace Umbraco.Web if (_tried == false) return; _tried = false; - //TODO: when resuming do we always want a full rebuild of all indexes? + // TODO: when resuming do we always want a full rebuild of all indexes? ExamineComponent.RebuildIndexes(indexRebuilder, logger, false); } } diff --git a/src/Umbraco.Web/Templates/TemplateRenderer.cs b/src/Umbraco.Web/Templates/TemplateRenderer.cs index ff87719b12..60d54d8bcd 100644 --- a/src/Umbraco.Web/Templates/TemplateRenderer.cs +++ b/src/Umbraco.Web/Templates/TemplateRenderer.cs @@ -37,8 +37,8 @@ namespace Umbraco.Web.Templates _umbracoContext = umbracoContext ?? throw new ArgumentNullException(nameof(umbracoContext)); } - private IFileService FileService => Current.Services.FileService; // todo inject - private PublishedRouter PublishedRouter => Core.Composing.Current.Factory.GetInstance(); // todo inject + private IFileService FileService => Current.Services.FileService; // TODO: inject + private PublishedRouter PublishedRouter => Core.Composing.Current.Factory.GetInstance(); // TODO: inject /// diff --git a/src/Umbraco.Web/Trees/ApplicationTreeController.cs b/src/Umbraco.Web/Trees/ApplicationTreeController.cs index b4a91f8ab8..205c38b8a1 100644 --- a/src/Umbraco.Web/Trees/ApplicationTreeController.cs +++ b/src/Umbraco.Web/Trees/ApplicationTreeController.cs @@ -298,7 +298,7 @@ namespace Umbraco.Web.Trees if (instance == null) throw new Exception("Failed to create tree " + appTree.TreeControllerType + "."); - //TODO: Shouldn't we be applying the same proxying logic as above so that filters work? seems like an oversight + // TODO: Shouldn't we be applying the same proxying logic as above so that filters work? seems like an oversight instance.ControllerContext = controllerContext; instance.Request = controllerContext.Request; diff --git a/src/Umbraco.Web/Trees/ContentTreeController.cs b/src/Umbraco.Web/Trees/ContentTreeController.cs index b50f06e14e..1609e966e5 100644 --- a/src/Umbraco.Web/Trees/ContentTreeController.cs +++ b/src/Umbraco.Web/Trees/ContentTreeController.cs @@ -307,7 +307,7 @@ namespace Umbraco.Web.Trees entity.Name = "[[" + entity.Id + "]]"; } - //todo: Remove the need for converting to legacy + // TODO: Remove the need for converting to legacy private void AddActionNode(IUmbracoEntity item, MenuItemCollection menu, bool hasSeparator = false, bool convert = false, bool opensDialog = false) where TAction : IAction { diff --git a/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs b/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs index 7c0e7c736d..bd35fd665f 100644 --- a/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs +++ b/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs @@ -414,7 +414,7 @@ namespace Umbraco.Web.Trees internal IEnumerable GetAllowedUserMenuItemsForNode(IUmbracoEntity dd) { var permission = Services.UserService.GetPermissions(Security.CurrentUser, dd.Path); - //todo: inject + // TODO: inject var actions = Current.Actions.FromEntityPermission(permission) .ToList(); @@ -437,7 +437,7 @@ namespace Umbraco.Web.Trees /// internal bool CanUserAccessNode(IUmbracoEntity doc, IEnumerable allowedUserOptions, string culture) { - //TODO: At some stage when we implement permissions on languages we'll need to take care of culture + // TODO: At some stage when we implement permissions on languages we'll need to take care of culture return allowedUserOptions.Select(x => x.Action).OfType().Any(); } diff --git a/src/Umbraco.Web/Trees/FileSystemTreeController.cs b/src/Umbraco.Web/Trees/FileSystemTreeController.cs index 11160ab282..9aea6e03dd 100644 --- a/src/Umbraco.Web/Trees/FileSystemTreeController.cs +++ b/src/Umbraco.Web/Trees/FileSystemTreeController.cs @@ -29,7 +29,7 @@ namespace Umbraco.Web.Trees /// /// protected virtual void OnRenderFolderNode(ref TreeNode treeNode) { - //TODO: This isn't the best way to ensure a noop process for clicking a node but it works for now. + // TODO: This isn't the best way to ensure a noop process for clicking a node but it works for now. treeNode.AdditionalData["jsClickCallback"] = "javascript:void(0);"; } diff --git a/src/Umbraco.Web/Trees/FilesTreeController.cs b/src/Umbraco.Web/Trees/FilesTreeController.cs index 99c4ade09e..429b08e9ee 100644 --- a/src/Umbraco.Web/Trees/FilesTreeController.cs +++ b/src/Umbraco.Web/Trees/FilesTreeController.cs @@ -8,7 +8,7 @@ namespace Umbraco.Web.Trees [Tree(Constants.Applications.Settings, "files", "Files", "icon-folder", "icon-folder", sortOrder: 13, initialize: false)] public class FilesTreeController : FileSystemTreeController { - protected override IFileSystem FileSystem => new PhysicalFileSystem("~/"); // todo inject + protected override IFileSystem FileSystem => new PhysicalFileSystem("~/"); // TODO: inject private static readonly string[] ExtensionsStatic = { "*" }; diff --git a/src/Umbraco.Web/Trees/ITree.cs b/src/Umbraco.Web/Trees/ITree.cs index 2821d4bfbb..1125a80fe2 100644 --- a/src/Umbraco.Web/Trees/ITree.cs +++ b/src/Umbraco.Web/Trees/ITree.cs @@ -1,6 +1,6 @@ namespace Umbraco.Web.Trees { - //todo- we don't really use this, it is nice to have the treecontroller, attribute and ApplicationTree streamlined to implement this but it's not used + // TODO: we don't really use this, it is nice to have the treecontroller, attribute and ApplicationTree streamlined to implement this but it's not used //leave as internal for now, maybe we'll use in the future, means we could pass around ITree internal interface ITree { diff --git a/src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs b/src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs index 277094d3c6..4936ce6541 100644 --- a/src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs +++ b/src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs @@ -12,7 +12,7 @@ namespace Umbraco.Web.Trees /// internal class LegacyTreeDataConverter { - //todo: remove this whole class when everything is angularized + // TODO: remove this whole class when everything is angularized /// /// This will look at the legacy IAction's JsFunctionName and convert it to a confirmation dialog view if possible diff --git a/src/Umbraco.Web/Trees/ScriptsTreeController.cs b/src/Umbraco.Web/Trees/ScriptsTreeController.cs index 2fbeae4f6b..bb7fd80f5b 100644 --- a/src/Umbraco.Web/Trees/ScriptsTreeController.cs +++ b/src/Umbraco.Web/Trees/ScriptsTreeController.cs @@ -9,7 +9,7 @@ namespace Umbraco.Web.Trees [Tree(Constants.Applications.Settings, Constants.Trees.Scripts, "Scripts", "icon-folder", "icon-folder", sortOrder: 10)] public class ScriptsTreeController : FileSystemTreeController { - protected override IFileSystem FileSystem => Current.FileSystems.ScriptsFileSystem; // todo inject + protected override IFileSystem FileSystem => Current.FileSystems.ScriptsFileSystem; // TODO: inject private static readonly string[] ExtensionsStatic = { "js" }; diff --git a/src/Umbraco.Web/Trees/StylesheetsTreeController.cs b/src/Umbraco.Web/Trees/StylesheetsTreeController.cs index f64e9fd752..0b82291919 100644 --- a/src/Umbraco.Web/Trees/StylesheetsTreeController.cs +++ b/src/Umbraco.Web/Trees/StylesheetsTreeController.cs @@ -8,7 +8,7 @@ namespace Umbraco.Web.Trees [Tree(Constants.Applications.Settings, Constants.Trees.Stylesheets, "Stylesheets", "icon-folder", "icon-folder", sortOrder: 9)] public class StylesheetsTreeController : FileSystemTreeController { - protected override IFileSystem FileSystem => Current.FileSystems.StylesheetsFileSystem; // todo inject + protected override IFileSystem FileSystem => Current.FileSystems.StylesheetsFileSystem; // TODO: inject private static readonly string[] ExtensionsStatic = { "css" }; diff --git a/src/Umbraco.Web/Trees/TemplatesTreeController.cs b/src/Umbraco.Web/Trees/TemplatesTreeController.cs index c074f828d4..77102dff45 100644 --- a/src/Umbraco.Web/Trees/TemplatesTreeController.cs +++ b/src/Umbraco.Web/Trees/TemplatesTreeController.cs @@ -50,7 +50,7 @@ namespace Umbraco.Web.Trees nodes.AddRange(found.Select(template => CreateTreeNode( template.Id.ToString(CultureInfo.InvariantCulture), - //TODO: Fix parent ID stuff for templates + // TODO: Fix parent ID stuff for templates "-1", queryStrings, template.Name, @@ -112,7 +112,7 @@ namespace Umbraco.Web.Trees Key = template.Key, Name = template.Name, NodeObjectType = Constants.ObjectTypes.Template, - //TODO: Fix parent/paths on templates + // TODO: Fix parent/paths on templates ParentId = -1, Path = template.Path, UpdateDate = template.UpdateDate diff --git a/src/Umbraco.Web/UI/Controls/UmbracoControl.cs b/src/Umbraco.Web/UI/Controls/UmbracoControl.cs index c56e4fe07f..9e7eed3ae1 100644 --- a/src/Umbraco.Web/UI/Controls/UmbracoControl.cs +++ b/src/Umbraco.Web/UI/Controls/UmbracoControl.cs @@ -20,7 +20,7 @@ namespace Umbraco.Web.UI.Controls UmbracoContext = umbracoContext ?? throw new ArgumentNullException(nameof(umbracoContext)); Umbraco = new UmbracoHelper(umbracoContext, services); - // todo inject somehow + // TODO: inject somehow Logger = Current.Logger; ProfilingLogger = Current.ProfilingLogger; Services = Current.Services; diff --git a/src/Umbraco.Web/UI/Controls/UmbracoUserControl.cs b/src/Umbraco.Web/UI/Controls/UmbracoUserControl.cs index f4cd7f1b50..560c6a2660 100644 --- a/src/Umbraco.Web/UI/Controls/UmbracoUserControl.cs +++ b/src/Umbraco.Web/UI/Controls/UmbracoUserControl.cs @@ -31,7 +31,7 @@ namespace Umbraco.Web.UI.Controls Umbraco = new UmbracoHelper(umbracoContext, services); Members = Current.Factory.GetInstance(); - // todo inject somehow + // TODO: inject somehow Logger = Current.Logger; ProfilingLogger = Current.ProfilingLogger; Services = Current.Services; diff --git a/src/Umbraco.Web/UI/JavaScript/Resources.Designer.cs b/src/Umbraco.Web/UI/JavaScript/Resources.Designer.cs index f223fe5310..51e40b5324 100644 --- a/src/Umbraco.Web/UI/JavaScript/Resources.Designer.cs +++ b/src/Umbraco.Web/UI/JavaScript/Resources.Designer.cs @@ -144,7 +144,7 @@ namespace Umbraco.Web.UI.JavaScript } /// - /// Looks up a localized string similar to //TODO: This would be nicer as an angular module so it can be injected into stuff... that'd be heaps nicer, but + /// Looks up a localized string similar to // TODO: This would be nicer as an angular module so it can be injected into stuff... that'd be heaps nicer, but ///// how to do that when this is not a regular JS file, it is a server side JS file and RequireJS seems to only want ///// to force load JS files ? /// diff --git a/src/Umbraco.Web/UI/JavaScript/ServerVariables.js b/src/Umbraco.Web/UI/JavaScript/ServerVariables.js index f7f6eb2a09..4a0017550a 100644 --- a/src/Umbraco.Web/UI/JavaScript/ServerVariables.js +++ b/src/Umbraco.Web/UI/JavaScript/ServerVariables.js @@ -1,4 +1,4 @@ -//TODO: This would be nicer as an angular module so it can be injected into stuff... that'd be heaps nicer, but +// TODO: This would be nicer as an angular module so it can be injected into stuff... that'd be heaps nicer, but // how to do that when this is not a regular JS file, it is a server side JS file and RequireJS seems to only want // to force load JS files ? diff --git a/src/Umbraco.Web/UmbracoComponentRenderer.cs b/src/Umbraco.Web/UmbracoComponentRenderer.cs index 48d0d571ee..a579c0abac 100644 --- a/src/Umbraco.Web/UmbracoComponentRenderer.cs +++ b/src/Umbraco.Web/UmbracoComponentRenderer.cs @@ -128,7 +128,7 @@ namespace Umbraco.Web var macroProps = new Hashtable(); foreach (var i in parameters) { - //TODO: We are doing at ToLower here because for some insane reason the UpdateMacroModel method of macro.cs + // TODO: We are doing at ToLower here because for some insane reason the UpdateMacroModel method of macro.cs // looks for a lower case match. WTF. the whole macro concept needs to be rewritten. diff --git a/src/Umbraco.Web/UmbracoContext.cs b/src/Umbraco.Web/UmbracoContext.cs index 49a3832483..04a9658ee5 100644 --- a/src/Umbraco.Web/UmbracoContext.cs +++ b/src/Umbraco.Web/UmbracoContext.cs @@ -41,7 +41,7 @@ namespace Umbraco.Web /// A value indicating whether to replace the existing context. /// The "current" UmbracoContext. /// - /// todo - this needs to be clarified + /// TODO: this needs to be clarified /// /// If is true then the "current" UmbracoContext is replaced /// with a new one even if there is one already. See . Has to do with diff --git a/src/Umbraco.Web/UmbracoHelper.cs b/src/Umbraco.Web/UmbracoHelper.cs index 110c3e84d0..9d55299ecc 100644 --- a/src/Umbraco.Web/UmbracoHelper.cs +++ b/src/Umbraco.Web/UmbracoHelper.cs @@ -638,10 +638,10 @@ namespace Umbraco.Web public IPublishedContent Media(Guid id) { - //TODO: This is horrible but until the media cache properly supports GUIDs we have no choice here and + // TODO: This is horrible but until the media cache properly supports GUIDs we have no choice here and // currently there won't be any way to add this method correctly to `ITypedPublishedContentQuery` without breaking an interface and adding GUID support for media - var entityService = Current.Services.EntityService; // todo inject + var entityService = Current.Services.EntityService; // TODO: inject var mediaAttempt = entityService.GetId(id, UmbracoObjectTypes.Media); return mediaAttempt.Success ? ContentQuery.Media(mediaAttempt.Result) : null; } diff --git a/src/Umbraco.Web/UmbracoHttpHandler.cs b/src/Umbraco.Web/UmbracoHttpHandler.cs index 009272963c..336b53e9e0 100644 --- a/src/Umbraco.Web/UmbracoHttpHandler.cs +++ b/src/Umbraco.Web/UmbracoHttpHandler.cs @@ -23,7 +23,7 @@ namespace Umbraco.Web UmbracoContext = umbracoContext; Umbraco = new UmbracoHelper(umbracoContext, services); - // todo inject somehow + // TODO: inject somehow Logger = Current.Logger; ProfilingLogger = Current.ProfilingLogger; Services = Current.Services; diff --git a/src/Umbraco.Web/WebApi/Filters/EnableOverrideAuthorizationAttribute.cs b/src/Umbraco.Web/WebApi/Filters/EnableOverrideAuthorizationAttribute.cs index 7828400487..358c9cc3b3 100644 --- a/src/Umbraco.Web/WebApi/Filters/EnableOverrideAuthorizationAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/EnableOverrideAuthorizationAttribute.cs @@ -11,6 +11,6 @@ namespace Umbraco.Web.WebApi.Filters [AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = true)] public sealed class EnableOverrideAuthorizationAttribute : Attribute { - //todo we should remove this and use the System.Web.Http.OverrideAuthorizationAttribute which uses IOverrideFilter instead + // TODO: we should remove this and use the System.Web.Http.OverrideAuthorizationAttribute which uses IOverrideFilter instead } } diff --git a/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForContentAttribute.cs b/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForContentAttribute.cs index 6604d1c9e7..ae42d54787 100644 --- a/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForContentAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForContentAttribute.cs @@ -89,13 +89,13 @@ namespace Umbraco.Web.WebApi.Filters } else if (Udi.TryParse(argument, true, out Udi udi)) { - //todo: inject? we can't because this is an attribute but we could provide ctors and empty ctors that pass in the required services + // TODO: inject? we can't because this is an attribute but we could provide ctors and empty ctors that pass in the required services nodeId = Current.Services.EntityService.GetId(udi).Result; } else { Guid.TryParse(argument, out Guid key); - //todo: inject? we can't because this is an attribute but we could provide ctors and empty ctors that pass in the required services + // TODO: inject? we can't because this is an attribute but we could provide ctors and empty ctors that pass in the required services nodeId = Current.Services.EntityService.GetId(key, UmbracoObjectTypes.Document).Result; } } diff --git a/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForMediaAttribute.cs b/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForMediaAttribute.cs index 866941d41d..026b43a01b 100644 --- a/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForMediaAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForMediaAttribute.cs @@ -42,7 +42,7 @@ namespace Umbraco.Web.WebApi.Filters _paramName = paramName; } - // todo v8 guess this is not used anymore, source is ignored?! + // TODO: v8 guess this is not used anymore, source is ignored?! public EnsureUserPermissionForMediaAttribute(string paramName, DictionarySource source) { if (string.IsNullOrEmpty(paramName)) throw new ArgumentNullOrEmptyException(nameof(paramName)); diff --git a/src/Umbraco.Web/WebApi/Filters/OverridableAuthorizationAttribute.cs b/src/Umbraco.Web/WebApi/Filters/OverridableAuthorizationAttribute.cs index 522c3af8bb..070bb53fb3 100644 --- a/src/Umbraco.Web/WebApi/Filters/OverridableAuthorizationAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/OverridableAuthorizationAttribute.cs @@ -5,7 +5,7 @@ using System.Web.Http.Controllers; namespace Umbraco.Web.WebApi.Filters { - //todo remove this since we don't need it, see notes in EnableOverrideAuthorizationAttribute + // TODO: remove this since we don't need it, see notes in EnableOverrideAuthorizationAttribute /// /// Abstract auth filter class that can be used to enable overriding class auth filters at the action level diff --git a/src/Umbraco.Web/WebApi/UmbracoAuthorizeAttribute.cs b/src/Umbraco.Web/WebApi/UmbracoAuthorizeAttribute.cs index 700554e731..49cb75fffb 100644 --- a/src/Umbraco.Web/WebApi/UmbracoAuthorizeAttribute.cs +++ b/src/Umbraco.Web/WebApi/UmbracoAuthorizeAttribute.cs @@ -19,7 +19,7 @@ namespace Umbraco.Web.WebApi /// internal static bool Enable = true; - // todo - inject! + // TODO: inject! private readonly UmbracoContext _umbracoContext; private readonly IRuntimeState _runtimeState; diff --git a/src/Umbraco.Web/_Legacy/PackageActions/publishRootDocument.cs b/src/Umbraco.Web/_Legacy/PackageActions/publishRootDocument.cs index 94e1b6e923..c6bbbfa00b 100644 --- a/src/Umbraco.Web/_Legacy/PackageActions/publishRootDocument.cs +++ b/src/Umbraco.Web/_Legacy/PackageActions/publishRootDocument.cs @@ -35,7 +35,7 @@ namespace Umbraco.Web._Legacy.PackageActions { if (rootDoc.Name.Trim() == documentName.Trim() && rootDoc.ContentType != null) { - // todo variants? + // TODO: variants? Current.Services.ContentService.SaveAndPublishBranch(rootDoc, true); break; } diff --git a/src/Umbraco.Web/umbraco.presentation/page.cs b/src/Umbraco.Web/umbraco.presentation/page.cs index 3b879c5b02..5c2ff7aa01 100644 --- a/src/Umbraco.Web/umbraco.presentation/page.cs +++ b/src/Umbraco.Web/umbraco.presentation/page.cs @@ -324,7 +324,7 @@ namespace umbraco _id = _inner.Id; _key = _inner.Key; - //TODO: ARGH! need to fix this - this is not good because it uses ApplicationContext.Current + // TODO: ARGH! need to fix this - this is not good because it uses ApplicationContext.Current _creatorName = _inner.GetCreatorProfile().Name; _writerName = _inner.GetWriterProfile().Name; From a185d56ae5eec9a084d55622109a8332e3ca78b3 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Tue, 22 Jan 2019 15:57:50 +0100 Subject: [PATCH 307/437] Ensure that element types can't be assigned as allowed children to other content types --- .../views/permissions/permissions.controller.js | 5 ++--- src/Umbraco.Web/Models/ContentEditing/ContentTypeBasic.cs | 8 ++++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/permissions/permissions.controller.js b/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/permissions/permissions.controller.js index 317fe094ae..a3b422e4f3 100644 --- a/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/permissions/permissions.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/permissions/permissions.controller.js @@ -38,13 +38,12 @@ }); contentTypeResource.getAll().then(function(contentTypes){ - - vm.contentTypes = contentTypes; + vm.contentTypes = _.where(contentTypes, {isElement: false}); // convert legacy icons iconHelper.formatContentTypeIcons(vm.contentTypes); - vm.selectedChildren = contentTypeHelper.makeObjectArrayFromId($scope.model.allowedContentTypes, vm.contentTypes); + vm.selectedChildren = contentTypeHelper.makeObjectArrayFromId($scope.model.allowedContentTypes, contentTypes); if($scope.model.id === 0) { contentTypeHelper.insertChildNodePlaceholder(vm.contentTypes, $scope.model.name, $scope.model.icon, $scope.model.id); diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentTypeBasic.cs b/src/Umbraco.Web/Models/ContentEditing/ContentTypeBasic.cs index 6aca5d8054..56d81a3189 100644 --- a/src/Umbraco.Web/Models/ContentEditing/ContentTypeBasic.cs +++ b/src/Umbraco.Web/Models/ContentEditing/ContentTypeBasic.cs @@ -116,5 +116,13 @@ namespace Umbraco.Web.Models.ContentEditing [DataMember(Name = "blueprints")] [ReadOnly(true)] public IDictionary Blueprints { get; set; } + + [DataMember(Name = "isContainer")] + [ReadOnly(true)] + public bool IsContainer { get; set; } + + [DataMember(Name = "isElement")] + [ReadOnly(true)] + public bool IsElement { get; set; } } } From 647d92775c092407a2734ed0d08b1c5c7292de8f Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Sun, 27 Jan 2019 12:02:39 +0100 Subject: [PATCH 308/437] Make right-click menu work in Firefox --- .../src/common/directives/components/events/events.directive.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/events/events.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/events/events.directive.js index 6e75973ae7..77f2ffb54a 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/events/events.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/events/events.directive.js @@ -188,7 +188,7 @@ angular.module('umbraco.directives') e.stopPropagation(); var fn = $parse(attrs.onRightClick); scope.$apply(function () { - fn(scope, { $event: event }); + fn(scope, { $event: e }); }); return false; }); From d174499e50f6ab84dba1600374371bb48fd5ad8a Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Sun, 27 Jan 2019 13:30:25 +0100 Subject: [PATCH 309/437] Fixes #4260 incorrect permissions required for Notifications sign up --- src/Umbraco.Web/Editors/ContentController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Editors/ContentController.cs b/src/Umbraco.Web/Editors/ContentController.cs index c77fe04b0d..5f3022b2a9 100644 --- a/src/Umbraco.Web/Editors/ContentController.cs +++ b/src/Umbraco.Web/Editors/ContentController.cs @@ -1179,7 +1179,7 @@ namespace Umbraco.Web.Editors return allowed; } - [EnsureUserPermissionForContent("contentId", 'R')] + [EnsureUserPermissionForContent("contentId", 'F')] public IEnumerable GetNotificationOptions(int contentId) { var notifications = new List(); From 7e8c0ed3694a35c131b601f9f06ae30045a57910 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Sun, 27 Jan 2019 15:17:08 +0100 Subject: [PATCH 310/437] Apply changes from PR #4197 to v8 too --- src/Umbraco.Web.UI/Umbraco/config/lang/da.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml index 5ece650343..9dceead927 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml @@ -1328,9 +1328,9 @@ Mange hilsner fra Umbraco robotten Makroer Medietyper Medlemmer - Medlemsgruppe + Medlemsgrupper Roller - Medlemstype + Medlemstyper Dokumenttyper Relationstyper Pakker From 6b0158f761f8c4912a4c13e05289f5e8254b7be6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Sun, 27 Jan 2019 18:14:55 +0100 Subject: [PATCH 311/437] color update --- .../src/less/components/umb-editor-navigation.less | 10 +++++----- src/Umbraco.Web.UI.Client/src/less/sections.less | 5 ++++- src/Umbraco.Web.UI.Client/src/less/variables.less | 8 ++++---- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-editor-navigation.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-editor-navigation.less index 0982eaed26..3875df1ce0 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-editor-navigation.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-editor-navigation.less @@ -32,12 +32,12 @@ } .umb-sub-views-nav-item.is-active { - color: @ui-active; - border-bottom-color: @ui-active; + //color: @ui-active; + //border-bottom-color: @ui-active; - //background-color: @ui-active; - //color: @ui-active-type; - //border-bottom-color: @ui-active-type; + //background-color: rgba(@ui-active, 0.25); + color: @ui-active-type; + border-bottom-color: @ui-active; /* &::after { content: ""; diff --git a/src/Umbraco.Web.UI.Client/src/less/sections.less b/src/Umbraco.Web.UI.Client/src/less/sections.less index 2c5be567c9..70fb3d353b 100644 --- a/src/Umbraco.Web.UI.Client/src/less/sections.less +++ b/src/Umbraco.Web.UI.Client/src/less/sections.less @@ -36,7 +36,7 @@ ul.sections>li>a::after { content: ""; height: 4px; width: 100%; - background-color: #b3afbd; + background-color: @pinkLight; position: absolute; bottom: -4px; border-radius: 3px 3px 0 0; @@ -45,6 +45,9 @@ ul.sections>li>a::after { transition: all .2s linear; } +ul.sections>li.current>a { + color:@pinkLight; +} ul.sections>li.current>a::after { opacity: 1; bottom: 0; diff --git a/src/Umbraco.Web.UI.Client/src/less/variables.less b/src/Umbraco.Web.UI.Client/src/less/variables.less index 7fe253bc82..a8fdc57a68 100644 --- a/src/Umbraco.Web.UI.Client/src/less/variables.less +++ b/src/Umbraco.Web.UI.Client/src/less/variables.less @@ -127,8 +127,8 @@ // ------------------------- //@ui-active: #346ab3; -@ui-active: @blueMid; -@ui-active-type: white; +@ui-active: @pinkLight; +@ui-active-type: @blueExtraDark; @ui-active-hover: @blueMid; @ui-selected: @blueMid;//not used jet. @ui-selected-hover: @blueMid;//not used jet. @@ -142,9 +142,9 @@ @type-white: @u-white; @type-black: @blueNight; -@ui-btn: @claus4; +@ui-btn: @brownLight; @ui-btn-hover: @ui-btn; -@ui-btn-type: @u-white; +@ui-btn-type: @blueExtraDark; @ui-btn-positive: @green; @ui-btn-positive-hover: @green; From 9b01910d44b4a720e065f9ebadcbe4995f490276 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 28 Jan 2019 08:27:42 +0100 Subject: [PATCH 312/437] Removed isPublished stuff from XmlPublishedContent. --- .../XmlPublishedContentInitBenchmarks.cs | 8 ++++---- .../XmlPublishedCache/XmlPublishedContent.cs | 9 ++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/Umbraco.Tests.Benchmarks/XmlPublishedContentInitBenchmarks.cs b/src/Umbraco.Tests.Benchmarks/XmlPublishedContentInitBenchmarks.cs index 860dc0ac4b..bc18b97d47 100644 --- a/src/Umbraco.Tests.Benchmarks/XmlPublishedContentInitBenchmarks.cs +++ b/src/Umbraco.Tests.Benchmarks/XmlPublishedContentInitBenchmarks.cs @@ -145,7 +145,7 @@ namespace Umbraco.Tests.Benchmarks XmlPublishedContent.InitializeNode(null, _xml10.DocumentElement, false, out id, out key, out template, out sortOrder, out name, out writerName, out urlName, out creatorName, out creatorId, out writerId, out docTypeAlias, out nodeType, out path, - out createDate, out updateDate, out level, out isDraft, out isPublished, out publishedContentType, + out createDate, out updateDate, out level, out isDraft, out publishedContentType, out properties, GetPublishedContentType); } @@ -155,7 +155,7 @@ namespace Umbraco.Tests.Benchmarks XmlPublishedContent.InitializeNode(null, _xml100.DocumentElement, false, out id, out key, out template, out sortOrder, out name, out writerName, out urlName, out creatorName, out creatorId, out writerId, out docTypeAlias, out nodeType, out path, - out createDate, out updateDate, out level, out isDraft, out isPublished,out publishedContentType, + out createDate, out updateDate, out level, out isDraft, out publishedContentType, out properties, GetPublishedContentType); } @@ -165,7 +165,7 @@ namespace Umbraco.Tests.Benchmarks XmlPublishedContent.InitializeNode(null, _xml1000.DocumentElement, false, out id, out key, out template, out sortOrder, out name, out writerName, out urlName, out creatorName, out creatorId, out writerId, out docTypeAlias, out nodeType, out path, - out createDate, out updateDate, out level, out isDraft, out isPublished,out publishedContentType, + out createDate, out updateDate, out level, out isDraft,out publishedContentType, out properties, GetPublishedContentType); } @@ -175,7 +175,7 @@ namespace Umbraco.Tests.Benchmarks XmlPublishedContent.InitializeNode(null, _xml10000.DocumentElement, false, out id, out key, out template, out sortOrder, out name, out writerName, out urlName, out creatorName, out creatorId, out writerId, out docTypeAlias, out nodeType, out path, - out createDate, out updateDate, out level, out isDraft, out isPublished,out publishedContentType, + out createDate, out updateDate, out level, out isDraft,out publishedContentType, out properties, GetPublishedContentType); } diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs index f601114ffd..3db52616e8 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs @@ -63,7 +63,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache private int _sortOrder; private int _level; private bool _isDraft; - private bool _isPublished; + public override IEnumerable Children { @@ -232,7 +232,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache public override bool IsPublished(string culture = null) { EnsureNodeInitialized(); - return _isPublished; // bah + return true; // Intentionally not implemented, because the XmlPublishedContent should not support this. } public override IEnumerable Properties @@ -287,7 +287,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache InitializeNode(this, _xmlNode, _isPreviewing, out _id, out _key, out _template, out _sortOrder, out _name, out _writerName, out _urlName, out _creatorName, out _creatorId, out _writerId, out _docTypeAlias, out _docTypeId, out _path, - out _createDate, out _updateDate, out _level, out _isDraft, out _isPublished, out _contentType, out _properties, + out _createDate, out _updateDate, out _level, out _isDraft, out _contentType, out _properties, _contentTypeCache.Get); _nodeInitialized = true; @@ -297,7 +297,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache internal static void InitializeNode(XmlPublishedContent node, XmlNode xmlNode, bool isPreviewing, out int id, out Guid key, out int template, out int sortOrder, out string name, out string writerName, out string urlName, out string creatorName, out int creatorId, out int writerId, out string docTypeAlias, out int docTypeId, out string path, - out DateTime createDate, out DateTime updateDate, out int level, out bool isDraft,out bool isPublished, + out DateTime createDate, out DateTime updateDate, out int level, out bool isDraft, out PublishedContentType contentType, out Dictionary properties, Func getPublishedContentType) { @@ -309,7 +309,6 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache name = writerName = urlName = creatorName = docTypeAlias = path = null; createDate = updateDate = default(DateTime); isDraft = false; - isPublished = false; // fixme not implemented? contentType = null; properties = null; From da3a5d35c188050b25268572a6a0c6bee0c7ae45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Mon, 28 Jan 2019 09:00:38 +0100 Subject: [PATCH 313/437] make unpublish button in overlay appear as button-style warning --- .../src/common/directives/components/content/edit.controller.js | 1 + .../src/views/components/overlays/umb-overlay.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js index 79701414f7..9e8a66ce5a 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js @@ -442,6 +442,7 @@ variants: $scope.content.variants, //set a model property for the dialog skipFormValidation: true, //when submitting the overlay form, skip any client side validation submitButtonLabelKey: "content_unpublish", + submitButtonSTYLE: "warning", submit: function (model) { model.submitButtonState = "busy"; diff --git a/src/Umbraco.Web.UI.Client/src/views/components/overlays/umb-overlay.html b/src/Umbraco.Web.UI.Client/src/views/components/overlays/umb-overlay.html index 40b0e181bf..aac2e2665b 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/overlays/umb-overlay.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/overlays/umb-overlay.html @@ -67,7 +67,7 @@ Date: Mon, 28 Jan 2019 09:30:08 +0100 Subject: [PATCH 314/437] correct color variable for variant switcher --- src/Umbraco.Web.UI.Client/src/less/components/editor.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/components/editor.less b/src/Umbraco.Web.UI.Client/src/less/components/editor.less index f193561ff3..c917b7e031 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/editor.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/editor.less @@ -166,7 +166,7 @@ a.umb-variant-switcher__toggle { .umb-variant-switcher_item--current .umb-variant-switcher__name-wrapper { background-color: @gray-10; - border-left: 2px solid @turquoise; + border-left: 2px solid @ui-active; } .umb-variant-switcher__item:hover, From e410b8b06719fe35ef154a3be621bddef3ee7a32 Mon Sep 17 00:00:00 2001 From: Stephan Date: Mon, 28 Jan 2019 10:27:36 +0100 Subject: [PATCH 315/437] Fix TreeUse --- src/Umbraco.Web/Trees/TreeAttribute.cs | 22 ------------------ src/Umbraco.Web/Trees/TreeUse.cs | 26 ++++++++++++++++++++++ src/Umbraco.Web/Trees/TreeUseExtensions.cs | 24 ++++++++++++++++++++ src/Umbraco.Web/Umbraco.Web.csproj | 2 ++ 4 files changed, 52 insertions(+), 22 deletions(-) create mode 100644 src/Umbraco.Web/Trees/TreeUse.cs create mode 100644 src/Umbraco.Web/Trees/TreeUseExtensions.cs diff --git a/src/Umbraco.Web/Trees/TreeAttribute.cs b/src/Umbraco.Web/Trees/TreeAttribute.cs index 2102bd4bfc..5b51d8605e 100644 --- a/src/Umbraco.Web/Trees/TreeAttribute.cs +++ b/src/Umbraco.Web/Trees/TreeAttribute.cs @@ -2,28 +2,6 @@ namespace Umbraco.Web.Trees { - // fixme move - [Flags] - public enum TreeUse - { - None = 0, - Main = 1, - Dialog = 2, - } - - public static class TreeUseExtensions - { - public static bool Has(this TreeUse use, TreeUse uses) - { - return use == uses; - } - - public static bool HasAny(this TreeUse use, TreeUse uses) - { - return (use & uses) > 0; - } - } - /// /// Identifies a section tree. /// diff --git a/src/Umbraco.Web/Trees/TreeUse.cs b/src/Umbraco.Web/Trees/TreeUse.cs new file mode 100644 index 0000000000..a1baee3332 --- /dev/null +++ b/src/Umbraco.Web/Trees/TreeUse.cs @@ -0,0 +1,26 @@ +using System; + +namespace Umbraco.Web.Trees +{ + /// + /// Defines tree uses. + /// + [Flags] + public enum TreeUse + { + /// + /// The tree is not used. + /// + None = 0, + + /// + /// The tree is used as a main (section) tree. + /// + Main = 1, + + /// + /// The tree is used as a dialog. + /// + Dialog = 2, + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Trees/TreeUseExtensions.cs b/src/Umbraco.Web/Trees/TreeUseExtensions.cs new file mode 100644 index 0000000000..02b417eb98 --- /dev/null +++ b/src/Umbraco.Web/Trees/TreeUseExtensions.cs @@ -0,0 +1,24 @@ +namespace Umbraco.Web.Trees +{ + /// + /// Provides extension methods to the method. + /// + public static class TreeUseExtensions + { + /// + /// Determines whether a TreeUse has all the specified values. + /// + public static bool Has(this TreeUse use, TreeUse uses) + { + return (use & uses) == uses; + } + + /// + /// Determines whether a TreeUse has any of the specified values. + /// + public static bool HasAny(this TreeUse use, TreeUse uses) + { + return (use & uses) > 0; + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index f924796d5f..361c2aa28a 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -185,6 +185,8 @@ + + From c2a404c02d84dbfeb6f06b366079dd8ac578023a Mon Sep 17 00:00:00 2001 From: Stephan Date: Mon, 28 Jan 2019 10:34:57 +0100 Subject: [PATCH 316/437] Update ModelsBuilder --- build/NuSpecs/UmbracoCms.nuspec | 2 +- src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/NuSpecs/UmbracoCms.nuspec b/build/NuSpecs/UmbracoCms.nuspec index f642b2f4e8..56851700b0 100644 --- a/build/NuSpecs/UmbracoCms.nuspec +++ b/build/NuSpecs/UmbracoCms.nuspec @@ -22,7 +22,7 @@ not want this to happen as the alpha of the next major is, really, the next major already. --> - + diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index 0ff158dadb..4da6e91579 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -106,7 +106,7 @@ - 8.0.0-alpha.33 + 8.0.0-alpha.34 From c675708388083ebae358f941e948494c9c722a69 Mon Sep 17 00:00:00 2001 From: Stephan Date: Mon, 28 Jan 2019 12:20:22 +0100 Subject: [PATCH 317/437] Refactor dashboards --- .../WeightedCollectionBuilderBase.cs | 2 +- src/Umbraco.Core/Dashboards/DashboardSlim.cs | 12 ++ src/Umbraco.Core/Dashboards/IDashboard.cs | 37 ++++++ .../Dashboards/IDashboardSection.cs | 34 ----- src/Umbraco.Core/Dashboards/IDashboardSlim.cs | 22 ++++ ...gnoreDataMemberWhenSerializingAttribute.cs | 15 --- .../Manifest/ManifestContentAppDefinition.cs | 7 +- ...oardDefinition.cs => ManifestDashboard.cs} | 5 +- src/Umbraco.Core/Manifest/ManifestParser.cs | 2 +- src/Umbraco.Core/Manifest/PackageManifest.cs | 2 +- src/Umbraco.Core/Umbraco.Core.csproj | 7 +- .../Composing/CollectionBuildersTests.cs | 2 +- .../DashboardSettings/Dashboard.config | 114 ---------------- .../DashboardSettingsTests.cs | 124 ------------------ .../DashboardSettings/web.config | 14 -- .../Manifest/ManifestParserTests.cs | 4 +- src/Umbraco.Tests/Umbraco.Tests.csproj | 9 -- .../Dashboards/ContentDashboard.cs | 2 +- .../Dashboards/DashboardCollection.cs | 4 +- .../Dashboards/DashboardCollectionBuilder.cs | 32 +++-- .../Dashboards/ExamineDashboard.cs | 2 +- src/Umbraco.Web/Dashboards/FormsDashboard.cs | 2 +- .../Dashboards/HealthCheckDashboard.cs | 2 +- src/Umbraco.Web/Dashboards/MediaDashboard.cs | 2 +- .../Dashboards/MembersDashboard.cs | 2 +- .../Dashboards/ModelsBuilderDashboard.cs | 2 +- .../Dashboards/PublishedStatusDashboard.cs | 2 +- .../Dashboards/RedirectUrlDashboard.cs | 2 +- .../Dashboards/SettingsDashboards.cs | 2 +- .../Editors/DashboardController.cs | 19 ++- .../Editors/EditorModelEventManager.cs | 8 +- src/Umbraco.Web/Runtime/WebRuntimeComposer.cs | 5 +- src/Umbraco.Web/Services/DashboardService.cs | 10 +- src/Umbraco.Web/Services/IDashboardService.cs | 4 +- src/Umbraco.Web/Umbraco.Web.csproj | 1 - ...taMemberWhenSerializingContractResolver.cs | 31 ----- .../WebApi/JsonCamelCaseFormatter.cs | 4 +- 37 files changed, 141 insertions(+), 409 deletions(-) create mode 100644 src/Umbraco.Core/Dashboards/DashboardSlim.cs create mode 100644 src/Umbraco.Core/Dashboards/IDashboard.cs delete mode 100644 src/Umbraco.Core/Dashboards/IDashboardSection.cs create mode 100644 src/Umbraco.Core/Dashboards/IDashboardSlim.cs delete mode 100644 src/Umbraco.Core/Manifest/IgnoreDataMemberWhenSerializingAttribute.cs rename src/Umbraco.Core/Manifest/{ManifestDashboardDefinition.cs => ManifestDashboard.cs} (86%) delete mode 100644 src/Umbraco.Tests/Configurations/DashboardSettings/Dashboard.config delete mode 100644 src/Umbraco.Tests/Configurations/DashboardSettings/DashboardSettingsTests.cs delete mode 100644 src/Umbraco.Tests/Configurations/DashboardSettings/web.config delete mode 100644 src/Umbraco.Web/WebApi/CamelCaseAndDataMemberWhenSerializingContractResolver.cs diff --git a/src/Umbraco.Core/Composing/WeightedCollectionBuilderBase.cs b/src/Umbraco.Core/Composing/WeightedCollectionBuilderBase.cs index f8ecc11d98..88eb61de76 100644 --- a/src/Umbraco.Core/Composing/WeightedCollectionBuilderBase.cs +++ b/src/Umbraco.Core/Composing/WeightedCollectionBuilderBase.cs @@ -114,7 +114,7 @@ namespace Umbraco.Core.Composing return list; } - protected virtual int DefaultWeight { get; set; } = 10; + public virtual int DefaultWeight { get; set; } = 100; protected virtual int GetWeight(Type type) { diff --git a/src/Umbraco.Core/Dashboards/DashboardSlim.cs b/src/Umbraco.Core/Dashboards/DashboardSlim.cs new file mode 100644 index 0000000000..a2869a90a2 --- /dev/null +++ b/src/Umbraco.Core/Dashboards/DashboardSlim.cs @@ -0,0 +1,12 @@ +using System.Runtime.Serialization; + +namespace Umbraco.Core.Dashboards +{ + [DataContract(IsReference = true)] + public class DashboardSlim : IDashboardSlim + { + public string Alias { get; set; } + + public string View { get; set; } + } +} diff --git a/src/Umbraco.Core/Dashboards/IDashboard.cs b/src/Umbraco.Core/Dashboards/IDashboard.cs new file mode 100644 index 0000000000..eaf6c47c88 --- /dev/null +++ b/src/Umbraco.Core/Dashboards/IDashboard.cs @@ -0,0 +1,37 @@ +using System.Runtime.Serialization; + +namespace Umbraco.Core.Dashboards +{ + /// + /// Represents a dashboard. + /// + public interface IDashboard : IDashboardSlim + { + /// + /// Gets the aliases of sections/applications where this dashboard appears. + /// + /// + /// This field is *not* needed by the UI and therefore we want to exclude + /// it from serialization, but it is deserialized as part of the manifest, + /// therefore we cannot plainly ignore it. + /// So, it has to remain a data member, plus we use our special + /// JsonDontSerialize attribute (see attribute for more details). + /// + [DataMember(Name = "sections")] + string[] Sections { get; } + + + /// + /// Gets the access rule determining the visibility of the dashboard. + /// + /// + /// This field is *not* needed by the UI and therefore we want to exclude + /// it from serialization, but it is deserialized as part of the manifest, + /// therefore we cannot plainly ignore it. + /// So, it has to remain a data member, plus we use our special + /// JsonDontSerialize attribute (see attribute for more details). + /// + [DataMember(Name = "access")] + IAccessRule[] AccessRules { get; } + } +} diff --git a/src/Umbraco.Core/Dashboards/IDashboardSection.cs b/src/Umbraco.Core/Dashboards/IDashboardSection.cs deleted file mode 100644 index 73cf8513f9..0000000000 --- a/src/Umbraco.Core/Dashboards/IDashboardSection.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System.Runtime.Serialization; -using Umbraco.Core.Manifest; - -namespace Umbraco.Core.Dashboards -{ - public interface IDashboardSection - { - /// - /// Alias to refer to this dashboard via code - /// - [DataMember(Name = "alias")] - string Alias { get; } - - /// - /// A collection of sections/application aliases that this dashboard will appear on - /// - [DataMember(Name = "sections")] - [IgnoreDataMemberWhenSerializing] - string[] Sections { get; } - - /// - /// The HTML view to load for the dashboard - /// - [DataMember(Name = "view")] - string View { get; } - - /// - /// Dashboards can be shown/hidden based on access rights - /// - [DataMember(Name = "access")] - [IgnoreDataMemberWhenSerializing] - IAccessRule[] AccessRules { get; } - } -} diff --git a/src/Umbraco.Core/Dashboards/IDashboardSlim.cs b/src/Umbraco.Core/Dashboards/IDashboardSlim.cs new file mode 100644 index 0000000000..655f56dfd9 --- /dev/null +++ b/src/Umbraco.Core/Dashboards/IDashboardSlim.cs @@ -0,0 +1,22 @@ +using System.Runtime.Serialization; + +namespace Umbraco.Core.Dashboards +{ + /// + /// Represents a dashboard with only minimal data. + /// + public interface IDashboardSlim + { + /// + /// Gets the alias of the dashboard. + /// + [DataMember(Name = "alias")] + string Alias { get; } + + /// + /// Gets the view used to render the dashboard. + /// + [DataMember(Name = "view")] + string View { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Manifest/IgnoreDataMemberWhenSerializingAttribute.cs b/src/Umbraco.Core/Manifest/IgnoreDataMemberWhenSerializingAttribute.cs deleted file mode 100644 index 8486e1b6a9..0000000000 --- a/src/Umbraco.Core/Manifest/IgnoreDataMemberWhenSerializingAttribute.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Umbraco.Core.Manifest -{ - /// - /// When applied to the member of a type, specifies that the member is not part of a data contract when - /// serialized but still when deserialized as opposite to . - /// - [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = false)] - public class IgnoreDataMemberWhenSerializingAttribute : Attribute - { - - } -} diff --git a/src/Umbraco.Core/Manifest/ManifestContentAppDefinition.cs b/src/Umbraco.Core/Manifest/ManifestContentAppDefinition.cs index 0667f11aab..af66bfc544 100644 --- a/src/Umbraco.Core/Manifest/ManifestContentAppDefinition.cs +++ b/src/Umbraco.Core/Manifest/ManifestContentAppDefinition.cs @@ -1,12 +1,6 @@ using System; -using System.Collections.Generic; -using System.Linq; using System.Runtime.Serialization; -using System.Text.RegularExpressions; using Umbraco.Core.IO; -using Umbraco.Core.Models; -using Umbraco.Core.Models.ContentEditing; -using Umbraco.Core.Models.Membership; namespace Umbraco.Core.Manifest { @@ -30,6 +24,7 @@ namespace Umbraco.Core.Manifest /// /// Represents a content app definition, parsed from a manifest. /// + /// Is used to create an actual . [DataContract(Name = "appdef", Namespace = "")] public class ManifestContentAppDefinition { diff --git a/src/Umbraco.Core/Manifest/ManifestDashboardDefinition.cs b/src/Umbraco.Core/Manifest/ManifestDashboard.cs similarity index 86% rename from src/Umbraco.Core/Manifest/ManifestDashboardDefinition.cs rename to src/Umbraco.Core/Manifest/ManifestDashboard.cs index 879f78e19c..e790655221 100644 --- a/src/Umbraco.Core/Manifest/ManifestDashboardDefinition.cs +++ b/src/Umbraco.Core/Manifest/ManifestDashboard.cs @@ -6,7 +6,7 @@ using Umbraco.Core.IO; namespace Umbraco.Core.Manifest { - public class ManifestDashboardDefinition : IDashboardSection + public class ManifestDashboard : IDashboard { private string _view; @@ -14,7 +14,7 @@ namespace Umbraco.Core.Manifest public string Alias { get; set; } [JsonProperty("weight", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - [DefaultValue(100)] + [DefaultValue(100)] // must be equal to DashboardCollectionBuilder.DefaultWeight public int Weight { get; set; } [JsonProperty("view", Required = Required.Always)] @@ -29,6 +29,5 @@ namespace Umbraco.Core.Manifest [JsonProperty("access")] public IAccessRule[] AccessRules { get; set; } = Array.Empty(); - } } diff --git a/src/Umbraco.Core/Manifest/ManifestParser.cs b/src/Umbraco.Core/Manifest/ManifestParser.cs index 825ffb7314..6ca3b916ea 100644 --- a/src/Umbraco.Core/Manifest/ManifestParser.cs +++ b/src/Umbraco.Core/Manifest/ManifestParser.cs @@ -100,7 +100,7 @@ namespace Umbraco.Core.Manifest var parameterEditors = new List(); var gridEditors = new List(); var contentApps = new List(); - var dashboards = new List(); + var dashboards = new List(); var sections = new List(); foreach (var manifest in manifests) diff --git a/src/Umbraco.Core/Manifest/PackageManifest.cs b/src/Umbraco.Core/Manifest/PackageManifest.cs index b29a28ab06..c272449509 100644 --- a/src/Umbraco.Core/Manifest/PackageManifest.cs +++ b/src/Umbraco.Core/Manifest/PackageManifest.cs @@ -49,7 +49,7 @@ namespace Umbraco.Core.Manifest /// Gets or sets the dashboards listed in the manifest. /// [JsonProperty("dashboards")] - public ManifestDashboardDefinition[] Dashboards { get; set; } = Array.Empty(); + public ManifestDashboard[] Dashboards { get; set; } = Array.Empty(); /// /// Gets or sets the sections listed in the manifest. diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index ebd0e2735b..a4e60bb9a9 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -313,8 +313,10 @@ + - + + @@ -354,11 +356,10 @@ - - + diff --git a/src/Umbraco.Tests/Composing/CollectionBuildersTests.cs b/src/Umbraco.Tests/Composing/CollectionBuildersTests.cs index 4c262fbf82..8ea13fc920 100644 --- a/src/Umbraco.Tests/Composing/CollectionBuildersTests.cs +++ b/src/Umbraco.Tests/Composing/CollectionBuildersTests.cs @@ -453,7 +453,7 @@ namespace Umbraco.Tests.Composing public class Resolved1 : Resolved { } - [Weight(5)] // default is 10 + [Weight(50)] // default is 100 public class Resolved2 : Resolved { } diff --git a/src/Umbraco.Tests/Configurations/DashboardSettings/Dashboard.config b/src/Umbraco.Tests/Configurations/DashboardSettings/Dashboard.config deleted file mode 100644 index 4c86355a1b..0000000000 --- a/src/Umbraco.Tests/Configurations/DashboardSettings/Dashboard.config +++ /dev/null @@ -1,114 +0,0 @@ - - - -
    - - settings - - - - views/dashboard/settings/settingsdashboardintro.html - - - views/dashboard/settings/settingsdashboardvideos.html - - - - dashboard/ExamineManagement.ascx - -
    - -
    - - developer - - - - views/dashboard/developer/developerdashboardintro.html - - - views/dashboard/developer/developerdashboardvideos.html - - -
    - -
    - - media - - - - views/dashboard/media/mediafolderbrowser.html - - - - - admin - - - views/dashboard/media/mediadashboardintro.html - - - views/dashboard/media/desktopmediauploader.html - - - views/dashboard/media/mediadashboardvideos.html - - -
    - -
    - - translator - hello - world - - - content - - - - admin - - - views/dashboard/default/startupdashboardintro.html - - - views/dashboard/default/startupdashboardkits.html - - editor - writer - - - - views/dashboard/default/startupdashboardvideos.html - - - - dashboard/latestEdits.ascx - - - - views/dashboard/changepassword.html - - -
    - -
    - - default - member - - - - views/dashboard/members/membersdashboardintro.html - - - members/membersearch.ascx - - - views/dashboard/members/membersdashboardvideos.html - - -
    -
    diff --git a/src/Umbraco.Tests/Configurations/DashboardSettings/DashboardSettingsTests.cs b/src/Umbraco.Tests/Configurations/DashboardSettings/DashboardSettingsTests.cs deleted file mode 100644 index 219e6092d2..0000000000 --- a/src/Umbraco.Tests/Configurations/DashboardSettings/DashboardSettingsTests.cs +++ /dev/null @@ -1,124 +0,0 @@ -using System; -using System.Configuration; -using System.IO; -using System.Linq; -using NUnit.Framework; -using Umbraco.Core.Dashboards; -using Umbraco.Tests.TestHelpers; - -namespace Umbraco.Tests.Configurations.DashboardSettings -{ - //[Obsolete("Dashboard tests not in config/XML", true)] - //[TestFixture] - //public class DashboardSettingsTests - //{ - // [SetUp] - // public void Init() - // { - // var config = new FileInfo(TestHelper.MapPathForTest("~/Configurations/DashboardSettings/web.config")); - - // var fileMap = new ExeConfigurationFileMap() { ExeConfigFilename = config.FullName }; - // var configuration = ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None); - - // SettingsSection = configuration.GetSection("umbracoConfiguration/dashBoard") as DashboardSection; - - // Assert.IsNotNull(SettingsSection); - // } - - // protected IDashboardSection SettingsSection { get; private set; } - - // [Test] - // public void Test_Sections() - // { - // Assert.AreEqual(5, SettingsSection.Sections.Count()); - - // Assert.AreEqual("StartupSettingsDashboardSection", SettingsSection.Sections.ElementAt(0).Alias); - // Assert.AreEqual("StartupDeveloperDashboardSection", SettingsSection.Sections.ElementAt(1).Alias); - // Assert.AreEqual("StartupMediaDashboardSection", SettingsSection.Sections.ElementAt(2).Alias); - // Assert.AreEqual("StartupDashboardSection", SettingsSection.Sections.ElementAt(3).Alias); - // Assert.AreEqual("StartupMemberDashboardSection", SettingsSection.Sections.ElementAt(4).Alias); - // } - - // [Test] - // public void Test_Section_Area() - // { - // Assert.AreEqual("settings", SettingsSection.Sections.ElementAt(0).Areas.First()); - // Assert.AreEqual("developer", SettingsSection.Sections.ElementAt(1).Areas.First()); - // Assert.AreEqual("media", SettingsSection.Sections.ElementAt(2).Areas.First()); - // Assert.AreEqual("content", SettingsSection.Sections.ElementAt(3).Areas.First()); - // Assert.AreEqual("default", SettingsSection.Sections.ElementAt(4).Areas.First()); - // Assert.AreEqual("member", SettingsSection.Sections.ElementAt(4).Areas.Last()); - // } - - // [Test] - // public void Test_Section_Access() - // { - - // Assert.AreEqual(3, SettingsSection.Sections.ElementAt(3).AccessRights.Rules.Count()); - - // Assert.AreEqual("translator", SettingsSection.Sections.ElementAt(3).AccessRights.Rules.ElementAt(0).Value); - // Assert.AreEqual(AccessRuleType.Deny, SettingsSection.Sections.ElementAt(3).AccessRights.Rules.ElementAt(0).Type); - // Assert.AreEqual("hello", SettingsSection.Sections.ElementAt(3).AccessRights.Rules.ElementAt(1).Value); - // Assert.AreEqual(AccessRuleType.Grant, SettingsSection.Sections.ElementAt(3).AccessRights.Rules.ElementAt(1).Type); - // Assert.AreEqual("world", SettingsSection.Sections.ElementAt(3).AccessRights.Rules.ElementAt(2).Value); - // Assert.AreEqual(AccessRuleType.GrantBySection, SettingsSection.Sections.ElementAt(3).AccessRights.Rules.ElementAt(2).Type); - // } - - // [Test] - // public void Test_Section_Tabs() - // { - // //Element 0 Alias "StartupSettingsDashboardSection" - // Assert.AreEqual(2, SettingsSection.Sections.ElementAt(0).Tabs.Count()); - - // //Element 1 Alias "StartupDeveloperDashboardSection" - // Assert.AreEqual(1, SettingsSection.Sections.ElementAt(1).Tabs.Count()); - - // //Element 2 Alias "StartupMediaDashboardSection" - // Assert.AreEqual(2, SettingsSection.Sections.ElementAt(2).Tabs.Count()); - - // //Element 3 Alias "StartupDashboardSection" - // Assert.AreEqual(3, SettingsSection.Sections.ElementAt(3).Tabs.Count()); - - // //Element 4 Alias "StartupMemberDashboardSection" - // Assert.AreEqual(1, SettingsSection.Sections.ElementAt(4).Tabs.Count()); - - // } - - // [Test] - // public void Test_Tab() - // { - // Assert.AreEqual("Get Started", SettingsSection.Sections.ElementAt(0).Tabs.ElementAt(0).Caption); - // Assert.AreEqual(2, SettingsSection.Sections.ElementAt(0).Tabs.ElementAt(0).Controls.Count()); - // } - - // [Test] - // public void Test_Tab_Access() - // { - // Assert.AreEqual(1, SettingsSection.Sections.ElementAt(2).Tabs.ElementAt(1).AccessRights.Rules.Count()); - // Assert.AreEqual(AccessRuleType.Grant, SettingsSection.Sections.ElementAt(2).Tabs.ElementAt(1).AccessRights.Rules.ElementAt(0).Type); - // Assert.AreEqual("admin", SettingsSection.Sections.ElementAt(2).Tabs.ElementAt(1).AccessRights.Rules.ElementAt(0).Value); - // } - - // [Test] - // public void Test_Control() - // { - // Assert.AreEqual("hello", SettingsSection.Sections.ElementAt(0).Tabs.ElementAt(0).Controls.ElementAt(0).PanelCaption); - // Assert.AreEqual("views/dashboard/settings/settingsdashboardintro.html", - // SettingsSection.Sections.ElementAt(0).Tabs.ElementAt(0).Controls.ElementAt(0).ControlPath); - - // Assert.AreEqual("", SettingsSection.Sections.ElementAt(0).Tabs.ElementAt(0).Controls.ElementAt(1).PanelCaption); - // Assert.AreEqual("views/dashboard/settings/settingsdashboardvideos.html", - // SettingsSection.Sections.ElementAt(0).Tabs.ElementAt(0).Controls.ElementAt(1).ControlPath); - // } - - // [Test] - // public void Test_Control_Access() - // { - // Assert.AreEqual(2, SettingsSection.Sections.ElementAt(3).Tabs.ElementAt(0).Controls.ElementAt(1).AccessRights.Rules.Count()); - // Assert.AreEqual(AccessRuleType.Deny, SettingsSection.Sections.ElementAt(3).Tabs.ElementAt(0).Controls.ElementAt(1).AccessRights.Rules.ElementAt(0).Type); - // Assert.AreEqual("editor", SettingsSection.Sections.ElementAt(3).Tabs.ElementAt(0).Controls.ElementAt(1).AccessRights.Rules.ElementAt(0).Value); - // Assert.AreEqual(AccessRuleType.Deny, SettingsSection.Sections.ElementAt(3).Tabs.ElementAt(0).Controls.ElementAt(1).AccessRights.Rules.ElementAt(1).Type); - // Assert.AreEqual("writer", SettingsSection.Sections.ElementAt(3).Tabs.ElementAt(0).Controls.ElementAt(1).AccessRights.Rules.ElementAt(1).Value); - // } - //} -} diff --git a/src/Umbraco.Tests/Configurations/DashboardSettings/web.config b/src/Umbraco.Tests/Configurations/DashboardSettings/web.config deleted file mode 100644 index 8cf262cbff..0000000000 --- a/src/Umbraco.Tests/Configurations/DashboardSettings/web.config +++ /dev/null @@ -1,14 +0,0 @@ - - - - - -
    - - - - - - - - \ No newline at end of file diff --git a/src/Umbraco.Tests/Manifest/ManifestParserTests.cs b/src/Umbraco.Tests/Manifest/ManifestParserTests.cs index d78c41f57a..6605bc4546 100644 --- a/src/Umbraco.Tests/Manifest/ManifestParserTests.cs +++ b/src/Umbraco.Tests/Manifest/ManifestParserTests.cs @@ -404,7 +404,7 @@ javascript: ['~/test.js',/*** some note about stuff asd09823-4**09234*/ '~/test2 var manifest = _parser.ParseManifest(json); Assert.AreEqual(2, manifest.Dashboards.Length); - Assert.IsInstanceOf(manifest.Dashboards[0]); + Assert.IsInstanceOf(manifest.Dashboards[0]); var db0 = manifest.Dashboards[0]; Assert.AreEqual("something", db0.Alias); Assert.AreEqual(100, db0.Weight); @@ -417,7 +417,7 @@ javascript: ['~/test.js',/*** some note about stuff asd09823-4**09234*/ '~/test2 Assert.AreEqual(AccessRuleType.Deny, db0.AccessRules[1].Type); Assert.AreEqual("foo", db0.AccessRules[1].Value); - Assert.IsInstanceOf(manifest.Dashboards[1]); + Assert.IsInstanceOf(manifest.Dashboards[1]); var db1 = manifest.Dashboards[1]; Assert.AreEqual("something.else", db1.Alias); Assert.AreEqual(-1, db1.Weight); diff --git a/src/Umbraco.Tests/Umbraco.Tests.csproj b/src/Umbraco.Tests/Umbraco.Tests.csproj index 11f5527a8c..cd73b2836b 100644 --- a/src/Umbraco.Tests/Umbraco.Tests.csproj +++ b/src/Umbraco.Tests/Umbraco.Tests.csproj @@ -292,7 +292,6 @@ - @@ -499,14 +498,6 @@ Designer - - Designer - Always - - - Designer - Always - Designer Always diff --git a/src/Umbraco.Web/Dashboards/ContentDashboard.cs b/src/Umbraco.Web/Dashboards/ContentDashboard.cs index 1ff741b7e4..0cd96f738c 100644 --- a/src/Umbraco.Web/Dashboards/ContentDashboard.cs +++ b/src/Umbraco.Web/Dashboards/ContentDashboard.cs @@ -5,7 +5,7 @@ using Umbraco.Core.Dashboards; namespace Umbraco.Web.Dashboards { [Weight(10)] - public class ContentDashboard : IDashboardSection + public class ContentDashboard : IDashboard { public string Alias => "contentIntro"; diff --git a/src/Umbraco.Web/Dashboards/DashboardCollection.cs b/src/Umbraco.Web/Dashboards/DashboardCollection.cs index 8d3bde622e..616a2cc8cc 100644 --- a/src/Umbraco.Web/Dashboards/DashboardCollection.cs +++ b/src/Umbraco.Web/Dashboards/DashboardCollection.cs @@ -4,9 +4,9 @@ using Umbraco.Core.Dashboards; namespace Umbraco.Web.Dashboards { - public class DashboardCollection : BuilderCollectionBase + public class DashboardCollection : BuilderCollectionBase { - public DashboardCollection(IEnumerable items) + public DashboardCollection(IEnumerable items) : base(items) { } } diff --git a/src/Umbraco.Web/Dashboards/DashboardCollectionBuilder.cs b/src/Umbraco.Web/Dashboards/DashboardCollectionBuilder.cs index 336625c415..36a417e957 100644 --- a/src/Umbraco.Web/Dashboards/DashboardCollectionBuilder.cs +++ b/src/Umbraco.Web/Dashboards/DashboardCollectionBuilder.cs @@ -1,47 +1,45 @@ using System.Collections.Generic; using System.Linq; +using Umbraco.Core; using Umbraco.Core.Composing; using Umbraco.Core.Dashboards; using Umbraco.Core.Manifest; namespace Umbraco.Web.Dashboards { - public class DashboardCollectionBuilder : WeightedCollectionBuilderBase + public class DashboardCollectionBuilder : WeightedCollectionBuilderBase { protected override DashboardCollectionBuilder This => this; - protected override IEnumerable CreateItems(IFactory factory) + protected override IEnumerable CreateItems(IFactory factory) { // get the manifest parser just-in-time - injecting it in the ctor would mean that // simply getting the builder in order to configure the collection, would require // its dependencies too, and that can create cycles or other oddities var manifestParser = factory.GetInstance(); - var dashboardSections = Merge(base.CreateItems(factory).ToArray(), manifestParser.Manifest.Dashboards); + var dashboardSections = Merge(base.CreateItems(factory), manifestParser.Manifest.Dashboards); return dashboardSections; } - private IEnumerable Merge(IReadOnlyList dashboardsFromCode, IReadOnlyList dashboardFromManifest) + private IEnumerable Merge(IEnumerable dashboardsFromCode, IReadOnlyList dashboardFromManifest) { - var list = dashboardsFromCode.Concat(dashboardFromManifest) - .Where(x=>!string.IsNullOrEmpty(x.Alias)) - .Select(x => (Weight: GetWeight(x), DashboardSection: x)) - .OrderBy(x=>x.Weight); - - return list.Select(x => x.DashboardSection); + return dashboardsFromCode.Concat(dashboardFromManifest) + .Where(x => !string.IsNullOrEmpty(x.Alias)) + .OrderBy(GetWeight); } - private static int GetWeight(IDashboardSection dashboardSection) + private int GetWeight(IDashboard dashboard) { - switch (dashboardSection) + switch (dashboard) { - case ManifestDashboardDefinition danifestDashboardDefinition: - return danifestDashboardDefinition.Weight; + case ManifestDashboard manifestDashboardDefinition: + return manifestDashboardDefinition.Weight; + default: - var weightAttribute = dashboardSection.GetType().GetCustomAttributes(typeof(WeightAttribute), false) - .Cast().FirstOrDefault(); - return weightAttribute.Weight; + var weightAttribute = dashboard.GetType().GetCustomAttribute(false); + return weightAttribute?.Weight ?? DefaultWeight; } } } diff --git a/src/Umbraco.Web/Dashboards/ExamineDashboard.cs b/src/Umbraco.Web/Dashboards/ExamineDashboard.cs index 8363e8079c..47cf97ca3b 100644 --- a/src/Umbraco.Web/Dashboards/ExamineDashboard.cs +++ b/src/Umbraco.Web/Dashboards/ExamineDashboard.cs @@ -5,7 +5,7 @@ using Umbraco.Core.Dashboards; namespace Umbraco.Web.Dashboards { [Weight(20)] - public class ExamineDashboard : IDashboardSection + public class ExamineDashboard : IDashboard { public string Alias => "settingsExamine"; diff --git a/src/Umbraco.Web/Dashboards/FormsDashboard.cs b/src/Umbraco.Web/Dashboards/FormsDashboard.cs index 0121fcd2c1..a3e1123369 100644 --- a/src/Umbraco.Web/Dashboards/FormsDashboard.cs +++ b/src/Umbraco.Web/Dashboards/FormsDashboard.cs @@ -5,7 +5,7 @@ using Umbraco.Core.Dashboards; namespace Umbraco.Web.Dashboards { [Weight(10)] - public class FormsDashboard : IDashboardSection + public class FormsDashboard : IDashboard { public string Alias => "formsInstall"; diff --git a/src/Umbraco.Web/Dashboards/HealthCheckDashboard.cs b/src/Umbraco.Web/Dashboards/HealthCheckDashboard.cs index a8347f1806..746dd04439 100644 --- a/src/Umbraco.Web/Dashboards/HealthCheckDashboard.cs +++ b/src/Umbraco.Web/Dashboards/HealthCheckDashboard.cs @@ -5,7 +5,7 @@ using Umbraco.Core.Dashboards; namespace Umbraco.Web.Dashboards { [Weight(50)] - public class HealthCheckDashboard : IDashboardSection + public class HealthCheckDashboard : IDashboard { public string Alias => "settingsHealthCheck"; diff --git a/src/Umbraco.Web/Dashboards/MediaDashboard.cs b/src/Umbraco.Web/Dashboards/MediaDashboard.cs index ae8f8343ce..c97ae298f3 100644 --- a/src/Umbraco.Web/Dashboards/MediaDashboard.cs +++ b/src/Umbraco.Web/Dashboards/MediaDashboard.cs @@ -5,7 +5,7 @@ using Umbraco.Core.Dashboards; namespace Umbraco.Web.Dashboards { [Weight(10)] - public class MediaDashboard : IDashboardSection + public class MediaDashboard : IDashboard { public string Alias => "mediaFolderBrowser"; diff --git a/src/Umbraco.Web/Dashboards/MembersDashboard.cs b/src/Umbraco.Web/Dashboards/MembersDashboard.cs index 57183ab6a6..473722dce1 100644 --- a/src/Umbraco.Web/Dashboards/MembersDashboard.cs +++ b/src/Umbraco.Web/Dashboards/MembersDashboard.cs @@ -5,7 +5,7 @@ using Umbraco.Core.Dashboards; namespace Umbraco.Web.Dashboards { [Weight(10)] - public class MembersDashboard : IDashboardSection + public class MembersDashboard : IDashboard { public string Alias => "memberIntro"; diff --git a/src/Umbraco.Web/Dashboards/ModelsBuilderDashboard.cs b/src/Umbraco.Web/Dashboards/ModelsBuilderDashboard.cs index 5e284ee0c2..44bc00cb6f 100644 --- a/src/Umbraco.Web/Dashboards/ModelsBuilderDashboard.cs +++ b/src/Umbraco.Web/Dashboards/ModelsBuilderDashboard.cs @@ -5,7 +5,7 @@ using Umbraco.Core.Dashboards; namespace Umbraco.Web.Dashboards { [Weight(40)] - public class ModelsBuilderDashboard : IDashboardSection + public class ModelsBuilderDashboard : IDashboard { public string Alias => "settingsModelsBuilder"; diff --git a/src/Umbraco.Web/Dashboards/PublishedStatusDashboard.cs b/src/Umbraco.Web/Dashboards/PublishedStatusDashboard.cs index 17e99bdf5b..66faa20b55 100644 --- a/src/Umbraco.Web/Dashboards/PublishedStatusDashboard.cs +++ b/src/Umbraco.Web/Dashboards/PublishedStatusDashboard.cs @@ -5,7 +5,7 @@ using Umbraco.Core.Dashboards; namespace Umbraco.Web.Dashboards { [Weight(30)] - public class PublishedStatusDashboard : IDashboardSection + public class PublishedStatusDashboard : IDashboard { public string Alias => "settingsPublishedStatus"; diff --git a/src/Umbraco.Web/Dashboards/RedirectUrlDashboard.cs b/src/Umbraco.Web/Dashboards/RedirectUrlDashboard.cs index 76cc03202d..f538cbc122 100644 --- a/src/Umbraco.Web/Dashboards/RedirectUrlDashboard.cs +++ b/src/Umbraco.Web/Dashboards/RedirectUrlDashboard.cs @@ -5,7 +5,7 @@ using Umbraco.Core.Dashboards; namespace Umbraco.Web.Dashboards { [Weight(20)] - public class RedirectUrlDashboard : IDashboardSection + public class RedirectUrlDashboard : IDashboard { public string Alias => "contentRedirectManager"; diff --git a/src/Umbraco.Web/Dashboards/SettingsDashboards.cs b/src/Umbraco.Web/Dashboards/SettingsDashboards.cs index 1fd32bee14..5cd92e4c3f 100644 --- a/src/Umbraco.Web/Dashboards/SettingsDashboards.cs +++ b/src/Umbraco.Web/Dashboards/SettingsDashboards.cs @@ -5,7 +5,7 @@ using Umbraco.Core.Dashboards; namespace Umbraco.Web.Dashboards { [Weight(10)] - public class SettingsDashboard : IDashboardSection + public class SettingsDashboard : IDashboard { public string Alias => "settingsWelcome"; diff --git a/src/Umbraco.Web/Editors/DashboardController.cs b/src/Umbraco.Web/Editors/DashboardController.cs index b166a8b4bf..1b11b1c4f3 100644 --- a/src/Umbraco.Web/Editors/DashboardController.cs +++ b/src/Umbraco.Web/Editors/DashboardController.cs @@ -7,6 +7,7 @@ using Newtonsoft.Json.Linq; using System.Threading.Tasks; using System.Net.Http; using System; +using System.Linq; using System.Net; using System.Text; using Umbraco.Core.Cache; @@ -26,7 +27,6 @@ namespace Umbraco.Web.Editors [AngularJsonOnlyConfiguration] [IsBackOffice] [WebApi.UmbracoAuthorize] - [JsonCamelCaseFormatter] public class DashboardController : UmbracoApiController { @@ -133,11 +133,24 @@ namespace Umbraco.Web.Editors }; } + // return IDashboardSlim - we don't need sections nor access rules [ValidateAngularAntiForgeryToken] [OutgoingEditorModelEvent] - public IEnumerable> GetDashboard(string section) + public IEnumerable> GetDashboard(string section) { - return _dashboardService.GetDashboards(section, Security.CurrentUser); + return _dashboardService.GetDashboards(section, Security.CurrentUser).Select(x => new Tab + { + Id = x.Id, + Alias = x.Alias, + Label = x.Label, + Expanded = x.Expanded, + IsActive = x.IsActive, + Properties = x.Properties.Select(y => new DashboardSlim + { + Alias = y.Alias, + View = y.View + }) + }); } } } diff --git a/src/Umbraco.Web/Editors/EditorModelEventManager.cs b/src/Umbraco.Web/Editors/EditorModelEventManager.cs index dd5282d724..c3a7d128ec 100644 --- a/src/Umbraco.Web/Editors/EditorModelEventManager.cs +++ b/src/Umbraco.Web/Editors/EditorModelEventManager.cs @@ -15,9 +15,9 @@ namespace Umbraco.Web.Editors public static event TypedEventHandler> SendingMediaModel; public static event TypedEventHandler> SendingMemberModel; public static event TypedEventHandler> SendingUserModel; - public static event TypedEventHandler>>> SendingDashboardModel; + public static event TypedEventHandler>>> SendingDashboardModel; - private static void OnSendingDashboardModel(HttpActionExecutedContext sender, EditorModelEventArgs>> e) + private static void OnSendingDashboardModel(HttpActionExecutedContext sender, EditorModelEventArgs>> e) { var handler = SendingDashboardModel; handler?.Invoke(sender, e); @@ -66,8 +66,8 @@ namespace Umbraco.Web.Editors if (e.Model is UserDisplay) OnSendingUserModel(sender, new EditorModelEventArgs(e)); - if (e.Model is IEnumerable) - OnSendingDashboardModel(sender, new EditorModelEventArgs>>(e)); + if (e.Model is IEnumerable) + OnSendingDashboardModel(sender, new EditorModelEventArgs>>(e)); } } } diff --git a/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs b/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs index c1ae3f15fb..b8a7fee2f7 100644 --- a/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs +++ b/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs @@ -103,7 +103,7 @@ namespace Umbraco.Web.Runtime // configure the container for web composition.ConfigureForWeb(); - + composition .ComposeUmbracoControllers(GetType().Assembly) .SetDefaultRenderMvcController(); // default controller for template views @@ -203,10 +203,9 @@ namespace Umbraco.Web.Runtime .Append() .Append(); - // register core CMS dashboards and 3rd party types - will be ordered by weight attribute & merged with package.manifest dashboards composition.WithCollectionBuilder() - .Add(composition.TypeLoader.GetTypes()); + .Add(composition.TypeLoader.GetTypes()); // register back office trees foreach (var treeControllerType in umbracoApiControllerTypes diff --git a/src/Umbraco.Web/Services/DashboardService.cs b/src/Umbraco.Web/Services/DashboardService.cs index 373c70e6d2..71969df475 100644 --- a/src/Umbraco.Web/Services/DashboardService.cs +++ b/src/Umbraco.Web/Services/DashboardService.cs @@ -32,9 +32,9 @@ namespace Umbraco.Web.Services /// - public IEnumerable> GetDashboards(string section, IUser currentUser) + public IEnumerable> GetDashboards(string section, IUser currentUser) { - var tabs = new List>(); + var tabs = new List>(); var tabId = 0; foreach (var dashboard in _dashboardCollection.Where(x => x.Sections.InvariantContains(section))) @@ -46,8 +46,8 @@ namespace Umbraco.Web.Services if (dashboard.View.InvariantEndsWith(".ascx")) throw new NotSupportedException("Legacy UserControl (.ascx) dashboards are no longer supported."); - var dashboards = new List {dashboard}; - tabs.Add(new Tab + var dashboards = new List {dashboard}; + tabs.Add(new Tab { Id = tabId++, Label = _localizedText.Localize("dashboardTabs", dashboard.Alias), @@ -60,7 +60,7 @@ namespace Umbraco.Web.Services } /// - public IDictionary>> GetDashboards(IUser currentUser) + public IDictionary>> GetDashboards(IUser currentUser) { return _sectionService.GetSections().ToDictionary(x => x.Alias, x => GetDashboards(x.Alias, currentUser)); } diff --git a/src/Umbraco.Web/Services/IDashboardService.cs b/src/Umbraco.Web/Services/IDashboardService.cs index a86715c83d..11ff2728cf 100644 --- a/src/Umbraco.Web/Services/IDashboardService.cs +++ b/src/Umbraco.Web/Services/IDashboardService.cs @@ -14,14 +14,14 @@ namespace Umbraco.Web.Services /// /// /// - IEnumerable> GetDashboards(string section, IUser currentUser); + IEnumerable> GetDashboards(string section, IUser currentUser); /// /// Gets all dashboards, organized by section, for a user. /// /// /// - IDictionary>> GetDashboards(IUser currentUser); + IDictionary>> GetDashboards(IUser currentUser); } } diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index c3ff7d47da..f81eff75ad 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -262,7 +262,6 @@ - diff --git a/src/Umbraco.Web/WebApi/CamelCaseAndDataMemberWhenSerializingContractResolver.cs b/src/Umbraco.Web/WebApi/CamelCaseAndDataMemberWhenSerializingContractResolver.cs deleted file mode 100644 index 49ab02a12e..0000000000 --- a/src/Umbraco.Web/WebApi/CamelCaseAndDataMemberWhenSerializingContractResolver.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using Newtonsoft.Json.Serialization; -using Umbraco.Core.Manifest; - -namespace Umbraco.Web.WebApi -{ - - public class CamelCaseAndDataMemberWhenSerializingContractResolver : CamelCasePropertyNamesContractResolver - { - /// - protected override List GetSerializableMembers(Type objectType) - { - return base.GetSerializableMembers(objectType) - .Where(HasNotTheIgnoreDataMemberWhenSerializingAttribute) - .ToList(); - } - - private bool HasNotTheIgnoreDataMemberWhenSerializingAttribute(MemberInfo member) - { - if (member.GetCustomAttributes(typeof(IgnoreDataMemberWhenSerializingAttribute), true).Any()) - { - return false; - } - - return true; - } - } -} diff --git a/src/Umbraco.Web/WebApi/JsonCamelCaseFormatter.cs b/src/Umbraco.Web/WebApi/JsonCamelCaseFormatter.cs index 5803afc819..912edc1397 100644 --- a/src/Umbraco.Web/WebApi/JsonCamelCaseFormatter.cs +++ b/src/Umbraco.Web/WebApi/JsonCamelCaseFormatter.cs @@ -2,9 +2,7 @@ using System.Linq; using System.Net.Http.Formatting; using System.Web.Http.Controllers; -using Newtonsoft.Json; using Newtonsoft.Json.Serialization; -using Umbraco.Core.Manifest; namespace Umbraco.Web.WebApi { @@ -26,7 +24,7 @@ namespace Umbraco.Web.WebApi { SerializerSettings = { - ContractResolver = new CamelCaseAndDataMemberWhenSerializingContractResolver() + ContractResolver = new CamelCasePropertyNamesContractResolver() } }; controllerSettings.Formatters.Add(jsonFormatter); From fac25b59712c254412c6be035795acc3752c7e35 Mon Sep 17 00:00:00 2001 From: Stephan Date: Mon, 28 Jan 2019 13:04:37 +0100 Subject: [PATCH 318/437] Bugfix --- src/Umbraco.Web/Editors/BackOfficeServerVariables.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs index 07df3a03fa..aa85a020bb 100644 --- a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs +++ b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs @@ -397,6 +397,7 @@ namespace Umbraco.Web.Editors return defaultVals; } + [DataContract] private class PluginTree { [DataMember(Name = "alias")] From 9a0f50291c87bf1a2ac1ac5d860d2e1d5b93742b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Mon, 28 Jan 2019 13:15:40 +0100 Subject: [PATCH 319/437] color adjustments for proposal --- .../src/less/buttons.less | 22 +++++++----- .../application/umb-app-header.less | 5 ++- .../components/application/umb-dashboard.less | 4 +-- .../application/umb-language-picker.less | 15 +++++--- .../src/less/components/editor.less | 11 +++++- .../src/less/components/umb-avatar.less | 10 +++--- .../components/umb-editor-navigation.less | 35 ++++++++++++------- .../src/less/components/umb-tabs.less | 34 ++++++++++++++---- .../src/less/mixins.less | 21 +++++------ .../src/less/sections.less | 2 +- .../src/less/variables.less | 21 ++++++++--- .../editor/umb-editor-content-header.html | 8 ++--- .../components/editor/umb-editor-header.html | 8 ++--- .../components/editor/umb-editor-menu.html | 2 +- 14 files changed, 131 insertions(+), 67 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/buttons.less b/src/Umbraco.Web.UI.Client/src/less/buttons.less index c99b759b59..f1e132dce3 100644 --- a/src/Umbraco.Web.UI.Client/src/less/buttons.less +++ b/src/Umbraco.Web.UI.Client/src/less/buttons.less @@ -176,7 +176,7 @@ input[type="button"] { // Set the backgrounds // ------------------------- .btn-primary { - .buttonBackground(@btnPrimaryBackground, @btnPrimaryBackgroundHighlight); + .buttonBackground(@btnPrimaryBackground, @btnPrimaryBackground); } // Warning appears are orange @@ -199,6 +199,10 @@ input[type="button"] { .btn-action { .buttonBackground(@btnInfoBackground, @btnInfoBackgroundHighlight, @btnInfoType); } +// Made for Umbraco, 2019, used for buttons that has to stand back. +.btn-transparent { + .buttonBackground(@btnWhiteBackground, @btnWhiteBackgroundHighlight, @btnWhiteType); +} // Inverse appears as dark gray .btn-inverse { .buttonBackground(@btnInverseBackground, @btnInverseBackgroundHighlight); @@ -230,25 +234,27 @@ input[type="button"] { background: @green; color: @white; font-weight: bold; - &:hover { + &:hover { background: @green-d1; - } + } } // outlined .btn-outline { - border: 1px solid @gray-8; + border: 1px solid; + border-color: @gray-8; background: @white; - color: @black; + color: @ui-light-type; padding: 5px 13px; + transition: all .2s linear; } .btn-outline:hover, .btn-outline:focus, .btn-outline:active { - border-color: @gray-7; - background: transparent; - color: @black; + border-color: @ui-light-type-hover; + color: @ui-light-type-hover; + background: @white; } // Cross-browser Jank diff --git a/src/Umbraco.Web.UI.Client/src/less/components/application/umb-app-header.less b/src/Umbraco.Web.UI.Client/src/less/components/application/umb-app-header.less index 1e3aa332fa..86ead685b8 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/application/umb-app-header.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/application/umb-app-header.less @@ -1,5 +1,5 @@ .umb-app-header { - background: @blueNight; + background: @blueExtraDark; display: flex; align-items: center; justify-content: space-between; @@ -31,7 +31,7 @@ } .umb-app-header__action-icon { - opacity: 0.6; + opacity: 0.8; color: @white; font-size: 22px; } @@ -40,4 +40,3 @@ .umb-app-header__action a:focus .umb-app-header__action-icon { opacity: 1; } - diff --git a/src/Umbraco.Web.UI.Client/src/less/components/application/umb-dashboard.less b/src/Umbraco.Web.UI.Client/src/less/components/application/umb-dashboard.less index 2a1d5eb6d3..fc6baead4e 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/application/umb-dashboard.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/application/umb-dashboard.less @@ -31,5 +31,5 @@ } .umb-dashboard__header .umb-tabs-nav .umb-tab > a { - padding-bottom: 23px; -} \ No newline at end of file + padding-bottom: 21px; +} diff --git a/src/Umbraco.Web.UI.Client/src/less/components/application/umb-language-picker.less b/src/Umbraco.Web.UI.Client/src/less/components/application/umb-language-picker.less index cf252020ee..b2fb1fa6d6 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/application/umb-language-picker.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/application/umb-language-picker.less @@ -16,14 +16,16 @@ border-bottom: 1px solid @gray-9; height: @editorHeaderHeight; box-sizing: border-box; + color: @ui-light-active-type; } .umb-language-picker__toggle:hover { - background: @gray-10; + //background: @gray-10; + color:@ui-light-active-type-hover; } .umb-language-picker__expand { - color: @gray-6; + //color: @gray-6; font-size: 14px; } @@ -48,9 +50,12 @@ .umb-language-picker__dropdown a:focus { background: @gray-10; text-decoration: none; + color:@ui-light-active-type-hover; } -.umb-language-picker__dropdown-item--current { - background-color: @gray-10; - border-left: 2px solid @ui-active; +.umb-language-picker__dropdown a.umb-language-picker__dropdown-item--current { + //background-color: @gray-10; + padding-left: 16px; + border-left: 4px solid @ui-light-active-border; + color:@ui-light-active-type; } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/editor.less b/src/Umbraco.Web.UI.Client/src/less/components/editor.less index c917b7e031..d091c1a442 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/editor.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/editor.less @@ -65,7 +65,7 @@ .umb-editor-header { background: @white; position: absolute; - padding: 0 20px; + padding-left: 20px; z-index: @zIndexEditor; border-bottom: 1px solid @gray-9; width: 100%; @@ -124,6 +124,15 @@ a.umb-editor-header__close-split-view:hover { color: @black; } +.umb-editor-header { + .btn-transparent { + height:69px; + border-radius: 0; + padding-left: 30px; + padding-right: 30px; + } +} + /* variant switcher */ .umb-variant-switcher__toggle { display: flex; diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-avatar.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-avatar.less index de746090b9..21f4a7bda8 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-avatar.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-avatar.less @@ -70,13 +70,13 @@ } .umb-avatar--primary { - background-color: @turquoise-l1; - color: @white; + background-color: @pinkLight; + color: @blueExtraDark; } .umb-avatar--secondary { - background-color: @purple-l3; - color: @white; + background-color: @pinkLight; + color: @blueExtraDark; } .umb-avatar--success { @@ -114,4 +114,4 @@ a.umb-avatar-btn .umb-avatar span { font-size: 50px; } -/*border-radius: 50%; width: 100px; height: 100px; font-size: 50px; text-align: center; display: flex; align-items: center; justify-content: center; background-color: #F3F3F5; border: 2px dashed #A2A1A6; color: #A2A1A6;*/ \ No newline at end of file +/*border-radius: 50%; width: 100px; height: 100px; font-size: 50px; text-align: center; display: flex; align-items: center; justify-content: center; background-color: #F3F3F5; border: 2px dashed #A2A1A6; color: #A2A1A6;*/ diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-editor-navigation.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-editor-navigation.less index 3875df1ce0..d432310dab 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-editor-navigation.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-editor-navigation.less @@ -10,7 +10,7 @@ cursor: pointer; display: block; padding: 4px 10px 0 10px; - border-bottom: 2px solid transparent; + //border-bottom: 4px solid transparent; min-width: 70px; border-right: 1px solid @gray-9; box-sizing: border-box; @@ -20,6 +20,23 @@ justify-content: center; height: @editorHeaderHeight; position: relative; + + &:hover { + color: @ui-light-active-type-hover !important; + } + + &::after { + content: ""; + height: 0px; + left: 8px; + right: 8px; + background-color: @ui-light-active-border; + position: absolute; + bottom: 0; + border-radius: 3px 3px 0 0; + opacity: 0; + transition: all .2s linear; + } } .umb-sub-views-nav-item:focus { @@ -36,20 +53,12 @@ //border-bottom-color: @ui-active; //background-color: rgba(@ui-active, 0.25); - color: @ui-active-type; - border-bottom-color: @ui-active; - /* + color: @ui-light-active-type; + //border-bottom-color: @ui-active; &::after { - content: ""; + opacity: 1; height: 4px; - background-color: @ui-active; - position: absolute; - bottom: -1px; - border-radius: 3px 3px 0 0; - left: 8px; - right: 8px; } - */ } .show-validation .umb-sub-views-nav-item.-has-error { @@ -69,7 +78,7 @@ right: 6px; min-width: 16px; color: @white; - background-color: @turquoise-d1; + background-color: @ui-active-type; border: 2px solid @white; border-radius: 50%; font-size: 10px; diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-tabs.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-tabs.less index f0f294ae4a..2a5b98df30 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-tabs.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-tabs.less @@ -14,24 +14,42 @@ } .umb-tab > a { + + display: flex; + justify-content: center; + align-items: center; + position: relative; + cursor: pointer; - border-bottom: 2px solid transparent; - color: @ui-action-disgrete; + //border-bottom: 4px solid transparent; + color: @ui-light-type; padding: 5px 20px 15px 20px; transition: color 150ms ease-in-out; &:focus { - color: @ui-action-disgrete-hover; + color: @ui-light-type-hover; } &:hover { - color: @ui-action-disgrete-hover; + color: @ui-light-type-hover; text-decoration: none; } + &::after { + content: ""; + height: 0px; + left: 14px; + right: 14px; + background-color: @ui-light-active-border; + position: absolute; + bottom: 0; + border-radius: 3px 3px 0 0; + opacity: 0; + transition: all .2s linear; + } } .umb-tab--active > a { - color: @ui-active; - border-bottom-color: @ui-active; + color: @ui-light-active-type; + //border-bottom-color: @ui-active; /* &:focus { border-bottom-color: @ui-active; @@ -40,6 +58,10 @@ border-bottom-color: @ui-active-hover; } */ + &::after { + opacity: 1; + height: 4px; + } } .show-validation .umb-tab--error > a, diff --git a/src/Umbraco.Web.UI.Client/src/less/mixins.less b/src/Umbraco.Web.UI.Client/src/less/mixins.less index ffeaae680b..02654459a1 100644 --- a/src/Umbraco.Web.UI.Client/src/less/mixins.less +++ b/src/Umbraco.Web.UI.Client/src/less/mixins.less @@ -515,7 +515,7 @@ // Button backgrounds // ------------------ -.buttonBackground(@startColor, @endColor, @textColor: #fff) { +.buttonBackground(@startColor, @hoverColor: @startColor, @textColor: #fff) { // gradientBar will set the background to a pleasing blend of these, to support IE<=9 //.gradientBar(@startColor, @endColor, @textColor); @@ -523,7 +523,7 @@ border-color: @startColor @startColor darken(@startColor, 15%); border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%); - background-color: @endColor; /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + background-color: @startColor; /* Darken IE7 buttons by default so they stand out more given they won't have borders */ .reset-filter(); .caret { @@ -531,22 +531,23 @@ border-bottom-color: @textColor; } - // button states - &:hover, &:focus, &:active { - background-color: darken(@startColor, 2%); - } - // in these cases the gradient won't cover the background, so we override - &:hover, &:focus, &:active, &.active, &.disabled, &[disabled] { + &:hover, &:focus, &:active, &.active { color: @textColor; - background-color: darken(@endColor, 5%); + background-color: @hoverColor; } - + + &.disabled, &[disabled] { + color: @textColor; + background-color: @gray-4; + } + /* // IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves &:active, &.active { background-color: darken(@endColor, 10%) e("\9"); } + */ } // Navbar vertical align diff --git a/src/Umbraco.Web.UI.Client/src/less/sections.less b/src/Umbraco.Web.UI.Client/src/less/sections.less index 70fb3d353b..c0a95c97c5 100644 --- a/src/Umbraco.Web.UI.Client/src/less/sections.less +++ b/src/Umbraco.Web.UI.Client/src/less/sections.less @@ -28,7 +28,7 @@ ul.sections>li>a { } ul.sections>li>a .section__name { - opacity: 0.6; + opacity: 0.8; transition: opacity .1s linear; } diff --git a/src/Umbraco.Web.UI.Client/src/less/variables.less b/src/Umbraco.Web.UI.Client/src/less/variables.less index a8fdc57a68..a836912041 100644 --- a/src/Umbraco.Web.UI.Client/src/less/variables.less +++ b/src/Umbraco.Web.UI.Client/src/less/variables.less @@ -57,7 +57,7 @@ @yellow-washed: #FFFAEB; @green-d1: #1FB572; -@green: #36B37E;// updated 2019 +@green: #2bc37c;// updated 2019 @green-l1: #4ECF95; @green-l2: #79E1B2; @green-l3: #A6F0CF; @@ -130,6 +130,15 @@ @ui-active: @pinkLight; @ui-active-type: @blueExtraDark; @ui-active-hover: @blueMid; + +@ui-light-border: @pinkLight; +@ui-light-type: @gray-4; +@ui-light-type-hover: @blueMid; + +@ui-light-active-border: @pinkLight; +@ui-light-active-type: @blueExtraDark; +@ui-light-active-type-hover: @blueMid; + @ui-selected: @blueMid;//not used jet. @ui-selected-hover: @blueMid;//not used jet. @@ -142,9 +151,9 @@ @type-white: @u-white; @type-black: @blueNight; -@ui-btn: @brownLight; -@ui-btn-hover: @ui-btn; -@ui-btn-type: @blueExtraDark; +@ui-btn: @blueExtraDark; +@ui-btn-hover: @blueMid; +@ui-btn-type: @white; @ui-btn-positive: @green; @ui-btn-positive-hover: @green; @@ -307,6 +316,10 @@ @btnInfoBackground: @ui-btn;// updated 2019 @btnInfoBackgroundHighlight: @ui-btn-hover;// updated 2019 +@btnWhiteType: @black;// updated 2019 +@btnWhiteBackground: @white;// updated 2019 +@btnWhiteBackgroundHighlight: @white;// updated 2019 + @btnSuccessType: @ui-btn-positive-type;// updated 2019 @btnSuccessBackground: @ui-btn-positive;// updated 2019 @btnSuccessBackgroundHighlight: @ui-btn-positive-hover;// updated 2019 diff --git a/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-content-header.html b/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-content-header.html index dad9dc5ba9..edf04d5297 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-content-header.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-content-header.html @@ -13,7 +13,7 @@
    -
    -
    -
    - + diff --git a/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-header.html b/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-header.html index 25925f42ed..1023953ce0 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-header.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-header.html @@ -23,7 +23,7 @@
    -
    -
    -
    - + diff --git a/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-menu.html b/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-menu.html index 54a33a705f..65935c3795 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-menu.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-menu.html @@ -2,7 +2,7 @@ From f619b03b04b4c0b1c7358b1e3eea422429ffaacb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Mon, 28 Jan 2019 13:17:38 +0100 Subject: [PATCH 320/437] Correct spelling --- .../src/common/directives/components/content/edit.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js index 9e8a66ce5a..fc7fff7e3c 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js @@ -442,7 +442,7 @@ variants: $scope.content.variants, //set a model property for the dialog skipFormValidation: true, //when submitting the overlay form, skip any client side validation submitButtonLabelKey: "content_unpublish", - submitButtonSTYLE: "warning", + submitButtonStyle: "warning", submit: function (model) { model.submitButtonState = "busy"; From 27fd90851752d65c43e0c5a0a2683d492d51fd9a Mon Sep 17 00:00:00 2001 From: Stephan Date: Mon, 28 Jan 2019 14:04:31 +0100 Subject: [PATCH 321/437] Refactor IPublished --- .../PublishedContent/NuCacheTests.cs | 135 +++++++++++++----- .../NuCache/DataSource/CultureVariation.cs | 3 - .../NuCache/PublishedContent.cs | 28 ++-- .../NuCache/PublishedSnapshotService.cs | 21 +-- 4 files changed, 121 insertions(+), 66 deletions(-) diff --git a/src/Umbraco.Tests/PublishedContent/NuCacheTests.cs b/src/Umbraco.Tests/PublishedContent/NuCacheTests.cs index ef37a822c1..cd5273cce7 100644 --- a/src/Umbraco.Tests/PublishedContent/NuCacheTests.cs +++ b/src/Umbraco.Tests/PublishedContent/NuCacheTests.cs @@ -20,6 +20,7 @@ using Umbraco.Tests.Testing.Objects; using Umbraco.Tests.Testing.Objects.Accessors; using Umbraco.Web; using Umbraco.Web.Cache; +using Umbraco.Web.PublishedCache; using Umbraco.Web.PublishedCache.NuCache; using Umbraco.Web.PublishedCache.NuCache.DataSource; using Umbraco.Web.Routing; @@ -29,12 +30,13 @@ namespace Umbraco.Tests.PublishedContent [TestFixture] public class NuCacheTests { - [Test] - public void StandaloneVariations() - { - // this test implements a full standalone NuCache (based upon a test IDataSource, does not - // use any local db files, does not rely on any database) - and tests variations + private IPublishedSnapshotService _snapshotService; + private IVariationContextAccessor _variationAccesor; + private ContentType _contentType; + private PropertyType _propertyType; + private void Init() + { Current.Reset(); Current.UnlockConfigs(); Current.Configs.Add(SettingsForTests.GenerateMockUmbracoSettings); @@ -46,20 +48,39 @@ namespace Umbraco.Tests.PublishedContent { ContentTypeId = 2, Node = new ContentNode(1, Guid.NewGuid(), 0, "-1,1", 0, -1, DateTime.Now, 0), - DraftData = new ContentData { Name="It Works2!", Published = false, TemplateId = 0, VersionId = 2, VersionDate = DateTime.Now, WriterId = 0, + DraftData = new ContentData + { + Name = "It Works2!", + Published = false, + TemplateId = 0, + VersionId = 2, + VersionDate = DateTime.Now, + WriterId = 0, Properties = new Dictionary { { "prop", new[] { new PropertyData { Culture = "", Segment = "", Value = "val2" }, new PropertyData { Culture = "fr-FR", Segment = "", Value = "val-fr2" }, - new PropertyData { Culture = "en-UK", Segment = "", Value = "val-uk2" } + new PropertyData { Culture = "en-UK", Segment = "", Value = "val-uk2" }, + new PropertyData { Culture = "dk-DA", Segment = "", Value = "val-da2" }, + new PropertyData { Culture = "de-DE", Segment = "", Value = "val-de2" } } } }, CultureInfos = new Dictionary { - { "fr-FR", new CultureVariation { Name = "name-fr2", Date = new DateTime(2018, 01, 03, 01, 00, 00) } }, - { "en-UK", new CultureVariation { Name = "name-uk2", Date = new DateTime(2018, 01, 04, 01, 00, 00) } } + // draft data = everything, and IsDraft indicates what's edited + { "fr-FR", new CultureVariation { Name = "name-fr2", IsDraft = true, Date = new DateTime(2018, 01, 03, 01, 00, 00) } }, + { "en-UK", new CultureVariation { Name = "name-uk2", IsDraft = true, Date = new DateTime(2018, 01, 04, 01, 00, 00) } }, + { "dk-DA", new CultureVariation { Name = "name-da2", IsDraft = true, Date = new DateTime(2018, 01, 05, 01, 00, 00) } }, + { "de-DE", new CultureVariation { Name = "name-de1", IsDraft = false, Date = new DateTime(2018, 01, 02, 01, 00, 00) } } } }, - PublishedData = new ContentData { Name="It Works1!", Published = true, TemplateId = 0, VersionId = 1, VersionDate = DateTime.Now, WriterId = 0, + PublishedData = new ContentData + { + Name = "It Works1!", + Published = true, + TemplateId = 0, + VersionId = 1, + VersionDate = DateTime.Now, + WriterId = 0, Properties = new Dictionary { { "prop", new[] { new PropertyData { Culture = "", Segment = "", Value = "val1" }, @@ -68,8 +89,10 @@ namespace Umbraco.Tests.PublishedContent } } }, CultureInfos = new Dictionary { - { "fr-FR", new CultureVariation { Name = "name-fr1", Date = new DateTime(2018, 01, 01, 01, 00, 00) } }, - { "en-UK", new CultureVariation { Name = "name-uk1", Date = new DateTime(2018, 01, 02, 01, 00, 00) } } + // published data = only what's actually published, and IsDraft has to be false + { "fr-FR", new CultureVariation { Name = "name-fr1", IsDraft = false, Date = new DateTime(2018, 01, 01, 01, 00, 00) } }, + { "en-UK", new CultureVariation { Name = "name-uk1", IsDraft = false, Date = new DateTime(2018, 01, 02, 01, 00, 00) } }, + { "de-DE", new CultureVariation { Name = "name-de1", IsDraft = false, Date = new DateTime(2018, 01, 02, 01, 00, 00) } } } } }; @@ -88,13 +111,13 @@ namespace Umbraco.Tests.PublishedContent dataType }; - var propertyType = new PropertyType("Umbraco.Void.Editor", ValueStorageType.Nvarchar) { Alias = "prop", DataTypeId = 3, Variations = ContentVariation.Culture }; - var contentType = new ContentType(-1) { Id = 2, Alias = "alias-ct", Variations = ContentVariation.Culture }; - contentType.AddPropertyType(propertyType); + _propertyType = new PropertyType("Umbraco.Void.Editor", ValueStorageType.Nvarchar) { Alias = "prop", DataTypeId = 3, Variations = ContentVariation.Culture }; + _contentType = new ContentType(-1) { Id = 2, Alias = "alias-ct", Variations = ContentVariation.Culture }; + _contentType.AddPropertyType(_propertyType); var contentTypes = new[] { - contentType + _contentType }; var contentTypeService = Mock.Of(); @@ -106,10 +129,10 @@ namespace Umbraco.Tests.PublishedContent // create a service context var serviceContext = ServiceContext.CreatePartial( - dataTypeService : dataTypeService, + dataTypeService: dataTypeService, memberTypeService: Mock.Of(), memberService: Mock.Of(), - contentTypeService : contentTypeService, + contentTypeService: contentTypeService, localizationService: Mock.Of() ); @@ -132,18 +155,18 @@ namespace Umbraco.Tests.PublishedContent dataTypeService); // create a variation accessor - var variationAccessor = new TestVariationContextAccessor(); + _variationAccesor = new TestVariationContextAccessor(); // at last, create the complete NuCache snapshot service! var options = new PublishedSnapshotService.Options { IgnoreLocalDb = true }; - var snapshotService = new PublishedSnapshotService(options, + _snapshotService = new PublishedSnapshotService(options, null, runtime, serviceContext, contentTypeFactory, null, new TestPublishedSnapshotAccessor(), - variationAccessor, + _variationAccesor, Mock.Of(), scopeProvider, Mock.Of(), @@ -155,12 +178,21 @@ namespace Umbraco.Tests.PublishedContent new SiteDomainHelper(), Mock.Of()); - // get a snapshot, get a published content - var snapshot = snapshotService.CreatePublishedSnapshot(previewToken: null); - var publishedContent = snapshot.Content.GetById(1); - // invariant is the current default - variationAccessor.VariationContext = new VariationContext(); + _variationAccesor.VariationContext = new VariationContext(); + } + + [Test] + public void StandaloneVariations() + { + // this test implements a full standalone NuCache (based upon a test IDataSource, does not + // use any local db files, does not rely on any database) - and tests variations + + Init(); + + // get a snapshot, get a published content + var snapshot = _snapshotService.CreatePublishedSnapshot(previewToken: null); + var publishedContent = snapshot.Content.GetById(1); Assert.IsNotNull(publishedContent); Assert.AreEqual("It Works1!", publishedContent.Name); @@ -181,31 +213,31 @@ namespace Umbraco.Tests.PublishedContent Assert.AreEqual("name-uk2", draftContent.GetCulture("en-UK").Name); // now french is default - variationAccessor.VariationContext = new VariationContext("fr-FR"); + _variationAccesor.VariationContext = new VariationContext("fr-FR"); Assert.AreEqual("val-fr1", publishedContent.Value("prop")); Assert.AreEqual("name-fr1", publishedContent.GetCulture().Name); Assert.AreEqual("name-fr1", publishedContent.Name); Assert.AreEqual(new DateTime(2018, 01, 01, 01, 00, 00), publishedContent.GetCulture().Date); // now uk is default - variationAccessor.VariationContext = new VariationContext("en-UK"); + _variationAccesor.VariationContext = new VariationContext("en-UK"); Assert.AreEqual("val-uk1", publishedContent.Value("prop")); Assert.AreEqual("name-uk1", publishedContent.GetCulture().Name); Assert.AreEqual("name-uk1", publishedContent.Name); Assert.AreEqual(new DateTime(2018, 01, 02, 01, 00, 00), publishedContent.GetCulture().Date); - // invariant needs to be retrieved explicitely, when it's not default + // invariant needs to be retrieved explicitly, when it's not default Assert.AreEqual("val1", publishedContent.Value("prop", culture: "")); // but, // if the content type / property type does not vary, then it's all invariant again // modify the content type and property type, notify the snapshot service - contentType.Variations = ContentVariation.Nothing; - propertyType.Variations = ContentVariation.Nothing; - snapshotService.Notify(new[] { new ContentTypeCacheRefresher.JsonPayload("IContentType", publishedContent.ContentType.Id, ContentTypeChangeTypes.RefreshMain) }); + _contentType.Variations = ContentVariation.Nothing; + _propertyType.Variations = ContentVariation.Nothing; + _snapshotService.Notify(new[] { new ContentTypeCacheRefresher.JsonPayload("IContentType", publishedContent.ContentType.Id, ContentTypeChangeTypes.RefreshMain) }); // get a new snapshot (nothing changed in the old one), get the published content again - var anotherSnapshot = snapshotService.CreatePublishedSnapshot(previewToken: null); + var anotherSnapshot = _snapshotService.CreatePublishedSnapshot(previewToken: null); var againContent = anotherSnapshot.Content.GetById(1); Assert.AreEqual(ContentVariation.Nothing, againContent.ContentType.Variations); @@ -215,5 +247,42 @@ namespace Umbraco.Tests.PublishedContent Assert.AreEqual("It Works1!", againContent.Name); Assert.AreEqual("val1", againContent.Value("prop")); } + + [Test] + public void IsDraftIsPublished() + { + Init(); + + // get the published published content + var s = _snapshotService.CreatePublishedSnapshot(null); + var c1 = s.Content.GetById(1); + + // published content = nothing is draft here + Assert.IsFalse(c1.IsDraft("fr-FR")); + Assert.IsFalse(c1.IsDraft("en-UK")); + Assert.IsFalse(c1.IsDraft("dk-DA")); + Assert.IsFalse(c1.IsDraft("de-DE")); + + // and only those with published name, are published + Assert.IsTrue(c1.IsPublished("fr-FR")); + Assert.IsTrue(c1.IsPublished("en-UK")); + Assert.IsFalse(c1.IsDraft("dk-DA")); + Assert.IsTrue(c1.IsPublished("de-DE")); + + // get the draft published content + var c2 = s.Content.GetById(true, 1); + + // draft content = we have drafts + Assert.IsTrue(c2.IsDraft("fr-FR")); + Assert.IsTrue(c2.IsDraft("en-UK")); + Assert.IsTrue(c2.IsDraft("dk-DA")); + Assert.IsFalse(c2.IsDraft("de-DE")); // except for the one that does not + + // and only those with published name, are published + Assert.IsTrue(c2.IsPublished("fr-FR")); + Assert.IsTrue(c2.IsPublished("en-UK")); + Assert.IsFalse(c2.IsPublished("dk-DA")); + Assert.IsTrue(c2.IsPublished("de-DE")); + } } } diff --git a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/CultureVariation.cs b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/CultureVariation.cs index 27bae6bf39..c6e603f5a9 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/CultureVariation.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/CultureVariation.cs @@ -16,8 +16,5 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource [JsonProperty("isDraft")] public bool IsDraft { get; set; } - - [JsonProperty("isPublished")] - public bool IsPublished { get; set; } } } diff --git a/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs b/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs index caecb4e053..ced655ab43 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Linq; using Umbraco.Core; using Umbraco.Core.Cache; -using Umbraco.Core.Models; using Umbraco.Core.Models.PublishedContent; using Umbraco.Web.Composing; using Umbraco.Web.Models; @@ -296,27 +295,26 @@ namespace Umbraco.Web.PublishedCache.NuCache /// public override bool IsPublished(string culture = null) { - if (!IsDraft(culture)) - { - return true; - } + // whether we are the 'draft' or 'published' content, need to determine whether + // there is a 'published' version for the specified culture (or at all, for + // invariant content items) + // if there is no 'published' published content, no culture can be published + var hasPublished = _contentNode.Published != null; + if (!hasPublished) + return false; + + // if there is a 'published' published content, and does not vary = published if (!ContentType.VariesByCulture()) - { - return _contentData.Published; - } + return true; // handle context culture if (culture == null) culture = VariationContextAccessor?.VariationContext?.Culture ?? ""; - if (_contentData.CultureInfos.TryGetValue(culture, out var variant)) - { - return variant.IsPublished; - } - - return false; - + // there is a 'published' published content, and varies + // = depends on the culture + return ((PublishedContent) _contentNode.Published)._contentData.CultureInfos.ContainsKey(culture); } #endregion diff --git a/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs b/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs index fbb6ac21e7..e1cd1ec764 100755 --- a/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs @@ -1202,25 +1202,16 @@ namespace Umbraco.Web.PublishedCache.NuCache // sanitize - names should be ok but ... never knows if (content.GetContentType().VariesByCulture()) { - - IReadOnlyDictionary infos = content.CultureInfos; - var publishedCultures = new HashSet(); - - if (content is IContent document) - { - if (published) - { - infos = document.PublishCultureInfos; - } - - publishedCultures = new HashSet(document.PublishedCultures); - } - + var infos = content is IContent document + ? (published + ? document.PublishCultureInfos + : document.CultureInfos) + : content.CultureInfos; foreach (var (culture, info) in infos) { var cultureIsDraft = !published && content is IContent d && d.IsCultureEdited(culture); - cultureData[culture] = new CultureVariation { Name = info.Name, Date = content.GetUpdateDate(culture) ?? DateTime.MinValue, IsDraft = cultureIsDraft, IsPublished = publishedCultures.Contains(culture)}; + cultureData[culture] = new CultureVariation { Name = info.Name, Date = content.GetUpdateDate(culture) ?? DateTime.MinValue, IsDraft = cultureIsDraft }; } } From 9b4b8b9d868c5f33c9034185c4018cb89ee75cb7 Mon Sep 17 00:00:00 2001 From: Stephan Date: Mon, 28 Jan 2019 14:15:47 +0100 Subject: [PATCH 322/437] Cleanup NuCache/PublishedContent --- .../PublishedCache/NuCache/ContentCache.cs | 8 ++-- .../PublishedCache/NuCache/ContentNode.cs | 39 +++++++++++-------- .../PublishedCache/NuCache/ContentStore.cs | 2 +- .../PublishedCache/NuCache/MediaCache.cs | 6 +-- .../NuCache/PublishedContent.cs | 4 +- 5 files changed, 33 insertions(+), 26 deletions(-) diff --git a/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs b/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs index cab6e7d759..74cf960170 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs @@ -243,7 +243,7 @@ namespace Umbraco.Web.PublishedCache.NuCache var n = _snapshot.Get(contentId); if (n == null) return false; - return preview || n.Published != null; + return preview || n.PublishedModel != null; } public override IEnumerable GetAtRoot(bool preview) @@ -280,8 +280,8 @@ namespace Umbraco.Web.PublishedCache.NuCache // both .Draft and .Published cannot be null at the same time return preview - ? node.Draft ?? GetPublishedContentAsDraft(node.Published) - : node.Published; + ? node.DraftModel ?? GetPublishedContentAsDraft(node.PublishedModel) + : node.PublishedModel; } // gets a published content as a previewing draft, if preview is true @@ -302,7 +302,7 @@ namespace Umbraco.Web.PublishedCache.NuCache { return preview ? _snapshot.IsEmpty == false - : _snapshot.GetAtRoot().Any(x => x.Published != null); + : _snapshot.GetAtRoot().Any(x => x.PublishedModel != null); } #endregion diff --git a/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs b/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs index 647adaad91..4ce6021801 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs @@ -67,9 +67,9 @@ namespace Umbraco.Web.PublishedCache.NuCache throw new ArgumentException("Both draftData and publishedData cannot be null at the same time."); if (draftData != null) - Draft = new PublishedContent(this, draftData, publishedSnapshotAccessor, variationContextAccessor).CreateModel(); + DraftModel = new PublishedContent(this, draftData, publishedSnapshotAccessor, variationContextAccessor).CreateModel(); if (publishedData != null) - Published = new PublishedContent(this, publishedData, publishedSnapshotAccessor, variationContextAccessor).CreateModel(); + PublishedModel = new PublishedContent(this, publishedData, publishedSnapshotAccessor, variationContextAccessor).CreateModel(); } // clone parent @@ -88,11 +88,11 @@ namespace Umbraco.Web.PublishedCache.NuCache CreateDate = origin.CreateDate; CreatorId = origin.CreatorId; - var originDraft = origin.Draft == null ? null : PublishedContent.UnwrapIPublishedContent(origin.Draft); - var originPublished = origin.Published == null ? null : PublishedContent.UnwrapIPublishedContent(origin.Published); + var originDraft = origin.DraftModel == null ? null : PublishedContent.UnwrapIPublishedContent(origin.DraftModel); + var originPublished = origin.PublishedModel == null ? null : PublishedContent.UnwrapIPublishedContent(origin.PublishedModel); - Draft = originDraft == null ? null : new PublishedContent(this, originDraft).CreateModel(); - Published = originPublished == null ? null : new PublishedContent(this, originPublished).CreateModel(); + DraftModel = originDraft == null ? null : new PublishedContent(this, originDraft).CreateModel(); + PublishedModel = originPublished == null ? null : new PublishedContent(this, originPublished).CreateModel(); ChildContentIds = new List(origin.ChildContentIds); // needs to be *another* list } @@ -110,11 +110,13 @@ namespace Umbraco.Web.PublishedCache.NuCache CreateDate = origin.CreateDate; CreatorId = origin.CreatorId; - var originDraft = origin.Draft == null ? null : PublishedContent.UnwrapIPublishedContent(origin.Draft); - var originPublished = origin.Published == null ? null : PublishedContent.UnwrapIPublishedContent(origin.Published); + var originDraft = origin.DraftModel == null ? null : PublishedContent.UnwrapIPublishedContent(origin.DraftModel); + var originPublished = origin.PublishedModel == null ? null : PublishedContent.UnwrapIPublishedContent(origin.PublishedModel); - Draft = originDraft == null ? null : new PublishedContent(this, originDraft._contentData, publishedSnapshotAccessor, variationContextAccessor).CreateModel(); - Published = originPublished == null ? null : new PublishedContent(this, originPublished._contentData, publishedSnapshotAccessor, variationContextAccessor).CreateModel(); + DraftContent = originDraft == null ? null : new PublishedContent(this, originDraft._contentData, publishedSnapshotAccessor, variationContextAccessor); + DraftModel = DraftContent?.CreateModel(); + PublishedContent = originPublished == null ? null : new PublishedContent(this, originPublished._contentData, publishedSnapshotAccessor, variationContextAccessor); + PublishedModel = PublishedContent?.CreateModel(); ChildContentIds = origin.ChildContentIds; // can be the *same* list } @@ -132,10 +134,15 @@ namespace Umbraco.Web.PublishedCache.NuCache public readonly DateTime CreateDate; public readonly int CreatorId; + // draft and published version (either can be null, but not both) + // are the direct PublishedContent instances + public PublishedContent DraftContent; + public PublishedContent PublishedContent; + // draft and published version (either can be null, but not both) // are models not direct PublishedContent instances - public IPublishedContent Draft; - public IPublishedContent Published; + public IPublishedContent DraftModel; + public IPublishedContent PublishedModel; public ContentNode CloneParent(IPublishedSnapshotAccessor publishedSnapshotAccessor) { @@ -144,13 +151,13 @@ namespace Umbraco.Web.PublishedCache.NuCache public ContentNodeKit ToKit() { - var draft = Draft is PublishedContentModel draftModel + var draft = DraftModel is PublishedContentModel draftModel ? (PublishedContent) draftModel.Unwrap() - : (PublishedContent) Draft; + : (PublishedContent) DraftModel; - var published = Published is PublishedContentModel publishedModel + var published = PublishedModel is PublishedContentModel publishedModel ? (PublishedContent) publishedModel.Unwrap() - : (PublishedContent) Published; + : (PublishedContent) PublishedModel; return new ContentNodeKit { diff --git a/src/Umbraco.Web/PublishedCache/NuCache/ContentStore.cs b/src/Umbraco.Web/PublishedCache/NuCache/ContentStore.cs index 353ac83eda..b14a8041bd 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/ContentStore.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/ContentStore.cs @@ -652,7 +652,7 @@ namespace Umbraco.Web.PublishedCache.NuCache return true; var link = GetParentLink(kit.Node); var node = link?.Value; - return node?.Published != null; + return node?.PublishedModel != null; } private void AddToParentLocked(ContentNode content) diff --git a/src/Umbraco.Web/PublishedCache/NuCache/MediaCache.cs b/src/Umbraco.Web/PublishedCache/NuCache/MediaCache.cs index 28c7c38c36..7a22366165 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/MediaCache.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/MediaCache.cs @@ -34,14 +34,14 @@ namespace Umbraco.Web.PublishedCache.NuCache { // ignore preview, there's only draft for media var n = _snapshot.Get(contentId); - return n?.Published; + return n?.PublishedModel; } public override IPublishedContent GetById(bool preview, Guid contentId) { // ignore preview, there's only draft for media var n = _snapshot.Get(contentId); - return n?.Published; + return n?.PublishedModel; } public override bool HasById(bool preview, int contentId) @@ -73,7 +73,7 @@ namespace Umbraco.Web.PublishedCache.NuCache var c = _snapshot.GetAtRoot(); // ignore preview, there's only draft for media - return c.Select(n => n.Published); + return c.Select(n => n.PublishedModel); } public override bool HasContent(bool preview) diff --git a/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs b/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs index ced655ab43..b9d74e7f15 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs @@ -300,7 +300,7 @@ namespace Umbraco.Web.PublishedCache.NuCache // invariant content items) // if there is no 'published' published content, no culture can be published - var hasPublished = _contentNode.Published != null; + var hasPublished = _contentNode.PublishedModel != null; if (!hasPublished) return false; @@ -314,7 +314,7 @@ namespace Umbraco.Web.PublishedCache.NuCache // there is a 'published' published content, and varies // = depends on the culture - return ((PublishedContent) _contentNode.Published)._contentData.CultureInfos.ContainsKey(culture); + return _contentNode.PublishedContent._contentData.CultureInfos.ContainsKey(culture); } #endregion From 9eabc1fb3f7ca0d55af2ea636e0f52fd8f3e9b82 Mon Sep 17 00:00:00 2001 From: Stephan Date: Mon, 28 Jan 2019 16:22:40 +0100 Subject: [PATCH 323/437] More NuCache/PublishedContent cleanup --- .../PublishedCache/NuCache/ContentNode.cs | 8 ++-- .../NuCache/PublishedContent.cs | 37 +++++++++---------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs b/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs index 4ce6021801..29749ad51b 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs @@ -113,9 +113,9 @@ namespace Umbraco.Web.PublishedCache.NuCache var originDraft = origin.DraftModel == null ? null : PublishedContent.UnwrapIPublishedContent(origin.DraftModel); var originPublished = origin.PublishedModel == null ? null : PublishedContent.UnwrapIPublishedContent(origin.PublishedModel); - DraftContent = originDraft == null ? null : new PublishedContent(this, originDraft._contentData, publishedSnapshotAccessor, variationContextAccessor); + DraftContent = originDraft == null ? null : new PublishedContent(this, originDraft.ContentData, publishedSnapshotAccessor, variationContextAccessor); DraftModel = DraftContent?.CreateModel(); - PublishedContent = originPublished == null ? null : new PublishedContent(this, originPublished._contentData, publishedSnapshotAccessor, variationContextAccessor); + PublishedContent = originPublished == null ? null : new PublishedContent(this, originPublished.ContentData, publishedSnapshotAccessor, variationContextAccessor); PublishedModel = PublishedContent?.CreateModel(); ChildContentIds = origin.ChildContentIds; // can be the *same* list @@ -164,8 +164,8 @@ namespace Umbraco.Web.PublishedCache.NuCache Node = this, ContentTypeId = ContentType.Id, - DraftData = draft?._contentData, - PublishedData = published?._contentData + DraftData = draft?.ContentData, + PublishedData = published?.ContentData }; } } diff --git a/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs b/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs index b9d74e7f15..522104c2f9 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs @@ -14,9 +14,6 @@ namespace Umbraco.Web.PublishedCache.NuCache { private readonly IPublishedSnapshotAccessor _publishedSnapshotAccessor; private readonly ContentNode _contentNode; - // ReSharper disable once InconsistentNaming - internal readonly ContentData _contentData; // internal for ContentNode cloning - private readonly string _urlSegment; #region Constructors @@ -24,12 +21,12 @@ namespace Umbraco.Web.PublishedCache.NuCache public PublishedContent(ContentNode contentNode, ContentData contentData, IPublishedSnapshotAccessor publishedSnapshotAccessor, IVariationContextAccessor variationContextAccessor) { _contentNode = contentNode; - _contentData = contentData; + ContentData = contentData; _publishedSnapshotAccessor = publishedSnapshotAccessor; VariationContextAccessor = variationContextAccessor; - _urlSegment = _contentData.Name.ToUrlSegment(); - IsPreviewing = _contentData.Published == false; + _urlSegment = ContentData.Name.ToUrlSegment(); + IsPreviewing = ContentData.Published == false; var properties = new List(); foreach (var propertyType in _contentNode.ContentType.PropertyTypes) @@ -70,7 +67,7 @@ namespace Umbraco.Web.PublishedCache.NuCache _contentNode = contentNode; _publishedSnapshotAccessor = origin._publishedSnapshotAccessor; VariationContextAccessor = origin.VariationContextAccessor; - _contentData = origin._contentData; + ContentData = origin.ContentData; _urlSegment = origin._urlSegment; IsPreviewing = origin.IsPreviewing; @@ -87,7 +84,7 @@ namespace Umbraco.Web.PublishedCache.NuCache _publishedSnapshotAccessor = origin._publishedSnapshotAccessor; VariationContextAccessor = origin.VariationContextAccessor; _contentNode = origin._contentNode; - _contentData = origin._contentData; + ContentData = origin.ContentData; _urlSegment = origin._urlSegment; IsPreviewing = true; @@ -169,6 +166,8 @@ namespace Umbraco.Web.PublishedCache.NuCache #region PublishedContent + internal ContentData ContentData { get; } + /// public override int Id => _contentNode.Id; @@ -178,11 +177,11 @@ namespace Umbraco.Web.PublishedCache.NuCache get { if (!ContentType.VariesByCulture()) - return _contentData.Name; + return ContentData.Name; var culture = VariationContextAccessor?.VariationContext?.Culture ?? ""; if (culture == "") - return _contentData.Name; + return ContentData.Name; return Cultures.TryGetValue(culture, out var cultureInfos) ? cultureInfos.Name : null; } @@ -214,7 +213,7 @@ namespace Umbraco.Web.PublishedCache.NuCache public override string Path => _contentNode.Path; /// - public override int? TemplateId => _contentData.TemplateId; + public override int? TemplateId => ContentData.TemplateId; /// public override int CreatorId => _contentNode.CreatorId; @@ -226,13 +225,13 @@ namespace Umbraco.Web.PublishedCache.NuCache public override DateTime CreateDate => _contentNode.CreateDate; /// - public override int WriterId => _contentData.WriterId; + public override int WriterId => ContentData.WriterId; /// - public override string WriterName => GetProfileNameById(_contentData.WriterId); + public override string WriterName => GetProfileNameById(ContentData.WriterId); /// - public override DateTime UpdateDate => _contentData.VersionDate; + public override DateTime UpdateDate => ContentData.VersionDate; private IReadOnlyDictionary _cultureInfos; @@ -262,9 +261,9 @@ namespace Umbraco.Web.PublishedCache.NuCache if (_cultureInfos != null) return _cultureInfos; - if (_contentData.CultureInfos == null) + if (ContentData.CultureInfos == null) throw new Exception("oops: _contentDate.CultureInfos is null."); - return _cultureInfos = _contentData.CultureInfos + return _cultureInfos = ContentData.CultureInfos .ToDictionary(x => x.Key, x => new PublishedCultureInfo(x.Key, x.Value.Name, x.Value.Date), StringComparer.OrdinalIgnoreCase); } } @@ -276,7 +275,7 @@ namespace Umbraco.Web.PublishedCache.NuCache public override bool IsDraft(string culture = null) { // if this is the 'published' published content, nothing can be draft - if (_contentData.Published) + if (ContentData.Published) return false; // not the 'published' published content, and does not vary = must be draft @@ -289,7 +288,7 @@ namespace Umbraco.Web.PublishedCache.NuCache // not the 'published' published content, and varies // = depends on the culture - return _contentData.CultureInfos.TryGetValue(culture, out var cvar) && cvar.IsDraft; + return ContentData.CultureInfos.TryGetValue(culture, out var cvar) && cvar.IsDraft; } /// @@ -314,7 +313,7 @@ namespace Umbraco.Web.PublishedCache.NuCache // there is a 'published' published content, and varies // = depends on the culture - return _contentNode.PublishedContent._contentData.CultureInfos.ContainsKey(culture); + return _contentNode.PublishedContent.ContentData.CultureInfos.ContainsKey(culture); } #endregion From 4a5eca3c6a8a779cb0262dc6a05bfb8ea24880fe Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Mon, 28 Jan 2019 15:39:49 +0000 Subject: [PATCH 324/437] Adds in Composition Extension Methods to allow Setting the LogViewer without having to know the composition.RegisterUnique syntax --- .../Components/CompositionExtensions.cs | 32 +++++++++++++++++++ .../Logging/Viewer/LogViewerComposer.cs | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Components/CompositionExtensions.cs b/src/Umbraco.Core/Components/CompositionExtensions.cs index 2aef865994..4e3e4816e5 100644 --- a/src/Umbraco.Core/Components/CompositionExtensions.cs +++ b/src/Umbraco.Core/Components/CompositionExtensions.cs @@ -10,6 +10,7 @@ using Umbraco.Core.PropertyEditors; using Umbraco.Core.Strings; using Umbraco.Core.Sync; using Umbraco.Core._Legacy.PackageActions; +using Umbraco.Core.Logging.Viewer; namespace Umbraco.Core.Components { @@ -297,6 +298,37 @@ namespace Umbraco.Core.Components public static void SetMediaFileSystem(this Composition composition, Func filesystemFactory) => composition.RegisterUniqueFor(_ => filesystemFactory()); + /// + /// Sets the log viewer. + /// + /// The type of the log viewer. + /// The composition. + public static void SetLogViewer(this Composition composition) + where T : ILogViewer + { + composition.RegisterUnique(); + } + + /// + /// Sets the log viewer. + /// + /// The composition. + /// A function creating a log viewer. + public static void SetLogViewer(this Composition composition, Func factory) + { + composition.RegisterUnique(factory); + } + + /// + /// Sets the log viewer. + /// + /// A composition. + /// A log viewer. + public static void SetLogViewer(this Composition composition, ILogViewer viewer) + { + composition.RegisterUnique(_ => viewer); + } + #endregion } } diff --git a/src/Umbraco.Core/Logging/Viewer/LogViewerComposer.cs b/src/Umbraco.Core/Logging/Viewer/LogViewerComposer.cs index f3d1b5137f..5ddcb01078 100644 --- a/src/Umbraco.Core/Logging/Viewer/LogViewerComposer.cs +++ b/src/Umbraco.Core/Logging/Viewer/LogViewerComposer.cs @@ -8,7 +8,7 @@ namespace Umbraco.Core.Logging.Viewer { public void Compose(Composition composition) { - composition.RegisterUnique(_ => new JsonLogViewer()); + composition.SetLogViewer(_ => new JsonLogViewer()); } } } From 052cee31b30c56ebc8996daf73076d2597dec22d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Mon, 28 Jan 2019 21:36:04 +0100 Subject: [PATCH 325/437] color corrections for pink theme --- .../components/tree/umbtree.directive.js | 12 ++++- .../src/less/buttons.less | 10 ++-- .../src/less/canvas-designer.less | 4 +- .../components/application/umb-dashboard.less | 2 +- .../application/umb-language-picker.less | 17 ++++--- .../src/less/components/editor.less | 50 +++++++++++++------ .../src/less/components/tree/umb-actions.less | 2 +- .../less/components/tree/umb-tree-root.less | 1 - .../src/less/components/tree/umb-tree.less | 41 +++++++++++---- .../components/umb-editor-navigation.less | 4 +- .../less/components/umb-group-builder.less | 6 +-- .../src/less/components/umb-node-preview.less | 4 +- .../src/less/components/umb-tabs.less | 2 +- .../src/less/listview.less | 8 --- .../src/less/mixins.less | 4 +- src/Umbraco.Web.UI.Client/src/less/navs.less | 6 +++ .../src/less/property-editors.less | 4 +- .../src/less/variables.less | 45 +++++++++++------ .../src/views/components/content/edit.html | 26 +++++----- .../editor/umb-editor-content-header.html | 2 +- 20 files changed, 161 insertions(+), 89 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js index c3243993c1..06513c9c66 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js @@ -302,8 +302,18 @@ function umbTreeDirective($q, $rootScope, treeService, notificationsService, use // TODO: This is called constantly because as a method in a template it's re-evaluated pretty much all the time // it would be better if we could cache the processing. The problem is that some of these things are dynamic. - + var css = []; + if (node == $scope.currentNode) { + css.push("current"); + } + if (node.hasChildren) { + css.push("has-children"); + } + if (node.deleteAnimations) { + css.push("umb-tree-item--deleted"); + } + if (node.cssClasses) { _.each(node.cssClasses, function (c) { css.push(c); diff --git a/src/Umbraco.Web.UI.Client/src/less/buttons.less b/src/Umbraco.Web.UI.Client/src/less/buttons.less index f1e132dce3..2440aaa738 100644 --- a/src/Umbraco.Web.UI.Client/src/less/buttons.less +++ b/src/Umbraco.Web.UI.Client/src/less/buttons.less @@ -193,15 +193,15 @@ input[type="button"] { } // Info appears as a neutral blue .btn-info { - .buttonBackground(@btnInfoBackground, @btnInfoBackgroundHighlight, @btnInfoType); + .buttonBackground(@sand-5, @blueDark, @blueExtraDark, @u-white); } // Made for Umbraco, 2019 .btn-action { - .buttonBackground(@btnInfoBackground, @btnInfoBackgroundHighlight, @btnInfoType); + .buttonBackground(@blueExtraDark, @blueDark, @pinkLight, @u-white); } // Made for Umbraco, 2019, used for buttons that has to stand back. .btn-transparent { - .buttonBackground(@btnWhiteBackground, @btnWhiteBackgroundHighlight, @btnWhiteType); + .buttonBackground(@btnWhiteBackground, @btnWhiteBackgroundHighlight, @btnWhiteType, @btnWhiteTypeHover); } // Inverse appears as dark gray .btn-inverse { @@ -242,9 +242,9 @@ input[type="button"] { // outlined .btn-outline { border: 1px solid; - border-color: @gray-8; + border-color: @blueExtraDark; background: @white; - color: @ui-light-type; + color: @blueExtraDark; padding: 5px 13px; transition: all .2s linear; } diff --git a/src/Umbraco.Web.UI.Client/src/less/canvas-designer.less b/src/Umbraco.Web.UI.Client/src/less/canvas-designer.less index 4d57f20063..a144336a54 100644 --- a/src/Umbraco.Web.UI.Client/src/less/canvas-designer.less +++ b/src/Umbraco.Web.UI.Client/src/less/canvas-designer.less @@ -207,14 +207,14 @@ a, a:hover{ clear: both; font-weight: normal; line-height: 20px; - color: #343434; + color: black; white-space: nowrap; cursor:pointer; } .dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus, .dropdown-submenu:hover > a, .dropdown-submenu:focus > a { color: #000000; - background: #f8f8f8; + background: #e4e0dd; } /****************************/ diff --git a/src/Umbraco.Web.UI.Client/src/less/components/application/umb-dashboard.less b/src/Umbraco.Web.UI.Client/src/less/components/application/umb-dashboard.less index fc6baead4e..3257d7b93f 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/application/umb-dashboard.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/application/umb-dashboard.less @@ -31,5 +31,5 @@ } .umb-dashboard__header .umb-tabs-nav .umb-tab > a { - padding-bottom: 21px; + padding-bottom: 25px; } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/application/umb-language-picker.less b/src/Umbraco.Web.UI.Client/src/less/components/application/umb-language-picker.less index b2fb1fa6d6..aabc4c4506 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/application/umb-language-picker.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/application/umb-language-picker.less @@ -16,19 +16,22 @@ border-bottom: 1px solid @gray-9; height: @editorHeaderHeight; box-sizing: border-box; - color: @ui-light-active-type; -} - -.umb-language-picker__toggle:hover { - //background: @gray-10; - color:@ui-light-active-type-hover; + color: @ui-option-type; } .umb-language-picker__expand { - //color: @gray-6; font-size: 14px; } +.umb-language-picker__toggle:hover { + background: @ui-option-hover; + color:@ui-option-type-hover; + .umb-language-picker__expand { + color: @ui-option-type-hover; + } +} + + .umb-language-picker__dropdown { width: 100%; background: @white; diff --git a/src/Umbraco.Web.UI.Client/src/less/components/editor.less b/src/Umbraco.Web.UI.Client/src/less/components/editor.less index d091c1a442..bb54b254df 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/editor.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/editor.less @@ -115,6 +115,14 @@ input.umb-editor-header__name-input:disabled { } a.umb-editor-header__close-split-view { + + display: flex; + justify-content: center; + align-items: center; + position: relative; + height: 69px; + width: 69px; + font-size: 20px; color: @gray-6; text-decoration: none !important; @@ -144,22 +152,28 @@ a.umb-editor-header__close-split-view:hover { height: 30px; text-decoration: none !important; font-size: 13px; - color: @gray-4; - background-color: @white; + //color: @gray-4; + color: @ui-action-disgrete-type; + //background-color: @white; } a.umb-variant-switcher__toggle { - transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; + transition: color 0.2s ease-in-out; &:hover { - background-color: @gray-10; + //background-color: @gray-10; + color: @ui-action-disgrete-type-hover; + .umb-variant-switcher__expand { + color: @ui-action-disgrete-type-hover; + } } } .umb-variant-switcher__expand { - color: @gray-7; + color: @ui-action-disgrete-type; margin-top: 3px; margin-left: 5px; margin-right: -5px; + transition: color 0.2s ease-in-out; } .umb-variant-switcher__item { @@ -167,27 +181,30 @@ a.umb-variant-switcher__toggle { justify-content: space-between; align-items: center; border-bottom: 1px solid @gray-9; + &:hover .umb-variant-switcher__name-wrapper { + + } } .umb-variant-switcher__item:last-child { border-bottom: none; } +.umb-variant-switcher_item--current { + color: @ui-light-active-type; +} .umb-variant-switcher_item--current .umb-variant-switcher__name-wrapper { - background-color: @gray-10; - border-left: 2px solid @ui-active; + //background-color: @gray-10; + border-left: 4px solid @ui-active; } .umb-variant-switcher__item:hover, -.umb-variant-switcher__item:focus, -.umb-variant-switcher__name-wrapper:hover, -.umb-variant-switcher__name-wrapper:focus { - background-color: @gray-10; +.umb-variant-switcher__item:focus { outline: none; } .umb-variant-switcher_item--not-allowed:not(.umb-variant-switcher_item--current) .umb-variant-switcher__name-wrapper:hover { - background-color: @white !important; + //background-color: @white !important; cursor: default; } @@ -217,7 +234,12 @@ a.umb-variant-switcher__toggle { .umb-variant-switcher__split-view { font-size: 13px; display: none; - padding: 8px 20px; + padding: 16px 20px; + + &:hover { + background-color: @ui-option-hover; + color: @ui-option-type-hover; + } } // container @@ -229,7 +251,7 @@ a.umb-variant-switcher__toggle { bottom: @editorFooterHeight; left: 0; overflow: auto; - background: @gray-10; + background: @brownGrayLight; } .umb-editor-wrapper.-no-footer .umb-editor-container { diff --git a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-actions.less b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-actions.less index 15296a6aaa..40a0cc41e3 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-actions.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-actions.less @@ -23,7 +23,7 @@ .icon { font-size: 18px; vertical-align: middle; - color: @gray-3; + //color: @gray-3; } } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-root.less b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-root.less index 72a008b8b6..a3529d5504 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-root.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-root.less @@ -14,7 +14,6 @@ margin: 0; width: 100%; display: flex; - color: @gray-2; } .umb-options { diff --git a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less index 38860e6d22..905b3abb87 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less @@ -14,7 +14,7 @@ a, a:hover { outline: none; text-decoration: none; - + // TODO: => confirm not in use // &.noSpr { // background-position: 0 @@ -28,10 +28,11 @@ visibility: hidden; text-decoration: none; font-size: 12px; - transition: opacity 120ms ease; + transition: color 120ms; &:hover { - opacity: .7; + //opacity: .7; + color: @ui-option-type-hover; } } @@ -93,17 +94,36 @@ body.touch .umb-tree { display: flex; flex-wrap: nowrap; align-items: center; - - &.active { - background: @gray-10; + + color: @ui-option-type; + a { + color: @ui-option-type; } - + + // active is equivilant to selected, its the item that is begin affected by the actions performed in the right-click-dialog. + &.active { + background: @ui-selected; + color: @ui-selected-type; + a { + color: @ui-selected-type; + } + } + &:hover { - background: @gray-10; - + background: @ui-option-hover; + + color: @ui-option-type-hover; + a { + color: @ui-option-type-hover; + } + > .umb-options { visibility: visible; } + + .umb-tree-icon { + color: @ui-option-type-hover; + } } } @@ -273,7 +293,8 @@ body.touch .umb-tree { .umb-tree-icon { vertical-align: middle; margin: 0 13px 0 0; - color: @gray-1; + //color: @gray-1; + color: @ui-option-type; font-size: 20px; &.blue { diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-editor-navigation.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-editor-navigation.less index d432310dab..c1f099c2a5 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-editor-navigation.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-editor-navigation.less @@ -21,8 +21,10 @@ height: @editorHeaderHeight; position: relative; + color: @ui-active-type; + &:hover { - color: @ui-light-active-type-hover !important; + color: @ui-active-type-hover !important; } &::after { diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-group-builder.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-group-builder.less index 0472deabf6..5db66da974 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-group-builder.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-group-builder.less @@ -40,7 +40,7 @@ &:hover { color:@ui-action-hover; text-decoration: none; - border-color: @ui-active-hover; + border-color: @ui-active-type-hover; } } @@ -429,8 +429,8 @@ input.umb-group-builder__group-sort-value { &:hover { text-decoration: none; - color:@ui-active-hover; - border-color:@ui-active-hover; + color:@ui-active-type-hover; + border-color:@ui-active-type-hover; } } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less index 3d1af014c7..233441c5d9 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less @@ -71,12 +71,12 @@ margin-right: 5px; font-size: 13px; font-weight: bold; - color: @ui-action-disgrete; + color: @ui-action-disgrete-type; cursor: pointer; } .umb-node-preview__action:hover { - color: @ui-action-disgrete-hover; + color: @ui-action-disgrete-type-hover; text-decoration: none; opacity: 1; } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-tabs.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-tabs.less index 2a5b98df30..f22d8b3a16 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-tabs.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-tabs.less @@ -55,7 +55,7 @@ border-bottom-color: @ui-active; } &:hover { - border-bottom-color: @ui-active-hover; + border-bottom-color: @ui-active-type-hover; } */ &::after { diff --git a/src/Umbraco.Web.UI.Client/src/less/listview.less b/src/Umbraco.Web.UI.Client/src/less/listview.less index 2271703540..c22e57b639 100644 --- a/src/Umbraco.Web.UI.Client/src/less/listview.less +++ b/src/Umbraco.Web.UI.Client/src/less/listview.less @@ -3,14 +3,6 @@ .umb-listview{width: auto !important;} -.dropdown-menu > li > a:hover, -.dropdown-menu > li > a:focus, -.dropdown-submenu:hover > a, -.dropdown-submenu:focus > a { - color: @black; - background: @gray-10; -} - .umb-listview table { border: 1px solid @gray-8; } diff --git a/src/Umbraco.Web.UI.Client/src/less/mixins.less b/src/Umbraco.Web.UI.Client/src/less/mixins.less index 02654459a1..a9f10bb196 100644 --- a/src/Umbraco.Web.UI.Client/src/less/mixins.less +++ b/src/Umbraco.Web.UI.Client/src/less/mixins.less @@ -515,7 +515,7 @@ // Button backgrounds // ------------------ -.buttonBackground(@startColor, @hoverColor: @startColor, @textColor: #fff) { +.buttonBackground(@startColor, @hoverColor: @startColor, @textColor: #fff, @textColorHover: @textColor) { // gradientBar will set the background to a pleasing blend of these, to support IE<=9 //.gradientBar(@startColor, @endColor, @textColor); @@ -533,7 +533,7 @@ // in these cases the gradient won't cover the background, so we override &:hover, &:focus, &:active, &.active { - color: @textColor; + color: @textColorHover; background-color: @hoverColor; } diff --git a/src/Umbraco.Web.UI.Client/src/less/navs.less b/src/Umbraco.Web.UI.Client/src/less/navs.less index d9656f194b..0101113670 100644 --- a/src/Umbraco.Web.UI.Client/src/less/navs.less +++ b/src/Umbraco.Web.UI.Client/src/less/navs.less @@ -233,6 +233,12 @@ .dropdown-menu > li > a { padding: 8px 20px; + color: @ui-option-type; +} + +.dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus, .dropdown-submenu:hover > a, .dropdown-submenu:focus > a { + color: @ui-option-type-hover; + background: @ui-option-hover; } .nav-tabs .dropdown-menu { diff --git a/src/Umbraco.Web.UI.Client/src/less/property-editors.less b/src/Umbraco.Web.UI.Client/src/less/property-editors.less index a0d32ee92e..c0364f4ad8 100644 --- a/src/Umbraco.Web.UI.Client/src/less/property-editors.less +++ b/src/Umbraco.Web.UI.Client/src/less/property-editors.less @@ -243,8 +243,8 @@ transition: all 150ms ease-in-out; &:hover { - color: @ui-action-disgrete-hover; - border-color: @ui-action-disgrete-hover; + color: @ui-action-disgrete-type-hover; + border-color: @ui-action-disgrete-type-hover; } } diff --git a/src/Umbraco.Web.UI.Client/src/less/variables.less b/src/Umbraco.Web.UI.Client/src/less/variables.less index a836912041..dd5788fa11 100644 --- a/src/Umbraco.Web.UI.Client/src/less/variables.less +++ b/src/Umbraco.Web.UI.Client/src/less/variables.less @@ -75,6 +75,9 @@ @gray-9: #E9E9EB; @gray-10: #F3F3F5; +@sand-2: hsl(50, 20%, 97%);// added 2019 +@sand-5: #f3efe9;// added 2019 + // Additional Icon Colours @brownIcon: #795548; @@ -110,26 +113,37 @@ @pinkLight: #f5c1bc;// added 2019 @brown: #9d8057;// added 2019 @brownLight: #e4e0dd;// added 2019 -@claus: #f6efe7; -@claus2: #f2ebe6; -@claus3: #535963; //#56777A -@claus4: #819a9e; +@brownGrayLight: #f3f2f1;// added 2019 +//@claus: #f6efe7; +//@claus2: #f2ebe6; +//@claus3: #535963; //#56777A +//@claus4: #819a9e; //@claus5: #2152A3;// blueMid -@claus6: #02A191; +//@claus6: #02A191; //@clausSoftRed: #D93F4C; // todo //@clausRed:#D42054;// todo. -@u-greyLight: #f2ebe6;// added 2019 +//@u-greyLight: #f2ebe6;// added 2019 @u-white: #f9f7f4;// added 2019 +@u-black: black;// added 2019 // UI colors // ------------------------- +@ui-option-type: @blueExtraDark; +@ui-option-hover: @sand-2; +@ui-option-type-hover: @blueMid; + //@ui-active: #346ab3; @ui-active: @pinkLight; @ui-active-type: @blueExtraDark; -@ui-active-hover: @blueMid; +@ui-active-type-hover: @blueMid; + +@ui-selected: @blue; +@ui-selected-hover: @blueMid; +@ui-selected-type: @u-white; +@ui-selected-type-hover: @u-white; @ui-light-border: @pinkLight; @ui-light-type: @gray-4; @@ -139,16 +153,17 @@ @ui-light-active-type: @blueExtraDark; @ui-light-active-type-hover: @blueMid; -@ui-selected: @blueMid;//not used jet. -@ui-selected-hover: @blueMid;//not used jet. @ui-action: @blueMid; @ui-action-hover: @blueMid; -@ui-action-disgrete: @gray-4; -@ui-action-disgrete-hover: @blueMid; +@ui-action-disgrete: white; +@ui-action-disgrete-hover: @brownLight; -@type-white: @u-white; +@ui-action-disgrete-type: @gray-4; +@ui-action-disgrete-type-hover: @blueMid; + +@type-white: @white; @type-black: @blueNight; @ui-btn: @blueExtraDark; @@ -157,7 +172,7 @@ @ui-btn-positive: @green; @ui-btn-positive-hover: @green; -@ui-btn-positive-type: @u-white; +@ui-btn-positive-type: @white; @ui-btn-negative: @red; @ui-btn-negative-hover: @red; @@ -313,10 +328,12 @@ @btnPrimaryBackgroundHighlight: @green; @btnInfoType: @ui-btn-type;// updated 2019 +@btnInfoTypeHover: @ui-btn-type;// updated 2019 @btnInfoBackground: @ui-btn;// updated 2019 @btnInfoBackgroundHighlight: @ui-btn-hover;// updated 2019 -@btnWhiteType: @black;// updated 2019 +@btnWhiteType: @blueExtraDark;// updated 2019 +@btnWhiteTypeHover: @ui-action-hover;// updated 2019 @btnWhiteBackground: @white;// updated 2019 @btnWhiteBackgroundHighlight: @white;// updated 2019 diff --git a/src/Umbraco.Web.UI.Client/src/views/components/content/edit.html b/src/Umbraco.Web.UI.Client/src/views/components/content/edit.html index adde101baa..e97eabf17f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/content/edit.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/content/edit.html @@ -6,7 +6,7 @@ - - @@ -36,16 +36,16 @@ type="button"> - - - - diff --git a/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-content-header.html b/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-content-header.html index edf04d5297..4861aac8a4 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-content-header.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-content-header.html @@ -54,7 +54,7 @@
    -
    +
    From c2f51be0a1d492bd129f6aaee337afb6cf0db8d1 Mon Sep 17 00:00:00 2001 From: Stephan Date: Mon, 28 Jan 2019 20:07:22 +0100 Subject: [PATCH 326/437] Bugfix --- .../PublishedCache/NuCache/ContentNode.cs | 37 ++++++++++--------- .../NuCache/PublishedContent.cs | 2 +- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs b/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs index 29749ad51b..21af0f87e2 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs @@ -67,9 +67,16 @@ namespace Umbraco.Web.PublishedCache.NuCache throw new ArgumentException("Both draftData and publishedData cannot be null at the same time."); if (draftData != null) - DraftModel = new PublishedContent(this, draftData, publishedSnapshotAccessor, variationContextAccessor).CreateModel(); + { + DraftContent = new PublishedContent(this, draftData, publishedSnapshotAccessor, variationContextAccessor); + DraftModel = DraftContent.CreateModel(); + } + if (publishedData != null) - PublishedModel = new PublishedContent(this, publishedData, publishedSnapshotAccessor, variationContextAccessor).CreateModel(); + { + PublishedContent = new PublishedContent(this, publishedData, publishedSnapshotAccessor, variationContextAccessor); + PublishedModel = PublishedContent.CreateModel(); + } } // clone parent @@ -88,11 +95,13 @@ namespace Umbraco.Web.PublishedCache.NuCache CreateDate = origin.CreateDate; CreatorId = origin.CreatorId; - var originDraft = origin.DraftModel == null ? null : PublishedContent.UnwrapIPublishedContent(origin.DraftModel); - var originPublished = origin.PublishedModel == null ? null : PublishedContent.UnwrapIPublishedContent(origin.PublishedModel); + var originDraft = origin.DraftContent; + var originPublished = origin.PublishedContent; - DraftModel = originDraft == null ? null : new PublishedContent(this, originDraft).CreateModel(); - PublishedModel = originPublished == null ? null : new PublishedContent(this, originPublished).CreateModel(); + DraftContent = new PublishedContent(this, originDraft); + PublishedContent = new PublishedContent(this, originPublished); + DraftModel = DraftContent?.CreateModel(); + PublishedModel = PublishedContent?.CreateModel(); ChildContentIds = new List(origin.ChildContentIds); // needs to be *another* list } @@ -110,8 +119,8 @@ namespace Umbraco.Web.PublishedCache.NuCache CreateDate = origin.CreateDate; CreatorId = origin.CreatorId; - var originDraft = origin.DraftModel == null ? null : PublishedContent.UnwrapIPublishedContent(origin.DraftModel); - var originPublished = origin.PublishedModel == null ? null : PublishedContent.UnwrapIPublishedContent(origin.PublishedModel); + var originDraft = origin.DraftContent; + var originPublished = origin.PublishedContent; DraftContent = originDraft == null ? null : new PublishedContent(this, originDraft.ContentData, publishedSnapshotAccessor, variationContextAccessor); DraftModel = DraftContent?.CreateModel(); @@ -151,21 +160,13 @@ namespace Umbraco.Web.PublishedCache.NuCache public ContentNodeKit ToKit() { - var draft = DraftModel is PublishedContentModel draftModel - ? (PublishedContent) draftModel.Unwrap() - : (PublishedContent) DraftModel; - - var published = PublishedModel is PublishedContentModel publishedModel - ? (PublishedContent) publishedModel.Unwrap() - : (PublishedContent) PublishedModel; - return new ContentNodeKit { Node = this, ContentTypeId = ContentType.Id, - DraftData = draft?.ContentData, - PublishedData = published?.ContentData + DraftData = DraftContent?.ContentData, + PublishedData = PublishedContent?.ContentData }; } } diff --git a/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs b/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs index 522104c2f9..e0d9a0c027 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs @@ -299,7 +299,7 @@ namespace Umbraco.Web.PublishedCache.NuCache // invariant content items) // if there is no 'published' published content, no culture can be published - var hasPublished = _contentNode.PublishedModel != null; + var hasPublished = _contentNode.PublishedContent != null; if (!hasPublished) return false; From 86d8bc0c6237b000e846c70c79092176137b84e0 Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 29 Jan 2019 17:19:58 +1100 Subject: [PATCH 327/437] fix merge --- src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs b/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs index baf7192258..5bab8aa265 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs @@ -69,13 +69,13 @@ namespace Umbraco.Web.PublishedCache.NuCache if (draftData != null) { - DraftContent = new PublishedContent(this, draftData, publishedSnapshotAccessor, variationContextAccessor); + DraftContent = new PublishedContent(this, draftData, publishedSnapshotAccessor, variationContextAccessor, umbracoContextAccessor); DraftModel = DraftContent.CreateModel(); } if (publishedData != null) { - PublishedContent = new PublishedContent(this, publishedData, publishedSnapshotAccessor, variationContextAccessor); + PublishedContent = new PublishedContent(this, publishedData, publishedSnapshotAccessor, variationContextAccessor, umbracoContextAccessor); PublishedModel = PublishedContent.CreateModel(); } } @@ -124,10 +124,9 @@ namespace Umbraco.Web.PublishedCache.NuCache var originDraft = origin.DraftContent; var originPublished = origin.PublishedContent; - - DraftContent = originDraft == null ? null : new PublishedContent(this, originDraft._contentData, publishedSnapshotAccessor, variationContextAccessor, umbracoContextAccessor); + DraftContent = originDraft == null ? null : new PublishedContent(this, originDraft.ContentData, publishedSnapshotAccessor, variationContextAccessor, umbracoContextAccessor); DraftModel = DraftContent?.CreateModel(); - PublishedContent = originPublished == null ? null : new PublishedContent(this, originPublished._contentData, publishedSnapshotAccessor, variationContextAccessor, umbracoContextAccessor); + PublishedContent = originPublished == null ? null : new PublishedContent(this, originPublished.ContentData, publishedSnapshotAccessor, variationContextAccessor, umbracoContextAccessor); PublishedModel = PublishedContent?.CreateModel(); ChildContentIds = origin.ChildContentIds; // can be the *same* list From ee693b63bd0e172e45621a357c280af6cee0b3aa Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 29 Jan 2019 17:52:48 +1100 Subject: [PATCH 328/437] Fixes issue with ConvertRelatedLinksToMultiUrlPicker migration since it produces invalid SQL if there are no values in the .Contains calls --- .../V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs index 7e7f398791..6a22451c0a 100644 --- a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs +++ b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs @@ -26,12 +26,16 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 var dataTypes = Database.Fetch(sqlDataTypes); var dataTypeIds = dataTypes.Select(x => x.NodeId).ToList(); + if (dataTypeIds.Count == 0) return; + var sqlPropertyTpes = Sql() .Select() .From() .Where(x => dataTypeIds.Contains(x.DataTypeId)); - var propertyTypeIds = Database.Fetch(sqlPropertyTpes).Select(x => x.Id); + var propertyTypeIds = Database.Fetch(sqlPropertyTpes).Select(x => x.Id).ToList(); + + if (propertyTypeIds.Count == 0) return; var sqlPropertyData = Sql() .Select() @@ -41,7 +45,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 var properties = Database.Fetch(sqlPropertyData); // Create a Multi URL Picker datatype for the converted RelatedLinks data - if (properties.Any() == false) + if (!properties.Any()) return; foreach (var property in properties) From 89a99e1c5f29dc7322ec27d2ac6d7a737ee58fcd Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 29 Jan 2019 18:10:50 +1100 Subject: [PATCH 329/437] Makes IDashboard IDiscoverable --- src/Umbraco.Core/Dashboards/IDashboard.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Dashboards/IDashboard.cs b/src/Umbraco.Core/Dashboards/IDashboard.cs index eaf6c47c88..c990e2ba61 100644 --- a/src/Umbraco.Core/Dashboards/IDashboard.cs +++ b/src/Umbraco.Core/Dashboards/IDashboard.cs @@ -1,11 +1,12 @@ using System.Runtime.Serialization; +using Umbraco.Core.Composing; namespace Umbraco.Core.Dashboards { /// /// Represents a dashboard. /// - public interface IDashboard : IDashboardSlim + public interface IDashboard : IDashboardSlim, IDiscoverable { /// /// Gets the aliases of sections/applications where this dashboard appears. From 5135635bf8d75fb712658b183e47dd71676de468 Mon Sep 17 00:00:00 2001 From: Stephan Date: Tue, 29 Jan 2019 09:15:10 +0100 Subject: [PATCH 330/437] Cleanup --- .../Trees/TreeCollectionBuilder.cs | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/Umbraco.Web/Trees/TreeCollectionBuilder.cs b/src/Umbraco.Web/Trees/TreeCollectionBuilder.cs index 438971ac41..a62e474e43 100644 --- a/src/Umbraco.Web/Trees/TreeCollectionBuilder.cs +++ b/src/Umbraco.Web/Trees/TreeCollectionBuilder.cs @@ -5,13 +5,6 @@ using Umbraco.Core.Composing; namespace Umbraco.Web.Trees { - // todo - // this is a weird collection builder because it actually contains trees, not types - // and it does not really rely on DI to instantiate anything - but meh - // can we have trees that don't have a controller, or something? looks like, no - // and then, we should not register trees here, and only create them when creating - // the collection! - /// /// Builds a . /// @@ -32,8 +25,11 @@ namespace Umbraco.Web.Trees if (!typeof(TreeControllerBase).IsAssignableFrom(controllerType)) throw new ArgumentException($"Type {controllerType} does not inherit from {typeof(TreeControllerBase).FullName}."); + // no all TreeControllerBase are meant to be used here, + // ignore those that don't have the attribute + var attribute = controllerType.GetCustomAttribute(false); - if (attribute == null) return; // todo - shouldn't we throw or at least log? + if (attribute == null) return; var tree = new Tree(attribute.SortOrder, attribute.SectionAlias, attribute.TreeGroup, attribute.TreeAlias, attribute.TreeTitle, attribute.TreeUse, controllerType, attribute.IsSingleNodeTree); _trees.Add(tree); } @@ -43,13 +39,5 @@ namespace Umbraco.Web.Trees foreach (var controllerType in controllerTypes) AddTreeController(controllerType); } - - // todo - do we want to support this? - public void AddTree(Tree tree) - => _trees.Add(tree); - - // todo - do we want to support this? - public void AddTrees(IEnumerable tree) - => _trees.AddRange(tree); } } From 08a8e0793e62b59a347d6c208786f30c960504c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 29 Jan 2019 09:30:42 +0100 Subject: [PATCH 331/437] Design & color changes for 2019 brand colors --- .../application/umbtour.directive.js | 2 +- .../components/buttons/umbbutton.directive.js | 2 +- .../components/tree/umbtree.directive.js | 10 -------- .../src/common/services/editor.service.js | 2 +- .../application/umb-language-picker.less | 4 ++-- .../src/less/components/overlays.less | 4 +++- .../less/components/tree/umb-tree-item.less | 6 ++--- .../src/less/components/tree/umb-tree.less | 24 ++++++++++++------- .../src/less/variables.less | 8 +++---- .../common/overlays/user/user.controller.js | 15 ++++++------ .../src/views/common/overlays/user/user.html | 4 ++-- .../nodename/nodename.html | 2 +- .../doctypename/doctypename.html | 2 +- .../propertyname/propertyname.html | 2 +- .../tabname/tabname.html | 2 +- .../foldername/foldername.html | 2 +- .../uploadimages/uploadimages.html | 2 +- .../components/application/umb-tour.html | 8 +++---- .../src/views/content/notify.html | 2 +- .../src/views/content/protect.html | 4 ++-- .../src/views/content/rights.html | 2 +- .../propertyeditors/listview/listview.html | 4 ++-- .../src/views/users/views/users/users.html | 10 ++++---- 23 files changed, 61 insertions(+), 62 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbtour.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbtour.directive.js index 2970c52bbb..b749518660 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbtour.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbtour.directive.js @@ -137,7 +137,7 @@ In the following example you see how to run some custom logic before a step goes
    diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js index 8ad71226ba..6038eb1ec0 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js @@ -14,7 +14,7 @@ Use this directive to render an umbraco button. The directive can be used to gen diff --git a/src/Umbraco.Web.UI.Client/src/less/components/application/umb-language-picker.less b/src/Umbraco.Web.UI.Client/src/less/components/application/umb-language-picker.less index aabc4c4506..c950b01602 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/application/umb-language-picker.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/application/umb-language-picker.less @@ -51,9 +51,9 @@ .umb-language-picker__dropdown a:hover, .umb-language-picker__dropdown a:focus { - background: @gray-10; + background: @ui-option-hover; text-decoration: none; - color:@ui-light-active-type-hover; + color:@ui-option-type-hover; } .umb-language-picker__dropdown a.umb-language-picker__dropdown-item--current { diff --git a/src/Umbraco.Web.UI.Client/src/less/components/overlays.less b/src/Umbraco.Web.UI.Client/src/less/components/overlays.less index b2d6cda9b1..6e9c79a0c2 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/overlays.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/overlays.less @@ -15,8 +15,10 @@ } .umb-overlay .umb-overlay-header { - background: @gray-10; + //background: @gray-10; border-bottom: 1px solid @purple-l3; + //background: @blueExtraDark; + //color:@u-white; padding: 10px; margin-top: 0; flex-grow: 0; diff --git a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less index a0ea622d6b..21e5f13880 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less @@ -58,7 +58,7 @@ i { background: @ui-active-type; - border-color: @ui-active; + //border-color: @ui-active; transition: opacity 120ms ease; } } @@ -67,7 +67,7 @@ .umb-tree-icon, ins { color: @ui-active-type !important; - background-color: @ui-active; - border-color: @ui-active; + //background-color: @ui-active; + //border-color: @ui-active; } } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less index 905b3abb87..8da00f5d0f 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less @@ -87,6 +87,21 @@ body.touch .umb-tree { } } +// active is equivilant to selected, its the item that is begin affected by the actions performed in the right-click-dialog. +.umb-tree-item > .umb-tree-item__inner.active { + background: @ui-selected; + color: @ui-selected-type; + a { + color: @ui-selected-type; + } + &:hover { + background: @ui-selected-hover; + color: @ui-selected-type-hover; + a { + color: @ui-selected-type-hover; + } + } +} .umb-tree-root, .umb-tree-item__inner { padding: 0; position: relative; @@ -100,15 +115,6 @@ body.touch .umb-tree { color: @ui-option-type; } - // active is equivilant to selected, its the item that is begin affected by the actions performed in the right-click-dialog. - &.active { - background: @ui-selected; - color: @ui-selected-type; - a { - color: @ui-selected-type; - } - } - &:hover { background: @ui-option-hover; diff --git a/src/Umbraco.Web.UI.Client/src/less/variables.less b/src/Umbraco.Web.UI.Client/src/less/variables.less index dd5788fa11..14d76c2251 100644 --- a/src/Umbraco.Web.UI.Client/src/less/variables.less +++ b/src/Umbraco.Web.UI.Client/src/less/variables.less @@ -140,10 +140,10 @@ @ui-active-type: @blueExtraDark; @ui-active-type-hover: @blueMid; -@ui-selected: @blue; -@ui-selected-hover: @blueMid; -@ui-selected-type: @u-white; -@ui-selected-type-hover: @u-white; +@ui-selected: @brownLight; +@ui-selected-hover: ligthen(@brownLight, 10); +@ui-selected-type: @blueMid; +@ui-selected-type-hover: @blueMid; @ui-light-border: @pinkLight; @ui-light-type: @gray-4; diff --git a/src/Umbraco.Web.UI.Client/src/views/common/overlays/user/user.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/overlays/user/user.controller.js index 3147989821..5ed87f073b 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/overlays/user/user.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/overlays/user/user.controller.js @@ -2,17 +2,18 @@ angular.module("umbraco") .controller("Umbraco.Overlays.UserController", function ($scope, $location, $timeout, dashboardResource, userService, historyService, eventsService, externalLoginInfo, authResource, currentUserResource, formHelper, localizationService) { $scope.history = historyService.getCurrent(); - $scope.version = Umbraco.Sys.ServerVariables.application.version + " assembly: " + Umbraco.Sys.ServerVariables.application.assemblyVersion; + //$scope.version = Umbraco.Sys.ServerVariables.application.version + " assembly: " + Umbraco.Sys.ServerVariables.application.assemblyVersion; $scope.showPasswordFields = false; $scope.changePasswordButtonState = "init"; - $scope.model.subtitle = "Umbraco version" + " " + $scope.version; - + $scope.model.title = "user.name"; + //$scope.model.subtitle = "Umbraco version" + " " + $scope.version; + /* if(!$scope.model.title) { localizationService.localize("general_user").then(function(value){ $scope.model.title = value; }); } - + */ $scope.externalLoginProviders = externalLoginInfo.providers; $scope.externalLinkLoginFormAction = Umbraco.Sys.ServerVariables.umbracoUrls.externalLinkLoginsUrl; var evts = []; @@ -45,7 +46,7 @@ angular.module("umbraco") $location.path(link); $scope.model.close(); }; - + /* //Manually update the remaining timeout seconds function updateTimeout() { $timeout(function () { @@ -58,7 +59,7 @@ angular.module("umbraco") }, 1000, false); // 1 second, do NOT execute a global digest } - + */ function updateUserInfo() { //get the user userService.getCurrentUser().then(function (user) { @@ -68,7 +69,7 @@ angular.module("umbraco") $scope.remainingAuthSeconds = $scope.user.remainingAuthSeconds; $scope.canEditProfile = _.indexOf($scope.user.allowedSections, "users") > -1; //set the timer - updateTimeout(); + //updateTimeout(); authResource.getCurrentUserLinkedLogins().then(function(logins) { //reset all to be un-linked diff --git a/src/Umbraco.Web.UI.Client/src/views/common/overlays/user/user.html b/src/Umbraco.Web.UI.Client/src/views/common/overlays/user/user.html index 754b170f23..404b4d8dd2 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/overlays/user/user.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/overlays/user/user.html @@ -4,11 +4,11 @@
    -

    +

    - +
    diff --git a/src/Umbraco.Web.UI.Client/src/views/common/tours/umbintrocreatedoctype/doctypename/doctypename.html b/src/Umbraco.Web.UI.Client/src/views/common/tours/umbintrocreatedoctype/doctypename/doctypename.html index a0b4b529e8..3ae8943560 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/tours/umbintrocreatedoctype/doctypename/doctypename.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/tours/umbintrocreatedoctype/doctypename/doctypename.html @@ -19,7 +19,7 @@
    - +
    diff --git a/src/Umbraco.Web.UI.Client/src/views/common/tours/umbintrocreatedoctype/propertyname/propertyname.html b/src/Umbraco.Web.UI.Client/src/views/common/tours/umbintrocreatedoctype/propertyname/propertyname.html index 5748f65a95..2c255706c8 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/tours/umbintrocreatedoctype/propertyname/propertyname.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/tours/umbintrocreatedoctype/propertyname/propertyname.html @@ -19,7 +19,7 @@
    - +
    diff --git a/src/Umbraco.Web.UI.Client/src/views/common/tours/umbintrocreatedoctype/tabname/tabname.html b/src/Umbraco.Web.UI.Client/src/views/common/tours/umbintrocreatedoctype/tabname/tabname.html index baa0d3da9a..0dfa084878 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/tours/umbintrocreatedoctype/tabname/tabname.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/tours/umbintrocreatedoctype/tabname/tabname.html @@ -19,7 +19,7 @@
    - +
    diff --git a/src/Umbraco.Web.UI.Client/src/views/common/tours/umbintromediasection/foldername/foldername.html b/src/Umbraco.Web.UI.Client/src/views/common/tours/umbintromediasection/foldername/foldername.html index 1a9bd41226..063f332e1d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/tours/umbintromediasection/foldername/foldername.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/tours/umbintromediasection/foldername/foldername.html @@ -19,7 +19,7 @@
    - +
    diff --git a/src/Umbraco.Web.UI.Client/src/views/common/tours/umbintromediasection/uploadimages/uploadimages.html b/src/Umbraco.Web.UI.Client/src/views/common/tours/umbintromediasection/uploadimages/uploadimages.html index e7e8750823..0e13b9b645 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/tours/umbintromediasection/uploadimages/uploadimages.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/tours/umbintromediasection/uploadimages/uploadimages.html @@ -19,7 +19,7 @@
    - +
    diff --git a/src/Umbraco.Web.UI.Client/src/views/components/application/umb-tour.html b/src/Umbraco.Web.UI.Client/src/views/components/application/umb-tour.html index b801d63cca..b756d23b50 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/application/umb-tour.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/application/umb-tour.html @@ -31,11 +31,11 @@
    - +
    - +
    @@ -55,7 +55,7 @@ - + @@ -76,7 +76,7 @@

    Please go back and start the tour again.

    - +
    diff --git a/src/Umbraco.Web.UI.Client/src/views/content/notify.html b/src/Umbraco.Web.UI.Client/src/views/content/notify.html index 8e2f860661..43f14d519f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/notify.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/notify.html @@ -42,7 +42,7 @@ type="button" action="vm.save(vm.notifyOptions)" state="vm.saveState" - button-style="success"> + button-style="action">
    diff --git a/src/Umbraco.Web.UI.Client/src/views/content/protect.html b/src/Umbraco.Web.UI.Client/src/views/content/protect.html index ae4a15e8c1..77584dac12 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/protect.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/protect.html @@ -127,7 +127,7 @@
    @@ -144,7 +144,7 @@ diff --git a/src/Umbraco.Web.UI.Client/src/views/content/rights.html b/src/Umbraco.Web.UI.Client/src/views/content/rights.html index 35f3d34260..31c7c628c0 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/rights.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/rights.html @@ -75,7 +75,7 @@ label-key="prompt_stay" action="vm.stay()" type="button" - button-style="success"> + button-style="action">
    diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html index 77576cac6a..abf571cfbf 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html @@ -5,7 +5,7 @@
    - + @@ -37,7 +37,7 @@
    - + Create diff --git a/src/Umbraco.Web.UI.Client/src/views/users/views/users/users.html b/src/Umbraco.Web.UI.Client/src/views/users/views/users/users.html index 0075342a36..4b6f77e696 100644 --- a/src/Umbraco.Web.UI.Client/src/views/users/views/users/users.html +++ b/src/Umbraco.Web.UI.Client/src/views/users/views/users/users.html @@ -11,7 +11,7 @@ @@ -392,7 +392,7 @@ @@ -536,7 +536,7 @@ From 9c3e501a605f82845ad6921d6e74ad487a583667 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 29 Jan 2019 09:46:24 +0100 Subject: [PATCH 332/437] Fixes UI for macropicker and added submit button --- .../macropicker/macropicker.html | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/macropicker/macropicker.html b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/macropicker/macropicker.html index a9551138e1..7e54e2ef8e 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/macropicker/macropicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/macropicker/macropicker.html @@ -12,11 +12,11 @@ - +
    - + - +
    - + @@ -47,28 +47,28 @@
    - +
    - +
    {{model.selectedMacro.name}}
    - +
    • - + - +
    - + There are no parameters for this macro - +
    @@ -83,6 +83,13 @@ label-key="general_close" action="close()">
    + + + From 7b85ebab56862a1c038eea85696e795504a8ff97 Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 29 Jan 2019 19:54:32 +1100 Subject: [PATCH 333/437] Adds migration to convert start nodes for picker configuration to UDIs --- .../Migrations/Upgrade/UmbracoPlan.cs | 1 + .../ConvertRelatedLinksToMultiUrlPicker.cs | 5 +- .../V_8_0_0/UpdatePickerIntegerValuesToUdi.cs | 108 ++++++++++++++++++ src/Umbraco.Core/Umbraco.Core.csproj | 1 + src/Umbraco.Web.UI.Client/package-lock.json | 4 +- 5 files changed, 114 insertions(+), 5 deletions(-) create mode 100644 src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/UpdatePickerIntegerValuesToUdi.cs diff --git a/src/Umbraco.Core/Migrations/Upgrade/UmbracoPlan.cs b/src/Umbraco.Core/Migrations/Upgrade/UmbracoPlan.cs index f4732acc4b..9bf58c8d2f 100644 --- a/src/Umbraco.Core/Migrations/Upgrade/UmbracoPlan.cs +++ b/src/Umbraco.Core/Migrations/Upgrade/UmbracoPlan.cs @@ -125,6 +125,7 @@ namespace Umbraco.Core.Migrations.Upgrade To("{0009109C-A0B8-4F3F-8FEB-C137BBDDA268}"); To("{8A027815-D5CD-4872-8B88-9A51AB5986A6}"); // from 7.14.0 To("{ED28B66A-E248-4D94-8CDB-9BDF574023F0}"); + To("{38C809D5-6C34-426B-9BEA-EFD39162595C}"); //FINAL diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs index 6a22451c0a..960990cbeb 100644 --- a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs +++ b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using Newtonsoft.Json; @@ -89,7 +88,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 // Should only have a URL if it's an external link otherwise it wil be a UDI Url = relatedLink.IsInternal == false ? relatedLink.Link : null }; - + links.Add(link); } diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/UpdatePickerIntegerValuesToUdi.cs b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/UpdatePickerIntegerValuesToUdi.cs new file mode 100644 index 0000000000..2e37c79632 --- /dev/null +++ b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/UpdatePickerIntegerValuesToUdi.cs @@ -0,0 +1,108 @@ +using System; +using System.Linq; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Umbraco.Core.Persistence; +using Umbraco.Core.Persistence.Dtos; + +namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +{ + public class UpdatePickerIntegerValuesToUdi : MigrationBase + { + public UpdatePickerIntegerValuesToUdi(IMigrationContext context) : base(context) + { } + + public override void Migrate() + { + var sqlDataTypes = Sql() + .Select() + .From() + .Where(x => x.EditorAlias == Constants.PropertyEditors.Aliases.ContentPicker + || x.EditorAlias == Constants.PropertyEditors.Aliases.MediaPicker + || x.EditorAlias == Constants.PropertyEditors.Aliases.MultiNodeTreePicker); + + var dataTypes = Database.Fetch(sqlDataTypes).ToList(); + + foreach (var datatype in dataTypes.Where(x => !x.Configuration.IsNullOrWhiteSpace())) + { + switch (datatype.EditorAlias) + { + case Constants.PropertyEditors.Aliases.ContentPicker: + case Constants.PropertyEditors.Aliases.MediaPicker: + { + var config = JsonConvert.DeserializeObject(datatype.Configuration); + var startNodeId = config.Value("startNodeId"); + if (!startNodeId.IsNullOrWhiteSpace() && int.TryParse(startNodeId, out var intStartNode)) + { + var guid = intStartNode <= 0 + ? null + : Context.Database.ExecuteScalar( + Sql().Select(x => x.UniqueId).From().Where(x => x.NodeId == intStartNode)); + if (guid.HasValue) + { + var udi = new GuidUdi(datatype.EditorAlias == Constants.PropertyEditors.Aliases.MediaPicker + ? Constants.UdiEntityType.Media + : Constants.UdiEntityType.Document, guid.Value); + config["startNodeId"] = new JValue(udi.ToString()); + } + else + config.Remove("startNodeId"); + + datatype.Configuration = JsonConvert.SerializeObject(config); + Database.Update(datatype); + } + + break; + } + case Constants.PropertyEditors.Aliases.MultiNodeTreePicker: + { + var config = JsonConvert.DeserializeObject(datatype.Configuration); + var startNodeConfig = config.Value("startNode"); + if (startNodeConfig != null) + { + var startNodeId = startNodeConfig.Value("id"); + var objectType = startNodeConfig.Value("type"); + if (!objectType.IsNullOrWhiteSpace() + && !startNodeId.IsNullOrWhiteSpace() + && int.TryParse(startNodeId, out var intStartNode)) + { + var guid = intStartNode <= 0 + ? null + : Context.Database.ExecuteScalar( + Sql().Select(x => x.UniqueId).From().Where(x => x.NodeId == intStartNode)); + + string entityType = null; + switch (objectType.ToLowerInvariant()) + { + case "content": + entityType = Constants.UdiEntityType.Document; + break; + case "media": + entityType = Constants.UdiEntityType.Media; + break; + case "member": + entityType = Constants.UdiEntityType.Member; + break; + } + + if (entityType != null && guid.HasValue) + { + var udi = new GuidUdi(entityType, guid.Value); + startNodeConfig["id"] = new JValue(udi.ToString()); + } + else + startNodeConfig.Remove("id"); + + datatype.Configuration = JsonConvert.SerializeObject(config); + Database.Update(datatype); + } + } + + break; + } + } + } + + } + } +} diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index dd9110eea2..fb54e4a4f4 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -403,6 +403,7 @@ + diff --git a/src/Umbraco.Web.UI.Client/package-lock.json b/src/Umbraco.Web.UI.Client/package-lock.json index 8afb0a17e3..fe657ae470 100644 --- a/src/Umbraco.Web.UI.Client/package-lock.json +++ b/src/Umbraco.Web.UI.Client/package-lock.json @@ -13278,7 +13278,7 @@ }, "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 }, @@ -15838,7 +15838,7 @@ "dependencies": { "lru-cache": { "version": "2.2.4", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.2.4.tgz", + "resolved": "http://registry.npmjs.org/lru-cache/-/lru-cache-2.2.4.tgz", "integrity": "sha1-bGWGGb7PFAMdDQtZSxYELOTcBj0=", "dev": true } From 9cd2e36c4be35650729e058c9258ff9acb0b2c42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 29 Jan 2019 10:00:38 +0100 Subject: [PATCH 334/437] more color corrections for brandcolors 2019 --- .../src/less/buttons.less | 2 +- .../less/components/tree/umb-tree-item.less | 2 +- .../src/less/components/umb-badge.less | 12 +++++----- .../less/components/umb-grid-selector.less | 23 ++++++++++++++++--- .../src/less/variables.less | 18 +++++++-------- 5 files changed, 36 insertions(+), 21 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/buttons.less b/src/Umbraco.Web.UI.Client/src/less/buttons.less index 2440aaa738..dee591c437 100644 --- a/src/Umbraco.Web.UI.Client/src/less/buttons.less +++ b/src/Umbraco.Web.UI.Client/src/less/buttons.less @@ -242,7 +242,7 @@ input[type="button"] { // outlined .btn-outline { border: 1px solid; - border-color: @blueExtraDark; + border-color: @gray-7; background: @white; color: @blueExtraDark; padding: 5px 13px; diff --git a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less index 21e5f13880..16bff41fd7 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less @@ -47,7 +47,7 @@ // override small icon color. TODO => check usage &:before { - color: @turquoise-l2; + color: @pink; } .umb-options { diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-badge.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-badge.less index 0e3bb35ffa..cad6dbaf2f 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-badge.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-badge.less @@ -10,22 +10,22 @@ // Colors .umb-badge--primary { - background-color: @turquoise; + background-color: @blueDark; color: @white; } .umb-badge--secondary { - background-color: @purple; + background-color: @blueExtraDark; color: @white; } .umb-badge--gray { - background-color: @gray-8; - color: @gray-4; + background-color: @sand-2; + color: @blueDark; } .umb-badge--danger { - background-color: @red-l1; + background-color: @red; color: @white; } @@ -68,4 +68,4 @@ .umb-badge--xl { font-size: 20px; padding: 6px 8px; -} \ No newline at end of file +} diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-grid-selector.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-grid-selector.less index 7a0b013e68..e25349f555 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-grid-selector.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-grid-selector.less @@ -28,6 +28,13 @@ border: 1px dashed @gray-8; background: none; cursor: pointer; + + color: @ui-option-type; + &:hover { + color: @ui-option-type-hover; + border-color: @ui-option-type-hover; + text-decoration: none; + } } .umb-grid-selector__item-content { @@ -48,7 +55,7 @@ } .umb-grid-selector__item-label.-blue { - color: @turquoise-d1; + color: @ui-option-type; } .umb-grid-selector__item-remove { @@ -56,6 +63,10 @@ top: 5px; right: 5px; cursor: pointer; + color: @ui-option-type; + &:hover { + color: @ui-option-type-hover; + } } .umb-grid-selector__item-default-label { @@ -64,9 +75,15 @@ } .umb-grid-selector__item-default-label.-blue { - color: @turquoise-d1; + color: @ui-option-type; + &:hover { + color: @ui-option-type-hover; + } } .umb-grid-selector__item-add { - color: @turquoise-d1; + color: @ui-option-type; + &:hover { + color: @ui-option-type-hover; + } } diff --git a/src/Umbraco.Web.UI.Client/src/less/variables.less b/src/Umbraco.Web.UI.Client/src/less/variables.less index 14d76c2251..c370a2090a 100644 --- a/src/Umbraco.Web.UI.Client/src/less/variables.less +++ b/src/Umbraco.Web.UI.Client/src/less/variables.less @@ -75,8 +75,9 @@ @gray-9: #E9E9EB; @gray-10: #F3F3F5; -@sand-2: hsl(50, 20%, 97%);// added 2019 +@sand-2: hsl(50, 20%, 88%);// added 2019 @sand-5: #f3efe9;// added 2019 +@sand-7: hsl(50, 20%, 97%);// added 2019 // Additional Icon Colours @@ -132,7 +133,7 @@ // ------------------------- @ui-option-type: @blueExtraDark; -@ui-option-hover: @sand-2; +@ui-option-hover: @sand-7; @ui-option-type-hover: @blueMid; //@ui-active: #346ab3; @@ -171,7 +172,7 @@ @ui-btn-type: @white; @ui-btn-positive: @green; -@ui-btn-positive-hover: @green; +@ui-btn-positive-hover: @green-l1; @ui-btn-positive-type: @white; @ui-btn-negative: @red; @@ -201,15 +202,12 @@ .btn-color-black {background-color: @black;} .color-black i { color: @black;} - .btn-color-blue-grey {background-color: @blueGrey;} .color-blue-grey, .color-blue-grey i { color: @blueGrey !important;} - .btn-color-grey{background-color: @grayIcon;} .color-grey, .color-grey i { color: @grayIcon !important; } - .btn-color-brown{background-color: @brownIcon;} .color-brown, .color-brown i { color: @brownIcon !important; } @@ -324,8 +322,8 @@ @btnBackgroundHighlight: @gray-9; @btnBorder: @gray-9; -@btnPrimaryBackground: @green; -@btnPrimaryBackgroundHighlight: @green; +@btnPrimaryBackground: @ui-btn-positive; +@btnPrimaryBackgroundHighlight: @ui-btn-positive-hover; @btnInfoType: @ui-btn-type;// updated 2019 @btnInfoTypeHover: @ui-btn-type;// updated 2019 @@ -341,10 +339,10 @@ @btnSuccessBackground: @ui-btn-positive;// updated 2019 @btnSuccessBackgroundHighlight: @ui-btn-positive-hover;// updated 2019 -@btnWarningBackground: @red-l1; +@btnWarningBackground: @red; @btnWarningBackgroundHighlight: @red-l1; -@btnDangerBackground: @red-l1; +@btnDangerBackground: @red; @btnDangerBackgroundHighlight: @red-l1; @btnInverseBackground: @gray-2; From d24b7f2abaa9ffa7fe5b4d87a40335e1c125dfdf Mon Sep 17 00:00:00 2001 From: Stephan Date: Tue, 29 Jan 2019 10:17:26 +0100 Subject: [PATCH 335/437] Refactor enums --- src/Umbraco.Core/EnumExtensions.cs | 45 +++++++++++++++ src/Umbraco.Core/Umbraco.Core.csproj | 1 + .../CoreThings/EnumExtensionsTests.cs | 55 +++++++++++++++++++ src/Umbraco.Tests/Umbraco.Tests.csproj | 2 + src/Umbraco.Web/Services/TreeService.cs | 7 ++- src/Umbraco.Web/Trees/TreeUseExtensions.cs | 24 -------- src/Umbraco.Web/Umbraco.Web.csproj | 1 - src/umbraco.sln.DotSettings | 2 +- 8 files changed, 109 insertions(+), 28 deletions(-) create mode 100644 src/Umbraco.Core/EnumExtensions.cs create mode 100644 src/Umbraco.Tests/CoreThings/EnumExtensionsTests.cs delete mode 100644 src/Umbraco.Web/Trees/TreeUseExtensions.cs diff --git a/src/Umbraco.Core/EnumExtensions.cs b/src/Umbraco.Core/EnumExtensions.cs new file mode 100644 index 0000000000..1443a27876 --- /dev/null +++ b/src/Umbraco.Core/EnumExtensions.cs @@ -0,0 +1,45 @@ +using System; + +namespace Umbraco.Core +{ + /// + /// Provides extension methods to enums. + /// + public static class EnumExtensions + { + // note: + // - no need to HasFlagExact, that's basically an == test + // - HasFlagAll cannot be named HasFlag because ext. methods never take priority over instance methods + + /// + /// Determines whether a flag enum has all the specified values. + /// + /// + /// True when all bits set in are set in , though other bits may be set too. + /// This is the behavior of the original method. + /// + public static bool HasFlagAll(this T use, T uses) + where T : Enum + { + var num = Convert.ToUInt64(use); + var nums = Convert.ToUInt64(uses); + + return (num & nums) == nums; + } + + /// + /// Determines whether a flag enum has any of the specified values. + /// + /// + /// True when at least one of the bits set in is set in . + /// + public static bool HasFlagAny(this T use, T uses) + where T : Enum + { + var num = Convert.ToUInt64(use); + var nums = Convert.ToUInt64(uses); + + return (num & nums) > 0; + } + } +} diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 1a978650f0..10c3964448 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -333,6 +333,7 @@ + diff --git a/src/Umbraco.Tests/CoreThings/EnumExtensionsTests.cs b/src/Umbraco.Tests/CoreThings/EnumExtensionsTests.cs new file mode 100644 index 0000000000..72a55cee85 --- /dev/null +++ b/src/Umbraco.Tests/CoreThings/EnumExtensionsTests.cs @@ -0,0 +1,55 @@ +using NUnit.Framework; +using Umbraco.Web.Trees; +using Umbraco.Core; + +namespace Umbraco.Tests.CoreThings +{ + [TestFixture] + public class EnumExtensionsTests + { + [TestCase(TreeUse.Dialog, TreeUse.Dialog, true)] + [TestCase(TreeUse.Dialog, TreeUse.Main, false)] + [TestCase(TreeUse.Dialog | TreeUse.Main, TreeUse.Dialog, true)] + [TestCase(TreeUse.Dialog, TreeUse.Dialog | TreeUse.Main, false)] + public void HasFlagTest(TreeUse value, TreeUse test, bool expected) + { + // the built-in Enum.HasFlag() method determines whether + // all bits from are set (other bits can be set too) + + if (expected) + Assert.IsTrue(value.HasFlag(test)); + else + Assert.IsFalse(value.HasFlag(test)); + } + + [TestCase(TreeUse.Dialog, TreeUse.Dialog, true)] + [TestCase(TreeUse.Dialog, TreeUse.Main, false)] + [TestCase(TreeUse.Dialog | TreeUse.Main, TreeUse.Dialog, true)] + [TestCase(TreeUse.Dialog, TreeUse.Dialog | TreeUse.Main, false)] + public void HasFlagAllTest(TreeUse value, TreeUse test, bool expected) + { + // the HasFlagAll() extension method determines whether + // all bits from are set (other bits can be set too) + + if (expected) + Assert.IsTrue(value.HasFlagAll(test)); + else + Assert.IsFalse(value.HasFlagAll(test)); + } + + [TestCase(TreeUse.Dialog, TreeUse.Dialog, true)] + [TestCase(TreeUse.Dialog, TreeUse.Main, false)] + [TestCase(TreeUse.Dialog | TreeUse.Main, TreeUse.Dialog, true)] + [TestCase(TreeUse.Dialog, TreeUse.Dialog | TreeUse.Main, true)] + public void HasFlagAnyTest(TreeUse value, TreeUse test, bool expected) + { + // the HasFlagAny() extension method determines whether + // at least one bit from is set + + if (expected) + Assert.IsTrue(value.HasFlagAny(test)); + else + Assert.IsFalse(value.HasFlagAny(test)); + } + } +} diff --git a/src/Umbraco.Tests/Umbraco.Tests.csproj b/src/Umbraco.Tests/Umbraco.Tests.csproj index 11f5527a8c..95b6608c42 100644 --- a/src/Umbraco.Tests/Umbraco.Tests.csproj +++ b/src/Umbraco.Tests/Umbraco.Tests.csproj @@ -69,6 +69,7 @@ + @@ -122,6 +123,7 @@ + diff --git a/src/Umbraco.Web/Services/TreeService.cs b/src/Umbraco.Web/Services/TreeService.cs index a5574946a6..dc500f2583 100644 --- a/src/Umbraco.Web/Services/TreeService.cs +++ b/src/Umbraco.Web/Services/TreeService.cs @@ -26,11 +26,14 @@ namespace Umbraco.Web.Services public Tree GetByAlias(string treeAlias) => _treeCollection.FirstOrDefault(x => x.TreeAlias == treeAlias); /// - public IEnumerable GetAll(TreeUse use = TreeUse.Main) => _treeCollection.Where(x => x.TreeUse.HasAny(use)); + public IEnumerable GetAll(TreeUse use = TreeUse.Main) + // use HasFlagAny: if use is Main|Dialog, we want to return Main *and* Dialog trees + => _treeCollection.Where(x => x.TreeUse.HasFlagAny(use)); /// public IEnumerable GetBySection(string sectionAlias, TreeUse use = TreeUse.Main) - => _treeCollection.Where(x => x.SectionAlias.InvariantEquals(sectionAlias) && x.TreeUse.HasAny(use)).OrderBy(x => x.SortOrder).ToList(); + // use HasFlagAny: if use is Main|Dialog, we want to return Main *and* Dialog trees + => _treeCollection.Where(x => x.SectionAlias.InvariantEquals(sectionAlias) && x.TreeUse.HasFlagAny(use)).OrderBy(x => x.SortOrder).ToList(); /// public IDictionary> GetBySectionGrouped(string sectionAlias, TreeUse use = TreeUse.Main) diff --git a/src/Umbraco.Web/Trees/TreeUseExtensions.cs b/src/Umbraco.Web/Trees/TreeUseExtensions.cs deleted file mode 100644 index 02b417eb98..0000000000 --- a/src/Umbraco.Web/Trees/TreeUseExtensions.cs +++ /dev/null @@ -1,24 +0,0 @@ -namespace Umbraco.Web.Trees -{ - /// - /// Provides extension methods to the method. - /// - public static class TreeUseExtensions - { - /// - /// Determines whether a TreeUse has all the specified values. - /// - public static bool Has(this TreeUse use, TreeUse uses) - { - return (use & uses) == uses; - } - - /// - /// Determines whether a TreeUse has any of the specified values. - /// - public static bool HasAny(this TreeUse use, TreeUse uses) - { - return (use & uses) > 0; - } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 361c2aa28a..f5cd7ce142 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -186,7 +186,6 @@ - diff --git a/src/umbraco.sln.DotSettings b/src/umbraco.sln.DotSettings index d6826e5f90..2f99fe6350 100644 --- a/src/umbraco.sln.DotSettings +++ b/src/umbraco.sln.DotSettings @@ -4,6 +4,6 @@ Disposable construction HINT False - CSharp71 + Default True True From fd80aecb2001e088a511c37256488668e34da519 Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 29 Jan 2019 21:22:01 +1100 Subject: [PATCH 336/437] fixes more of the ConvertRelatedLinksToMultiUrlPicker migration --- .../ConvertRelatedLinksToMultiUrlPicker.cs | 22 +++++++------------ 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs index 960990cbeb..ed1c08f0f8 100644 --- a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs +++ b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs @@ -27,6 +27,12 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 if (dataTypeIds.Count == 0) return; + foreach (var dataType in dataTypes) + { + dataType.EditorAlias = Constants.PropertyEditors.Aliases.MultiUrlPicker; + Database.Update(dataType); + } + var sqlPropertyTpes = Sql() .Select() .From() @@ -44,9 +50,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 var properties = Database.Fetch(sqlPropertyData); // Create a Multi URL Picker datatype for the converted RelatedLinks data - if (!properties.Any()) - return; - + foreach (var property in properties) { var value = property.Value.ToString(); @@ -99,17 +103,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 Database.Update(property); } - foreach (var dataType in dataTypes) - { - // Change existing datatypes from RelatedLinks to MultiUrlPicker - var dataTypeResult = Database.Fetch(Sql() - .Select() - .From() - .Where(x => x.NodeId == dataType.NodeId)).First(); - - dataTypeResult.EditorAlias = Constants.PropertyEditors.Aliases.MultiUrlPicker; - Database.Update(dataTypeResult); - } + } } From 9bcb2bfb38534499c5812ba6e5c8e1d4e2874444 Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 29 Jan 2019 21:27:22 +1100 Subject: [PATCH 337/437] removes unused code --- src/Umbraco.Web/UrlHelperExtensions.cs | 37 -------------------------- 1 file changed, 37 deletions(-) diff --git a/src/Umbraco.Web/UrlHelperExtensions.cs b/src/Umbraco.Web/UrlHelperExtensions.cs index 1397ffc818..249ce76193 100644 --- a/src/Umbraco.Web/UrlHelperExtensions.cs +++ b/src/Umbraco.Web/UrlHelperExtensions.cs @@ -21,17 +21,6 @@ namespace Umbraco.Web ///
    public static class UrlHelperExtensions { - /// - /// Returns the base path (not including the 'action') of the MVC controller "ExamineManagementController" - /// - /// - /// - public static string GetExamineManagementServicePath(this UrlHelper url) - { - // TODO: Possibly remove this method, I think it's unused... - var result = url.GetUmbracoApiService("GetIndexerDetails"); - return result.TrimEnd("GetIndexerDetails").EnsureEndsWith('/'); - } /// /// Return the Url for a Web Api service @@ -47,19 +36,6 @@ namespace Umbraco.Web return url.GetUmbracoApiService(actionName, typeof(T), routeVals); } - /// - /// Return the Base Url (not including the action) for a Web Api service - /// - /// - /// - /// - /// - public static string GetUmbracoApiServiceBaseUrl(this UrlHelper url, string actionName) - where T : UmbracoApiController - { - return url.GetUmbracoApiService(actionName).TrimEnd(actionName); - } - public static string GetUmbracoApiServiceBaseUrl(this UrlHelper url, Expression> methodSelector) where T : UmbracoApiController { @@ -112,19 +88,6 @@ namespace Umbraco.Web return url.GetUmbracoApiService(actionName, ControllerExtensions.GetControllerName(apiControllerType), area, routeVals); } - /// - /// Return the Url for a Web Api service - /// - /// - /// - /// - /// - /// - public static string GetUmbracoApiService(this UrlHelper url, string actionName, string controllerName, RouteValueDictionary routeVals = null) - { - return url.GetUmbracoApiService(actionName, controllerName, "", routeVals); - } - /// /// Return the Url for a Web Api service /// From e2d41106856e599c009fd06dd3397ccc930bf4c9 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Tue, 29 Jan 2019 10:46:10 +0000 Subject: [PATCH 338/437] When creating a PartialView we do a string.replace for Model.Content. to be Model. as MacroPartialViews work with Model.Content and PartialViews like Model. --- src/Umbraco.Core/Services/Implement/FileService.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Services/Implement/FileService.cs b/src/Umbraco.Core/Services/Implement/FileService.cs index f49395d73d..cbf961595e 100644 --- a/src/Umbraco.Core/Services/Implement/FileService.cs +++ b/src/Umbraco.Core/Services/Implement/FileService.cs @@ -764,6 +764,12 @@ namespace Umbraco.Core.Services.Implement //strip the @inherits if it's there snippetContent = StripPartialViewHeader(snippetContent); + //Update Model.Content. to be Model. when used as PartialView + if(partialViewType == PartialViewType.PartialView) + { + snippetContent = snippetContent.Replace("Model.Content.", "Model."); + } + partialViewContent = $"{partialViewHeader}{Environment.NewLine}{snippetContent}"; } } @@ -790,7 +796,7 @@ namespace Umbraco.Core.Services.Implement } return Attempt.Succeed(partialView); - } + } public bool DeletePartialView(string path, int userId = 0) { @@ -1027,6 +1033,12 @@ namespace Umbraco.Core.Services.Implement //strip the @inherits if it's there snippetContent = StripPartialViewHeader(snippetContent); + //Update Model.Content. to be Model. when used as PartialView + if (partialViewType == PartialViewType.PartialView) + { + snippetContent = snippetContent.Replace("Model.Content.", "Model."); + } + var content = $"{partialViewHeader}{Environment.NewLine}{snippetContent}"; return content; } From 6bf7db79e3d02840c08c1df55208d8301244da93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 29 Jan 2019 12:05:52 +0100 Subject: [PATCH 339/437] frontend design update for brandcolors 2019 --- .../content/umbcontentnodeinfo.directive.js | 8 ++++++++ .../components/umbconfirm.directive.js | 3 ++- src/Umbraco.Web.UI.Client/src/less/buttons.less | 2 +- .../src/less/components/editor.less | 2 +- .../src/less/components/html/umb-alert.less | 12 ++++++------ .../src/less/components/tree/umb-tree-item.less | 10 +++++++--- .../src/less/components/tree/umb-tree.less | 2 +- .../src/less/components/umb-badge.less | 2 +- .../src/less/components/umb-node-preview.less | 4 ++-- .../less/components/umb-progress-circle.less | 2 +- .../src/less/dashboards.less | 2 +- src/Umbraco.Web.UI.Client/src/less/main.less | 3 +-- src/Umbraco.Web.UI.Client/src/less/mixins.less | 4 ++-- .../src/less/sections.less | 1 + .../src/less/variables.less | 17 +++++++++++------ .../components/editor/umb-editor-menu.html | 2 +- .../src/views/components/umb-confirm.html | 8 ++++---- .../src/views/content/delete.html | 4 ++-- .../propertyeditors/listview/listview.html | 2 +- 19 files changed, 54 insertions(+), 36 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbcontentnodeinfo.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbcontentnodeinfo.directive.js index b65bf447e7..0a25471c4f 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbcontentnodeinfo.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbcontentnodeinfo.directive.js @@ -245,13 +245,21 @@ function setAuditTrailLogTypeColor(auditTrail) { angular.forEach(auditTrail, function (item) { + + console.log(item.logType); + switch (item.logType) { + case "Save": + item.logTypeColor = "primary"; + break; case "Publish": case "PublishVariant": item.logTypeColor = "success"; break; case "Unpublish": case "UnpublishVariant": + item.logTypeColor = "warning"; + break; case "Delete": item.logTypeColor = "danger"; break; diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbconfirm.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbconfirm.directive.js index 18e08bb973..ca9e7a6712 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbconfirm.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbconfirm.directive.js @@ -54,7 +54,8 @@ function confirmDirective() { scope: { onConfirm: '=', onCancel: '=', - caption: '@' + caption: '@', + confirmButtonStyle: '@' }, link: function (scope, element, attr, ctrl) { scope.showCancel = false; diff --git a/src/Umbraco.Web.UI.Client/src/less/buttons.less b/src/Umbraco.Web.UI.Client/src/less/buttons.less index dee591c437..00deec0a94 100644 --- a/src/Umbraco.Web.UI.Client/src/less/buttons.less +++ b/src/Umbraco.Web.UI.Client/src/less/buttons.less @@ -200,7 +200,7 @@ input[type="button"] { .buttonBackground(@blueExtraDark, @blueDark, @pinkLight, @u-white); } // Made for Umbraco, 2019, used for buttons that has to stand back. -.btn-transparent { +.btn-white { .buttonBackground(@btnWhiteBackground, @btnWhiteBackgroundHighlight, @btnWhiteType, @btnWhiteTypeHover); } // Inverse appears as dark gray diff --git a/src/Umbraco.Web.UI.Client/src/less/components/editor.less b/src/Umbraco.Web.UI.Client/src/less/components/editor.less index bb54b254df..d576c33b67 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/editor.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/editor.less @@ -133,7 +133,7 @@ a.umb-editor-header__close-split-view:hover { } .umb-editor-header { - .btn-transparent { + .btn-white { height:69px; border-radius: 0; padding-left: 30px; diff --git a/src/Umbraco.Web.UI.Client/src/less/components/html/umb-alert.less b/src/Umbraco.Web.UI.Client/src/less/components/html/umb-alert.less index 4cbee6b15e..934992fc6e 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/html/umb-alert.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/html/umb-alert.less @@ -6,16 +6,16 @@ } .umb-alert--info { - background-color: @turquoise-washed; - border: 1px solid @blueMid; + background-color: @blueLight; + border: 1px solid @blueDark; } .umb-alert--warning { - background-color: @yellow-washed; - border: 1px solid @yellow; + background-color: @pinkLight; + border: 1px solid @pink; } .umb-alert--danger { - background-color: @red-washed; - border: 1px solid @red; + background-color: @pinkLight; + border: 1px solid @pink; } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less index 16bff41fd7..377b61c225 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less @@ -2,7 +2,11 @@ display: block; min-width: 100%; width: auto; - + + .umb-tree-item__label { + user-select: none; + } + &:hover ins { visibility: visible; cursor: pointer @@ -14,7 +18,7 @@ &:hover .umb-tree-item__label { overflow: hidden; margin-right: 6px; - } + } // Loading Animation // ------------------------ @@ -47,7 +51,7 @@ // override small icon color. TODO => check usage &:before { - color: @pink; + color: @blue; } .umb-options { diff --git a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less index 8da00f5d0f..6b6f0c5f60 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less @@ -271,7 +271,7 @@ body.touch .umb-tree { .is-container::before { content: "\e04e"; - color: @turquoise; + color: @blue; font-size: 8px; padding-left: 13px; padding-top: 8px; diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-badge.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-badge.less index cad6dbaf2f..9a18bef2de 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-badge.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-badge.less @@ -30,7 +30,7 @@ } .umb-badge--warning { - background-color: @yellow-d1; + background-color: @orange; color: @white; } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less index 233441c5d9..b10e761d68 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less @@ -71,12 +71,12 @@ margin-right: 5px; font-size: 13px; font-weight: bold; - color: @ui-action-disgrete-type; + color: @ui-action-type; cursor: pointer; } .umb-node-preview__action:hover { - color: @ui-action-disgrete-type-hover; + color: @ui-action-type-hover; text-decoration: none; opacity: 1; } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-progress-circle.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-progress-circle.less index 348d7bb5db..5e98075fc2 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-progress-circle.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-progress-circle.less @@ -17,7 +17,7 @@ } .umb-progress-circle__highlight--primary { - stroke: @turquoise; + stroke: @blue; } .umb-progress-circle__highlight--secondary { diff --git a/src/Umbraco.Web.UI.Client/src/less/dashboards.less b/src/Umbraco.Web.UI.Client/src/less/dashboards.less index cc13ad31fd..0ddef2e8b1 100644 --- a/src/Umbraco.Web.UI.Client/src/less/dashboards.less +++ b/src/Umbraco.Web.UI.Client/src/less/dashboards.less @@ -133,4 +133,4 @@ } -} \ No newline at end of file +} diff --git a/src/Umbraco.Web.UI.Client/src/less/main.less b/src/Umbraco.Web.UI.Client/src/less/main.less index 12a13e11ed..3a8228bde5 100644 --- a/src/Umbraco.Web.UI.Client/src/less/main.less +++ b/src/Umbraco.Web.UI.Client/src/less/main.less @@ -495,7 +495,7 @@ table thead a { // ------------------------ .umb-loader{ -background-color: @turquoise-d1; +background-color: @blue; margin-top:0; margin-left:-100%; -moz-animation-name:bounce_loadingProgressG; @@ -671,4 +671,3 @@ input[type=checkbox]:checked + .input-label--small { width: 1px !important; overflow: hidden; } - diff --git a/src/Umbraco.Web.UI.Client/src/less/mixins.less b/src/Umbraco.Web.UI.Client/src/less/mixins.less index a9f10bb196..b67fd1dd25 100644 --- a/src/Umbraco.Web.UI.Client/src/less/mixins.less +++ b/src/Umbraco.Web.UI.Client/src/less/mixins.less @@ -538,8 +538,8 @@ } &.disabled, &[disabled] { - color: @textColor; - background-color: @gray-4; + color: @white; + background-color: @sand-2; } /* // IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves diff --git a/src/Umbraco.Web.UI.Client/src/less/sections.less b/src/Umbraco.Web.UI.Client/src/less/sections.less index c0a95c97c5..cf362a67f0 100644 --- a/src/Umbraco.Web.UI.Client/src/less/sections.less +++ b/src/Umbraco.Web.UI.Client/src/less/sections.less @@ -57,6 +57,7 @@ ul.sections>li.current>a .section__name, ul.sections>li>a:hover .section__name, ul.sections>li>a:focus .section__name { opacity: 1; + -webkit-font-smoothing: subpixel-antialiased; } diff --git a/src/Umbraco.Web.UI.Client/src/less/variables.less b/src/Umbraco.Web.UI.Client/src/less/variables.less index c370a2090a..6c906f3161 100644 --- a/src/Umbraco.Web.UI.Client/src/less/variables.less +++ b/src/Umbraco.Web.UI.Client/src/less/variables.less @@ -75,9 +75,10 @@ @gray-9: #E9E9EB; @gray-10: #F3F3F5; -@sand-2: hsl(50, 20%, 88%);// added 2019 -@sand-5: #f3efe9;// added 2019 -@sand-7: hsl(50, 20%, 97%);// added 2019 +@sand-1: hsl(22, 33%, 93%);// added 2019 +@sand-2: hsl(22, 34%, 88%);// added 2019 +@sand-5: hsl(22, 31%, 93%);// added 2019 +@sand-7: hsl(22, 26%, 97%);// added 2019 // Additional Icon Colours @@ -112,9 +113,11 @@ @orange: #f79c37;// updated 2019 @pink: #D93F4C;// #C3325F;// update 2019 @pinkLight: #f5c1bc;// added 2019 +@pinkRedLight: #ff8a89;// added 2019 @brown: #9d8057;// added 2019 @brownLight: #e4e0dd;// added 2019 @brownGrayLight: #f3f2f1;// added 2019 +@orange: #ff9412;// added 2019 //@claus: #f6efe7; //@claus2: #f2ebe6; //@claus3: #535963; //#56777A @@ -141,8 +144,8 @@ @ui-active-type: @blueExtraDark; @ui-active-type-hover: @blueMid; -@ui-selected: @brownLight; -@ui-selected-hover: ligthen(@brownLight, 10); +@ui-selected: @sand-1; +@ui-selected-hover: ligthen(@sand-1, 10); @ui-selected-type: @blueMid; @ui-selected-type-hover: @blueMid; @@ -157,6 +160,8 @@ @ui-action: @blueMid; @ui-action-hover: @blueMid; +@ui-action-type: @blueExtraDark; +@ui-action-type-hover: @blueMid; @ui-action-disgrete: white; @ui-action-disgrete-hover: @brownLight; @@ -262,7 +267,7 @@ // ------------------------- @appHeaderHeight: 55px; @bodyBackground: @gray-10; -@textColor: @gray-2; +@textColor: #000; @editorHeaderHeight: 70px; @editorFooterHeight: 50px; diff --git a/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-menu.html b/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-menu.html index 65935c3795..c621670462 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-menu.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-menu.html @@ -2,7 +2,7 @@ diff --git a/src/Umbraco.Web.UI.Client/src/views/components/umb-confirm.html b/src/Umbraco.Web.UI.Client/src/views/components/umb-confirm.html index ebe829ea52..70839f2625 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/umb-confirm.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/umb-confirm.html @@ -1,10 +1,10 @@

    {{caption}}

    - +
    -
    +
    Cancel - Ok -
    + Ok +
    diff --git a/src/Umbraco.Web.UI.Client/src/views/content/delete.html b/src/Umbraco.Web.UI.Client/src/views/content/delete.html index 8e85bfeaeb..047776de54 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/delete.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/delete.html @@ -5,11 +5,11 @@ Are you sure you want to delete {{currentNode.name}} ?

    -
    +
    This will delete the node and all its languages. If you only want to delete one language go and unpublish it instead.
    - +
    diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html index abf571cfbf..dba6a41a7c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html @@ -37,7 +37,7 @@
    - + Create From 66ca8c601812268b38f1dd8f852704945e05fa7e Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Tue, 29 Jan 2019 12:25:23 +0100 Subject: [PATCH 340/437] Respect the name casing when creating a new template --- src/Umbraco.Core/Services/IFileService.cs | 2 +- .../Services/Implement/FileService.cs | 7 ++--- .../Services/FileServiceTests.cs | 27 ++++++++++++++----- src/Umbraco.Web/Editors/TemplateController.cs | 2 +- 4 files changed, 26 insertions(+), 12 deletions(-) diff --git a/src/Umbraco.Core/Services/IFileService.cs b/src/Umbraco.Core/Services/IFileService.cs index d32c984b5e..8596424b03 100644 --- a/src/Umbraco.Core/Services/IFileService.cs +++ b/src/Umbraco.Core/Services/IFileService.cs @@ -200,7 +200,7 @@ namespace Umbraco.Core.Services /// Attempt> CreateTemplateForContentType(string contentTypeAlias, string contentTypeName, int userId = 0); - ITemplate CreateTemplateWithIdentity(string name, string content, ITemplate masterTemplate = null, int userId = 0); + ITemplate CreateTemplateWithIdentity(string name, string alias, string content, ITemplate masterTemplate = null, int userId = 0); /// /// Deletes a template by its alias diff --git a/src/Umbraco.Core/Services/Implement/FileService.cs b/src/Umbraco.Core/Services/Implement/FileService.cs index f49395d73d..658e3b93a5 100644 --- a/src/Umbraco.Core/Services/Implement/FileService.cs +++ b/src/Umbraco.Core/Services/Implement/FileService.cs @@ -390,16 +390,17 @@ namespace Umbraco.Core.Services.Implement /// Create a new template, setting the content if a view exists in the filesystem /// /// + /// /// /// /// /// - public ITemplate CreateTemplateWithIdentity(string name, string content, ITemplate masterTemplate = null, int userId = 0) + public ITemplate CreateTemplateWithIdentity(string name, string alias, string content, ITemplate masterTemplate = null, int userId = 0) { // file might already be on disk, if so grab the content to avoid overwriting - var template = new Template(name, name) + var template = new Template(name, alias) { - Content = GetViewContent(name) ?? content + Content = GetViewContent(alias) ?? content }; if (masterTemplate != null) diff --git a/src/Umbraco.Tests/Services/FileServiceTests.cs b/src/Umbraco.Tests/Services/FileServiceTests.cs index b419ae186f..fa27a3ee81 100644 --- a/src/Umbraco.Tests/Services/FileServiceTests.cs +++ b/src/Umbraco.Tests/Services/FileServiceTests.cs @@ -19,8 +19,8 @@ namespace Umbraco.Tests.Services [Test] public void Create_Template_Then_Assign_Child() { - var child = ServiceContext.FileService.CreateTemplateWithIdentity("child", "test"); - var parent = ServiceContext.FileService.CreateTemplateWithIdentity("parent", "test"); + var child = ServiceContext.FileService.CreateTemplateWithIdentity("Child", "child", "test"); + var parent = ServiceContext.FileService.CreateTemplateWithIdentity("Parent", "parent", "test"); child.SetMasterTemplate(parent); ServiceContext.FileService.SaveTemplate(child); @@ -34,8 +34,8 @@ namespace Umbraco.Tests.Services [Test] public void Create_Template_With_Child_Then_Unassign() { - var parent = ServiceContext.FileService.CreateTemplateWithIdentity("parent", "test"); - var child = ServiceContext.FileService.CreateTemplateWithIdentity("child", "test", parent); + var parent = ServiceContext.FileService.CreateTemplateWithIdentity("Parent", "parent", "test"); + var child = ServiceContext.FileService.CreateTemplateWithIdentity("Child", "child", "test", parent); child.SetMasterTemplate(null); ServiceContext.FileService.SaveTemplate(child); @@ -48,9 +48,9 @@ namespace Umbraco.Tests.Services [Test] public void Can_Query_Template_Children() { - var parent = ServiceContext.FileService.CreateTemplateWithIdentity("parent", "test"); - var child1 = ServiceContext.FileService.CreateTemplateWithIdentity("child1", "test", parent); - var child2 = ServiceContext.FileService.CreateTemplateWithIdentity("child2", "test", parent); + var parent = ServiceContext.FileService.CreateTemplateWithIdentity("Parent", "parent", "test"); + var child1 = ServiceContext.FileService.CreateTemplateWithIdentity("Child1", "child1", "test", parent); + var child2 = ServiceContext.FileService.CreateTemplateWithIdentity("Child2", "child2", "test", parent); var children = ServiceContext.FileService.GetTemplates(parent.Id).Select(x => x.Id).ToArray(); @@ -58,5 +58,18 @@ namespace Umbraco.Tests.Services Assert.IsTrue(children.Contains(child2.Id)); } + [Test] + public void Create_Template_With_Custom_Alias() + { + var template = ServiceContext.FileService.CreateTemplateWithIdentity("Test template", "customTemplateAlias", "test"); + + ServiceContext.FileService.SaveTemplate(template); + + template = ServiceContext.FileService.GetTemplate(template.Id); + + Assert.AreEqual("Test template", template.Name); + Assert.AreEqual("customTemplateAlias", template.Alias); + } + } } diff --git a/src/Umbraco.Web/Editors/TemplateController.cs b/src/Umbraco.Web/Editors/TemplateController.cs index ac9341a095..f91d27ceae 100644 --- a/src/Umbraco.Web/Editors/TemplateController.cs +++ b/src/Umbraco.Web/Editors/TemplateController.cs @@ -184,7 +184,7 @@ namespace Umbraco.Web.Editors throw new HttpResponseException(HttpStatusCode.NotFound); } - var template = Services.FileService.CreateTemplateWithIdentity(display.Alias, display.Content, master); + var template = Services.FileService.CreateTemplateWithIdentity(display.Name, display.Alias, display.Content, master); Mapper.Map(template, display); } From e7b0e43d982af756a572fd69ece1574b2ec78639 Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 29 Jan 2019 22:38:03 +1100 Subject: [PATCH 341/437] removes scripting.config, EnableSplashWhileLoading, RenderingEngine, and more! --- .../UmbracoSettings/ContentElement.cs | 5 -- .../UmbracoSettings/IContentSection.cs | 4 +- src/Umbraco.Core/RenderingEngine.cs | 9 ---- src/Umbraco.Core/Umbraco.Core.csproj | 1 - src/Umbraco.Tests/Cache/AppCacheTests.cs | 52 ++++++++++--------- .../UmbracoSettings/ContentElementTests.cs | 6 +-- .../Routing/RenderRouteHandlerTests.cs | 1 - src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 14 ----- .../config/scripting.Release.config | 11 ---- src/Umbraco.Web.UI/config/scripting.config | 11 ---- src/Umbraco.Web.UI/web.Template.config | 2 - .../Cache/ContentCacheRefresher.cs | 4 +- src/Umbraco.Web/Cache/MacroCacheRefresher.cs | 9 ---- .../Editors/DashboardController.cs | 6 +-- src/Umbraco.Web/Mvc/RenderRouteHandler.cs | 3 -- src/Umbraco.Web/Mvc/UmbracoPageResult.cs | 27 +++++----- src/Umbraco.Web/Routing/PublishedRequest.cs | 39 ++------------ src/Umbraco.Web/Routing/PublishedRouter.cs | 24 --------- src/Umbraco.Web/Templates/TemplateRenderer.cs | 35 +++++-------- src/Umbraco.Web/Umbraco.Web.csproj | 1 - src/Umbraco.Web/UmbracoInjectedModule.cs | 6 +-- .../umbraco.presentation/MacroCacheContent.cs | 28 ---------- 22 files changed, 65 insertions(+), 233 deletions(-) delete mode 100644 src/Umbraco.Core/RenderingEngine.cs delete mode 100644 src/Umbraco.Web.UI/config/scripting.Release.config delete mode 100644 src/Umbraco.Web.UI/config/scripting.config delete mode 100644 src/Umbraco.Web/umbraco.presentation/MacroCacheContent.cs diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs index 91627edb8b..abeaa8542a 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs @@ -40,9 +40,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings [ConfigurationProperty("XmlContentCheckForDiskChanges")] internal InnerTextConfigurationElement XmlContentCheckForDiskChanges => GetOptionalTextElement("XmlContentCheckForDiskChanges", false); - [ConfigurationProperty("EnableSplashWhileLoading")] - internal InnerTextConfigurationElement EnableSplashWhileLoading => GetOptionalTextElement("EnableSplashWhileLoading", false); - [ConfigurationProperty("PropertyContextHelpOption")] internal InnerTextConfigurationElement PropertyContextHelpOption => GetOptionalTextElement("PropertyContextHelpOption", "text"); @@ -110,8 +107,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings bool IContentSection.XmlContentCheckForDiskChanges => XmlContentCheckForDiskChanges; - bool IContentSection.EnableSplashWhileLoading => EnableSplashWhileLoading; - string IContentSection.PropertyContextHelpOption => PropertyContextHelpOption; bool IContentSection.ForceSafeAliases => ForceSafeAliases; diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs index fe2eea5d91..00dc7f073d 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs @@ -35,8 +35,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings bool XmlContentCheckForDiskChanges { get; } - bool EnableSplashWhileLoading { get; } - string PropertyContextHelpOption { get; } bool ForceSafeAliases { get; } @@ -67,4 +65,4 @@ namespace Umbraco.Core.Configuration.UmbracoSettings string LoginBackgroundImage { get; } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/RenderingEngine.cs b/src/Umbraco.Core/RenderingEngine.cs deleted file mode 100644 index ac1c9dce56..0000000000 --- a/src/Umbraco.Core/RenderingEngine.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Umbraco.Core -{ - public enum RenderingEngine - { - Unknown, - Mvc, - WebForms - } -} diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index fb54e4a4f4..588c66cd3d 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -1308,7 +1308,6 @@ - diff --git a/src/Umbraco.Tests/Cache/AppCacheTests.cs b/src/Umbraco.Tests/Cache/AppCacheTests.cs index 29d61cc14a..3a86feb90a 100644 --- a/src/Umbraco.Tests/Cache/AppCacheTests.cs +++ b/src/Umbraco.Tests/Cache/AppCacheTests.cs @@ -3,7 +3,6 @@ using System.Linq; using System.Web.UI; using NUnit.Framework; using Umbraco.Core.Cache; -using umbraco; namespace Umbraco.Tests.Cache { @@ -104,9 +103,9 @@ namespace Umbraco.Tests.Cache [Test] public void Can_Get_By_Search() { - var cacheContent1 = new MacroCacheContent(new LiteralControl(), "Test1"); - var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2"); - var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3"); + var cacheContent1 = new MacroCacheContent(); + var cacheContent2 = new MacroCacheContent(); + var cacheContent3 = new MacroCacheContent(); var cacheContent4 = new LiteralControl(); AppCache.Get("Test1", () => cacheContent1); AppCache.Get("Tester2", () => cacheContent2); @@ -123,9 +122,9 @@ namespace Umbraco.Tests.Cache [Test] public void Can_Clear_By_Expression() { - var cacheContent1 = new MacroCacheContent(new LiteralControl(), "Test1"); - var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2"); - var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3"); + var cacheContent1 = new MacroCacheContent(); + var cacheContent2 = new MacroCacheContent(); + var cacheContent3 = new MacroCacheContent(); var cacheContent4 = new LiteralControl(); AppCache.Get("TTes1t", () => cacheContent1); AppCache.Get("Tester2", () => cacheContent2); @@ -142,9 +141,9 @@ namespace Umbraco.Tests.Cache [Test] public void Can_Clear_By_Search() { - var cacheContent1 = new MacroCacheContent(new LiteralControl(), "Test1"); - var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2"); - var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3"); + var cacheContent1 = new MacroCacheContent(); + var cacheContent2 = new MacroCacheContent(); + var cacheContent3 = new MacroCacheContent(); var cacheContent4 = new LiteralControl(); AppCache.Get("Test1", () => cacheContent1); AppCache.Get("Tester2", () => cacheContent2); @@ -161,9 +160,9 @@ namespace Umbraco.Tests.Cache [Test] public void Can_Clear_By_Key() { - var cacheContent1 = new MacroCacheContent(new LiteralControl(), "Test1"); - var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2"); - var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3"); + var cacheContent1 = new MacroCacheContent(); + var cacheContent2 = new MacroCacheContent(); + var cacheContent3 = new MacroCacheContent(); var cacheContent4 = new LiteralControl(); AppCache.Get("Test1", () => cacheContent1); AppCache.Get("Test2", () => cacheContent2); @@ -181,9 +180,9 @@ namespace Umbraco.Tests.Cache [Test] public void Can_Clear_All_Items() { - var cacheContent1 = new MacroCacheContent(new LiteralControl(), "Test1"); - var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2"); - var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3"); + var cacheContent1 = new MacroCacheContent(); + var cacheContent2 = new MacroCacheContent(); + var cacheContent3 = new MacroCacheContent(); var cacheContent4 = new LiteralControl(); AppCache.Get("Test1", () => cacheContent1); AppCache.Get("Test2", () => cacheContent2); @@ -200,7 +199,7 @@ namespace Umbraco.Tests.Cache [Test] public void Can_Add_When_Not_Available() { - var cacheContent1 = new MacroCacheContent(new LiteralControl(), "Test1"); + var cacheContent1 = new MacroCacheContent(); AppCache.Get("Test1", () => cacheContent1); Assert.AreEqual(1, GetTotalItemCount); } @@ -208,7 +207,7 @@ namespace Umbraco.Tests.Cache [Test] public void Can_Get_When_Available() { - var cacheContent1 = new MacroCacheContent(new LiteralControl(), "Test1"); + var cacheContent1 = new MacroCacheContent(); var result = AppCache.Get("Test1", () => cacheContent1); var result2 = AppCache.Get("Test1", () => cacheContent1); Assert.AreEqual(1, GetTotalItemCount); @@ -218,9 +217,9 @@ namespace Umbraco.Tests.Cache [Test] public void Can_Remove_By_Type_Name() { - var cacheContent1 = new MacroCacheContent(new LiteralControl(), "Test1"); - var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2"); - var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3"); + var cacheContent1 = new MacroCacheContent(); + var cacheContent2 = new MacroCacheContent(); + var cacheContent3 = new MacroCacheContent(); var cacheContent4 = new LiteralControl(); AppCache.Get("Test1", () => cacheContent1); AppCache.Get("Test2", () => cacheContent2); @@ -238,9 +237,9 @@ namespace Umbraco.Tests.Cache [Test] public void Can_Remove_By_Strong_Type() { - var cacheContent1 = new MacroCacheContent(new LiteralControl(), "Test1"); - var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2"); - var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3"); + var cacheContent1 = new MacroCacheContent(); + var cacheContent2 = new MacroCacheContent(); + var cacheContent3 = new MacroCacheContent(); var cacheContent4 = new LiteralControl(); AppCache.Get("Test1", () => cacheContent1); AppCache.Get("Test2", () => cacheContent2); @@ -253,5 +252,10 @@ namespace Umbraco.Tests.Cache Assert.AreEqual(1, GetTotalItemCount); } + + //just used for these tests + private class MacroCacheContent + { + } } } diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs index 962d6d13a9..d1b86c6c37 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs @@ -130,11 +130,7 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings { Assert.IsTrue(SettingsSection.Content.XmlContentCheckForDiskChanges); } - [Test] - public void EnableSplashWhileLoading() - { - Assert.IsFalse(SettingsSection.Content.EnableSplashWhileLoading); - } + [Test] public void PropertyContextHelpOption() { diff --git a/src/Umbraco.Tests/Routing/RenderRouteHandlerTests.cs b/src/Umbraco.Tests/Routing/RenderRouteHandlerTests.cs index 569f5382e8..71e3836b3d 100644 --- a/src/Umbraco.Tests/Routing/RenderRouteHandlerTests.cs +++ b/src/Umbraco.Tests/Routing/RenderRouteHandlerTests.cs @@ -97,7 +97,6 @@ namespace Umbraco.Tests.Routing var frequest = publishedRouter.CreateRequest(umbracoContext); frequest.PublishedContent = umbracoContext.ContentCache.GetById(1174); frequest.TemplateModel = template; - frequest.RenderingEngine = RenderingEngine.Mvc; var handler = new RenderRouteHandler(umbracoContext, new TestControllerFactory(umbracoContext, Mock.Of())); diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index f05a7b4eed..5e61de2132 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -206,15 +206,6 @@ tinyMceConfig.config Designer - - scripting.config - - - Dashboard.config - Designer - - feedProxy.config - @@ -249,7 +240,6 @@ Designer - @@ -307,10 +297,6 @@ Designer - - Designer - - Designer diff --git a/src/Umbraco.Web.UI/config/scripting.Release.config b/src/Umbraco.Web.UI/config/scripting.Release.config deleted file mode 100644 index 085856c52e..0000000000 --- a/src/Umbraco.Web.UI/config/scripting.Release.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/src/Umbraco.Web.UI/config/scripting.config b/src/Umbraco.Web.UI/config/scripting.config deleted file mode 100644 index 085856c52e..0000000000 --- a/src/Umbraco.Web.UI/config/scripting.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/src/Umbraco.Web.UI/web.Template.config b/src/Umbraco.Web.UI/web.Template.config index e7399f600b..ab6e9258b9 100644 --- a/src/Umbraco.Web.UI/web.Template.config +++ b/src/Umbraco.Web.UI/web.Template.config @@ -8,7 +8,6 @@ --> -
    @@ -30,7 +29,6 @@ - diff --git a/src/Umbraco.Web/Cache/ContentCacheRefresher.cs b/src/Umbraco.Web/Cache/ContentCacheRefresher.cs index 99a1e6c803..e4d2c2e4da 100644 --- a/src/Umbraco.Web/Cache/ContentCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/ContentCacheRefresher.cs @@ -102,8 +102,7 @@ namespace Umbraco.Web.Cache if (payloads.Any(x => x.ChangeTypes.HasType(TreeChangeTypes.RefreshAll)) || publishedChanged) { // when a public version changes - Current.AppCaches.ClearPartialViewCache(); - MacroCacheRefresher.ClearMacroContentCache(AppCaches); // just the content + AppCaches.ClearPartialViewCache(); } base.Refresh(payloads); @@ -160,7 +159,6 @@ namespace Umbraco.Web.Cache // simple for now, just clear the whole thing appCaches.ClearPartialViewCache(); - MacroCacheRefresher.ClearMacroContentCache(appCaches); // just the content appCaches.IsolatedCaches.ClearCache(); appCaches.IsolatedCaches.ClearCache(); diff --git a/src/Umbraco.Web/Cache/MacroCacheRefresher.cs b/src/Umbraco.Web/Cache/MacroCacheRefresher.cs index b224a07151..741604ee81 100644 --- a/src/Umbraco.Web/Cache/MacroCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/MacroCacheRefresher.cs @@ -37,9 +37,6 @@ namespace Umbraco.Web.Cache ClearAllIsolatedCacheByEntityType(); - //TODO: WB Was I too aggresive with cleanup? - AppCaches.RuntimeCache.ClearOfType(); - base.RefreshAll(); } @@ -111,12 +108,6 @@ namespace Umbraco.Web.Cache return GetAllMacroCacheKeys().Select(x => x + alias).ToArray(); } - public static void ClearMacroContentCache(AppCaches appCaches) - { - //TODO: WB Was I too aggresive with cleanup? - appCaches.RuntimeCache.ClearOfType(); - } - #endregion } } diff --git a/src/Umbraco.Web/Editors/DashboardController.cs b/src/Umbraco.Web/Editors/DashboardController.cs index 91a966cef7..8ae59b974c 100644 --- a/src/Umbraco.Web/Editors/DashboardController.cs +++ b/src/Umbraco.Web/Editors/DashboardController.cs @@ -154,11 +154,7 @@ namespace Umbraco.Web.Editors break; default: - //Throw error - return new HttpResponseMessage(HttpStatusCode.Unauthorized) - { - Content = new StringContent($"The Site {site} and {url} is not on the whitelist"), - }; + return new HttpResponseMessage(HttpStatusCode.NotFound); } diff --git a/src/Umbraco.Web/Mvc/RenderRouteHandler.cs b/src/Umbraco.Web/Mvc/RenderRouteHandler.cs index 48284769ec..4cd7e3b0e0 100644 --- a/src/Umbraco.Web/Mvc/RenderRouteHandler.cs +++ b/src/Umbraco.Web/Mvc/RenderRouteHandler.cs @@ -347,9 +347,6 @@ namespace Umbraco.Web.Mvc // to Mvc since Mvc can't do much return new PublishedContentNotFoundHandler("In addition, no template exists to render the custom 404."); - if (request.RenderingEngine != RenderingEngine.Mvc) // else ? - return new PublishedContentNotFoundHandler("In addition, no rendering engine exists to render the custom 404."); - return null; } diff --git a/src/Umbraco.Web/Mvc/UmbracoPageResult.cs b/src/Umbraco.Web/Mvc/UmbracoPageResult.cs index 96aa7f9039..ea832e1352 100644 --- a/src/Umbraco.Web/Mvc/UmbracoPageResult.cs +++ b/src/Umbraco.Web/Mvc/UmbracoPageResult.cs @@ -30,24 +30,21 @@ namespace Umbraco.Web.Mvc var routeDef = (RouteDefinition)context.RouteData.DataTokens[Umbraco.Core.Constants.Web.UmbracoRouteDefinitionDataToken]; - if (routeDef.PublishedRequest.RenderingEngine == RenderingEngine.Mvc) + var factory = ControllerBuilder.Current.GetControllerFactory(); + context.RouteData.Values["action"] = routeDef.ActionName; + ControllerBase controller = null; + + try { - var factory = ControllerBuilder.Current.GetControllerFactory(); - context.RouteData.Values["action"] = routeDef.ActionName; - ControllerBase controller = null; + controller = CreateController(context, factory, routeDef); - try - { - controller = CreateController(context, factory, routeDef); + CopyControllerData(context, controller); - CopyControllerData(context, controller); - - ExecuteControllerAction(context, controller); - } - finally - { - CleanupController(controller, factory); - } + ExecuteControllerAction(context, controller); + } + finally + { + CleanupController(controller, factory); } } diff --git a/src/Umbraco.Web/Routing/PublishedRequest.cs b/src/Umbraco.Web/Routing/PublishedRequest.cs index cccc89074d..9a775adb85 100644 --- a/src/Umbraco.Web/Routing/PublishedRequest.cs +++ b/src/Umbraco.Web/Routing/PublishedRequest.cs @@ -6,10 +6,8 @@ using System.Web; using umbraco; using Umbraco.Core; using Umbraco.Core.Composing; -using Umbraco.Core.Configuration; using Umbraco.Core.Models; using Umbraco.Core.Models.PublishedContent; -using RenderingEngine = Umbraco.Core.RenderingEngine; namespace Umbraco.Web.Routing { @@ -24,7 +22,6 @@ namespace Umbraco.Web.Routing private bool _readonly; // after prepared private bool _readonlyUri; // after preparing private Uri _uri; // clean uri, no virtual dir, no trailing slash nor .aspx, nothing - private ITemplate _template; // template model if any else null private bool _is404; private DomainAndUri _domain; private CultureInfo _culture; @@ -43,7 +40,6 @@ namespace Umbraco.Web.Routing UmbracoContext = umbracoContext ?? throw new ArgumentNullException(nameof(umbracoContext)); _publishedRouter = publishedRouter ?? throw new ArgumentNullException(nameof(publishedRouter)); Uri = uri ?? umbracoContext.CleanedUmbracoUrl; - RenderingEngine = RenderingEngine.Unknown; } /// @@ -174,8 +170,7 @@ namespace Umbraco.Web.Routing // else // save - var template = _template; - var renderingEngine = RenderingEngine; + var template = TemplateModel; // set published content - this resets the template, and sets IsInternalRedirect to false PublishedContent = content; @@ -185,8 +180,7 @@ namespace Umbraco.Web.Routing if (isInternalRedirect && Current.Configs.Settings().WebRouting.InternalRedirectPreservesTemplate) { // restore - _template = template; - RenderingEngine = renderingEngine; + TemplateModel = template; } } @@ -234,26 +228,12 @@ namespace Umbraco.Web.Routing /// /// Gets or sets the template model to use to display the requested content. /// - internal ITemplate TemplateModel - { - get - { - return _template; - } - - set - { - _template = value; - RenderingEngine = RenderingEngine.Unknown; // reset - if (_template != null) - RenderingEngine = _publishedRouter.FindTemplateRenderingEngine(_template.Alias); - } - } + internal ITemplate TemplateModel { get; set; } /// /// Gets the alias of the template to use to display the requested content. /// - public string TemplateAlias => _template?.Alias; + public string TemplateAlias => TemplateModel?.Alias; /// /// Tries to set the template to use to display the requested content. @@ -309,7 +289,7 @@ namespace Umbraco.Web.Routing /// /// Gets a value indicating whether the content request has a template. /// - public bool HasTemplate => _template != null; + public bool HasTemplate => TemplateModel != null; internal void UpdateOnMissingTemplate() { @@ -361,15 +341,6 @@ namespace Umbraco.Web.Routing #endregion - #region Rendering - - /// - /// Gets or sets whether the rendering engine is MVC or WebForms. - /// - public RenderingEngine RenderingEngine { get; internal set; } - - #endregion - #region Status /// diff --git a/src/Umbraco.Web/Routing/PublishedRouter.cs b/src/Umbraco.Web/Routing/PublishedRouter.cs index 63def7a1cd..7ffb01e7f6 100644 --- a/src/Umbraco.Web/Routing/PublishedRouter.cs +++ b/src/Umbraco.Web/Routing/PublishedRouter.cs @@ -15,7 +15,6 @@ using Umbraco.Core.Models; using Umbraco.Core.Models.PublishedContent; using Umbraco.Core.Services; using Umbraco.Web.Security; -using RenderingEngine = Umbraco.Core.RenderingEngine; namespace Umbraco.Web.Routing { @@ -365,29 +364,6 @@ namespace Umbraco.Web.Routing #region Rendering engine - /// - /// Finds the rendering engine to use to render a template specified by its alias. - /// - /// The alias of the template. - /// The rendering engine, or Unknown if the template was not found. - internal RenderingEngine FindTemplateRenderingEngine(string alias) - { - if (string.IsNullOrWhiteSpace(alias)) - return RenderingEngine.Unknown; - - alias = alias.Replace('\\', '/'); // forward slashes only - - // NOTE: we could start with what's the current default? - - // TODO: bad - we probably should be using the appropriate filesystems! - - if (FindTemplateRenderingEngineInDirectory(new DirectoryInfo(IOHelper.MapPath(SystemDirectories.MvcViews)), - alias, new[] { ".cshtml", ".vbhtml" })) - return RenderingEngine.Mvc; - - return RenderingEngine.Unknown; - } - internal bool FindTemplateRenderingEngineInDirectory(DirectoryInfo directory, string alias, string[] extensions) { if (directory == null || directory.Exists == false) diff --git a/src/Umbraco.Web/Templates/TemplateRenderer.cs b/src/Umbraco.Web/Templates/TemplateRenderer.cs index 686f8e21e2..24526de7b2 100644 --- a/src/Umbraco.Web/Templates/TemplateRenderer.cs +++ b/src/Umbraco.Web/Templates/TemplateRenderer.cs @@ -136,31 +136,22 @@ namespace Umbraco.Web.Templates //var queryString = _umbracoContext.HttpContext.Request.QueryString.AllKeys // .ToDictionary(key => key, key => context.Request.QueryString[key]); - switch (request.RenderingEngine) + var requestContext = new RequestContext(_umbracoContext.HttpContext, new RouteData() { - case RenderingEngine.Mvc: - var requestContext = new RequestContext(_umbracoContext.HttpContext, new RouteData() - { - Route = RouteTable.Routes["Umbraco_default"] - }); - var routeHandler = new RenderRouteHandler(_umbracoContext, ControllerBuilder.Current.GetControllerFactory()); - var routeDef = routeHandler.GetUmbracoRouteDefinition(requestContext, request); - var renderModel = new ContentModel(request.PublishedContent); - //manually add the action/controller, this is required by mvc - requestContext.RouteData.Values.Add("action", routeDef.ActionName); - requestContext.RouteData.Values.Add("controller", routeDef.ControllerName); - //add the rest of the required route data - routeHandler.SetupRouteDataForRequest(renderModel, requestContext, request); + Route = RouteTable.Routes["Umbraco_default"] + }); + var routeHandler = new RenderRouteHandler(_umbracoContext, ControllerBuilder.Current.GetControllerFactory()); + var routeDef = routeHandler.GetUmbracoRouteDefinition(requestContext, request); + var renderModel = new ContentModel(request.PublishedContent); + //manually add the action/controller, this is required by mvc + requestContext.RouteData.Values.Add("action", routeDef.ActionName); + requestContext.RouteData.Values.Add("controller", routeDef.ControllerName); + //add the rest of the required route data + routeHandler.SetupRouteDataForRequest(renderModel, requestContext, request); - var stringOutput = RenderUmbracoRequestToString(requestContext); - - sw.Write(stringOutput); - break; - case RenderingEngine.WebForms: - default: - throw new Exception("We no longer support WebForms in Umbraco"); - } + var stringOutput = RenderUmbracoRequestToString(requestContext); + sw.Write(stringOutput); } /// diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 2d30c27c27..c3d3707fd3 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -261,7 +261,6 @@ - diff --git a/src/Umbraco.Web/UmbracoInjectedModule.cs b/src/Umbraco.Web/UmbracoInjectedModule.cs index 9c413402b8..cc17d32752 100644 --- a/src/Umbraco.Web/UmbracoInjectedModule.cs +++ b/src/Umbraco.Web/UmbracoInjectedModule.cs @@ -270,12 +270,12 @@ namespace Umbraco.Web ReportRuntime(level, "Umbraco is booting."); // let requests pile up and wait for 10s then show the splash anyway - if (Current.Configs.Settings().Content.EnableSplashWhileLoading == false - && ((RuntimeState) _runtime).WaitForRunLevel(TimeSpan.FromSeconds(10))) return true; + //fixme: Do we want this for some insane reason? no other site in history has this + if (((RuntimeState) _runtime).WaitForRunLevel(TimeSpan.FromSeconds(10))) return true; // redirect to booting page httpContext.Response.StatusCode = 503; // temp not available - const string bootUrl = "~/config/splashes/booting.aspx"; + const string bootUrl = "~/config/splashes/booting.aspx"; //fixme: remove booting.aspx once the above question is resolved httpContext.Response.AddHeader("Retry-After", debug ? "1" : "30"); // seconds httpContext.RewritePath(UriUtility.ToAbsolute(bootUrl) + "?url=" + HttpUtility.UrlEncode(uri.ToString())); return false; // cannot serve content diff --git a/src/Umbraco.Web/umbraco.presentation/MacroCacheContent.cs b/src/Umbraco.Web/umbraco.presentation/MacroCacheContent.cs deleted file mode 100644 index 38fa4deca8..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/MacroCacheContent.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Web.UI; - -namespace umbraco -{ - public class MacroCacheContent - { - private readonly Control _control; - private readonly string _id; - - [Obsolete("TODO: WB This seems legacy as we reference WebForms Control type", false)] - public MacroCacheContent(Control control, string ID) - { - _control = control; - _id = ID; - } - - public string ID - { - get { return _id; } - } - - public Control Content - { - get { return _control; } - } - } -} From 2c3a2b29b2bdaa2db5c65da215ae6e44ccf9196c Mon Sep 17 00:00:00 2001 From: Benjamin Carleski Date: Mon, 28 Jan 2019 16:27:57 -0800 Subject: [PATCH 342/437] Obsolete direct hash generation methods, and switch to generic GenerateHash As noted in https://github.com/umbraco/Umbraco-CMS/issues/4292, using direct hash methods can break compliance when on restricted systems that require FIPS compliance. This has been addressed in a few commits. This commit goes further to obsolete methods not previously obsoleted relating to direct hashing calls, and switches a direct call to one of these methods to use the correct, generic GenerateHash. --- src/Umbraco.Core/StringExtensions.cs | 2 ++ src/Umbraco.Web/Models/Mapping/UserModelMapper.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Core/StringExtensions.cs b/src/Umbraco.Core/StringExtensions.cs index 93ff2aac50..869181f1b9 100644 --- a/src/Umbraco.Core/StringExtensions.cs +++ b/src/Umbraco.Core/StringExtensions.cs @@ -731,6 +731,7 @@ namespace Umbraco.Core /// /// Referrs to itself /// The MD5 hashed string + [Obsolete("Please use the GenerateHash method instead. This may be removed in future versions")] public static string ToMd5(this string stringToConvert) { return stringToConvert.GenerateHash("MD5"); @@ -741,6 +742,7 @@ namespace Umbraco.Core /// /// referrs to itself /// The SHA1 hashed string + [Obsolete("Please use the GenerateHash method instead. This may be removed in future versions")] public static string ToSHA1(this string stringToConvert) { return stringToConvert.GenerateHash("SHA1"); diff --git a/src/Umbraco.Web/Models/Mapping/UserModelMapper.cs b/src/Umbraco.Web/Models/Mapping/UserModelMapper.cs index ad6c81e2ee..4c7f8c17f8 100644 --- a/src/Umbraco.Web/Models/Mapping/UserModelMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/UserModelMapper.cs @@ -323,7 +323,7 @@ namespace Umbraco.Web.Models.Mapping .ForMember(detail => detail.Culture, opt => opt.MapFrom(user => user.GetUserCulture(applicationContext.Services.TextService))) .ForMember( detail => detail.EmailHash, - opt => opt.MapFrom(user => user.Email.ToLowerInvariant().Trim().ToMd5())) + opt => opt.MapFrom(user => user.Email.ToLowerInvariant().Trim().GenerateHash())) .ForMember(detail => detail.ParentId, opt => opt.UseValue(-1)) .ForMember(detail => detail.Path, opt => opt.MapFrom(user => "-1," + user.Id)) .ForMember(detail => detail.Notifications, opt => opt.Ignore()) From eef86689c873713741c9b8d122eec1ac851db7fa Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 29 Jan 2019 23:05:59 +1100 Subject: [PATCH 343/437] Removes booting.aspx and creates embedded html pages for booting and failed (if those are ever seen ), renames some classes and namespaces, removes old cdf bundle classes --- .../MultiValuePropertyEditorTests.cs | 1 - .../Runtimes/WebRuntimeComponentTests.cs | 1 - .../JsInitializationTests.cs | 2 +- .../ServerVariablesParserTests.cs | 2 +- ...RenderIndexActionSelectorAttributeTests.cs | 1 - src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 1 - .../config/ClientDependency.Release.config | 2 +- .../config/splashes/booting.aspx | 29 ---- src/Umbraco.Web/{UI => }/CdfLogger.cs | 2 +- src/Umbraco.Web/CompositionExtensions.cs | 9 +- .../Editors/BackOfficeController.cs | 2 +- .../Editors/ContentTypeController.cs | 5 +- .../Editors/DictionaryController.cs | 3 +- src/Umbraco.Web/Editors/MacrosController.cs | 41 +++--- src/Umbraco.Web/Editors/MediaController.cs | 10 +- .../Editors/PackageInstallController.cs | 14 +- src/Umbraco.Web/Editors/PreviewController.cs | 2 +- .../Install/Controllers/InstallController.cs | 2 +- .../JavaScript/AssetInitialization.cs | 2 +- .../ClientDependencyConfiguration.cs | 2 +- .../{UI => }/JavaScript/CssInitialization.cs | 8 +- .../JavaScript/DependencyPathRenderer.cs | 2 +- .../{UI => }/JavaScript/JsInitialization.cs | 6 +- .../{UI => }/JavaScript/JsInitialize.js | 0 src/Umbraco.Web/{UI => }/JavaScript/Main.js | 0 .../{UI => }/JavaScript/PreviewInitialize.js | 0 .../{UI => }/JavaScript/Resources.Designer.cs | 89 +++++------- .../{UI => }/JavaScript/Resources.resx | 0 .../{UI => }/JavaScript/ServerVariables.js | 0 .../JavaScript/ServerVariablesParser.cs | 2 +- .../UmbracoClientDependencyLoader.cs | 2 +- .../ContentEditing/MessagesExtensions.cs | 13 +- .../Models/ContentEditing/Notification.cs | 5 +- .../ContentEditing/NotificationStyle.cs} | 9 +- src/Umbraco.Web/Mvc/ProfilingView.cs | 4 +- src/Umbraco.Web/Mvc/ProfilingViewEngine.cs | 4 +- src/Umbraco.Web/Mvc/UmbracoPageResult.cs | 1 - src/Umbraco.Web/Mvc/UrlHelperExtensions.cs | 72 ---------- .../Routing/RedirectTrackingComponent.cs | 3 +- .../Routing/RedirectTrackingComposer.cs | 2 +- .../Routing/Resources/Booting.html | 9 ++ src/Umbraco.Web/Routing/Resources/Failed.html | 8 ++ .../Routing/Resources/HtmlPages.Designer.cs | 99 ++++++++++++++ .../Routing/Resources/HtmlPages.resx | 127 ++++++++++++++++++ .../Runtime/WebRuntimeComponent.cs | 3 +- .../UI/Bundles/JsApplicationLib.cs | 13 -- src/Umbraco.Web/UI/Bundles/JsJQueryCore.cs | 14 -- src/Umbraco.Web/UI/Bundles/JsJQueryPlugins.cs | 15 --- .../UI/Bundles/JsUmbracoApplicationCore.cs | 13 -- .../UI/Bundles/JsUmbracoApplicationUI.cs | 14 -- src/Umbraco.Web/UI/Bundles/JsUmbracoTree.cs | 18 --- src/Umbraco.Web/Umbraco.Web.csproj | 48 ++++--- src/Umbraco.Web/UmbracoInjectedModule.cs | 10 +- .../AppendCurrentEventMessagesAttribute.cs | 13 +- 54 files changed, 383 insertions(+), 376 deletions(-) delete mode 100644 src/Umbraco.Web.UI/config/splashes/booting.aspx rename src/Umbraco.Web/{UI => }/CdfLogger.cs (97%) rename src/Umbraco.Web/{UI => }/JavaScript/AssetInitialization.cs (98%) rename src/Umbraco.Web/{UI => }/JavaScript/ClientDependencyConfiguration.cs (99%) rename src/Umbraco.Web/{UI => }/JavaScript/CssInitialization.cs (95%) rename src/Umbraco.Web/{UI => }/JavaScript/DependencyPathRenderer.cs (98%) rename src/Umbraco.Web/{UI => }/JavaScript/JsInitialization.cs (99%) rename src/Umbraco.Web/{UI => }/JavaScript/JsInitialize.js (100%) rename src/Umbraco.Web/{UI => }/JavaScript/Main.js (100%) rename src/Umbraco.Web/{UI => }/JavaScript/PreviewInitialize.js (100%) rename src/Umbraco.Web/{UI => }/JavaScript/Resources.Designer.cs (82%) rename src/Umbraco.Web/{UI => }/JavaScript/Resources.resx (100%) rename src/Umbraco.Web/{UI => }/JavaScript/ServerVariables.js (100%) rename src/Umbraco.Web/{UI => }/JavaScript/ServerVariablesParser.cs (95%) rename src/Umbraco.Web/{UI => }/JavaScript/UmbracoClientDependencyLoader.cs (97%) rename src/Umbraco.Web/{UI/SpeechBubbleIcon.cs => Models/ContentEditing/NotificationStyle.cs} (75%) delete mode 100644 src/Umbraco.Web/Mvc/UrlHelperExtensions.cs create mode 100644 src/Umbraco.Web/Routing/Resources/Booting.html create mode 100644 src/Umbraco.Web/Routing/Resources/Failed.html create mode 100644 src/Umbraco.Web/Routing/Resources/HtmlPages.Designer.cs create mode 100644 src/Umbraco.Web/Routing/Resources/HtmlPages.resx delete mode 100644 src/Umbraco.Web/UI/Bundles/JsApplicationLib.cs delete mode 100644 src/Umbraco.Web/UI/Bundles/JsJQueryCore.cs delete mode 100644 src/Umbraco.Web/UI/Bundles/JsJQueryPlugins.cs delete mode 100644 src/Umbraco.Web/UI/Bundles/JsUmbracoApplicationCore.cs delete mode 100644 src/Umbraco.Web/UI/Bundles/JsUmbracoApplicationUI.cs delete mode 100644 src/Umbraco.Web/UI/Bundles/JsUmbracoTree.cs diff --git a/src/Umbraco.Tests/PropertyEditors/MultiValuePropertyEditorTests.cs b/src/Umbraco.Tests/PropertyEditors/MultiValuePropertyEditorTests.cs index 129116bf61..b7037eb192 100644 --- a/src/Umbraco.Tests/PropertyEditors/MultiValuePropertyEditorTests.cs +++ b/src/Umbraco.Tests/PropertyEditors/MultiValuePropertyEditorTests.cs @@ -9,7 +9,6 @@ using Umbraco.Core.Cache; using Umbraco.Core.Composing; using Umbraco.Core.Logging; using Umbraco.Core.Models; -using Umbraco.Core.Profiling; using Umbraco.Core.PropertyEditors; using Umbraco.Core.Services; using Umbraco.Tests.TestHelpers; diff --git a/src/Umbraco.Tests/Runtimes/WebRuntimeComponentTests.cs b/src/Umbraco.Tests/Runtimes/WebRuntimeComponentTests.cs index 97688a7113..27e5328f6f 100644 --- a/src/Umbraco.Tests/Runtimes/WebRuntimeComponentTests.cs +++ b/src/Umbraco.Tests/Runtimes/WebRuntimeComponentTests.cs @@ -1,7 +1,6 @@ using System.Collections.Generic; using System.Web.Mvc; using NUnit.Framework; -using Umbraco.Core.Profiling; using Umbraco.Web.Mvc; using Umbraco.Web.Runtime; diff --git a/src/Umbraco.Tests/Web/AngularIntegration/JsInitializationTests.cs b/src/Umbraco.Tests/Web/AngularIntegration/JsInitializationTests.cs index f16abd578a..c4b5e3247b 100644 --- a/src/Umbraco.Tests/Web/AngularIntegration/JsInitializationTests.cs +++ b/src/Umbraco.Tests/Web/AngularIntegration/JsInitializationTests.cs @@ -1,7 +1,7 @@ using System.Linq; using NUnit.Framework; using Umbraco.Core; -using Umbraco.Web.UI.JavaScript; +using Umbraco.Web.JavaScript; namespace Umbraco.Tests.Web.AngularIntegration { diff --git a/src/Umbraco.Tests/Web/AngularIntegration/ServerVariablesParserTests.cs b/src/Umbraco.Tests/Web/AngularIntegration/ServerVariablesParserTests.cs index 0bf07a83c6..42abecd06b 100644 --- a/src/Umbraco.Tests/Web/AngularIntegration/ServerVariablesParserTests.cs +++ b/src/Umbraco.Tests/Web/AngularIntegration/ServerVariablesParserTests.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using NUnit.Framework; -using Umbraco.Web.UI.JavaScript; using Umbraco.Core; +using Umbraco.Web.JavaScript; namespace Umbraco.Tests.Web.AngularIntegration { diff --git a/src/Umbraco.Tests/Web/Mvc/RenderIndexActionSelectorAttributeTests.cs b/src/Umbraco.Tests/Web/Mvc/RenderIndexActionSelectorAttributeTests.cs index c6609f38c9..29deeb31ec 100644 --- a/src/Umbraco.Tests/Web/Mvc/RenderIndexActionSelectorAttributeTests.cs +++ b/src/Umbraco.Tests/Web/Mvc/RenderIndexActionSelectorAttributeTests.cs @@ -12,7 +12,6 @@ using Umbraco.Core.Cache; using Umbraco.Core.Composing; using Umbraco.Core.Configuration.UmbracoSettings; using Umbraco.Core.Logging; -using Umbraco.Core.Profiling; using Umbraco.Core.Services; using Umbraco.Tests.TestHelpers; using Umbraco.Tests.TestHelpers.Stubs; diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index 5e61de2132..ceca081b37 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -162,7 +162,6 @@ - diff --git a/src/Umbraco.Web.UI/config/ClientDependency.Release.config b/src/Umbraco.Web.UI/config/ClientDependency.Release.config index 4693347955..2814119201 100644 --- a/src/Umbraco.Web.UI/config/ClientDependency.Release.config +++ b/src/Umbraco.Web.UI/config/ClientDependency.Release.config @@ -10,7 +10,7 @@ NOTES: * Compression/Combination/Minification is not enabled unless debug="false" is specified on the 'compiliation' element in the web.config * A new version will invalidate both client and server cache and create new persisted files --> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + booting.html;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 + + + failed.html;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 + + \ No newline at end of file diff --git a/src/Umbraco.Web/Runtime/WebRuntimeComponent.cs b/src/Umbraco.Web/Runtime/WebRuntimeComponent.cs index 26c8faca58..4fb8dadf17 100644 --- a/src/Umbraco.Web/Runtime/WebRuntimeComponent.cs +++ b/src/Umbraco.Web/Runtime/WebRuntimeComponent.cs @@ -19,16 +19,15 @@ using Umbraco.Core.Configuration; using Umbraco.Core.Configuration.UmbracoSettings; using Umbraco.Core.IO; using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Profiling; using Umbraco.Core.Services; using Umbraco.Web.Install; +using Umbraco.Web.JavaScript; using Umbraco.Web.Models.Trees; using Umbraco.Web.Mvc; using Umbraco.Web.PublishedCache; using Umbraco.Web.Routing; using Umbraco.Web.Security; using Umbraco.Web.Trees; -using Umbraco.Web.UI.JavaScript; using Umbraco.Web.WebApi; using Current = Umbraco.Web.Composing.Current; diff --git a/src/Umbraco.Web/UI/Bundles/JsApplicationLib.cs b/src/Umbraco.Web/UI/Bundles/JsApplicationLib.cs deleted file mode 100644 index 5b0ffcd85d..0000000000 --- a/src/Umbraco.Web/UI/Bundles/JsApplicationLib.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Web.UI; -using ClientDependency.Core; - -namespace Umbraco.Web.UI.Bundles -{ - /// - /// The core libs that have no dependencies - /// - [ClientDependency(ClientDependencyType.Javascript, "lib/umbraco/NamespaceManager.js", "UmbracoRoot", Priority = 0, Group = 0)] - public class JsApplicationLib : Control - { - } -} diff --git a/src/Umbraco.Web/UI/Bundles/JsJQueryCore.cs b/src/Umbraco.Web/UI/Bundles/JsJQueryCore.cs deleted file mode 100644 index 570551c0bf..0000000000 --- a/src/Umbraco.Web/UI/Bundles/JsJQueryCore.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Web.UI; -using ClientDependency.Core; - -namespace Umbraco.Web.UI.Bundles -{ - /// - /// The core Jquery libs - /// - [ClientDependency(ClientDependencyType.Javascript, "lib/jquery/jquery.min.js", "UmbracoRoot", Priority = 1, Group = 1)] - [ClientDependency(ClientDependencyType.Javascript, "lib/jquery-migrate/jquery-migrate.min.js", "UmbracoRoot", Priority = 2, Group = 1)] - public class JsJQueryCore : Control - { - } -} diff --git a/src/Umbraco.Web/UI/Bundles/JsJQueryPlugins.cs b/src/Umbraco.Web/UI/Bundles/JsJQueryPlugins.cs deleted file mode 100644 index c5fcdb858b..0000000000 --- a/src/Umbraco.Web/UI/Bundles/JsJQueryPlugins.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Web.UI; -using ClientDependency.Core; -namespace Umbraco.Web.UI.Bundles -{ - /// - /// The core Jquery libs - /// - [ClientDependency(ClientDependencyType.Javascript, "modal/jquery.simplemodal.1.4.1.custom.js", "UmbracoClient", Priority = 2, Group = 4)] - [ClientDependency(ClientDependencyType.Javascript, "Application/jQuery/jquery.cookie.js", "UmbracoClient", Priority = 3, Group = 4)] - [ClientDependency(ClientDependencyType.Javascript, "Application/JQuery/jquery.metadata.min.js", "UmbracoClient", Priority = 4, Group = 4)] - [ClientDependency(ClientDependencyType.Javascript, "Application/jQuery/jquery.hotkeys.js", "UmbracoClient", Priority = 5, Group = 4)] - public class JsJQueryPlugins : Control - { - } -} diff --git a/src/Umbraco.Web/UI/Bundles/JsUmbracoApplicationCore.cs b/src/Umbraco.Web/UI/Bundles/JsUmbracoApplicationCore.cs deleted file mode 100644 index 6ccee78fa3..0000000000 --- a/src/Umbraco.Web/UI/Bundles/JsUmbracoApplicationCore.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Web.UI; -using ClientDependency.Core; - -namespace Umbraco.Web.UI.Bundles -{ - /// - /// The core libs that require JQuery to be loaded - /// - [ClientDependency(ClientDependencyType.Javascript, "lib/umbraco/LegacyUmbClientMgr.js", "UmbracoRoot", Priority = 1, Group = 2)] - public class JsUmbracoApplicationCore : Control - { - } -} diff --git a/src/Umbraco.Web/UI/Bundles/JsUmbracoApplicationUI.cs b/src/Umbraco.Web/UI/Bundles/JsUmbracoApplicationUI.cs deleted file mode 100644 index cd4f8da660..0000000000 --- a/src/Umbraco.Web/UI/Bundles/JsUmbracoApplicationUI.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Web.UI; -using ClientDependency.Core; - -namespace Umbraco.Web.UI.Bundles -{ - /// - /// The UI Umbraco libs - /// - [ClientDependency(ClientDependencyType.Javascript, "js/guiFunctions.js", "UmbracoRoot", Priority = 1, Group = 5)] - [ClientDependency(ClientDependencyType.Javascript, "js/UmbracoSpeechBubbleBackend.js", "UmbracoRoot", Priority = 3, Group = 5)] - public class JsUmbracoApplicationUI : Control - { - } -} diff --git a/src/Umbraco.Web/UI/Bundles/JsUmbracoTree.cs b/src/Umbraco.Web/UI/Bundles/JsUmbracoTree.cs deleted file mode 100644 index 5f393376cf..0000000000 --- a/src/Umbraco.Web/UI/Bundles/JsUmbracoTree.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Web.UI; -using ClientDependency.Core; - -namespace Umbraco.Web.UI.Bundles -{ - /// - /// The umb tree libs - /// - [ClientDependency(ClientDependencyType.Javascript, "Tree/jquery.tree.js", "UmbracoClient", Priority = 0, Group = 10)] - [ClientDependency(ClientDependencyType.Javascript, "Tree/UmbracoContext.js", "UmbracoClient", Priority = 1, Group = 10)] - [ClientDependency(ClientDependencyType.Javascript, "Tree/jquery.tree.contextmenu.js", "UmbracoClient", Priority = 2, Group = 10)] - [ClientDependency(ClientDependencyType.Javascript, "Tree/jquery.tree.checkbox.js", "UmbracoClient", Priority = 3, Group = 10)] - [ClientDependency(ClientDependencyType.Javascript, "Tree/NodeDefinition.js", "UmbracoClient", Priority = 4, Group = 10)] - [ClientDependency(ClientDependencyType.Javascript, "Tree/UmbracoTree.js", "UmbracoClient", Priority = 5, Group = 10)] - public class JsUmbracoTree : Control - { - } -} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index c3d3707fd3..5a3379b82b 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -182,6 +182,11 @@ + + True + True + HtmlPages.resx + @@ -259,7 +264,7 @@ - + @@ -577,9 +582,6 @@ - - - @@ -679,7 +681,7 @@ - + @@ -691,7 +693,6 @@ - @@ -892,9 +893,9 @@ - - - + + + True @@ -1001,7 +1002,7 @@ - + @@ -1035,17 +1036,14 @@ - + True True Resources.resx - + - - - - + @@ -1139,7 +1137,7 @@ - + @@ -1202,7 +1200,7 @@ - + ResXFileCodeGenerator Resources.Designer.cs Designer @@ -1211,15 +1209,21 @@ ResXFileCodeGenerator Strings.Designer.cs - - - + + + + + ResXFileCodeGenerator + HtmlPages.Designer.cs + - + + + diff --git a/src/Umbraco.Web/UmbracoInjectedModule.cs b/src/Umbraco.Web/UmbracoInjectedModule.cs index cc17d32752..2b6d032f72 100644 --- a/src/Umbraco.Web/UmbracoInjectedModule.cs +++ b/src/Umbraco.Web/UmbracoInjectedModule.cs @@ -275,9 +275,10 @@ namespace Umbraco.Web // redirect to booting page httpContext.Response.StatusCode = 503; // temp not available - const string bootUrl = "~/config/splashes/booting.aspx"; //fixme: remove booting.aspx once the above question is resolved + var bootHtml = Routing.Resources.HtmlPages.Booting; httpContext.Response.AddHeader("Retry-After", debug ? "1" : "30"); // seconds - httpContext.RewritePath(UriUtility.ToAbsolute(bootUrl) + "?url=" + HttpUtility.UrlEncode(uri.ToString())); + httpContext.Response.Write(bootHtml); + httpContext.Response.Flush(); return false; // cannot serve content case RuntimeLevel.BootFailed: @@ -285,9 +286,10 @@ namespace Umbraco.Web ReportRuntime(level, "Umbraco has failed."); httpContext.Response.StatusCode = 503; // temp not available - const string deathUrl = "~/config/splashes/death.aspx"; + var deathHtml = Routing.Resources.HtmlPages.Failed; httpContext.Response.AddHeader("Retry-After", debug ? "1" : "300"); // seconds - httpContext.RewritePath(UriUtility.ToAbsolute(deathUrl) + "?url=" + HttpUtility.UrlEncode(uri.ToString())); + httpContext.Response.Write(deathHtml); + httpContext.Response.Flush(); return false; // cannot serve content case RuntimeLevel.Run: diff --git a/src/Umbraco.Web/WebApi/Filters/AppendCurrentEventMessagesAttribute.cs b/src/Umbraco.Web/WebApi/Filters/AppendCurrentEventMessagesAttribute.cs index 911fff3e3c..779a559a16 100644 --- a/src/Umbraco.Web/WebApi/Filters/AppendCurrentEventMessagesAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/AppendCurrentEventMessagesAttribute.cs @@ -4,7 +4,6 @@ using System.Web.Http.Filters; using Umbraco.Core.Events; using Umbraco.Web.Composing; using Umbraco.Web.Models.ContentEditing; -using Umbraco.Web.UI; namespace Umbraco.Web.WebApi.Filters { @@ -32,23 +31,23 @@ namespace Umbraco.Web.WebApi.Filters foreach (var eventMessage in msgs.GetAll()) { - SpeechBubbleIcon msgType; + NotificationStyle msgType; switch (eventMessage.MessageType) { case EventMessageType.Default: - msgType = SpeechBubbleIcon.Save; + msgType = NotificationStyle.Save; break; case EventMessageType.Info: - msgType = SpeechBubbleIcon.Info; + msgType = NotificationStyle.Info; break; case EventMessageType.Error: - msgType = SpeechBubbleIcon.Error; + msgType = NotificationStyle.Error; break; case EventMessageType.Success: - msgType = SpeechBubbleIcon.Success; + msgType = NotificationStyle.Success; break; case EventMessageType.Warning: - msgType = SpeechBubbleIcon.Warning; + msgType = NotificationStyle.Warning; break; default: throw new ArgumentOutOfRangeException(); From 2e527163f91cf73707f0f94b6cb6e19c038259ea Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 29 Jan 2019 23:27:00 +1100 Subject: [PATCH 344/437] no more umbraco.presentation namespace! no more "page" class, has been refactored and renamed to what it actually is and internalized --- .../Composing/TypeFinderTests.cs | 1 - .../Composing/TypeLoaderTests.cs | 1 - .../PublishedContent/PublishedRouterTests.cs | 2 +- .../Umbraco/Views/AuthorizeUpgrade.cshtml | 1 - src/Umbraco.Web/Cache/MacroCacheRefresher.cs | 1 - .../Editors/MacroRenderingController.cs | 2 +- .../InstallSteps/FilePermissionsStep.cs | 1 - .../PublishedContentHashtableConverter.cs} | 321 ++++-------------- .../Macros/UserControlMacroEngine.cs | 1 - src/Umbraco.Web/Routing/PublishedRequest.cs | 10 +- src/Umbraco.Web/Routing/PublishedRouter.cs | 10 +- src/Umbraco.Web/Templates/TemplateRenderer.cs | 6 +- src/Umbraco.Web/Umbraco.Web.csproj | 2 +- src/Umbraco.Web/UmbracoComponentRenderer.cs | 7 +- 14 files changed, 80 insertions(+), 286 deletions(-) rename src/Umbraco.Web/{umbraco.presentation/page.cs => Macros/PublishedContentHashtableConverter.cs} (53%) diff --git a/src/Umbraco.Tests/Composing/TypeFinderTests.cs b/src/Umbraco.Tests/Composing/TypeFinderTests.cs index 49c807b19f..7271db9b61 100644 --- a/src/Umbraco.Tests/Composing/TypeFinderTests.cs +++ b/src/Umbraco.Tests/Composing/TypeFinderTests.cs @@ -11,7 +11,6 @@ using System.Threading; using System.Web; using System.Web.Compilation; using NUnit.Framework; -using umbraco; using Umbraco.Core; using Umbraco.Core.Composing; using Umbraco.Core.IO; diff --git a/src/Umbraco.Tests/Composing/TypeLoaderTests.cs b/src/Umbraco.Tests/Composing/TypeLoaderTests.cs index add3424599..2354dc8147 100644 --- a/src/Umbraco.Tests/Composing/TypeLoaderTests.cs +++ b/src/Umbraco.Tests/Composing/TypeLoaderTests.cs @@ -5,7 +5,6 @@ using System.Linq; using System.Reflection; using Moq; using NUnit.Framework; -using umbraco; using Umbraco.Core; using Umbraco.Core.Cache; using Umbraco.Core.Composing; diff --git a/src/Umbraco.Tests/PublishedContent/PublishedRouterTests.cs b/src/Umbraco.Tests/PublishedContent/PublishedRouterTests.cs index 0e360bae58..d8dbabb569 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedRouterTests.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedRouterTests.cs @@ -51,7 +51,7 @@ namespace Umbraco.Tests.PublishedContent request.PublishedContent = content.Object; publishedRouter.ConfigureRequest(request); - Assert.IsNotNull(request.UmbracoPage); + Assert.IsNotNull(request.LegacyContentHashTable); } private Mock GetPublishedContentMock() diff --git a/src/Umbraco.Web.UI/Umbraco/Views/AuthorizeUpgrade.cshtml b/src/Umbraco.Web.UI/Umbraco/Views/AuthorizeUpgrade.cshtml index a3c7dd912c..fba9a83789 100644 --- a/src/Umbraco.Web.UI/Umbraco/Views/AuthorizeUpgrade.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/Views/AuthorizeUpgrade.cshtml @@ -10,7 +10,6 @@ @using Umbraco.Core.IO @using Umbraco.Web @using Umbraco.Web.Editors -@using umbraco @using Umbraco.Core.Configuration @inherits System.Web.Mvc.WebViewPage @{ diff --git a/src/Umbraco.Web/Cache/MacroCacheRefresher.cs b/src/Umbraco.Web/Cache/MacroCacheRefresher.cs index 741604ee81..a5187db211 100644 --- a/src/Umbraco.Web/Cache/MacroCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/MacroCacheRefresher.cs @@ -2,7 +2,6 @@ using Umbraco.Core; using Umbraco.Core.Cache; using Umbraco.Core.Models; -using umbraco; using Umbraco.Core.Persistence.Repositories; using System.Linq; using Newtonsoft.Json; diff --git a/src/Umbraco.Web/Editors/MacroRenderingController.cs b/src/Umbraco.Web/Editors/MacroRenderingController.cs index 3ec25b1632..65abde759a 100644 --- a/src/Umbraco.Web/Editors/MacroRenderingController.cs +++ b/src/Umbraco.Web/Editors/MacroRenderingController.cs @@ -137,7 +137,7 @@ namespace Umbraco.Web.Editors Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(culture.Culture); } - var legacyPage = new global::umbraco.page(doc, _variationContextAccessor); + var legacyPage = new global::Umbraco.Web.Macros.PublishedContentHashtableConverter(doc, _variationContextAccessor); UmbracoContext.HttpContext.Items["pageElements"] = legacyPage.Elements; UmbracoContext.HttpContext.Items[Core.Constants.Conventions.Url.AltTemplate] = null; diff --git a/src/Umbraco.Web/Install/InstallSteps/FilePermissionsStep.cs b/src/Umbraco.Web/Install/InstallSteps/FilePermissionsStep.cs index c5bc9ac047..2c236e6592 100644 --- a/src/Umbraco.Web/Install/InstallSteps/FilePermissionsStep.cs +++ b/src/Umbraco.Web/Install/InstallSteps/FilePermissionsStep.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.IO; using System.Threading.Tasks; -using umbraco; using Umbraco.Core; using Umbraco.Core.IO; using Umbraco.Web.Install.Models; diff --git a/src/Umbraco.Web/umbraco.presentation/page.cs b/src/Umbraco.Web/Macros/PublishedContentHashtableConverter.cs similarity index 53% rename from src/Umbraco.Web/umbraco.presentation/page.cs rename to src/Umbraco.Web/Macros/PublishedContentHashtableConverter.cs index 1ce2a738fa..ece76090d8 100644 --- a/src/Umbraco.Web/umbraco.presentation/page.cs +++ b/src/Umbraco.Web/Macros/PublishedContentHashtableConverter.cs @@ -2,51 +2,25 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Web.UI; using Umbraco.Core; using Umbraco.Core.Models; using Umbraco.Core.Models.PublishedContent; -using Umbraco.Web.Editors; -using Umbraco.Web.Routing; using Umbraco.Core.PropertyEditors; using Umbraco.Web.Composing; +using Umbraco.Web.Editors; +using Umbraco.Web.Routing; -namespace umbraco +namespace Umbraco.Web.Macros { /// - /// Summary description for page. + /// Legacy class used by macros which converts a published content item into a hashset of values /// - [Obsolete("TODO: WB This seems legacy", false)] - public class page + internal class PublishedContentHashtableConverter { - - #region Private members and properties - - string _pageName; - int _parentId; - string _writerName; - string _creatorName; - string _path; - int _nodeType; - string _nodeTypeAlias; - string[] _splitpath; - DateTime _createDate; - DateTime _updateDate; - int _pageId; - Guid _pageVersion; - readonly int _template; - - readonly Hashtable _elements = new Hashtable(); - readonly StringBuilder _pageContent = new StringBuilder(); - Control _pageContentControl = new Control(); - - #endregion - #region Constructors /// - /// Initializes a new instance of the class for a published document request. + /// Initializes a new instance of the class for a published document request. /// /// The pointing to the document. /// @@ -54,22 +28,20 @@ namespace umbraco /// that the PublishedContentRequest takes into account how a template is assigned during the routing process whereas /// with an IPublishedContent item, the template id is assigned purely based on the default. /// - internal page(PublishedRequest frequest) + internal PublishedContentHashtableConverter(PublishedRequest frequest) { if (!frequest.HasPublishedContent) throw new ArgumentException("Document request has no node.", "frequest"); - populatePageData(frequest.PublishedContent.Id, + PopulatePageData(frequest.PublishedContent.Id, frequest.PublishedContent.Name, frequest.PublishedContent.ContentType.Id, frequest.PublishedContent.ContentType.Alias, frequest.PublishedContent.WriterName, frequest.PublishedContent.CreatorName, frequest.PublishedContent.CreateDate, frequest.PublishedContent.UpdateDate, frequest.PublishedContent.Path, frequest.PublishedContent.Parent == null ? -1 : frequest.PublishedContent.Parent.Id); if (frequest.HasTemplate) { - - this._template = frequest.TemplateModel.Id; - _elements["template"] = _template.ToString(); + Elements["template"] = frequest.TemplateModel.Id.ToString(); } PopulateElementData(frequest.PublishedContent); @@ -80,11 +52,11 @@ namespace umbraco /// Initializes a new instance of the page for a published document /// /// - internal page(IPublishedContent doc) + internal PublishedContentHashtableConverter(IPublishedContent doc) { if (doc == null) throw new ArgumentNullException("doc"); - populatePageData(doc.Id, + PopulatePageData(doc.Id, doc.Name, doc.ContentType.Id, doc.ContentType.Alias, doc.WriterName, doc.CreatorName, doc.CreateDate, doc.UpdateDate, doc.Path, doc.Parent == null ? -1 : doc.Parent.Id); @@ -92,8 +64,7 @@ namespace umbraco if (doc.TemplateId.HasValue) { //set the template to whatever is assigned to the doc - _template = doc.TemplateId.Value; - _elements["template"] = _template.ToString(); + Elements["template"] = doc.TemplateId.Value.ToString(); } PopulateElementData(doc); @@ -103,8 +74,9 @@ namespace umbraco /// Initializes a new instance of the page for a content. /// /// The content. + /// /// This is for usage only. - internal page(IContent content, IVariationContextAccessor variationContextAccessor) + internal PublishedContentHashtableConverter(IContent content, IVariationContextAccessor variationContextAccessor) : this(new PagePublishedContent(content, variationContextAccessor)) { } @@ -112,46 +84,34 @@ namespace umbraco #region Initialize - void populatePageData(int pageID, + private void PopulatePageData(int pageId, string pageName, int nodeType, string nodeTypeAlias, string writerName, string creatorName, DateTime createDate, DateTime updateDate, string path, int parentId) { - this._pageId = pageID; - this._pageName = pageName; - this._nodeType = nodeType; - this._nodeTypeAlias = nodeTypeAlias; - this._writerName = writerName; - this._creatorName = creatorName; - this._createDate = createDate; - this._updateDate = updateDate; - this._parentId = parentId; - this._path = path; - this._splitpath = path.Split(','); - // Update the elements hashtable - _elements.Add("pageID", pageID); - _elements.Add("parentID", parentId); - _elements.Add("pageName", pageName); - _elements.Add("nodeType", nodeType); - _elements.Add("nodeTypeAlias", nodeTypeAlias); - _elements.Add("writerName", writerName); - _elements.Add("creatorName", creatorName); - _elements.Add("createDate", createDate); - _elements.Add("updateDate", updateDate); - _elements.Add("path", path); - _elements.Add("splitpath", _splitpath); + Elements.Add("pageID", pageId); + Elements.Add("parentID", parentId); + Elements.Add("pageName", pageName); + Elements.Add("nodeType", nodeType); + Elements.Add("nodeTypeAlias", nodeTypeAlias); + Elements.Add("writerName", writerName); + Elements.Add("creatorName", creatorName); + Elements.Add("createDate", createDate); + Elements.Add("updateDate", updateDate); + Elements.Add("path", path); + Elements.Add("splitpath", path.Split(',')); } /// /// Puts the properties of the node into the elements table /// /// - void PopulateElementData(IPublishedContent node) + private void PopulateElementData(IPublishedElement node) { foreach (var p in node.Properties) { - if (_elements.ContainsKey(p.Alias) == false) + if (Elements.ContainsKey(p.Alias) == false) { // note: legacy used the raw value (see populating from an Xml node below) // so we're doing the same here, using DataValue. If we use Value then every @@ -161,94 +121,16 @@ namespace umbraco // to properly fix this, we'd need to turn the elements collection into some // sort of collection of lazy values. - _elements[p.Alias] = p.GetSourceValue(); + Elements[p.Alias] = p.GetSourceValue(); } } } #endregion - #region Public properties - - public Control PageContentControl - { - get { return _pageContentControl; } - } - - public string PageName - { - get { return _pageName; } - } - - public int ParentId - { - get { return _parentId; } - } - - public string NodeTypeAlias - { - get { return _nodeTypeAlias; } - } - - public int NodeType - { - get { return _nodeType; } - } - - public string WriterName - { - get { return _writerName; } - } - - public string CreatorName - { - get { return _creatorName; } - } - - public DateTime CreateDate - { - get { return _createDate; } - } - - public DateTime UpdateDate - { - get { return _updateDate; } - } - - public int PageID - { - get { return _pageId; } - } - - public int Template - { - get { return _template; } - } - - public Hashtable Elements - { - get { return _elements; } - } - - public string PageContent - { - get { return _pageContent.ToString(); } - } - - public string[] SplitPath - { - get { return this._splitpath; } - } - - #endregion - - #region ToString - - public override string ToString() - { - return _pageName; - } - - #endregion + /// + /// Returns a Hashtable of data for a published content item + /// + public Hashtable Elements { get; } = new Hashtable(); #region PublishedContent @@ -298,13 +180,7 @@ namespace umbraco private class PagePublishedContent : IPublishedContent { private readonly IContent _inner; - private readonly int _id; - private readonly Guid _key; - private readonly string _creatorName; - private readonly string _writerName; - private readonly PublishedContentType _contentType; private readonly IPublishedProperty[] _properties; - private readonly IPublishedContent _parent; private IReadOnlyDictionary _cultureInfos; private readonly IVariationContextAccessor _variationContextAccessor; @@ -312,26 +188,23 @@ namespace umbraco private PagePublishedContent(int id) { - _id = id; + Id = id; } public PagePublishedContent(IContent inner, IVariationContextAccessor variationContextAccessor) { - if (inner == null) - throw new NullReferenceException("content"); - - _inner = inner; + _inner = inner ?? throw new NullReferenceException("content"); _variationContextAccessor = variationContextAccessor; - _id = _inner.Id; - _key = _inner.Key; + Id = _inner.Id; + Key = _inner.Key; // TODO: ARGH! need to fix this - this is not good because it uses ApplicationContext.Current - _creatorName = _inner.GetCreatorProfile().Name; - _writerName = _inner.GetWriterProfile().Name; + CreatorName = _inner.GetCreatorProfile().Name; + WriterName = _inner.GetWriterProfile().Name; - _contentType = Current.PublishedContentTypeFactory.CreateContentType(_inner.ContentType); + ContentType = Current.PublishedContentTypeFactory.CreateContentType(_inner.ContentType); - _properties = _contentType.PropertyTypes + _properties = ContentType.PropertyTypes .Select(x => { var p = _inner.Properties.SingleOrDefault(xx => xx.Alias == x.Alias); @@ -340,35 +213,20 @@ namespace umbraco .Cast() .ToArray(); - _parent = new PagePublishedContent(_inner.ParentId); + Parent = new PagePublishedContent(_inner.ParentId); } - public PublishedContentType ContentType - { - get { return _contentType; } - } + public PublishedContentType ContentType { get; } - public int Id - { - get { return _id; } - } + public int Id { get; } - public Guid Key - { - get { return _key; } - } + public Guid Key { get; } public int? TemplateId => _inner.TemplateId; - public int SortOrder - { - get { return _inner.SortOrder; } - } + public int SortOrder => _inner.SortOrder; - public string Name - { - get { return _inner.Name; } - } + public string Name => _inner.Name; public PublishedCultureInfo GetCulture(string culture = null) { @@ -398,72 +256,29 @@ namespace umbraco } } - public string UrlSegment - { - get { throw new NotImplementedException(); } - } + public string UrlSegment => throw new NotImplementedException(); - public string DocumentTypeAlias - { - get { return _inner.ContentType.Alias; } - } + public string WriterName { get; } - public int DocumentTypeId - { - get { return _inner.ContentTypeId; } - } + public string CreatorName { get; } - public string WriterName - { - get { return _writerName; } - } + public int WriterId => _inner.WriterId; - public string CreatorName - { - get { return _creatorName; } - } + public int CreatorId => _inner.CreatorId; - public int WriterId - { - get { return _inner.WriterId; } - } + public string Path => _inner.Path; - public int CreatorId - { - get { return _inner.CreatorId; } - } + public DateTime CreateDate => _inner.CreateDate; - public string Path - { - get { return _inner.Path; } - } + public DateTime UpdateDate => _inner.UpdateDate; - public DateTime CreateDate - { - get { return _inner.CreateDate; } - } + public int Level => _inner.Level; - public DateTime UpdateDate - { - get { return _inner.UpdateDate; } - } - - public int Level - { - get { return _inner.Level; } - } - - public string Url - { - get { throw new NotImplementedException(); } - } + public string Url => throw new NotImplementedException(); public string GetUrl(string culture = null) => throw new NotSupportedException(); - public PublishedItemType ItemType - { - get { return PublishedItemType.Content; } - } + public PublishedItemType ItemType => PublishedItemType.Content; public bool IsDraft(string culture = null) { @@ -475,30 +290,16 @@ namespace umbraco throw new NotImplementedException(); } - public IPublishedContent Parent - { - get { return _parent; } - } + public IPublishedContent Parent { get; } - public IEnumerable Children - { - get { throw new NotImplementedException(); } - } + public IEnumerable Children => throw new NotImplementedException(); - public IEnumerable Properties - { - get { return _properties; } - } + public IEnumerable Properties => _properties; public IPublishedProperty GetProperty(string alias) { throw new NotImplementedException(); } - - public IPublishedProperty GetProperty(string alias, bool recurse) - { - throw new NotImplementedException(); - } } #endregion diff --git a/src/Umbraco.Web/Macros/UserControlMacroEngine.cs b/src/Umbraco.Web/Macros/UserControlMacroEngine.cs index 12730c1d1d..f92074a91b 100644 --- a/src/Umbraco.Web/Macros/UserControlMacroEngine.cs +++ b/src/Umbraco.Web/Macros/UserControlMacroEngine.cs @@ -2,7 +2,6 @@ using System.IO; using System.Web; using System.Web.UI; -using umbraco; using Umbraco.Core; using Umbraco.Core.IO; using Umbraco.Core.Logging; diff --git a/src/Umbraco.Web/Routing/PublishedRequest.cs b/src/Umbraco.Web/Routing/PublishedRequest.cs index 9a775adb85..c5475f8b73 100644 --- a/src/Umbraco.Web/Routing/PublishedRequest.cs +++ b/src/Umbraco.Web/Routing/PublishedRequest.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; using System.Globalization; using System.Threading; using System.Web; -using umbraco; using Umbraco.Core; using Umbraco.Core.Composing; using Umbraco.Core.Models; using Umbraco.Core.Models.PublishedContent; +using Umbraco.Web.Macros; namespace Umbraco.Web.Routing { @@ -27,7 +27,7 @@ namespace Umbraco.Web.Routing private CultureInfo _culture; private IPublishedContent _publishedContent; private IPublishedContent _initialPublishedContent; // found by finders before 404, redirects, etc - private page _umbracoPage; // legacy + private PublishedContentHashtableConverter _umbracoPage; // legacy /// /// Initializes a new instance of the class. @@ -478,9 +478,9 @@ namespace Umbraco.Web.Routing #region Legacy - // for legacy/webforms code - + // for legacy/webforms/macro code - // TODO: get rid of it eventually - internal page UmbracoPage + internal PublishedContentHashtableConverter LegacyContentHashTable { get { @@ -489,7 +489,7 @@ namespace Umbraco.Web.Routing return _umbracoPage; } - set { _umbracoPage = value; } + set => _umbracoPage = value; } #endregion diff --git a/src/Umbraco.Web/Routing/PublishedRouter.cs b/src/Umbraco.Web/Routing/PublishedRouter.cs index 7ffb01e7f6..14c36198d8 100644 --- a/src/Umbraco.Web/Routing/PublishedRouter.cs +++ b/src/Umbraco.Web/Routing/PublishedRouter.cs @@ -5,7 +5,6 @@ using System.Threading; using System.Globalization; using System.IO; using System.Web.Security; -using umbraco; using Umbraco.Core; using Umbraco.Core.Composing; using Umbraco.Core.Configuration.UmbracoSettings; @@ -14,6 +13,7 @@ using Umbraco.Core.Logging; using Umbraco.Core.Models; using Umbraco.Core.Models.PublishedContent; using Umbraco.Core.Services; +using Umbraco.Web.Macros; using Umbraco.Web.Security; namespace Umbraco.Web.Routing @@ -205,10 +205,10 @@ namespace Umbraco.Web.Routing // assign the legacy page back to the request // handlers like default.aspx will want it and most macros currently need it - frequest.UmbracoPage = new page(frequest); + frequest.LegacyContentHashTable = new PublishedContentHashtableConverter(frequest); // used by many legacy objects - frequest.UmbracoContext.HttpContext.Items["pageElements"] = frequest.UmbracoPage.Elements; + frequest.UmbracoContext.HttpContext.Items["pageElements"] = frequest.LegacyContentHashTable.Elements; return true; } @@ -251,10 +251,10 @@ namespace Umbraco.Web.Routing // assign the legacy page back to the docrequest // handlers like default.aspx will want it and most macros currently need it - request.UmbracoPage = new page(request); + request.LegacyContentHashTable = new PublishedContentHashtableConverter(request); // this is used by many legacy objects - request.UmbracoContext.HttpContext.Items["pageElements"] = request.UmbracoPage.Elements; + request.UmbracoContext.HttpContext.Items["pageElements"] = request.LegacyContentHashTable.Elements; } #endregion diff --git a/src/Umbraco.Web/Templates/TemplateRenderer.cs b/src/Umbraco.Web/Templates/TemplateRenderer.cs index 24526de7b2..214612ef2d 100644 --- a/src/Umbraco.Web/Templates/TemplateRenderer.cs +++ b/src/Umbraco.Web/Templates/TemplateRenderer.cs @@ -9,10 +9,10 @@ using Umbraco.Core; using Umbraco.Web.Models; using Umbraco.Web.Mvc; using Umbraco.Web.Routing; -using umbraco; using Umbraco.Core.Composing; using Umbraco.Core.Configuration; using Umbraco.Core.Services; +using Umbraco.Web.Macros; using Current = Umbraco.Web.Composing.Current; namespace Umbraco.Web.Templates @@ -184,9 +184,9 @@ namespace Umbraco.Web.Templates private void SetNewItemsOnContextObjects(PublishedRequest request) { // handlers like default.aspx will want it and most macros currently need it - request.UmbracoPage = new page(request); + request.LegacyContentHashTable = new PublishedContentHashtableConverter(request); //now, set the new ones for this page execution - _umbracoContext.HttpContext.Items["pageElements"] = request.UmbracoPage.Elements; + _umbracoContext.HttpContext.Items["pageElements"] = request.LegacyContentHashTable.Elements; _umbracoContext.HttpContext.Items[Core.Constants.Conventions.Url.AltTemplate] = null; _umbracoContext.PublishedRequest = request; } diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 5a3379b82b..463b72e3e9 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -1173,7 +1173,7 @@ Code - + Code diff --git a/src/Umbraco.Web/UmbracoComponentRenderer.cs b/src/Umbraco.Web/UmbracoComponentRenderer.cs index a579c0abac..f59962a0f2 100644 --- a/src/Umbraco.Web/UmbracoComponentRenderer.cs +++ b/src/Umbraco.Web/UmbracoComponentRenderer.cs @@ -5,7 +5,6 @@ using System.Web; using System.Web.UI; using Umbraco.Core; using Umbraco.Web.Templates; -using umbraco; using System.Collections.Generic; using Umbraco.Web.Composing; using Umbraco.Web.Macros; @@ -86,7 +85,7 @@ namespace Umbraco.Web throw new InvalidOperationException("Cannot render a macro when there is no current PublishedContentRequest."); } - return RenderMacro(alias, parameters, _umbracoContext.PublishedRequest.UmbracoPage); + return RenderMacro(alias, parameters, _umbracoContext.PublishedRequest.LegacyContentHashTable); } /// @@ -96,7 +95,7 @@ namespace Umbraco.Web /// The parameters. /// The legacy umbraco page object that is required for some macros /// - internal IHtmlString RenderMacro(string alias, IDictionary parameters, page umbracoPage) + internal IHtmlString RenderMacro(string alias, IDictionary parameters, PublishedContentHashtableConverter umbracoPage) { if (alias == null) throw new ArgumentNullException("alias"); if (umbracoPage == null) throw new ArgumentNullException("umbracoPage"); @@ -115,7 +114,7 @@ namespace Umbraco.Web /// The parameters. /// The legacy umbraco page object that is required for some macros /// - internal IHtmlString RenderMacro(MacroModel m, IDictionary parameters, page umbracoPage) + internal IHtmlString RenderMacro(MacroModel m, IDictionary parameters, PublishedContentHashtableConverter umbracoPage) { if (umbracoPage == null) throw new ArgumentNullException(nameof(umbracoPage)); if (m == null) throw new ArgumentNullException(nameof(m)); From 34f93331bd310b9411710c19aa73fdbf061b0e87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 29 Jan 2019 13:31:54 +0100 Subject: [PATCH 345/437] brandcolor 2019 corrections --- .../subheader/umb-editor-sub-header.less | 7 ++++ .../less/components/tree/umb-tree-item.less | 4 +- .../src/less/components/tree/umb-tree.less | 8 +++- .../less/components/umb-file-dropzone.less | 6 +-- .../src/less/components/umb-folder-grid.less | 23 +++++++++-- .../src/less/components/umb-media-grid.less | 39 ++++++++++++------- src/Umbraco.Web.UI.Client/src/less/main.less | 2 +- .../src/less/variables.less | 6 ++- .../src/views/components/umb-folder-grid.html | 2 +- .../src/views/components/umb-media-grid.html | 2 +- 10 files changed, 69 insertions(+), 30 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/components/editor/subheader/umb-editor-sub-header.less b/src/Umbraco.Web.UI.Client/src/less/components/editor/subheader/umb-editor-sub-header.less index 10296b58e3..2b9f1e31a5 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/editor/subheader/umb-editor-sub-header.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/editor/subheader/umb-editor-sub-header.less @@ -48,10 +48,17 @@ padding-right: 10px; } +.umb-editor-sub-header__content-left .umb-editor-sub-header__section { + padding-left: 0; +} + .umb-editor-sub-header__content-left .umb-editor-sub-header__section:first-child { padding-left: 0; } +.umb-editor-sub-header__content-right .umb-editor-sub-header__section { + padding-right: 0; +} .umb-editor-sub-header__content-right .umb-editor-sub-header__section:last-child { padding-right: 0; } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less index 377b61c225..d6202c5665 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less @@ -24,11 +24,11 @@ // ------------------------ .l { width: 100%; - height: 1px; + height: 2px; overflow: hidden; position: absolute; left: 0; - bottom: 0; + bottom: -1; div { .umb-loader; diff --git a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less index 6b6f0c5f60..13e2a55089 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less @@ -89,13 +89,15 @@ body.touch .umb-tree { // active is equivilant to selected, its the item that is begin affected by the actions performed in the right-click-dialog. .umb-tree-item > .umb-tree-item__inner.active { - background: @ui-selected; + //background: @ui-selected; + border-color: @ui-selected-border; color: @ui-selected-type; a { color: @ui-selected-type; } &:hover { - background: @ui-selected-hover; + //background: @ui-selected-hover; + border-color: @ui-selected-border-hover; color: @ui-selected-type-hover; a { color: @ui-selected-type-hover; @@ -110,6 +112,8 @@ body.touch .umb-tree { flex-wrap: nowrap; align-items: center; + border:2px dashed transparent; + color: @ui-option-type; a { color: @ui-option-type; diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-file-dropzone.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-file-dropzone.less index b7c58ad3cf..63190f0ed3 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-file-dropzone.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-file-dropzone.less @@ -43,14 +43,14 @@ // file select link .file-select { font-size: 15px; - color: @turquoise-d1; + color: @ui-action-disgrete-type; cursor: pointer; margin-top: 10px; &:hover { - color: @turquoise-d1; - text-decoration: underline; + color: @ui-action-disgrete-type-hover; + text-decoration: none; } } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-folder-grid.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-folder-grid.less index d91f24cbca..f5ca1f8438 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-folder-grid.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-folder-grid.less @@ -14,7 +14,7 @@ padding: 10px 20px; box-sizing: border-box; flex: 1 1 200px; - border: 1px solid transparent; + border: 2px dashed transparent; transition: border 0.2s; position: relative; justify-content: space-between; @@ -22,8 +22,24 @@ user-select: none; box-shadow: 0 1px 1px 0 rgba(0,0,0,0.16); border-radius: 3px; + + transition: box-shadow 150ms ease-in-out; } +.umb-folder-grid__folder.-selected { + box-shadow: 0 2px 8px 0 darken(@ui-selected-border, 20); + + //background: @ui-selected; + color:@ui-selected-type; + border-color:@ui-selected-border; + + &:hover { + color:@ui-selected-type-hover; + border-color:@ui-selected-border-hover; + } +} + + .umb-folder-grid__folder:focus, .umb-folder-grid__folder:active { text-decoration: none; @@ -31,8 +47,6 @@ .umb-folder-grid__folder:hover { text-decoration: none; - box-shadow: 0 3px 6px 0 rgba(0,0,0,0.16); - transition: box-shadow 150ms ease-in-out; } .umb-folder-grid__folder-description { @@ -57,7 +71,7 @@ .umb-folder-grid__folder-name:hover { text-decoration: underline; } - +/* .umb-folder-grid__action { opacity: 0; border: 2px solid @white; @@ -78,3 +92,4 @@ opacity: 1; background: @green; } +*/ diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-media-grid.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-media-grid.less index 3356c1de68..8185040f23 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-media-grid.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-media-grid.less @@ -23,16 +23,30 @@ position: relative; overflow: hidden; cursor: pointer; - + + border: 2px dashed transparent; box-shadow: 0 1px 1px 0 rgba(0,0,0,.2); - - transition: box-shadow 100ms; + + transition: box-shadow 150ms ease-in-out; } .umb-media-grid__item.-file { background-color: @white; } +.umb-media-grid__item.-selected { + box-shadow: 0 2px 8px 0 darken(@ui-selected-border, 20); + + //background: @ui-selected; + color:@ui-selected-type; + border-color:@ui-selected-border; + + &:hover { + color:@ui-selected-type-hover; + border-color:@ui-selected-border-hover; + } +} + .umb-media-grid__item-file-icon > span { color: @white; background: @gray-4; @@ -45,10 +59,6 @@ position: relative; } -.umb-media-grid__item.-selected { - box-shadow: 0 2px 8px 0 rgba(0,0,0,.35); -} - .umb-media-grid__item:hover { text-decoration: none; } @@ -90,12 +100,13 @@ box-sizing: border-box; font-size: 12px; overflow: hidden; - color: @white; + color: @black; white-space: nowrap; - background: @purple; + border-top:1px solid @gray-9; + background: @white; transition: opacity 150ms; } - +/* .umb-media-grid__item.-file .umb-media-grid__item-overlay { opacity: 1; color: @gray-4; @@ -105,9 +116,9 @@ .umb-media-grid__item.-file:hover .umb-media-grid__item-overlay, .umb-media-grid__item.-file.-selected .umb-media-grid__item-overlay { color: @white; - background: @purple; + background: @blueExtraDark; } - +*/ .umb-media-grid__info { margin-right: 5px; } @@ -134,7 +145,7 @@ font-size: 40px !important; transform: translate(-50%,-50%); } - +/* .umb-media-grid__checkmark { position: absolute; z-index: 2; @@ -152,7 +163,7 @@ color: @white; transition: background 100ms; } - +*/ .umb-media-grid__edit { position: absolute; opacity: 0; diff --git a/src/Umbraco.Web.UI.Client/src/less/main.less b/src/Umbraco.Web.UI.Client/src/less/main.less index 3a8228bde5..51892106e1 100644 --- a/src/Umbraco.Web.UI.Client/src/less/main.less +++ b/src/Umbraco.Web.UI.Client/src/less/main.less @@ -519,7 +519,7 @@ animation-duration:1s; animation-iteration-count:infinite; animation-timing-function:linear; width:100%; -height:1px; +height:2px; } diff --git a/src/Umbraco.Web.UI.Client/src/less/variables.less b/src/Umbraco.Web.UI.Client/src/less/variables.less index 6c906f3161..31d0095836 100644 --- a/src/Umbraco.Web.UI.Client/src/less/variables.less +++ b/src/Umbraco.Web.UI.Client/src/less/variables.less @@ -43,7 +43,7 @@ // UI Colors @red-d1: #F02E28; @red: #D42054;// updated 2019 -@red-l1: #FE6561; +@red-l1: #e22c60;// updated 2019 @red-l2: #FE8B88; @red-l3: #FFB2B0; @red-washed: #FFECEB; @@ -146,8 +146,10 @@ @ui-selected: @sand-1; @ui-selected-hover: ligthen(@sand-1, 10); -@ui-selected-type: @blueMid; +@ui-selected-type: @blueExtraDark; @ui-selected-type-hover: @blueMid; +@ui-selected-border: @pinkLight; +@ui-selected-border-hover: @pinkLight; @ui-light-border: @pinkLight; @ui-light-type: @gray-4; diff --git a/src/Umbraco.Web.UI.Client/src/views/components/umb-folder-grid.html b/src/Umbraco.Web.UI.Client/src/views/components/umb-folder-grid.html index df5eafbbca..6796b7d64b 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/umb-folder-grid.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/umb-folder-grid.html @@ -11,7 +11,7 @@
    {{ folder.name }}
    - + diff --git a/src/Umbraco.Web.UI.Client/src/views/components/umb-media-grid.html b/src/Umbraco.Web.UI.Client/src/views/components/umb-media-grid.html index 360c6b2bb7..da94729562 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/umb-media-grid.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/umb-media-grid.html @@ -1,7 +1,7 @@
    - +
    From 1897c0f162bdb85a7c54fc3706aa435aa4ea5ddd Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 29 Jan 2019 23:31:59 +1100 Subject: [PATCH 346/437] moves package actions to correct namespace, no more _Legacy namespace --- .../Components/CompositionExtensions.cs | 2 +- src/Umbraco.Core/Composing/Current.cs | 2 +- .../Composing/TypeLoaderExtensions.cs | 2 +- .../PackageActions/AllowDoctype.cs} | 10 +-- .../PackageActions/IPackageAction.cs | 3 +- .../PackageActions/PackageActionCollection.cs | 2 +- .../PackageActionCollectionBuilder.cs | 2 +- .../PackageActions/PublishRootDocument.cs} | 10 +-- .../Packaging/PackageActionRunner.cs | 2 +- .../Runtime/CoreRuntimeComposer.cs | 2 +- src/Umbraco.Core/Umbraco.Core.csproj | 8 +- .../Composing/PackageActionCollectionTests.cs | 2 +- src/Umbraco.Web/Composing/Current.cs | 2 +- src/Umbraco.Web/Umbraco.Web.csproj | 2 - .../PackageActions/addProxyFeedHost.cs | 81 ------------------- 15 files changed, 21 insertions(+), 111 deletions(-) rename src/{Umbraco.Web/_Legacy/PackageActions/allowDoctype.cs => Umbraco.Core/PackageActions/AllowDoctype.cs} (94%) rename src/Umbraco.Core/{_Legacy => }/PackageActions/IPackageAction.cs (80%) rename src/Umbraco.Core/{_Legacy => }/PackageActions/PackageActionCollection.cs (86%) rename src/Umbraco.Core/{_Legacy => }/PackageActions/PackageActionCollectionBuilder.cs (85%) rename src/{Umbraco.Web/_Legacy/PackageActions/publishRootDocument.cs => Umbraco.Core/PackageActions/PublishRootDocument.cs} (91%) delete mode 100644 src/Umbraco.Web/_Legacy/PackageActions/addProxyFeedHost.cs diff --git a/src/Umbraco.Core/Components/CompositionExtensions.cs b/src/Umbraco.Core/Components/CompositionExtensions.cs index 4e3e4816e5..8810213421 100644 --- a/src/Umbraco.Core/Components/CompositionExtensions.cs +++ b/src/Umbraco.Core/Components/CompositionExtensions.cs @@ -9,8 +9,8 @@ using Umbraco.Core.Persistence.Mappers; using Umbraco.Core.PropertyEditors; using Umbraco.Core.Strings; using Umbraco.Core.Sync; -using Umbraco.Core._Legacy.PackageActions; using Umbraco.Core.Logging.Viewer; +using Umbraco.Core.PackageActions; namespace Umbraco.Core.Components { diff --git a/src/Umbraco.Core/Composing/Current.cs b/src/Umbraco.Core/Composing/Current.cs index 12672bcc9a..1b16ad2b8e 100644 --- a/src/Umbraco.Core/Composing/Current.cs +++ b/src/Umbraco.Core/Composing/Current.cs @@ -5,6 +5,7 @@ using Umbraco.Core.Dictionary; using Umbraco.Core.IO; using Umbraco.Core.Logging; using Umbraco.Core.Models.PublishedContent; +using Umbraco.Core.PackageActions; using Umbraco.Core.Packaging; using Umbraco.Core.Persistence; using Umbraco.Core.PropertyEditors; @@ -12,7 +13,6 @@ using Umbraco.Core.Scoping; using Umbraco.Core.Services; using Umbraco.Core.Strings; using Umbraco.Core.Sync; -using Umbraco.Core._Legacy.PackageActions; namespace Umbraco.Core.Composing { diff --git a/src/Umbraco.Core/Composing/TypeLoaderExtensions.cs b/src/Umbraco.Core/Composing/TypeLoaderExtensions.cs index ba57243071..5d17b0f53c 100644 --- a/src/Umbraco.Core/Composing/TypeLoaderExtensions.cs +++ b/src/Umbraco.Core/Composing/TypeLoaderExtensions.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using System.Linq; using Umbraco.Core.Cache; +using Umbraco.Core.PackageActions; using Umbraco.Core.Persistence.Mappers; using Umbraco.Core.Persistence.SqlSyntax; using Umbraco.Core.PropertyEditors; -using Umbraco.Core._Legacy.PackageActions; namespace Umbraco.Core.Composing { diff --git a/src/Umbraco.Web/_Legacy/PackageActions/allowDoctype.cs b/src/Umbraco.Core/PackageActions/AllowDoctype.cs similarity index 94% rename from src/Umbraco.Web/_Legacy/PackageActions/allowDoctype.cs rename to src/Umbraco.Core/PackageActions/AllowDoctype.cs index f4b206a9ad..2e37061c31 100644 --- a/src/Umbraco.Web/_Legacy/PackageActions/allowDoctype.cs +++ b/src/Umbraco.Core/PackageActions/AllowDoctype.cs @@ -1,14 +1,10 @@ -using System; -using System.Collections; +using System.Collections; using System.Linq; -using System.Xml; using System.Xml.Linq; -using Umbraco.Core; +using Umbraco.Core.Composing; using Umbraco.Core.Models; -using Umbraco.Core._Legacy.PackageActions; -using Umbraco.Web.Composing; -namespace Umbraco.Web._Legacy.PackageActions +namespace Umbraco.Core.PackageActions { /// /// This class implements the IPackageAction Interface, used to execute code when packages are installed. diff --git a/src/Umbraco.Core/_Legacy/PackageActions/IPackageAction.cs b/src/Umbraco.Core/PackageActions/IPackageAction.cs similarity index 80% rename from src/Umbraco.Core/_Legacy/PackageActions/IPackageAction.cs rename to src/Umbraco.Core/PackageActions/IPackageAction.cs index b58ea34a60..d4dfb4079b 100644 --- a/src/Umbraco.Core/_Legacy/PackageActions/IPackageAction.cs +++ b/src/Umbraco.Core/PackageActions/IPackageAction.cs @@ -1,8 +1,7 @@ -using System.Xml; using System.Xml.Linq; using Umbraco.Core.Composing; -namespace Umbraco.Core._Legacy.PackageActions +namespace Umbraco.Core.PackageActions { public interface IPackageAction : IDiscoverable { diff --git a/src/Umbraco.Core/_Legacy/PackageActions/PackageActionCollection.cs b/src/Umbraco.Core/PackageActions/PackageActionCollection.cs similarity index 86% rename from src/Umbraco.Core/_Legacy/PackageActions/PackageActionCollection.cs rename to src/Umbraco.Core/PackageActions/PackageActionCollection.cs index a38c8cea56..813695f84c 100644 --- a/src/Umbraco.Core/_Legacy/PackageActions/PackageActionCollection.cs +++ b/src/Umbraco.Core/PackageActions/PackageActionCollection.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Umbraco.Core.Composing; -namespace Umbraco.Core._Legacy.PackageActions +namespace Umbraco.Core.PackageActions { public sealed class PackageActionCollection : BuilderCollectionBase { diff --git a/src/Umbraco.Core/_Legacy/PackageActions/PackageActionCollectionBuilder.cs b/src/Umbraco.Core/PackageActions/PackageActionCollectionBuilder.cs similarity index 85% rename from src/Umbraco.Core/_Legacy/PackageActions/PackageActionCollectionBuilder.cs rename to src/Umbraco.Core/PackageActions/PackageActionCollectionBuilder.cs index 2f73a2b489..fdb118ae06 100644 --- a/src/Umbraco.Core/_Legacy/PackageActions/PackageActionCollectionBuilder.cs +++ b/src/Umbraco.Core/PackageActions/PackageActionCollectionBuilder.cs @@ -1,6 +1,6 @@ using Umbraco.Core.Composing; -namespace Umbraco.Core._Legacy.PackageActions +namespace Umbraco.Core.PackageActions { internal class PackageActionCollectionBuilder : LazyCollectionBuilderBase { diff --git a/src/Umbraco.Web/_Legacy/PackageActions/publishRootDocument.cs b/src/Umbraco.Core/PackageActions/PublishRootDocument.cs similarity index 91% rename from src/Umbraco.Web/_Legacy/PackageActions/publishRootDocument.cs rename to src/Umbraco.Core/PackageActions/PublishRootDocument.cs index c6bbbfa00b..55955a4c8f 100644 --- a/src/Umbraco.Web/_Legacy/PackageActions/publishRootDocument.cs +++ b/src/Umbraco.Core/PackageActions/PublishRootDocument.cs @@ -1,11 +1,7 @@ -using System; -using System.Xml; -using System.Xml.Linq; -using Umbraco.Core; -using Umbraco.Core._Legacy.PackageActions; -using Umbraco.Web.Composing; +using System.Xml.Linq; +using Umbraco.Core.Composing; -namespace Umbraco.Web._Legacy.PackageActions +namespace Umbraco.Core.PackageActions { /// /// This class implements the IPackageAction Interface, used to execute code when packages are installed. diff --git a/src/Umbraco.Core/Packaging/PackageActionRunner.cs b/src/Umbraco.Core/Packaging/PackageActionRunner.cs index dba2690c0c..8434f52f30 100644 --- a/src/Umbraco.Core/Packaging/PackageActionRunner.cs +++ b/src/Umbraco.Core/Packaging/PackageActionRunner.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Xml.Linq; using Umbraco.Core.Logging; -using Umbraco.Core._Legacy.PackageActions; +using Umbraco.Core.PackageActions; namespace Umbraco.Core.Packaging { diff --git a/src/Umbraco.Core/Runtime/CoreRuntimeComposer.cs b/src/Umbraco.Core/Runtime/CoreRuntimeComposer.cs index 8285b9b4fd..ee289ddcfa 100644 --- a/src/Umbraco.Core/Runtime/CoreRuntimeComposer.cs +++ b/src/Umbraco.Core/Runtime/CoreRuntimeComposer.cs @@ -11,6 +11,7 @@ using Umbraco.Core.Manifest; using Umbraco.Core.Migrations; using Umbraco.Core.Migrations.Install; using Umbraco.Core.Models.PublishedContent; +using Umbraco.Core.PackageActions; using Umbraco.Core.Persistence; using Umbraco.Core.Persistence.Mappers; using Umbraco.Core.PropertyEditors; @@ -19,7 +20,6 @@ using Umbraco.Core.Scoping; using Umbraco.Core.Services; using Umbraco.Core.Strings; using Umbraco.Core.Sync; -using Umbraco.Core._Legacy.PackageActions; using IntegerValidator = Umbraco.Core.PropertyEditors.Validators.IntegerValidator; namespace Umbraco.Core.Runtime diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 588c66cd3d..e31579c9f7 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -454,6 +454,8 @@ + + @@ -1516,9 +1518,9 @@ - - - + + + Component diff --git a/src/Umbraco.Tests/Composing/PackageActionCollectionTests.cs b/src/Umbraco.Tests/Composing/PackageActionCollectionTests.cs index 75030decbf..fe8ca7dadc 100644 --- a/src/Umbraco.Tests/Composing/PackageActionCollectionTests.cs +++ b/src/Umbraco.Tests/Composing/PackageActionCollectionTests.cs @@ -8,7 +8,7 @@ using Umbraco.Core; using Umbraco.Core.Components; using Umbraco.Core.Composing; using Umbraco.Core.Logging; -using Umbraco.Core._Legacy.PackageActions; +using Umbraco.Core.PackageActions; using Umbraco.Tests.Components; namespace Umbraco.Tests.Composing diff --git a/src/Umbraco.Web/Composing/Current.cs b/src/Umbraco.Web/Composing/Current.cs index 70b0927c43..b394684f56 100644 --- a/src/Umbraco.Web/Composing/Current.cs +++ b/src/Umbraco.Web/Composing/Current.cs @@ -11,13 +11,13 @@ using Umbraco.Core.Models.PublishedContent; using Umbraco.Core.Persistence; using Umbraco.Core.Composing; using Umbraco.Core.Configuration; +using Umbraco.Core.PackageActions; using Umbraco.Core.Packaging; using Umbraco.Core.PropertyEditors; using Umbraco.Core.Scoping; using Umbraco.Core.Services; using Umbraco.Core.Strings; using Umbraco.Core.Sync; -using Umbraco.Core._Legacy.PackageActions; using Umbraco.Web.Actions; using Umbraco.Web.Cache; using Umbraco.Web.Editors; diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 463b72e3e9..89e35b4e07 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -1135,8 +1135,6 @@ - - diff --git a/src/Umbraco.Web/_Legacy/PackageActions/addProxyFeedHost.cs b/src/Umbraco.Web/_Legacy/PackageActions/addProxyFeedHost.cs deleted file mode 100644 index f53adb3be0..0000000000 --- a/src/Umbraco.Web/_Legacy/PackageActions/addProxyFeedHost.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System.Xml; -using System.Xml.Linq; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.Xml; -using Umbraco.Core._Legacy.PackageActions; - -namespace Umbraco.Web._Legacy.PackageActions -{ - public class AddProxyFeedHost : IPackageAction - { - #region IPackageAction Members - - public bool Execute(string packageName, XElement xmlData) - { - var hostname = xmlData.AttributeValue("host"); - if (string.IsNullOrEmpty(hostname)) - return false; - - var xdoc = XDocument.Load(IOHelper.MapPath(SystemFiles.FeedProxyConfig)); - - var insert = true; - - if (xdoc.Root.HasElements) - { - foreach (var node in xdoc.Root.Elements("allow")) - { - if (node.AttributeValue("host") != null && node.AttributeValue("host") == hostname) - insert = false; - } - } - - if (insert) - { - xdoc.Root.Add(new XElement("allow", new XAttribute("host", hostname))); - xdoc.Save(IOHelper.MapPath(SystemFiles.FeedProxyConfig)); - - return true; - } - return false; - } - - public string Alias() - { - return "addProxyFeedHost"; - } - - public bool Undo(string packageName, XElement xmlData) - { - var hostname = xmlData.AttributeValue("host"); - if (string.IsNullOrEmpty(hostname)) - return false; - - var xdoc = XDocument.Load(IOHelper.MapPath(SystemFiles.FeedProxyConfig)); - - bool inserted = false; - if (xdoc.Root.HasElements) - { - foreach (var node in xdoc.Root.Elements("allow")) - { - if (node.AttributeValue("host") != null && node.AttributeValue("host") == hostname) - { - node.Remove(); - inserted = true; - } - } - } - - if (inserted) - { - xdoc.Save(IOHelper.MapPath(SystemFiles.FeedProxyConfig)); - return true; - } - - return false; - } - - #endregion - - } -} From c0026d3c23b72ce0f6221dafea3dbf5d7829f447 Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 29 Jan 2019 23:58:43 +1100 Subject: [PATCH 347/437] Removes UseDirectoryUrls, have better defaults for reserved paths, don't ship with values in them just have them blank --- .../Configuration/GlobalSettings.cs | 70 +++++++------------ .../Configuration/IGlobalSettings.cs | 6 -- src/Umbraco.Tests/Misc/UriUtilityTests.cs | 26 ++----- src/Umbraco.Tests/Routing/UrlProviderTests.cs | 8 --- .../Routing/UrlsProviderWithDomainsTests.cs | 7 -- .../Routing/UrlsWithNestedDomains.cs | 1 - .../TestHelpers/SettingsForTests.cs | 1 - .../config/umbracoSettings.config | 3 - src/Umbraco.Web.UI/web.Template.config | 17 +---- .../JavaScript/ServerVariablesParser.cs | 15 ++-- src/Umbraco.Web/UmbracoInjectedModule.cs | 19 +++-- src/Umbraco.Web/UriUtility.cs | 9 +-- 12 files changed, 53 insertions(+), 129 deletions(-) diff --git a/src/Umbraco.Core/Configuration/GlobalSettings.cs b/src/Umbraco.Core/Configuration/GlobalSettings.cs index 4b449decff..49cb9c3fbf 100644 --- a/src/Umbraco.Core/Configuration/GlobalSettings.cs +++ b/src/Umbraco.Core/Configuration/GlobalSettings.cs @@ -31,8 +31,8 @@ namespace Umbraco.Core.Configuration private static string _reservedPaths; private static string _reservedUrls; //ensure the built on (non-changeable) reserved paths are there at all times - internal const string StaticReservedPaths = "~/app_plugins/,~/install/,"; - internal const string StaticReservedUrls = "~/config/splashes/booting.aspx,~/config/splashes/noNodes.aspx,~/VSEnterpriseHelper.axd,"; + internal const string StaticReservedPaths = "~/app_plugins/,~/install/"; + internal const string StaticReservedUrls = "~/config/splashes/noNodes.aspx,~/.well-known"; #endregion /// @@ -82,19 +82,18 @@ namespace Umbraco.Core.Configuration public string ReservedUrls { get - { - if (_reservedUrls == null) - { - var urls = ConfigurationManager.AppSettings.ContainsKey("umbracoReservedUrls") - ? ConfigurationManager.AppSettings["umbracoReservedUrls"] - : string.Empty; + { + if (_reservedUrls != null) return _reservedUrls; - //ensure the built on (non-changeable) reserved paths are there at all times - _reservedUrls = StaticReservedUrls + urls; - } + var urls = ConfigurationManager.AppSettings.ContainsKey("umbracoReservedUrls") + ? ConfigurationManager.AppSettings["umbracoReservedUrls"] + : string.Empty; + + //ensure the built on (non-changeable) reserved paths are there at all times + _reservedUrls = StaticReservedUrls + urls; return _reservedUrls; } - internal set { _reservedUrls = value; } + internal set => _reservedUrls = value; } /// @@ -105,22 +104,20 @@ namespace Umbraco.Core.Configuration { get { - if (_reservedPaths == null) - { - var reservedPaths = StaticReservedPaths; - //always add the umbraco path to the list - if (ConfigurationManager.AppSettings.ContainsKey("umbracoPath") - && !ConfigurationManager.AppSettings["umbracoPath"].IsNullOrWhiteSpace()) - { - reservedPaths += ConfigurationManager.AppSettings["umbracoPath"].EnsureEndsWith(','); - } + if (_reservedPaths != null) return _reservedPaths; - var allPaths = ConfigurationManager.AppSettings.ContainsKey("umbracoReservedPaths") - ? ConfigurationManager.AppSettings["umbracoReservedPaths"] - : string.Empty; + var reservedPaths = StaticReservedPaths; + var umbPath = ConfigurationManager.AppSettings.ContainsKey("umbracoPath") && !ConfigurationManager.AppSettings["umbracoPath"].IsNullOrWhiteSpace() + ? ConfigurationManager.AppSettings["umbracoPath"] + : "~/umbraco"; + //always add the umbraco path to the list + reservedPaths += umbPath.EnsureEndsWith(','); - _reservedPaths = reservedPaths + allPaths; - } + var allPaths = ConfigurationManager.AppSettings.ContainsKey("umbracoReservedPaths") + ? ConfigurationManager.AppSettings["umbracoReservedPaths"] + : string.Empty; + + _reservedPaths = reservedPaths + allPaths; return _reservedPaths; } } @@ -260,26 +257,7 @@ namespace Umbraco.Core.Configuration } } } - - /// - /// Gets a value indicating whether umbraco uses directory urls. - /// - /// true if umbraco uses directory urls; otherwise, false. - public bool UseDirectoryUrls - { - get - { - try - { - return bool.Parse(ConfigurationManager.AppSettings["umbracoUseDirectoryUrls"]); - } - catch - { - return false; - } - } - } - + /// /// Returns the number of days that should take place between version checks. /// diff --git a/src/Umbraco.Core/Configuration/IGlobalSettings.cs b/src/Umbraco.Core/Configuration/IGlobalSettings.cs index 157103be9e..b3c8ded1c0 100644 --- a/src/Umbraco.Core/Configuration/IGlobalSettings.cs +++ b/src/Umbraco.Core/Configuration/IGlobalSettings.cs @@ -34,12 +34,6 @@ namespace Umbraco.Core.Configuration /// int TimeOutInMinutes { get; } - /// - /// Gets a value indicating whether umbraco uses directory urls. - /// - /// true if umbraco uses directory urls; otherwise, false. - bool UseDirectoryUrls { get; } - /// /// Gets the default UI language. /// diff --git a/src/Umbraco.Tests/Misc/UriUtilityTests.cs b/src/Umbraco.Tests/Misc/UriUtilityTests.cs index 3dbd54c3a9..33a4b45249 100644 --- a/src/Umbraco.Tests/Misc/UriUtilityTests.cs +++ b/src/Umbraco.Tests/Misc/UriUtilityTests.cs @@ -60,32 +60,20 @@ namespace Umbraco.Tests.Misc Assert.AreEqual(expectedUri.ToString(), resultUri.ToString()); } - // test directoryUrl false, trailingSlash false - [TestCase("/", "/", false, false)] - [TestCase("/home", "/home.aspx", false, false)] - [TestCase("/home/sub1", "/home/sub1.aspx", false, false)] - - // test directoryUrl false, trailingSlash true - [TestCase("/", "/", false, true)] - [TestCase("/home", "/home.aspx", false, true)] - [TestCase("/home/sub1", "/home/sub1.aspx", false, true)] // test directoryUrl true, trailingSlash false - [TestCase("/", "/", true, false)] - [TestCase("/home", "/home", true, false)] - [TestCase("/home/sub1", "/home/sub1", true, false)] + [TestCase("/", "/", false)] + [TestCase("/home", "/home", false)] + [TestCase("/home/sub1", "/home/sub1", false)] // test directoryUrl true, trailingSlash true - [TestCase("/", "/", true, true)] - [TestCase("/home", "/home/", true, true)] - [TestCase("/home/sub1", "/home/sub1/", true, true)] + [TestCase("/", "/", true)] + [TestCase("/home", "/home/", true)] + [TestCase("/home/sub1", "/home/sub1/", true)] - public void Uri_From_Umbraco(string sourceUrl, string expectedUrl, bool directoryUrls, bool trailingSlash) + public void Uri_From_Umbraco(string sourceUrl, string expectedUrl, bool trailingSlash) { - ConfigurationManager.AppSettings.Set("umbracoUseDirectoryUrls", directoryUrls ? "true" : "false"); - var globalConfig = Mock.Get(SettingsForTests.GenerateMockGlobalSettings()); - globalConfig.Setup(x => x.UseDirectoryUrls).Returns(directoryUrls); var settings = SettingsForTests.GenerateMockUmbracoSettings(); var requestMock = Mock.Get(settings.RequestHandler); diff --git a/src/Umbraco.Tests/Routing/UrlProviderTests.cs b/src/Umbraco.Tests/Routing/UrlProviderTests.cs index 819ea0b01c..f223f2fbea 100644 --- a/src/Umbraco.Tests/Routing/UrlProviderTests.cs +++ b/src/Umbraco.Tests/Routing/UrlProviderTests.cs @@ -42,7 +42,6 @@ namespace Umbraco.Tests.Routing public void Ensure_Cache_Is_Correct() { var globalSettings = Mock.Get(Factory.GetInstance()); //this will modify the IGlobalSettings instance stored in the container - globalSettings.Setup(x => x.UseDirectoryUrls).Returns(true); globalSettings.Setup(x => x.HideTopLevelNodeFromPath).Returns(false); var umbracoSettings = Current.Configs.Settings(); @@ -106,7 +105,6 @@ namespace Umbraco.Tests.Routing public void Get_Url_Not_Hiding_Top_Level(int nodeId, string niceUrlMatch) { var globalSettings = Mock.Get(Factory.GetInstance()); //this will modify the IGlobalSettings instance stored in the container - globalSettings.Setup(x => x.UseDirectoryUrls).Returns(true); globalSettings.Setup(x => x.HideTopLevelNodeFromPath).Returns(false); var umbracoSettings = Current.Configs.Settings(); @@ -137,7 +135,6 @@ namespace Umbraco.Tests.Routing public void Get_Url_Hiding_Top_Level(int nodeId, string niceUrlMatch) { var globalSettings = Mock.Get(Factory.GetInstance()); //this will modify the IGlobalSettings instance stored in the container - globalSettings.Setup(x => x.UseDirectoryUrls).Returns(true); globalSettings.Setup(x => x.HideTopLevelNodeFromPath).Returns(true); var umbracoSettings = Current.Configs.Settings(); @@ -160,7 +157,6 @@ namespace Umbraco.Tests.Routing const string currentUri = "http://example.us/test"; var globalSettings = Mock.Get(Factory.GetInstance()); //this will modify the IGlobalSettings instance stored in the container - globalSettings.Setup(x => x.UseDirectoryUrls).Returns(true); globalSettings.Setup(x => x.HideTopLevelNodeFromPath).Returns(false); var umbracoSettings = Current.Configs.Settings(); @@ -209,7 +205,6 @@ namespace Umbraco.Tests.Routing const string currentUri = "http://example.fr/test"; var globalSettings = Mock.Get(Factory.GetInstance()); //this will modify the IGlobalSettings instance stored in the container - globalSettings.Setup(x => x.UseDirectoryUrls).Returns(true); globalSettings.Setup(x => x.HideTopLevelNodeFromPath).Returns(false); var umbracoSettings = Current.Configs.Settings(); @@ -267,7 +262,6 @@ namespace Umbraco.Tests.Routing const string currentUri = "http://example.us/test"; var globalSettings = Mock.Get(Factory.GetInstance()); //this will modify the IGlobalSettings instance stored in the container - globalSettings.Setup(x => x.UseDirectoryUrls).Returns(true); globalSettings.Setup(x => x.HideTopLevelNodeFromPath).Returns(false); var umbracoSettings = Current.Configs.Settings(); @@ -321,7 +315,6 @@ namespace Umbraco.Tests.Routing public void Get_Url_Relative_Or_Absolute() { var globalSettings = Mock.Get(Factory.GetInstance()); //this will modify the IGlobalSettings instance stored in the container - globalSettings.Setup(x => x.UseDirectoryUrls).Returns(true); globalSettings.Setup(x => x.HideTopLevelNodeFromPath).Returns(false); var umbracoSettings = Current.Configs.Settings(); @@ -348,7 +341,6 @@ namespace Umbraco.Tests.Routing public void Get_Url_Unpublished() { var globalSettings = Mock.Get(Factory.GetInstance()); //this will modify the IGlobalSettings instance stored in the container - globalSettings.Setup(x => x.UseDirectoryUrls).Returns(true); globalSettings.Setup(x => x.HideTopLevelNodeFromPath).Returns(false); var umbracoSettings = Current.Configs.Settings(); diff --git a/src/Umbraco.Tests/Routing/UrlsProviderWithDomainsTests.cs b/src/Umbraco.Tests/Routing/UrlsProviderWithDomainsTests.cs index ba646f6d94..dc9a52835b 100644 --- a/src/Umbraco.Tests/Routing/UrlsProviderWithDomainsTests.cs +++ b/src/Umbraco.Tests/Routing/UrlsProviderWithDomainsTests.cs @@ -180,7 +180,6 @@ namespace Umbraco.Tests.Routing request.Setup(x => x.UseDomainPrefixes).Returns(false); var globalSettings = Mock.Get(Factory.GetInstance()); //this will modify the IGlobalSettings instance stored in the container - globalSettings.Setup(x => x.UseDirectoryUrls).Returns(true); globalSettings.Setup(x => x.HideTopLevelNodeFromPath).Returns(false); // ignored w/domains var umbracoContext = GetUmbracoContext("/test", 1111, umbracoSettings: settings, urlProviders: new[] @@ -215,7 +214,6 @@ namespace Umbraco.Tests.Routing request.Setup(x => x.UseDomainPrefixes).Returns(false); var globalSettings = Mock.Get(Factory.GetInstance()); //this will modify the IGlobalSettings instance stored in the container - globalSettings.Setup(x => x.UseDirectoryUrls).Returns(true); globalSettings.Setup(x => x.HideTopLevelNodeFromPath).Returns(false); // ignored w/domains var umbracoContext = GetUmbracoContext("/test", 1111, umbracoSettings: settings, urlProviders: new[] @@ -242,7 +240,6 @@ namespace Umbraco.Tests.Routing request.Setup(x => x.UseDomainPrefixes).Returns(false); var globalSettings = Mock.Get(Factory.GetInstance()); //this will modify the IGlobalSettings instance stored in the container - globalSettings.Setup(x => x.UseDirectoryUrls).Returns(true); globalSettings.Setup(x => x.HideTopLevelNodeFromPath).Returns(false); // ignored w/domains var umbracoContext = GetUmbracoContext("/test", 1111, umbracoSettings: settings, urlProviders: new[] @@ -275,7 +272,6 @@ namespace Umbraco.Tests.Routing request.Setup(x => x.UseDomainPrefixes).Returns(false); var globalSettings = Mock.Get(Factory.GetInstance()); //this will modify the IGlobalSettings instance stored in the container - globalSettings.Setup(x => x.UseDirectoryUrls).Returns(true); globalSettings.Setup(x => x.HideTopLevelNodeFromPath).Returns(false); // ignored w/domains var umbracoContext = GetUmbracoContext("/test", 1111, umbracoSettings: settings, urlProviders: new[] @@ -298,7 +294,6 @@ namespace Umbraco.Tests.Routing request.Setup(x => x.UseDomainPrefixes).Returns(false); var globalSettings = Mock.Get(Factory.GetInstance()); //this will modify the IGlobalSettings instance stored in the container - globalSettings.Setup(x => x.UseDirectoryUrls).Returns(true); globalSettings.Setup(x => x.HideTopLevelNodeFromPath).Returns(false); // ignored w/domains var umbracoContext = GetUmbracoContext("/test", 1111, umbracoSettings: settings, urlProviders: new[] @@ -364,7 +359,6 @@ namespace Umbraco.Tests.Routing requestMock.Setup(x => x.UseDomainPrefixes).Returns(false); var globalSettings = Mock.Get(Factory.GetInstance()); //this will modify the IGlobalSettings instance stored in the container - globalSettings.Setup(x => x.UseDirectoryUrls).Returns(true); globalSettings.Setup(x => x.HideTopLevelNodeFromPath).Returns(false); // ignored w/domains var umbracoContext = GetUmbracoContext("http://domain1.com/test", 1111, umbracoSettings: settings, urlProviders: new[] @@ -395,7 +389,6 @@ namespace Umbraco.Tests.Routing var settings = SettingsForTests.GenerateMockUmbracoSettings(); var globalSettings = Mock.Get(Factory.GetInstance()); //this will modify the IGlobalSettings instance stored in the container - globalSettings.Setup(x => x.UseDirectoryUrls).Returns(true); globalSettings.Setup(x => x.HideTopLevelNodeFromPath).Returns(false); // ignored w/domains var umbracoContext = GetUmbracoContext("http://domain1.com/en/test", 1111, umbracoSettings: settings, urlProviders: new[] diff --git a/src/Umbraco.Tests/Routing/UrlsWithNestedDomains.cs b/src/Umbraco.Tests/Routing/UrlsWithNestedDomains.cs index e28a6485d6..bb06ff894b 100644 --- a/src/Umbraco.Tests/Routing/UrlsWithNestedDomains.cs +++ b/src/Umbraco.Tests/Routing/UrlsWithNestedDomains.cs @@ -31,7 +31,6 @@ namespace Umbraco.Tests.Routing public void DoNotPolluteCache() { var globalSettings = Mock.Get(Factory.GetInstance()); //this will modify the IGlobalSettings instance stored in the container - globalSettings.Setup(x => x.UseDirectoryUrls).Returns(true); globalSettings.Setup(x => x.HideTopLevelNodeFromPath).Returns(false); var settings = SettingsForTests.GenerateMockUmbracoSettings(); diff --git a/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs b/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs index 37be4aea6d..ad6699b6d5 100644 --- a/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs +++ b/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs @@ -18,7 +18,6 @@ namespace Umbraco.Tests.TestHelpers settings.UseHttps == false && settings.HideTopLevelNodeFromPath == false && settings.Path == IOHelper.ResolveUrl("~/umbraco") && - settings.UseDirectoryUrls == true && settings.TimeOutInMinutes == 20 && settings.DefaultUILanguage == "en" && settings.LocalTempStorageLocation == LocalTempStorage.Default && diff --git a/src/Umbraco.Web.UI/config/umbracoSettings.config b/src/Umbraco.Web.UI/config/umbracoSettings.config index 4de0a04735..026bfa17b5 100644 --- a/src/Umbraco.Web.UI/config/umbracoSettings.config +++ b/src/Umbraco.Web.UI/config/umbracoSettings.config @@ -68,9 +68,6 @@ False - - False - text diff --git a/src/Umbraco.Web.UI/web.Template.config b/src/Umbraco.Web.UI/web.Template.config index ab6e9258b9..f781d234fe 100644 --- a/src/Umbraco.Web.UI/web.Template.config +++ b/src/Umbraco.Web.UI/web.Template.config @@ -33,11 +33,10 @@ - - + + - @@ -90,18 +89,6 @@ - - - - - - - - - - - - diff --git a/src/Umbraco.Web/JavaScript/ServerVariablesParser.cs b/src/Umbraco.Web/JavaScript/ServerVariablesParser.cs index 42c8a3bbbd..6824d02d18 100644 --- a/src/Umbraco.Web/JavaScript/ServerVariablesParser.cs +++ b/src/Umbraco.Web/JavaScript/ServerVariablesParser.cs @@ -2,9 +2,17 @@ using System.Collections.Generic; using Newtonsoft.Json.Linq; +namespace Umbraco.Web.UI.JavaScript +{ + //fixme delete this when Models Builder is updated + public sealed class ServerVariablesParser : global::Umbraco.Web.JavaScript.ServerVariablesParser + { + } +} + namespace Umbraco.Web.JavaScript { - public sealed class ServerVariablesParser + public class ServerVariablesParser { /// @@ -19,10 +27,7 @@ namespace Umbraco.Web.JavaScript var vars = Resources.ServerVariables; //Raise event for developers to add custom variables - if (Parsing != null) - { - Parsing(null, items); - } + Parsing?.Invoke(null, items); var json = JObject.FromObject(items); return vars.Replace(Token, json.ToString()); diff --git a/src/Umbraco.Web/UmbracoInjectedModule.cs b/src/Umbraco.Web/UmbracoInjectedModule.cs index 2b6d032f72..6da3f90ed9 100644 --- a/src/Umbraco.Web/UmbracoInjectedModule.cs +++ b/src/Umbraco.Web/UmbracoInjectedModule.cs @@ -217,18 +217,15 @@ namespace Umbraco.Web var lpath = uri.AbsolutePath.ToLowerInvariant(); // handle directory-urls used for asmx - // legacy - what's the point really? - if (/*maybeDoc &&*/ _globalSettings.UseDirectoryUrls) + // TODO: legacy - what's the point really? + var asmxPos = lpath.IndexOf(".asmx/", StringComparison.OrdinalIgnoreCase); + if (asmxPos >= 0) { - var asmxPos = lpath.IndexOf(".asmx/", StringComparison.OrdinalIgnoreCase); - if (asmxPos >= 0) - { - // use uri.AbsolutePath, not path, 'cos path has been lowercased - httpContext.RewritePath(uri.AbsolutePath.Substring(0, asmxPos + 5), // filePath - uri.AbsolutePath.Substring(asmxPos + 5), // pathInfo - uri.Query.TrimStart('?')); - maybeDoc = false; - } + // use uri.AbsolutePath, not path, 'cos path has been lowercased + httpContext.RewritePath(uri.AbsolutePath.Substring(0, asmxPos + 5), // filePath + uri.AbsolutePath.Substring(asmxPos + 5), // pathInfo + uri.Query.TrimStart('?')); + maybeDoc = false; } // a document request should be diff --git a/src/Umbraco.Web/UriUtility.cs b/src/Umbraco.Web/UriUtility.cs index a4de3c412e..04357a3a5a 100644 --- a/src/Umbraco.Web/UriUtility.cs +++ b/src/Umbraco.Web/UriUtility.cs @@ -64,13 +64,8 @@ namespace Umbraco.Web { var path = uri.GetSafeAbsolutePath(); - if (path != "/") - { - if (!globalSettings.UseDirectoryUrls) - path += ".aspx"; - else if (requestConfig.AddTrailingSlash) - path = path.EnsureEndsWith("/"); - } + if (path != "/" && requestConfig.AddTrailingSlash) + path = path.EnsureEndsWith("/"); path = ToAbsolute(path); From b573b9a50a8470dd7d1fe0bc851dd938f971aba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 29 Jan 2019 14:09:48 +0100 Subject: [PATCH 348/437] brandcolor 2019 corrections --- .../src/less/components/card.less | 14 +++++++------- .../src/less/components/umb-group-builder.less | 8 ++++---- src/Umbraco.Web.UI.Client/src/less/forms.less | 4 ++-- .../src/less/property-editors.less | 6 ++++-- src/Umbraco.Web.UI.Client/src/less/variables.less | 9 ++++++--- 5 files changed, 23 insertions(+), 18 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/components/card.less b/src/Umbraco.Web.UI.Client/src/less/components/card.less index a302ba71b8..0f4f2a7a9d 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/card.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/card.less @@ -70,7 +70,7 @@ margin: 0; } -.umb-card-list li{ +.umb-card-list li { border-bottom: @gray-10 1px solid; padding-bottom: 3px; display: block; @@ -123,15 +123,15 @@ .umb-card-grid .umb-card-grid-item:focus, .umb-card-grid .umb-card-grid-item:hover > *, .umb-card-grid .umb-card-grid-item:focus > * { - background: @gray-10; - //color: white; + background: @ui-option-hover; + color: @ui-option-type-hover; cursor: pointer; outline: none; border-radius: 3px; } .umb-card-grid a { - color: @gray-2; + color: @ui-option-type; text-decoration: none; } @@ -139,7 +139,7 @@ font-size: 30px; line-height: 50px; display: block; - color: @gray-3; + color: @ui-option-type; } .umb-card-grid .umb-card-grid-item__loading { @@ -164,9 +164,9 @@ } .umb-btn-round:hover, .umb-btn-round:hover *{ - background: @turquoise !important; + background: @blueDark !important; color: @white !important; - border-color: @turquoise !important; + border-color: @blueDark !important; text-decoration:none; } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-group-builder.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-group-builder.less index 5db66da974..ba433e80d3 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-group-builder.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-group-builder.less @@ -416,7 +416,7 @@ input.umb-group-builder__group-sort-value { } .editor-placeholder { - border: 1px dashed @gray-8; + border: 1px dashed @ui-action-border; width: 100%; height: 80px; line-height: 80px; @@ -425,12 +425,12 @@ input.umb-group-builder__group-sort-value { border-radius: 5px; font-weight: bold; font-size: 14px; - color: @ui-active; + color: @ui-action-type; &:hover { text-decoration: none; - color:@ui-active-type-hover; - border-color:@ui-active-type-hover; + color:@ui-action-type-hover; + border-color:@ui-action-border-hover; } } diff --git a/src/Umbraco.Web.UI.Client/src/less/forms.less b/src/Umbraco.Web.UI.Client/src/less/forms.less index 70b60f810e..7b2afad20b 100644 --- a/src/Umbraco.Web.UI.Client/src/less/forms.less +++ b/src/Umbraco.Web.UI.Client/src/less/forms.less @@ -201,7 +201,7 @@ input[type="color"], margin-bottom: @baseLineHeight / 2; font-size: @baseFontSize; line-height: @baseLineHeight; - color: @gray-3; + color: @gray-2; .border-radius(@inputBorderRadius); vertical-align: middle; box-sizing: border-box; @@ -818,4 +818,4 @@ legend + .control-group { /* User/group selector */ .group-selector .group-selector-list { float: left; } .group-selector .group-selector-list div { height: 24px; } -.group-selector .group-selector-buttons { float: left; margin: 24px 16px; } \ No newline at end of file +.group-selector .group-selector-buttons { float: left; margin: 24px 16px; } diff --git a/src/Umbraco.Web.UI.Client/src/less/property-editors.less b/src/Umbraco.Web.UI.Client/src/less/property-editors.less index 57df982fd3..7c0383b415 100644 --- a/src/Umbraco.Web.UI.Client/src/less/property-editors.less +++ b/src/Umbraco.Web.UI.Client/src/less/property-editors.less @@ -246,7 +246,7 @@ display: flex; justify-content:center; align-items:center; - width: 120px; + //width: 120px; text-align: center; color: @gray-9; border: 2px @gray-9 dashed; @@ -295,7 +295,9 @@ } .umb-mediapicker .add-link-square { - height: 120px; + height: 100px; + width: 100px; + margin: 10px; } diff --git a/src/Umbraco.Web.UI.Client/src/less/variables.less b/src/Umbraco.Web.UI.Client/src/less/variables.less index f5685059c9..ea2f479101 100644 --- a/src/Umbraco.Web.UI.Client/src/less/variables.less +++ b/src/Umbraco.Web.UI.Client/src/less/variables.less @@ -161,16 +161,19 @@ @ui-light-active-type-hover: @blueMid; -@ui-action: @blueMid; -@ui-action-hover: @blueMid; +@ui-action: white; +@ui-action-hover: @brownLight; @ui-action-type: @blueExtraDark; @ui-action-type-hover: @blueMid; +@ui-action-border: @blueExtraDark; +@ui-action-border-hover: @blueMid; @ui-action-disgrete: white; @ui-action-disgrete-hover: @brownLight; - @ui-action-disgrete-type: @gray-4; @ui-action-disgrete-type-hover: @blueMid; +@ui-action-disgrete-border: @gray-4; +@ui-action-disgrete-border-hover: @blueMid; @type-white: @white; @type-black: @blueNight; From 2c40e46d56518cad69db6369e49591fc89316312 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Wed, 23 Jan 2019 20:49:08 +0100 Subject: [PATCH 349/437] Set form dirty on color picker value change + update selected item label + clean up unused code --- .../colorpicker/colorpicker.controller.js | 65 +++++++++---------- .../colorpicker/colorpicker.html | 3 +- 2 files changed, 31 insertions(+), 37 deletions(-) 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 9b3be511a4..15d8906ec0 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 @@ -1,4 +1,4 @@ -function ColorPickerController($scope) { +function ColorPickerController($scope, angularHelper) { //setup the default config var config = { @@ -77,29 +77,7 @@ function ColorPickerController($scope) { //now make the editor model the array $scope.model.config.items = items; } - - $scope.toggleItem = function (color) { - - var currentColor = ($scope.model.value && $scope.model.value.hasOwnProperty("value")) - ? $scope.model.value.value - : $scope.model.value; - - var newColor; - if (currentColor === color.value) { - // deselect - $scope.model.value = $scope.model.useLabel ? { value: "", label: "" } : ""; - newColor = ""; - } - else { - // select - $scope.model.value = $scope.model.useLabel ? { value: color.value, label: color.label } : color.value; - newColor = color.value; - } - - // this is required to re-validate - $scope.propertyForm.modelValue.$setViewValue(newColor); - }; - + // 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 || ( @@ -115,20 +93,35 @@ function ColorPickerController($scope) { } $scope.isConfigured = $scope.model.config && $scope.model.config.items && _.keys($scope.model.config.items).length > 0; - // A color is active if it matches the value and label of the model. - // If the model doesn't store the label, ignore the label during the comparison. - $scope.isActiveColor = function (color) { - - // no value - if (!$scope.model.value) - return false; - + $scope.onSelect = function (color) { // Complex color (value and label)? - if (!$scope.model.value.hasOwnProperty("value")) - return $scope.model.value === color.value; + if (!$scope.model.value.hasOwnProperty("value")) { + // did the value change? + if ($scope.model.value !== color) { + // yes, make sure to set dirty + angularHelper.getCurrentForm($scope).$setDirty(); + } + return; + } - return $scope.model.value.value === color.value && $scope.model.value.label === color.label; - }; + // did the value change? + if ($scope.model.value.value === color) { + // no, skip the rest + return; + } + + // yes, make sure to set dirty + angularHelper.getCurrentForm($scope).$setDirty(); + + // update the label according to the new color + var selectedItem = _.find($scope.model.config.items, function (item) { + return item.value === color; + }); + if (!selectedItem) { + return; + } + $scope.model.value.label = selectedItem.label; + } // Finds the color best matching the model's color, // and sets the model color to that one. This is useful when 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 b09d73cee2..0b6e8e7c59 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 @@ -8,7 +8,8 @@ + use-label="model.useLabel" + on-select="onSelect(color)"> From 99f0e6c05a80017e1fb3fdb4b3035ed628309f22 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Wed, 23 Jan 2019 20:54:34 +0100 Subject: [PATCH 350/437] Fix callback --- .../common/directives/components/umbcolorswatches.directive.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbcolorswatches.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbcolorswatches.directive.js index dc67cb464b..494fae9919 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbcolorswatches.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbcolorswatches.directive.js @@ -38,7 +38,7 @@ Use this directive to generate color swatches to pick from. scope.selectedColor = color; if (scope.onSelect) { - scope.onSelect(color); + scope.onSelect({color: color }); } }; } From d39045caef7daf5a935b3481ca3f9b76d758af81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 29 Jan 2019 14:31:27 +0100 Subject: [PATCH 351/437] =?UTF-8?q?V8:=20CSS=20=E2=80=94=20adding=20missin?= =?UTF-8?q?g=20unit=20for=20umb-loader=20in=20umb-tree?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/less/components/tree/umb-tree-item.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less index d6202c5665..097665bdd4 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less @@ -28,7 +28,7 @@ overflow: hidden; position: absolute; left: 0; - bottom: -1; + bottom: -1px; div { .umb-loader; From f94e0fd3ec61906c04ce2e7deba25d059cca2612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 29 Jan 2019 14:38:33 +0100 Subject: [PATCH 352/437] =?UTF-8?q?V8:=20CSS=20=E2=80=94=20variable=20corr?= =?UTF-8?q?ection?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/less/components/umb-child-selector.less | 6 +++--- .../src/less/components/umb-group-builder.less | 4 ++-- .../src/less/components/umb-list-view-settings.less | 6 +++--- .../src/less/components/umb-node-preview.less | 6 +++--- src/Umbraco.Web.UI.Client/src/less/variables.less | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-child-selector.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-child-selector.less index d8e6676728..b6cdc0e8d9 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-child-selector.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-child-selector.less @@ -20,10 +20,10 @@ text-align: center; justify-content: center; - color:@ui-action; + color:@ui-action-type; &:hover { - color:@ui-action-hover; - border-color:@ui-action-hover; + color:@ui-action-type-hover; + border-color:@ui-action-type-hover; text-decoration:none; } } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-group-builder.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-group-builder.less index ba433e80d3..33df17c754 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-group-builder.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-group-builder.less @@ -33,12 +33,12 @@ align-items: center; cursor: pointer; border: 1px dashed @gray-7; - color: @ui-action; + color: @ui-action-type; font-weight: bold; position: relative; box-shadow: none; &:hover { - color:@ui-action-hover; + color:@ui-action-type-hover; text-decoration: none; border-color: @ui-active-type-hover; } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-list-view-settings.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-list-view-settings.less index b23a9d14b8..733836d85f 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-list-view-settings.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-list-view-settings.less @@ -34,12 +34,12 @@ .umb-list-view-settings__create-new { font-size: 13px; - color: @ui-action; + color: @ui-action-type; } .umb-list-view-settings__create-new:hover { - color: @ui-action-hover; - border-color: @ui-action-hover; + color: @ui-action-type-hover; + border-color: @ui-action-type-hover; } .umb-list-view-settings__remove-new { diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less index b10e761d68..5b27206fc2 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less @@ -90,15 +90,15 @@ align-items: center; justify-content: center; border: 1px dashed @gray-7; - color: @ui-action; + color: @ui-action-type; font-weight: bold; padding: 5px 15px; box-sizing: border-box; } .umb-node-preview-add:hover { - color: @ui-action-hover; - border-color: @ui-action-hover; + color: @ui-action-type-hover; + border-color: @ui-action-type-hover; text-decoration: none; } diff --git a/src/Umbraco.Web.UI.Client/src/less/variables.less b/src/Umbraco.Web.UI.Client/src/less/variables.less index ea2f479101..cde86b34e5 100644 --- a/src/Umbraco.Web.UI.Client/src/less/variables.less +++ b/src/Umbraco.Web.UI.Client/src/less/variables.less @@ -342,7 +342,7 @@ @btnInfoBackgroundHighlight: @ui-btn-hover;// updated 2019 @btnWhiteType: @blueExtraDark;// updated 2019 -@btnWhiteTypeHover: @ui-action-hover;// updated 2019 +@btnWhiteTypeHover: @ui-action-type-hover;// updated 2019 @btnWhiteBackground: @white;// updated 2019 @btnWhiteBackgroundHighlight: @white;// updated 2019 From cd5dc410cc5c47ef5049f3d7c51c4a0dd8d8e906 Mon Sep 17 00:00:00 2001 From: Stephan Date: Tue, 29 Jan 2019 14:47:09 +0100 Subject: [PATCH 353/437] Refactor IDataTypeConfigurationConnector for Deploy --- src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs | 4 ++-- .../PropertyEditors/ValueListConfigurationEditor.cs | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs b/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs index 6c266ced2a..3a673e92a2 100644 --- a/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs +++ b/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs @@ -22,13 +22,13 @@ namespace Umbraco.Core.Deploy /// /// The datatype. /// The dependencies. - IDictionary ToArtifact(IDataType dataType, ICollection dependencies); + string ToArtifact(IDataType dataType, ICollection dependencies); /// /// Gets the actual datatype configuration corresponding to the artifact configuration. /// /// The datatype. /// The artifact configuration. - object FromArtifact(IDataType dataType, IDictionary configuration); + object FromArtifact(IDataType dataType, string configuration); } } diff --git a/src/Umbraco.Web/PropertyEditors/ValueListConfigurationEditor.cs b/src/Umbraco.Web/PropertyEditors/ValueListConfigurationEditor.cs index d130fb5952..abfde3646a 100644 --- a/src/Umbraco.Web/PropertyEditors/ValueListConfigurationEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ValueListConfigurationEditor.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using Newtonsoft.Json.Linq; using Umbraco.Core.Services; @@ -13,7 +12,7 @@ namespace Umbraco.Web.PropertyEditors /// /// This pre-value editor is shared with editors like drop down, checkbox list, etc.... /// - internal class ValueListConfigurationEditor : ConfigurationEditor + public class ValueListConfigurationEditor : ConfigurationEditor { public ValueListConfigurationEditor(ILocalizedTextService textService) { From 78c3797e5a1e96be91ad467e5c8d2b17c3b995e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 29 Jan 2019 15:14:38 +0100 Subject: [PATCH 354/437] V8: colors for tags --- src/Umbraco.Web.UI.Client/src/less/property-editors.less | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/property-editors.less b/src/Umbraco.Web.UI.Client/src/less/property-editors.less index 7c0383b415..8d1b70c35d 100644 --- a/src/Umbraco.Web.UI.Client/src/less/property-editors.less +++ b/src/Umbraco.Web.UI.Client/src/less/property-editors.less @@ -845,16 +845,16 @@ // Tags // -------------------------------------------------- .umb-tags{ - border: @gray-10 solid 1px; + border: @inputBorder solid 1px; padding: 10px; font-size: 13px; text-shadow: none; - .tag{ + .tag { cursor: default; margin: 7px; padding: 10px; - background: @ui-action; + background: @blueDark; position: relative; .icon-trash{ From d75cace85de23f03d23f9102d21a3e16b3bdfee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 29 Jan 2019 15:23:21 +0100 Subject: [PATCH 355/437] color variable clean up --- src/Umbraco.Web.UI.Client/src/less/variables.less | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/variables.less b/src/Umbraco.Web.UI.Client/src/less/variables.less index cde86b34e5..bde61517ac 100644 --- a/src/Umbraco.Web.UI.Client/src/less/variables.less +++ b/src/Umbraco.Web.UI.Client/src/less/variables.less @@ -101,7 +101,7 @@ @indigoIcon: #3F51B5; -// Accent colors +// Brand colors // ------------------------- //@blueLight: #4f89de; @@ -119,14 +119,6 @@ @brownLight: #e4e0dd;// added 2019 @brownGrayLight: #f3f2f1;// added 2019 @orange: #ff9412;// added 2019 -//@claus: #f6efe7; -//@claus2: #f2ebe6; -//@claus3: #535963; //#56777A -//@claus4: #819a9e; -//@claus5: #2152A3;// blueMid -//@claus6: #02A191; -//@clausSoftRed: #D93F4C; // todo -//@clausRed:#D42054;// todo. //@u-greyLight: #f2ebe6;// added 2019 @u-white: #f9f7f4;// added 2019 From 414f838476653170ede3266230a480078c4b29fe Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 29 Jan 2019 15:30:25 +0100 Subject: [PATCH 356/437] #3645 - Lists available languages in the preview bar (if more than 1) Reads the culture from hash instead of query and updates the hash when changing culture. --- .../components/content/edit.controller.js | 2 +- .../src/preview/preview.controller.js | 54 +++++++++++-------- .../Umbraco/Views/Preview/Index.cshtml | 11 ++++ .../Editors/BackOfficePreviewLinkModel.cs | 8 +++ .../Editors/BackOfficePreviewModel.cs | 14 +++-- src/Umbraco.Web/Editors/PreviewController.cs | 20 +++++-- .../Mvc/UmbracoViewPageOfTModel.cs | 2 +- src/Umbraco.Web/Umbraco.Web.csproj | 1 + 8 files changed, 80 insertions(+), 32 deletions(-) create mode 100644 src/Umbraco.Web/Editors/BackOfficePreviewLinkModel.cs diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js index fc7fff7e3c..9850f251f3 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js @@ -785,7 +785,7 @@ // Build the correct path so both /#/ and #/ work. var query = 'id=' + content.id; if ($scope.culture) { - query += "&culture=" + $scope.culture; + query += "#?culture=" + $scope.culture; } var redirect = Umbraco.Sys.ServerVariables.umbracoSettings.umbracoPath + '/preview/?' + query; diff --git a/src/Umbraco.Web.UI.Client/src/preview/preview.controller.js b/src/Umbraco.Web.UI.Client/src/preview/preview.controller.js index fe0bb28aeb..5eb985a582 100644 --- a/src/Umbraco.Web.UI.Client/src/preview/preview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/preview/preview.controller.js @@ -68,16 +68,7 @@ var app = angular.module("umbraco.preview", ['umbraco.resources', 'umbraco.servi return; } - $scope.pageId = $location.search().id || getParameterByName("id"); - var culture = $location.search().culture || getParameterByName("culture"); - - if ($scope.pageId) { - var query = 'id=' + $scope.pageId; - if (culture) { - query += "&culture=" + culture; - } - $scope.pageUrl = "frame?" + query; - } + setPageUrl(); $scope.isOpen = false; $scope.frameLoaded = false; @@ -93,6 +84,19 @@ var app = angular.module("umbraco.preview", ['umbraco.resources', 'umbraco.servi ]; $scope.previewDevice = $scope.devices[0]; + + function setPageUrl(){ + $scope.pageId = $location.search().id || getParameterByName("id"); + var culture = $location.search().culture || getParameterByName("culture"); + + if ($scope.pageId) { + var query = 'id=' + $scope.pageId; + if (culture) { + query += "&culture=" + culture; + } + $scope.pageUrl = "frame?" + query; + } + } /*****************************************************************************/ /* Preview devices */ /*****************************************************************************/ @@ -107,28 +111,39 @@ var app = angular.module("umbraco.preview", ['umbraco.resources', 'umbraco.servi /*****************************************************************************/ $scope.exitPreview = function () { - window.top.location.href = "../preview/end?redir=%2f" + $scope.pageId; + + var culture = $location.search().culture || getParameterByName("culture"); + var relativeUrl = "/" + $scope.pageId +'?culture='+ culture; + window.top.location.href = "../preview/end?redir=" + encodeURIComponent(relativeUrl); }; $scope.onFrameLoaded = function (iframe) { $scope.frameLoaded = true; configureSignalR(iframe); - } + }; /*****************************************************************************/ - /* Panel managment */ + /* Panel management */ /*****************************************************************************/ $scope.openPreviewDevice = function () { $scope.showDevicesPreview = true; - } + }; + + /*****************************************************************************/ + /* Change culture */ + /*****************************************************************************/ + $scope.changeCulture = function (culture) { + // $scope.frameLoaded = false; + $location.search("culture", culture); + setPageUrl(); + }; }) .component('previewIFrame', { - - template: "
    ", + template: "
    ", controller: function ($element, $scope, angularHelper) { var vm = this; @@ -136,22 +151,15 @@ var app = angular.module("umbraco.preview", ['umbraco.resources', 'umbraco.servi vm.$postLink = function () { var resultFrame = $element.find("#resultFrame"); resultFrame.on("load", iframeReady); - vm.srcDelayed = vm.src; }; function iframeReady() { var iframe = $element.find("#resultFrame").get(0); - hideUmbracoPreviewBadge(iframe); angularHelper.safeApply($scope, function () { vm.onLoaded({ iframe: iframe }); }); } - function hideUmbracoPreviewBadge (iframe) { - if (iframe && iframe.contentDocument && iframe.contentDocument.getElementById("umbracoPreviewBadge")) { - iframe.contentDocument.getElementById("umbracoPreviewBadge").style.display = "none"; - } - }; }, controllerAs: "vm", diff --git a/src/Umbraco.Web.UI/Umbraco/Views/Preview/Index.cshtml b/src/Umbraco.Web.UI/Umbraco/Views/Preview/Index.cshtml index fcd375da45..db9fc2d3bf 100644 --- a/src/Umbraco.Web.UI/Umbraco/Views/Preview/Index.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/Views/Preview/Index.cshtml @@ -46,6 +46,17 @@
  • + + @if (Model.PreviewLinks != null && Model.PreviewLinks.Count() > 2) + { + foreach (var previewLink in Model.PreviewLinks) + { +
  • + @previewLink.CultureName +
  • + } + } +
  • diff --git a/src/Umbraco.Web/Editors/BackOfficePreviewLinkModel.cs b/src/Umbraco.Web/Editors/BackOfficePreviewLinkModel.cs new file mode 100644 index 0000000000..c47db0811a --- /dev/null +++ b/src/Umbraco.Web/Editors/BackOfficePreviewLinkModel.cs @@ -0,0 +1,8 @@ +namespace Umbraco.Web.Editors +{ + public class BackOfficePreviewLinkModel + { + public string CultureName { get; set; } + public string CultureId { get; set; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Editors/BackOfficePreviewModel.cs b/src/Umbraco.Web/Editors/BackOfficePreviewModel.cs index 1298575e50..89b055d9d7 100644 --- a/src/Umbraco.Web/Editors/BackOfficePreviewModel.cs +++ b/src/Umbraco.Web/Editors/BackOfficePreviewModel.cs @@ -1,15 +1,21 @@ -using Umbraco.Core.Configuration; +using System.Collections.Generic; +using Umbraco.Core.Configuration; using Umbraco.Web.Features; namespace Umbraco.Web.Editors { public class BackOfficePreviewModel : BackOfficeModel { - public BackOfficePreviewModel(UmbracoFeatures features, IGlobalSettings globalSettings) : base(features, globalSettings) + private readonly UmbracoFeatures _features; + public IEnumerable PreviewLinks { get; } + + public BackOfficePreviewModel(UmbracoFeatures features, IGlobalSettings globalSettings, IEnumerable previewLinks) : base(features, globalSettings) { + _features = features; + PreviewLinks = previewLinks; } - public bool DisableDevicePreview => Features.Disabled.DisableDevicePreview; - public string PreviewExtendedHeaderView => Features.Enabled.PreviewExtendedView; + public bool DisableDevicePreview => _features.Disabled.DisableDevicePreview; + public string PreviewExtendedHeaderView => _features.Enabled.PreviewExtendedView; } } diff --git a/src/Umbraco.Web/Editors/PreviewController.cs b/src/Umbraco.Web/Editors/PreviewController.cs index bd14a6c6f4..a71f963678 100644 --- a/src/Umbraco.Web/Editors/PreviewController.cs +++ b/src/Umbraco.Web/Editors/PreviewController.cs @@ -1,12 +1,13 @@ using System; +using System.Linq; using System.Web; using System.Web.Mvc; using System.Web.UI; using Umbraco.Core; using Umbraco.Core.Configuration; +using Umbraco.Core.Services; using Umbraco.Web.Composing; using Umbraco.Web.Features; -using Umbraco.Web.Models.ContentEditing; using Umbraco.Web.Mvc; using Umbraco.Web.PublishedCache; using Umbraco.Web.UI.JavaScript; @@ -21,20 +22,33 @@ namespace Umbraco.Web.Editors private readonly IGlobalSettings _globalSettings; private readonly IPublishedSnapshotService _publishedSnapshotService; private readonly UmbracoContext _umbracoContext; + private readonly ILocalizationService _localizationService; - public PreviewController(UmbracoFeatures features, IGlobalSettings globalSettings, IPublishedSnapshotService publishedSnapshotService, UmbracoContext umbracoContext) + public PreviewController( + UmbracoFeatures features, + IGlobalSettings globalSettings, + IPublishedSnapshotService publishedSnapshotService, + UmbracoContext umbracoContext, + ILocalizationService localizationService) { _features = features; _globalSettings = globalSettings; _publishedSnapshotService = publishedSnapshotService; _umbracoContext = umbracoContext; + _localizationService = localizationService; } [UmbracoAuthorize(redirectToUmbracoLogin: true)] [DisableBrowserCache] public ActionResult Index() { - var model = new BackOfficePreviewModel(_features, _globalSettings); + var availableLanguages = _localizationService.GetAllLanguages(); + var previewLinks = availableLanguages.Select(x => new BackOfficePreviewLinkModel() { + CultureName = x.CultureName, + CultureId = x.IsoCode} + ); + + var model = new BackOfficePreviewModel(_features, _globalSettings, previewLinks); if (model.PreviewExtendedHeaderView.IsNullOrWhiteSpace() == false) { diff --git a/src/Umbraco.Web/Mvc/UmbracoViewPageOfTModel.cs b/src/Umbraco.Web/Mvc/UmbracoViewPageOfTModel.cs index a16f9661aa..748efbb27a 100644 --- a/src/Umbraco.Web/Mvc/UmbracoViewPageOfTModel.cs +++ b/src/Umbraco.Web/Mvc/UmbracoViewPageOfTModel.cs @@ -217,7 +217,7 @@ namespace Umbraco.Web.Mvc markupToInject = string.Format(Current.Configs.Settings().Content.PreviewBadge, IOHelper.ResolveUrl(SystemDirectories.Umbraco), - Server.UrlEncode(UmbracoContext.Current.HttpContext.Request.Path)); + Server.UrlEncode(UmbracoContext.Current.HttpContext.Request.Url?.PathAndQuery)); } else { diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index ccf8c49485..c9c33ceb8d 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -138,6 +138,7 @@ + From 5637c44f69db6c324fa5cb4806189fb5f39e026f Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Tue, 29 Jan 2019 16:49:10 +0100 Subject: [PATCH 357/437] Explicitly set the form dirty when toggling a boolean --- .../src/views/propertyeditors/boolean/boolean.controller.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 c574e1424f..07be03da29 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) { +function booleanEditorController($scope, angularHelper) { function setupViewModel() { $scope.renderModel = { @@ -28,7 +28,8 @@ function booleanEditorController($scope) { }; // Update the value when the toggle is clicked - $scope.toggle = function(){ + $scope.toggle = function () { + angularHelper.getCurrentForm($scope).$setDirty(); if($scope.renderModel.value){ $scope.model.value = "0"; setupViewModel(); From 1340a5ce4b7d5166a203b3b544c6744bddc76556 Mon Sep 17 00:00:00 2001 From: Callum Whyte Date: Sat, 26 Jan 2019 02:59:14 +0000 Subject: [PATCH 358/437] Removing support for legacy webservices --- src/Umbraco.Core/IO/SystemDirectories.cs | 3 - .../Sync/ServerSyncWebServiceClient.cs | 248 ------------------ src/Umbraco.Core/Umbraco.Core.csproj | 3 - src/Umbraco.Core/UriExtensions.cs | 3 - .../Composing/TypeFinderTests.cs | 1 - .../CoreThings/UriExtensionsTests.cs | 3 - src/Umbraco.Tests/IO/IoHelperTests.cs | 1 - src/Umbraco.Web/Mvc/BackOfficeArea.cs | 8 - .../Routing/WebServicesRouteConstraint.cs | 26 -- src/Umbraco.Web/Umbraco.Web.csproj | 1 - 10 files changed, 297 deletions(-) delete mode 100644 src/Umbraco.Core/Sync/ServerSyncWebServiceClient.cs delete mode 100644 src/Umbraco.Web/Routing/WebServicesRouteConstraint.cs diff --git a/src/Umbraco.Core/IO/SystemDirectories.cs b/src/Umbraco.Core/IO/SystemDirectories.cs index 5bbf325c8c..100dbc265e 100644 --- a/src/Umbraco.Core/IO/SystemDirectories.cs +++ b/src/Umbraco.Core/IO/SystemDirectories.cs @@ -39,9 +39,6 @@ namespace Umbraco.Core.IO [Obsolete("Usercontrols are obsolete and code should be removed")] public static string UserControls => "~/usercontrols"; - [Obsolete("Only used by legacy load balancing which is obsolete and should be removed")] - public static string WebServices => IOHelper.ReturnPath("umbracoWebservicesPath", Umbraco.EnsureEndsWith("/") + "webservices"); - public static string Packages => Data + "/packages"; public static string Preview => Data + "/preview"; diff --git a/src/Umbraco.Core/Sync/ServerSyncWebServiceClient.cs b/src/Umbraco.Core/Sync/ServerSyncWebServiceClient.cs deleted file mode 100644 index 38ba2ce189..0000000000 --- a/src/Umbraco.Core/Sync/ServerSyncWebServiceClient.cs +++ /dev/null @@ -1,248 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Web.Services; -using Umbraco.Core.IO; - -namespace Umbraco.Core.Sync -{ - /// - /// The client Soap service for making distributed cache calls between servers - /// - [WebServiceBinding(Name = "CacheRefresherSoap", Namespace = "http://umbraco.org/webservices/")] - [Obsolete("Legacy load balancing is obsolete and should be removed")] - internal class ServerSyncWebServiceClient : System.Web.Services.Protocols.SoapHttpClientProtocol - { - - /// - public ServerSyncWebServiceClient() - { - // only set the url if the httpcontext is present, else it's set by the cache dispatcher methods (when using distributed calls) - if (System.Web.HttpContext.Current != null) - this.Url = "http://" + System.Web.HttpContext.Current.Request.ServerVariables["SERVER_NAME"] + IOHelper.ResolveUrl(SystemDirectories.WebServices) + "/cacheRefresher.asmx"; - - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://umbraco.org/webservices/BulkRefresh", RequestNamespace = "http://umbraco.org/webservices/", ResponseNamespace = "http://umbraco.org/webservices/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void BulkRefresh(RefreshInstruction[] instructions, string appId, string login, string password) - { - this.Invoke("BulkRefresh", new object[] { - instructions, - appId, - login, - password}); - } - - /// - public System.IAsyncResult BeginBulkRefresh(RefreshInstruction[] instructions, string appId, string login, string password, System.AsyncCallback callback, object asyncState) - { - return this.BeginInvoke("BulkRefresh", new object[] { - instructions, - appId, - login, - password}, callback, asyncState); - } - - /// - public void EndBulkRefresh(System.IAsyncResult asyncResult) - { - this.EndInvoke(asyncResult); - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://umbraco.org/webservices/RefreshAll", RequestNamespace = "http://umbraco.org/webservices/", ResponseNamespace = "http://umbraco.org/webservices/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void RefreshAll(System.Guid uniqueIdentifier, string Login, string Password) - { - this.Invoke("RefreshAll", new object[] { - uniqueIdentifier, - Login, - Password}); - } - - /// - public System.IAsyncResult BeginRefreshAll(System.Guid uniqueIdentifier, string Login, string Password, System.AsyncCallback callback, object asyncState) - { - return this.BeginInvoke("RefreshAll", new object[] { - uniqueIdentifier, - Login, - Password}, callback, asyncState); - } - - /// - public void EndRefreshAll(System.IAsyncResult asyncResult) - { - this.EndInvoke(asyncResult); - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://umbraco.org/webservices/RefreshByJson", RequestNamespace = "http://umbraco.org/webservices/", ResponseNamespace = "http://umbraco.org/webservices/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void RefreshByJson(System.Guid uniqueIdentifier, string jsonPayload, string Login, string Password) - { - this.Invoke("RefreshByJson", new object[] { - uniqueIdentifier, - jsonPayload, - Login, - Password}); - } - - /// - public System.IAsyncResult BeginRefreshByJson(System.Guid uniqueIdentifier, string jsonPayload, string Login, string Password, System.AsyncCallback callback, object asyncState) - { - return this.BeginInvoke("RefreshByJson", new object[] { - uniqueIdentifier, - jsonPayload, - Login, - Password}, callback, asyncState); - } - - /// - public void EndRefreshByJson(System.IAsyncResult asyncResult) - { - this.EndInvoke(asyncResult); - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://umbraco.org/webservices/RefreshByGuid", RequestNamespace = "http://umbraco.org/webservices/", ResponseNamespace = "http://umbraco.org/webservices/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void RefreshByGuid(System.Guid uniqueIdentifier, System.Guid Id, string Login, string Password) - { - this.Invoke("RefreshByGuid", new object[] { - uniqueIdentifier, - Id, - Login, - Password}); - } - - /// - public System.IAsyncResult BeginRefreshByGuid(System.Guid uniqueIdentifier, System.Guid Id, string Login, string Password, System.AsyncCallback callback, object asyncState) - { - return this.BeginInvoke("RefreshByGuid", new object[] { - uniqueIdentifier, - Id, - Login, - Password}, callback, asyncState); - } - - /// - public void EndRefreshByGuid(System.IAsyncResult asyncResult) - { - this.EndInvoke(asyncResult); - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://umbraco.org/webservices/RefreshById", - RequestNamespace = "http://umbraco.org/webservices/", - ResponseNamespace = "http://umbraco.org/webservices/", - Use = System.Web.Services.Description.SoapBindingUse.Literal, - ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void RefreshById(System.Guid uniqueIdentifier, int Id, string Login, string Password) - { - this.Invoke("RefreshById", new object[] { - uniqueIdentifier, - Id, - Login, - Password}); - } - - /// - public System.IAsyncResult BeginRefreshById(System.Guid uniqueIdentifier, int Id, string Login, string Password, System.AsyncCallback callback, object asyncState) - { - return this.BeginInvoke("RefreshById", new object[] { - uniqueIdentifier, - Id, - Login, - Password}, callback, asyncState); - } - - /// - public void EndRefreshById(System.IAsyncResult asyncResult) - { - this.EndInvoke(asyncResult); - } - - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://umbraco.org/webservices/RefreshByIds", - RequestNamespace = "http://umbraco.org/webservices/", - ResponseNamespace = "http://umbraco.org/webservices/", - Use = System.Web.Services.Description.SoapBindingUse.Literal, - ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void RefreshByIds(System.Guid uniqueIdentifier, string jsonIds, string Login, string Password) - { - this.Invoke("RefreshByIds", new object[] { - uniqueIdentifier, - jsonIds, - Login, - Password}); - } - - /// - public System.IAsyncResult BeginRefreshByIds(System.Guid uniqueIdentifier, string jsonIds, string Login, string Password, System.AsyncCallback callback, object asyncState) - { - return this.BeginInvoke("RefreshByIds", new object[] { - uniqueIdentifier, - jsonIds, - Login, - Password}, callback, asyncState); - } - - /// - public void EndRefreshByIds(System.IAsyncResult asyncResult) - { - this.EndInvoke(asyncResult); - } - - - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://umbraco.org/webservices/RemoveById", RequestNamespace = "http://umbraco.org/webservices/", ResponseNamespace = "http://umbraco.org/webservices/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void RemoveById(System.Guid uniqueIdentifier, int Id, string Login, string Password) - { - this.Invoke("RemoveById", new object[] { - uniqueIdentifier, - Id, - Login, - Password}); - } - - /// - public System.IAsyncResult BeginRemoveById(System.Guid uniqueIdentifier, int Id, string Login, string Password, System.AsyncCallback callback, object asyncState) - { - return this.BeginInvoke("RemoveById", new object[] { - uniqueIdentifier, - Id, - Login, - Password}, callback, asyncState); - } - - /// - public void EndRemoveById(System.IAsyncResult asyncResult) - { - this.EndInvoke(asyncResult); - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://umbraco.org/webservices/GetRefreshers", RequestNamespace = "http://umbraco.org/webservices/", ResponseNamespace = "http://umbraco.org/webservices/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public System.Xml.XmlNode GetRefreshers(string Login, string Password) - { - object[] results = this.Invoke("GetRefreshers", new object[] { - Login, - Password}); - return ((System.Xml.XmlNode)(results[0])); - } - - /// - public System.IAsyncResult BeginGetRefreshers(string Login, string Password, System.AsyncCallback callback, object asyncState) - { - return this.BeginInvoke("GetRefreshers", new object[] { - Login, - Password}, callback, asyncState); - } - - /// - public System.Xml.XmlNode EndGetRefreshers(System.IAsyncResult asyncResult) - { - object[] results = this.EndInvoke(asyncResult); - return ((System.Xml.XmlNode)(results[0])); - } - } -} diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 86c37ca54d..c3c052b2af 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -1524,9 +1524,6 @@ Component - - Component - Properties\SolutionInfo.cs diff --git a/src/Umbraco.Core/UriExtensions.cs b/src/Umbraco.Core/UriExtensions.cs index ba3e677219..083ca90cc4 100644 --- a/src/Umbraco.Core/UriExtensions.cs +++ b/src/Umbraco.Core/UriExtensions.cs @@ -4,7 +4,6 @@ using System.Linq; using Umbraco.Core.Composing; using Umbraco.Core.Configuration; using Umbraco.Core.IO; -using Umbraco.Core.Logging; namespace Umbraco.Core { @@ -28,7 +27,6 @@ namespace Umbraco.Core /// If any route has an extension in the path like .aspx = back office /// /// These are def back office: - /// /Umbraco/RestServices = back office /// /Umbraco/BackOffice = back office /// /Umbraco/Preview = back office /// If it's not any of the above, and there's no extension then we cannot determine if it's back office or front-end @@ -78,7 +76,6 @@ namespace Umbraco.Core //check for special back office paths if (urlPath.InvariantStartsWith("/" + globalSettings.GetUmbracoMvcArea() + "/BackOffice/") - || urlPath.InvariantStartsWith("/" + globalSettings.GetUmbracoMvcArea() + "/RestServices/") || urlPath.InvariantStartsWith("/" + globalSettings.GetUmbracoMvcArea() + "/Preview/")) { return true; diff --git a/src/Umbraco.Tests/Composing/TypeFinderTests.cs b/src/Umbraco.Tests/Composing/TypeFinderTests.cs index 49c807b19f..f615d6cebb 100644 --- a/src/Umbraco.Tests/Composing/TypeFinderTests.cs +++ b/src/Umbraco.Tests/Composing/TypeFinderTests.cs @@ -367,7 +367,6 @@ namespace Umbraco.Tests.Composing "umbraco.interfaces,", "umbraco.providers,", "Umbraco.Web.UI,", - "umbraco.webservices", "Lucene.", "Examine,", "Examine.", diff --git a/src/Umbraco.Tests/CoreThings/UriExtensionsTests.cs b/src/Umbraco.Tests/CoreThings/UriExtensionsTests.cs index f253d44973..be7aec631e 100644 --- a/src/Umbraco.Tests/CoreThings/UriExtensionsTests.cs +++ b/src/Umbraco.Tests/CoreThings/UriExtensionsTests.cs @@ -33,7 +33,6 @@ namespace Umbraco.Tests.CoreThings [TestCase("http://www.domain.com/umbrac", "", false)] [TestCase("http://www.domain.com/test", "", false)] [TestCase("http://www.domain.com/test/umbraco", "", false)] - [TestCase("http://www.domain.com/Umbraco/restServices/blah", "", true)] [TestCase("http://www.domain.com/Umbraco/Backoffice/blah", "", true)] [TestCase("http://www.domain.com/Umbraco/anything", "", true)] [TestCase("http://www.domain.com/Umbraco/anything/", "", true)] @@ -42,8 +41,6 @@ namespace Umbraco.Tests.CoreThings [TestCase("http://www.domain.com/myvdir/umbraco/api/blah", "myvdir", false)] [TestCase("http://www.domain.com/MyVdir/umbraco/api/blah", "/myvdir", false)] [TestCase("http://www.domain.com/MyVdir/Umbraco/", "myvdir", true)] - [TestCase("http://www.domain.com/MyVdir/Umbraco/restServices/blah", "/myvdir", true)] - [TestCase("http://www.domain.com/umbraco/webservices/legacyAjaxCalls.asmx/js", "", true)] [TestCase("http://www.domain.com/umbraco/test/legacyAjaxCalls.ashx?some=query&blah=js", "", true)] public void Is_Back_Office_Request(string input, string virtualPath, bool expected) { diff --git a/src/Umbraco.Tests/IO/IoHelperTests.cs b/src/Umbraco.Tests/IO/IoHelperTests.cs index b0e59cbb55..3f510dd57e 100644 --- a/src/Umbraco.Tests/IO/IoHelperTests.cs +++ b/src/Umbraco.Tests/IO/IoHelperTests.cs @@ -44,7 +44,6 @@ namespace Umbraco.Tests.IO Assert.AreEqual(IOHelper.MapPath(SystemDirectories.Scripts, true), IOHelper.MapPath(SystemDirectories.Scripts, false)); Assert.AreEqual(IOHelper.MapPath(SystemDirectories.Umbraco, true), IOHelper.MapPath(SystemDirectories.Umbraco, false)); Assert.AreEqual(IOHelper.MapPath(SystemDirectories.UserControls, true), IOHelper.MapPath(SystemDirectories.UserControls, false)); - Assert.AreEqual(IOHelper.MapPath(SystemDirectories.WebServices, true), IOHelper.MapPath(SystemDirectories.WebServices, false)); } [Test] diff --git a/src/Umbraco.Web/Mvc/BackOfficeArea.cs b/src/Umbraco.Web/Mvc/BackOfficeArea.cs index f501a70729..e72f2cc81a 100644 --- a/src/Umbraco.Web/Mvc/BackOfficeArea.cs +++ b/src/Umbraco.Web/Mvc/BackOfficeArea.cs @@ -44,14 +44,6 @@ namespace Umbraco.Web.Mvc id = @"[a-zA-Z]*" }, new[] {typeof (BackOfficeController).Namespace}); - - //Create the REST/web/script service routes - context.MapRoute( - "Umbraco_web_services", - _globalSettings.GetUmbracoMvcArea() + "/RestServices/{controller}/{action}/{id}", - new {controller = "SaveFileController", action = "Index", id = UrlParameter.Optional}, - //look in this namespace for controllers - new[] {"Umbraco.Web.WebServices"}); } public override string AreaName => _globalSettings.GetUmbracoMvcArea(); diff --git a/src/Umbraco.Web/Routing/WebServicesRouteConstraint.cs b/src/Umbraco.Web/Routing/WebServicesRouteConstraint.cs deleted file mode 100644 index 4b2ecc28fe..0000000000 --- a/src/Umbraco.Web/Routing/WebServicesRouteConstraint.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Web; -using System.Web.Routing; - -namespace Umbraco.Web.Routing -{ - //public class WebServicesRouteConstraint : IRouteConstraint - //{ - // public bool Match( - // HttpContextBase httpContext, - // Route route, - // string parameterName, - // RouteValueDictionary values, - // RouteDirection routeDirection) - // { - // if (routeDirection == RouteDirection.UrlGeneration) - // { - - // } - // return true; - // } - //} -} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index ccf8c49485..5c1fb9d91d 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -1137,7 +1137,6 @@ - From c778249fed1ae34d0dc824c00fee648ffcc671d5 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Tue, 29 Jan 2019 14:33:41 +0100 Subject: [PATCH 359/437] Fix the approved color styling --- .../src/less/components/umb-color-swatches.less | 4 ---- .../src/views/components/umb-color-swatches.html | 5 ++--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-color-swatches.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-color-swatches.less index 6dc2dd6ff3..8cf64e183c 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-color-swatches.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-color-swatches.less @@ -57,10 +57,6 @@ .umb-color-box__label { background: @white; font-size: 14px; - display: flex; - flex-flow: column wrap; - flex: 1 0 100%; - justify-content: flex-end; padding: 1px 5px; min-height: 45px; max-width: 100%; diff --git a/src/Umbraco.Web.UI.Client/src/views/components/umb-color-swatches.html b/src/Umbraco.Web.UI.Client/src/views/components/umb-color-swatches.html index a18319b4f2..24aa29125e 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/umb-color-swatches.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/umb-color-swatches.html @@ -2,8 +2,8 @@
    - \ No newline at end of file From 4915efbb8d0aced43a3bb5d634021aa510b4036a Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Tue, 29 Jan 2019 14:38:52 +0100 Subject: [PATCH 360/437] Re-select selected color on reload --- .../src/views/components/umb-color-swatches.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/components/umb-color-swatches.html b/src/Umbraco.Web.UI.Client/src/views/components/umb-color-swatches.html index 24aa29125e..74c010307a 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/umb-color-swatches.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/umb-color-swatches.html @@ -3,7 +3,7 @@
    -
    \ No newline at end of file +
    diff --git a/src/Umbraco.Web.UI.Client/src/views/stylesheets/create.html b/src/Umbraco.Web.UI.Client/src/views/stylesheets/create.html index 0554c430d1..630d23fe78 100644 --- a/src/Umbraco.Web.UI.Client/src/views/stylesheets/create.html +++ b/src/Umbraco.Web.UI.Client/src/views/stylesheets/create.html @@ -35,7 +35,6 @@
    -
    {{vm.createFolderError.errorMsg}}
    {{vm.createFolderError.data.message}}
    diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml index 9dceead927..3c57fa35d8 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml @@ -187,7 +187,8 @@ Oprettelse af mappen under parent med ID %0% fejlede Oprettelse af mappen under parent med navnet %0% fejlede - Sletning af filen/mappen fejlede: %0% + Mappens navn må ikke indeholde ugyldige tegn. + Sletning af filen/mappen fejlede: %0% Udgivet diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml index 3dcbfcded2..8135591c0c 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml @@ -195,6 +195,7 @@ Failed to create a folder under parent with ID %0% Failed to create a folder under parent with name %0% + The folder name cannot contain illegal characters. Failed to delete item: %0% 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 8c8a405e29..48ea15e3dc 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml @@ -199,6 +199,7 @@ Failed to create a folder under parent with ID %0% Failed to create a folder under parent with name %0% + The folder name cannot contain illegal characters. Failed to delete item: %0% diff --git a/src/Umbraco.Web/Editors/CodeFileController.cs b/src/Umbraco.Web/Editors/CodeFileController.cs index 1812ccd0ea..719f7521cb 100644 --- a/src/Umbraco.Web/Editors/CodeFileController.cs +++ b/src/Umbraco.Web/Editors/CodeFileController.cs @@ -81,7 +81,7 @@ namespace Umbraco.Web.Editors if (string.IsNullOrWhiteSpace(parentId)) throw new ArgumentException("Value cannot be null or whitespace.", "parentId"); if (string.IsNullOrWhiteSpace(name)) throw new ArgumentException("Value cannot be null or whitespace.", "name"); if (name.ContainsAny(Path.GetInvalidPathChars())) { - return Request.CreateNotificationValidationErrorResponse("The folder name cannot contain illegal characters."); + return Request.CreateNotificationValidationErrorResponse(Services.TextService.Localize("codefile/createFolderIllegalChars")); } // if the parentId is root (-1) then we just need an empty string as we are From 48069201798e95103cb0712beaadf19bc52d7fd5 Mon Sep 17 00:00:00 2001 From: Damiaan Peeters Date: Mon, 28 Jan 2019 15:01:09 +0100 Subject: [PATCH 366/437] Do not allow a empty name with for the MemberGroup --- src/Umbraco.Core/Services/MemberGroupService.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Services/MemberGroupService.cs b/src/Umbraco.Core/Services/MemberGroupService.cs index 78d8581577..e6b0c5e998 100644 --- a/src/Umbraco.Core/Services/MemberGroupService.cs +++ b/src/Umbraco.Core/Services/MemberGroupService.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using Umbraco.Core.Events; using Umbraco.Core.Logging; @@ -69,6 +70,11 @@ namespace Umbraco.Core.Services public void Save(IMemberGroup memberGroup, bool raiseEvents = true) { + if (string.IsNullOrWhiteSpace(memberGroup.Name)) + { + throw new InvalidOperationException("The name of a MemberGroup can not be empty"); + } + using (var uow = UowProvider.GetUnitOfWork()) { var saveEventArgs = new SaveEventArgs(memberGroup); @@ -133,4 +139,4 @@ namespace Umbraco.Core.Services /// public static event TypedEventHandler> Saved; } -} \ No newline at end of file +} From 7656de693cce4a801c103f845a1e1be56ce1202e Mon Sep 17 00:00:00 2001 From: Damiaan Peeters Date: Mon, 28 Jan 2019 16:14:55 +0100 Subject: [PATCH 367/437] Add unittest --- .../Services/MemberGroupServiceTests.cs | 39 +++++++++++++++++++ src/Umbraco.Tests/Umbraco.Tests.csproj | 1 + 2 files changed, 40 insertions(+) create mode 100644 src/Umbraco.Tests/Services/MemberGroupServiceTests.cs diff --git a/src/Umbraco.Tests/Services/MemberGroupServiceTests.cs b/src/Umbraco.Tests/Services/MemberGroupServiceTests.cs new file mode 100644 index 0000000000..20205d74bc --- /dev/null +++ b/src/Umbraco.Tests/Services/MemberGroupServiceTests.cs @@ -0,0 +1,39 @@ +using System; +using System.Linq; +using NUnit.Framework; +using Umbraco.Core; +using Umbraco.Core.Models; +using Umbraco.Core.Models.Rdbms; +using Umbraco.Tests.TestHelpers; +using Umbraco.Tests.TestHelpers.Entities; + +namespace Umbraco.Tests.Services +{ + [DatabaseTestBehavior(DatabaseBehavior.NewDbFileAndSchemaPerTest)] + [TestFixture, RequiresSTA] + public class MemberGroupServiceTests : BaseServiceTest + { + [SetUp] + public override void Initialize() + { + base.Initialize(); + } + + [TearDown] + public override void TearDown() + { + base.TearDown(); + } + + [Test] + [ExpectedException("System.InvalidOperationException")] + public void New_MemberGroup_Is_Not_Allowed_With_Empty_Name() + { + var service = ServiceContext.MemberGroupService; + + service.Save(new MemberGroup {Name = ""}); + + Assert.Fail("An exception should have been thrown"); + } + } +} diff --git a/src/Umbraco.Tests/Umbraco.Tests.csproj b/src/Umbraco.Tests/Umbraco.Tests.csproj index 86c36a8d76..08c44aafdc 100644 --- a/src/Umbraco.Tests/Umbraco.Tests.csproj +++ b/src/Umbraco.Tests/Umbraco.Tests.csproj @@ -193,6 +193,7 @@ + From 3f080ab2775ace29bd7612c8b1c31be26f7ed1db Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Sun, 27 Jan 2019 20:26:33 +0100 Subject: [PATCH 368/437] Remove the annoying menuDialogTitle tooltip --- .../tree/umbcontextdialog/umbcontextdialog.directive.js | 2 +- .../src/views/components/application/umb-navigation.html | 2 +- .../components/tree/umbcontextdialog/umb-context-dialog.html | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbcontextdialog/umbcontextdialog.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbcontextdialog/umbcontextdialog.directive.js index 28e3a9f53c..99a5dad58c 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbcontextdialog/umbcontextdialog.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbcontextdialog/umbcontextdialog.directive.js @@ -25,7 +25,7 @@ transclude: true, templateUrl: "views/components/tree/umbcontextdialog/umb-context-dialog.html", scope: { - title: "<", + dialogTitle: "<", currentNode: "<", view: "<" }, diff --git a/src/Umbraco.Web.UI.Client/src/views/components/application/umb-navigation.html b/src/Umbraco.Web.UI.Client/src/views/components/application/umb-navigation.html index c5b4f69cef..275c814761 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/application/umb-navigation.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/application/umb-navigation.html @@ -38,7 +38,7 @@ diff --git a/src/Umbraco.Web.UI.Client/src/views/components/tree/umbcontextdialog/umb-context-dialog.html b/src/Umbraco.Web.UI.Client/src/views/components/tree/umbcontextdialog/umb-context-dialog.html index 63385570d9..fa0ec487bc 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/tree/umbcontextdialog/umb-context-dialog.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/tree/umbcontextdialog/umb-context-dialog.html @@ -1,6 +1,6 @@
    -

    {{title}}

    +

    {{dialogTitle}}

    -
    \ No newline at end of file + From 27ce8c8ebc2cf42a33b25898f2e0250f2ba6af1a Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Sun, 27 Jan 2019 14:01:42 +0100 Subject: [PATCH 369/437] Add a few missing localizations for edit media --- src/Umbraco.Web.UI.Client/src/views/media/edit.html | 5 ++--- .../src/views/media/media.edit.controller.js | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) 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 be1219f052..3a72b0b40d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/media/edit.html +++ b/src/Umbraco.Web.UI.Client/src/views/media/edit.html @@ -42,7 +42,7 @@ @@ -50,14 +50,13 @@ ng-if="page.listViewPath" type="link" href="#{{page.listViewPath}}" - label="Return to list" label-key="buttons_returnToList">
    diff --git a/src/Umbraco.Web.UI.Client/src/views/media/media.edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/media/media.edit.controller.js index 19932887fd..4868bf0c6b 100644 --- a/src/Umbraco.Web.UI.Client/src/views/media/media.edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/media/media.edit.controller.js @@ -40,7 +40,7 @@ function mediaEditController($scope, $routeParams, $q, appState, mediaResource, $scope.page.menu.currentNode = null; //the editors affiliated node $scope.page.listViewPath = null; $scope.page.saveButtonState = "init"; - $scope.page.submitButtonLabel = "Save"; + $scope.page.submitButtonLabelKey = "buttons_save"; /** Syncs the content item to it's tree node - this occurs on first load and after saving */ function syncTreeNode(content, path, initialLoad) { @@ -103,7 +103,7 @@ function mediaEditController($scope, $routeParams, $q, appState, mediaResource, // setup infinite mode if(infiniteMode) { - $scope.page.submitButtonLabel = "Save and Close"; + $scope.page.submitButtonLabelKey = "buttons_saveAndClose"; } } From 69548aed20bb676a43cb87424942808d878aefe0 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Sun, 27 Jan 2019 12:33:32 +0100 Subject: [PATCH 370/437] Fix the offset in the crop editor --- .../imaging/umbimagecrop.directive.js | 47 +++++-------------- .../common/services/cropperhelper.service.js | 7 --- 2 files changed, 13 insertions(+), 41 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/imaging/umbimagecrop.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/imaging/umbimagecrop.directive.js index a287ec0476..62bf888852 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/imaging/umbimagecrop.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/imaging/umbimagecrop.directive.js @@ -103,34 +103,6 @@ angular.module("umbraco.directives") scope.dimensions.cropper.height = _viewPortH; // scope.dimensions.viewport.height - 2 * scope.dimensions.margin; }; - - //when loading an image without any crop info, we center and fit it - var resizeImageToEditor = function(){ - //returns size fitting the cropper - var size = cropperHelper.calculateAspectRatioFit( - scope.dimensions.image.width, - scope.dimensions.image.height, - scope.dimensions.cropper.width, - scope.dimensions.cropper.height, - true); - - //sets the image size and updates the scope - scope.dimensions.image.width = size.width; - scope.dimensions.image.height = size.height; - - //calculate the best suited ratios - scope.dimensions.scale.min = size.ratio; - scope.dimensions.scale.max = 2; - scope.dimensions.scale.current = size.ratio; - - //center the image - var position = cropperHelper.centerInsideViewPort(scope.dimensions.image, scope.dimensions.cropper); - scope.dimensions.top = position.top; - scope.dimensions.left = position.left; - - setConstraints(); - }; - //resize to a given ratio var resizeImageToScale = function(ratio){ //do stuff @@ -227,12 +199,19 @@ angular.module("umbraco.directives") //set dimensions on image, viewport, cropper etc setDimensions(image); - //if we have a crop already position the image - if(scope.crop){ - resizeImageToCrop(); - }else{ - resizeImageToEditor(); - } + //create a default crop if we haven't got one already + var createDefaultCrop = !scope.crop; + if (createDefaultCrop) { + calculateCropBox(); + } + + resizeImageToCrop(); + + //if we're creating a new crop, make sure to zoom out fully + if (createDefaultCrop) { + scope.dimensions.scale.current = scope.dimensions.scale.min; + resizeImageToScale(scope.dimensions.scale.min); + } //sets constaints for the cropper setConstraints(); diff --git a/src/Umbraco.Web.UI.Client/src/common/services/cropperhelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/cropperhelper.service.js index e613ccad0d..256a1461db 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/cropperhelper.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/cropperhelper.service.js @@ -123,13 +123,6 @@ function cropperHelper(umbRequestHelper, $http) { return crop; }, - centerInsideViewPort : function(img, viewport){ - var left = viewport.width/ 2 - img.width / 2, - top = viewport.height / 2 - img.height / 2; - - return {left: left, top: top}; - }, - alignToCoordinates : function(image, center, viewport){ var min_left = (image.width) - (viewport.width); From cca1393f2b7fe48499337281d974b9ce171fb08e Mon Sep 17 00:00:00 2001 From: Vigan Shemsiu Date: Tue, 29 Jan 2019 12:08:49 +0100 Subject: [PATCH 371/437] Validate both width and height Make sure to validate both width and height before running "setDimensions();". The focus point will not work if we have "img { width: 100%; }" in the stylesheet. This pull request will fix the bug. --- .../directives/components/imaging/umbimagegravity.directive.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/imaging/umbimagegravity.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/imaging/umbimagegravity.directive.js index 7d1b1c5a18..28b9ebdb78 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/imaging/umbimagegravity.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/imaging/umbimagegravity.directive.js @@ -35,7 +35,7 @@ angular.module("umbraco.directives") var $overlay = element.find(".overlay"); scope.style = function () { - if (scope.dimensions.width <= 0) { + if (scope.dimensions.width <= 0 || scope.dimensions.height <= 0) { setDimensions(); } From 10fbffcfcc82907b28b54bc027e1a35990e94179 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Wed, 23 Jan 2019 14:40:11 +0100 Subject: [PATCH 372/437] Handle element types in the conten picker --- .../ValueConverters/ContentPickerValueConverter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/ContentPickerValueConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/ContentPickerValueConverter.cs index b9cac88ecf..d30762f13f 100644 --- a/src/Umbraco.Web/PropertyEditors/ValueConverters/ContentPickerValueConverter.cs +++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/ContentPickerValueConverter.cs @@ -65,7 +65,7 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters if (udi == null) return null; content = _publishedSnapshotAccessor.PublishedSnapshot.Content.GetById(udi.Guid); - if (content != null) + if (content != null && content.ItemType == PublishedItemType.Content) return content; } } From 9d3d4b77a0bed59856a3cd84a6a6e6623dae2db1 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Wed, 23 Jan 2019 14:40:25 +0100 Subject: [PATCH 373/437] Handle element types in the MNTP --- .../ValueConverters/MultiNodeTreePickerValueConverter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/MultiNodeTreePickerValueConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/MultiNodeTreePickerValueConverter.cs index 0f8b75f6b1..beb22bb57e 100644 --- a/src/Umbraco.Web/PropertyEditors/ValueConverters/MultiNodeTreePickerValueConverter.cs +++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/MultiNodeTreePickerValueConverter.cs @@ -98,7 +98,7 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters break; } - if (multiNodeTreePickerItem != null) + if (multiNodeTreePickerItem != null && multiNodeTreePickerItem.ItemType != PublishedItemType.Element) { multiNodeTreePicker.Add(multiNodeTreePickerItem); } From a025568196045a6347fee5ba236a1c599ea9da64 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Wed, 23 Jan 2019 14:40:42 +0100 Subject: [PATCH 374/437] Handle element types in the multi URL picker --- .../ValueConverters/MultiUrlPickerValueConverter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/MultiUrlPickerValueConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/MultiUrlPickerValueConverter.cs index c2c604cb7f..814d499252 100644 --- a/src/Umbraco.Web/PropertyEditors/ValueConverters/MultiUrlPickerValueConverter.cs +++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/MultiUrlPickerValueConverter.cs @@ -65,7 +65,7 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters _publishedSnapshotAccessor.PublishedSnapshot.Media.GetById(preview, dto.Udi.Guid) : _publishedSnapshotAccessor.PublishedSnapshot.Content.GetById(preview, dto.Udi.Guid); - if (content == null) + if (content == null || content.ItemType == PublishedItemType.Element) { continue; } From 45bfaee5904e78ab8456f15ba12b39d60533c3c8 Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 30 Jan 2019 14:26:41 +1100 Subject: [PATCH 375/437] fixing tests --- src/Umbraco.Core/Configuration/GlobalSettings.cs | 4 ++-- src/Umbraco.Tests/Configurations/GlobalSettingsTests.cs | 1 - .../Configurations/UmbracoSettings/umbracoSettings.config | 3 --- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Core/Configuration/GlobalSettings.cs b/src/Umbraco.Core/Configuration/GlobalSettings.cs index 49cb9c3fbf..b89a4d1daf 100644 --- a/src/Umbraco.Core/Configuration/GlobalSettings.cs +++ b/src/Umbraco.Core/Configuration/GlobalSettings.cs @@ -31,8 +31,8 @@ namespace Umbraco.Core.Configuration private static string _reservedPaths; private static string _reservedUrls; //ensure the built on (non-changeable) reserved paths are there at all times - internal const string StaticReservedPaths = "~/app_plugins/,~/install/"; - internal const string StaticReservedUrls = "~/config/splashes/noNodes.aspx,~/.well-known"; + internal const string StaticReservedPaths = "~/app_plugins/,~/install/,"; //must end with a comma! + internal const string StaticReservedUrls = "~/config/splashes/noNodes.aspx,~/.well-known,"; //must end with a comma! #endregion /// diff --git a/src/Umbraco.Tests/Configurations/GlobalSettingsTests.cs b/src/Umbraco.Tests/Configurations/GlobalSettingsTests.cs index 8587a7b194..54080f05de 100644 --- a/src/Umbraco.Tests/Configurations/GlobalSettingsTests.cs +++ b/src/Umbraco.Tests/Configurations/GlobalSettingsTests.cs @@ -60,7 +60,6 @@ namespace Umbraco.Tests.Configurations [TestCase("/install")] [TestCase("/install/?installStep=asdf")] [TestCase("/install/test.aspx")] - [TestCase("/config/splashes/booting.aspx")] public void Is_Reserved_Path_Or_Url(string url) { var globalSettings = TestObjects.GetGlobalSettings(); diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config index dd44e23328..b3ca1524c9 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config @@ -65,9 +65,6 @@ True - - False - text From 16b655fd6277572627861cd73d12514ea3563895 Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 30 Jan 2019 16:47:48 +1100 Subject: [PATCH 376/437] Adds null check to SingleServerRegistrar --- src/Umbraco.Core/Sync/SingleServerRegistrar.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Sync/SingleServerRegistrar.cs b/src/Umbraco.Core/Sync/SingleServerRegistrar.cs index dec0342fc0..edd14e9f5c 100644 --- a/src/Umbraco.Core/Sync/SingleServerRegistrar.cs +++ b/src/Umbraco.Core/Sync/SingleServerRegistrar.cs @@ -23,7 +23,7 @@ namespace Umbraco.Core.Sync public string GetCurrentServerUmbracoApplicationUrl() { - return _runtime.ApplicationUrl.ToString(); + return _runtime.ApplicationUrl?.ToString(); } private class ServerAddressImpl : IServerAddress From 35b78cc2246ee6e55efb0277dce8555dbb853bce Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 30 Jan 2019 16:56:14 +1100 Subject: [PATCH 377/437] Adds notes --- src/Umbraco.Core/Sync/DatabaseServerRegistrar.cs | 4 ++++ src/Umbraco.Core/Sync/SingleServerRegistrar.cs | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Sync/DatabaseServerRegistrar.cs b/src/Umbraco.Core/Sync/DatabaseServerRegistrar.cs index 9ad5875edf..276ce6097c 100644 --- a/src/Umbraco.Core/Sync/DatabaseServerRegistrar.cs +++ b/src/Umbraco.Core/Sync/DatabaseServerRegistrar.cs @@ -7,6 +7,10 @@ namespace Umbraco.Core.Sync /// /// A registrar that stores registered server nodes in the database. /// + /// + /// This is the default registrar which determines a server's role by using a master election process. + /// The master election process doesn't occur until just after startup so this election process doesn't really affect the primary startup phase. + /// public sealed class DatabaseServerRegistrar : IServerRegistrar { private readonly Lazy _registrationService; diff --git a/src/Umbraco.Core/Sync/SingleServerRegistrar.cs b/src/Umbraco.Core/Sync/SingleServerRegistrar.cs index edd14e9f5c..b29533dd51 100644 --- a/src/Umbraco.Core/Sync/SingleServerRegistrar.cs +++ b/src/Umbraco.Core/Sync/SingleServerRegistrar.cs @@ -3,6 +3,14 @@ using System.Collections.Generic; namespace Umbraco.Core.Sync { + /// + /// Can be used when Umbraco is definitely not operating in a Load Balanced scenario to micro-optimize some startup performance + /// + /// + /// The micro optimization is specifically to avoid a DB query just after the app starts up to determine the + /// which by default is done with master election by a database query. The master election process doesn't occur until just after startup + /// so this micro optimization doesn't really affect the primary startup phase. + /// public class SingleServerRegistrar : IServerRegistrar { private readonly IRuntimeState _runtime; @@ -13,7 +21,7 @@ namespace Umbraco.Core.Sync public SingleServerRegistrar(IRuntimeState runtime) { _runtime = runtime; - _registrations = new Lazy(() => new[] { new ServerAddressImpl(_runtime.ApplicationUrl.ToString()) }); + _registrations = new Lazy(() => new IServerAddress[] { new ServerAddressImpl(_runtime.ApplicationUrl.ToString()) }); } public ServerRole GetCurrentServerRole() From f49516ff13cfe3dda77c089de36c184c4075fdd4 Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 30 Jan 2019 17:14:04 +1100 Subject: [PATCH 378/437] fix csproj building --- src/Umbraco.Core/Umbraco.Core.csproj | 23 ----------------------- src/Umbraco.Tests/Umbraco.Tests.csproj | 2 -- 2 files changed, 25 deletions(-) diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index ca4bd40551..366326cd8b 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -211,29 +211,6 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Umbraco.Tests/Umbraco.Tests.csproj b/src/Umbraco.Tests/Umbraco.Tests.csproj index 4fa3961bf1..03d0d4f8cb 100644 --- a/src/Umbraco.Tests/Umbraco.Tests.csproj +++ b/src/Umbraco.Tests/Umbraco.Tests.csproj @@ -294,8 +294,6 @@ - - From 08a886b724862c5f5b5776d896658ef9a3c8ae9a Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 30 Jan 2019 17:35:57 +1100 Subject: [PATCH 379/437] nucache bug fix --- src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs b/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs index 5bab8aa265..db7aa0d5d1 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs @@ -100,8 +100,8 @@ namespace Umbraco.Web.PublishedCache.NuCache var originPublished = origin.PublishedContent; - DraftContent = new PublishedContent(this, originDraft, umbracoContextAccessor); - PublishedContent = new PublishedContent(this, originPublished, umbracoContextAccessor); + DraftContent = originDraft == null ? null : new PublishedContent(this, originDraft, umbracoContextAccessor); + PublishedContent = originPublished == null ? null : new PublishedContent(this, originPublished, umbracoContextAccessor); DraftModel = DraftContent?.CreateModel(); PublishedModel = PublishedContent?.CreateModel(); From f02da1fdd2a0111dc8fa51a3a53e262b2a98fbe0 Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 30 Jan 2019 17:36:33 +1100 Subject: [PATCH 380/437] nucache bug fix --- src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs b/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs index 5bab8aa265..db7aa0d5d1 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs @@ -100,8 +100,8 @@ namespace Umbraco.Web.PublishedCache.NuCache var originPublished = origin.PublishedContent; - DraftContent = new PublishedContent(this, originDraft, umbracoContextAccessor); - PublishedContent = new PublishedContent(this, originPublished, umbracoContextAccessor); + DraftContent = originDraft == null ? null : new PublishedContent(this, originDraft, umbracoContextAccessor); + PublishedContent = originPublished == null ? null : new PublishedContent(this, originPublished, umbracoContextAccessor); DraftModel = DraftContent?.CreateModel(); PublishedModel = PublishedContent?.CreateModel(); From cf0095dc1c88b452e648c820be9fbda67f4871fd Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 30 Jan 2019 07:49:45 +0100 Subject: [PATCH 381/437] #3645 - removed viewmodel and uses ILanguage directly in the view --- src/Umbraco.Web.UI/Umbraco/Views/Preview/Index.cshtml | 6 +++--- src/Umbraco.Web/Editors/BackOfficePreviewLinkModel.cs | 8 -------- src/Umbraco.Web/Editors/BackOfficePreviewModel.cs | 7 ++++--- src/Umbraco.Web/Editors/PreviewController.cs | 6 +----- src/Umbraco.Web/Umbraco.Web.csproj | 1 - 5 files changed, 8 insertions(+), 20 deletions(-) delete mode 100644 src/Umbraco.Web/Editors/BackOfficePreviewLinkModel.cs diff --git a/src/Umbraco.Web.UI/Umbraco/Views/Preview/Index.cshtml b/src/Umbraco.Web.UI/Umbraco/Views/Preview/Index.cshtml index db9fc2d3bf..b656942020 100644 --- a/src/Umbraco.Web.UI/Umbraco/Views/Preview/Index.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/Views/Preview/Index.cshtml @@ -47,12 +47,12 @@ - @if (Model.PreviewLinks != null && Model.PreviewLinks.Count() > 2) + @if (Model.Languages != null && Model.Languages.Count() > 2) { - foreach (var previewLink in Model.PreviewLinks) + foreach (var previewLink in Model.Languages) {
  • - @previewLink.CultureName + @previewLink.CultureName
  • } } diff --git a/src/Umbraco.Web/Editors/BackOfficePreviewLinkModel.cs b/src/Umbraco.Web/Editors/BackOfficePreviewLinkModel.cs deleted file mode 100644 index c47db0811a..0000000000 --- a/src/Umbraco.Web/Editors/BackOfficePreviewLinkModel.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Umbraco.Web.Editors -{ - public class BackOfficePreviewLinkModel - { - public string CultureName { get; set; } - public string CultureId { get; set; } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/Editors/BackOfficePreviewModel.cs b/src/Umbraco.Web/Editors/BackOfficePreviewModel.cs index 89b055d9d7..b66e432699 100644 --- a/src/Umbraco.Web/Editors/BackOfficePreviewModel.cs +++ b/src/Umbraco.Web/Editors/BackOfficePreviewModel.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using Umbraco.Core.Configuration; +using Umbraco.Core.Models; using Umbraco.Web.Features; namespace Umbraco.Web.Editors @@ -7,12 +8,12 @@ namespace Umbraco.Web.Editors public class BackOfficePreviewModel : BackOfficeModel { private readonly UmbracoFeatures _features; - public IEnumerable PreviewLinks { get; } + public IEnumerable Languages { get; } - public BackOfficePreviewModel(UmbracoFeatures features, IGlobalSettings globalSettings, IEnumerable previewLinks) : base(features, globalSettings) + public BackOfficePreviewModel(UmbracoFeatures features, IGlobalSettings globalSettings, IEnumerable languages) : base(features, globalSettings) { _features = features; - PreviewLinks = previewLinks; + Languages = languages; } public bool DisableDevicePreview => _features.Disabled.DisableDevicePreview; diff --git a/src/Umbraco.Web/Editors/PreviewController.cs b/src/Umbraco.Web/Editors/PreviewController.cs index 2b0bee052f..5507104860 100644 --- a/src/Umbraco.Web/Editors/PreviewController.cs +++ b/src/Umbraco.Web/Editors/PreviewController.cs @@ -44,12 +44,8 @@ namespace Umbraco.Web.Editors public ActionResult Index() { var availableLanguages = _localizationService.GetAllLanguages(); - var previewLinks = availableLanguages.Select(x => new BackOfficePreviewLinkModel() { - CultureName = x.CultureName, - CultureId = x.IsoCode} - ); - var model = new BackOfficePreviewModel(_features, _globalSettings, previewLinks); + var model = new BackOfficePreviewModel(_features, _globalSettings, availableLanguages); if (model.PreviewExtendedHeaderView.IsNullOrWhiteSpace() == false) { diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 376f1fe313..91ffbe68b5 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -138,7 +138,6 @@ - From 134cc176fffbe0007a0200992da3112111e1b5df Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 30 Jan 2019 17:50:13 +1100 Subject: [PATCH 382/437] Moves the Xml published cache to the tests project since that is the only place it is used, removes the xml data integrity check since it's not needed, removes the xml published cache benchmark since it's not needed. Now we don't include the old xml published cache at all in the shipped product. --- .../Umbraco.Tests.Benchmarks.csproj | 1 - .../XmlPublishedContentInitBenchmarks.cs | 311 ------------------ .../PublishedContentCacheTests.cs | 4 +- .../PublishedMediaCacheTests.cs | 2 +- .../DictionaryPublishedContent.cs | 4 +- .../LegacyXmlPublishedCache}/DomainCache.cs | 5 +- .../PreviewContent.cs | 2 +- .../PublishedContentCache.cs | 10 +- .../PublishedMediaCache.cs | 10 +- .../PublishedMemberCache.cs | 4 +- .../PublishedSnapshot.cs | 3 +- .../PublishedSnapshotService.cs | 5 +- .../LegacyXmlPublishedCache}/RoutesCache.cs | 7 +- .../SafeXmlReaderWriter.cs | 2 +- .../UmbracoContextCache.cs | 9 +- .../XmlPublishedContent.cs | 4 +- .../XmlPublishedProperty.cs | 2 +- .../LegacyXmlPublishedCache}/XmlStore.cs | 5 +- .../XmlStoreFilePersister.cs | 3 +- .../PublishedContent/PublishedMediaTests.cs | 2 +- src/Umbraco.Tests/Routing/RoutesCacheTests.cs | 2 +- src/Umbraco.Tests/Routing/UrlProviderTests.cs | 2 +- src/Umbraco.Tests/Routing/UrlRoutesTests.cs | 2 +- .../Routing/UrlsProviderWithDomainsTests.cs | 2 +- .../Routing/UrlsWithNestedDomains.cs | 2 +- src/Umbraco.Tests/Scoping/ScopedXmlTests.cs | 2 +- .../TestHelpers/TestWithDatabaseBase.cs | 2 +- src/Umbraco.Tests/Umbraco.Tests.csproj | 15 + .../Web/Mvc/UmbracoViewPageTests.cs | 2 +- .../xmldataintegrityreport.controller.js | 62 ---- .../settings/xmldataintegrityreport.html | 29 -- .../Editors/BackOfficeServerVariables.cs | 4 - .../Editors/PublishedStatusController.cs | 3 - .../Editors/XmlDataIntegrityController.cs | 61 ---- src/Umbraco.Web/Umbraco.Web.csproj | 16 - 35 files changed, 66 insertions(+), 535 deletions(-) delete mode 100644 src/Umbraco.Tests.Benchmarks/XmlPublishedContentInitBenchmarks.cs rename src/{Umbraco.Web/PublishedCache/XmlPublishedCache => Umbraco.Tests/LegacyXmlPublishedCache}/DictionaryPublishedContent.cs (99%) rename src/{Umbraco.Web/PublishedCache/XmlPublishedCache => Umbraco.Tests/LegacyXmlPublishedCache}/DomainCache.cs (94%) rename src/{Umbraco.Web/PublishedCache/XmlPublishedCache => Umbraco.Tests/LegacyXmlPublishedCache}/PreviewContent.cs (99%) rename src/{Umbraco.Web/PublishedCache/XmlPublishedCache => Umbraco.Tests/LegacyXmlPublishedCache}/PublishedContentCache.cs (99%) rename src/{Umbraco.Web/PublishedCache/XmlPublishedCache => Umbraco.Tests/LegacyXmlPublishedCache}/PublishedMediaCache.cs (99%) rename src/{Umbraco.Web/PublishedCache/XmlPublishedCache => Umbraco.Tests/LegacyXmlPublishedCache}/PublishedMemberCache.cs (98%) rename src/{Umbraco.Web/PublishedCache/XmlPublishedCache => Umbraco.Tests/LegacyXmlPublishedCache}/PublishedSnapshot.cs (95%) rename src/{Umbraco.Web/PublishedCache/XmlPublishedCache => Umbraco.Tests/LegacyXmlPublishedCache}/PublishedSnapshotService.cs (99%) rename src/{Umbraco.Web/PublishedCache/XmlPublishedCache => Umbraco.Tests/LegacyXmlPublishedCache}/RoutesCache.cs (95%) rename src/{Umbraco.Web/PublishedCache/XmlPublishedCache => Umbraco.Tests/LegacyXmlPublishedCache}/SafeXmlReaderWriter.cs (98%) rename src/{Umbraco.Web/PublishedCache/XmlPublishedCache => Umbraco.Tests/LegacyXmlPublishedCache}/UmbracoContextCache.cs (81%) rename src/{Umbraco.Web/PublishedCache/XmlPublishedCache => Umbraco.Tests/LegacyXmlPublishedCache}/XmlPublishedContent.cs (99%) rename src/{Umbraco.Web/PublishedCache/XmlPublishedCache => Umbraco.Tests/LegacyXmlPublishedCache}/XmlPublishedProperty.cs (98%) rename src/{Umbraco.Web/PublishedCache/XmlPublishedCache => Umbraco.Tests/LegacyXmlPublishedCache}/XmlStore.cs (99%) rename src/{Umbraco.Web/PublishedCache/XmlPublishedCache => Umbraco.Tests/LegacyXmlPublishedCache}/XmlStoreFilePersister.cs (98%) delete mode 100644 src/Umbraco.Web.UI.Client/src/views/dashboard/settings/xmldataintegrityreport.controller.js delete mode 100644 src/Umbraco.Web.UI.Client/src/views/dashboard/settings/xmldataintegrityreport.html delete mode 100644 src/Umbraco.Web/Editors/XmlDataIntegrityController.cs diff --git a/src/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj b/src/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj index 233da0d14b..48d69cf757 100644 --- a/src/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj +++ b/src/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj @@ -61,7 +61,6 @@ - diff --git a/src/Umbraco.Tests.Benchmarks/XmlPublishedContentInitBenchmarks.cs b/src/Umbraco.Tests.Benchmarks/XmlPublishedContentInitBenchmarks.cs deleted file mode 100644 index bc18b97d47..0000000000 --- a/src/Umbraco.Tests.Benchmarks/XmlPublishedContentInitBenchmarks.cs +++ /dev/null @@ -1,311 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Xml; -using BenchmarkDotNet.Attributes; -using Moq; -using Umbraco.Core; -using Umbraco.Core.Logging; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Services; -using Umbraco.Tests.Benchmarks.Config; -using Umbraco.Web.PublishedCache.XmlPublishedCache; - -namespace Umbraco.Tests.Benchmarks -{ - [QuickRunWithMemoryDiagnoserConfig] - public class XmlPublishedContentInitBenchmarks - { - public XmlPublishedContentInitBenchmarks() - { - _xml10 = Build(10); - _xml100 = Build(100); - _xml1000 = Build(1000); - _xml10000 = Build(10000); - } - - private readonly string[] _intAttributes = { "id", "parentID", "nodeType", "level", "writerID", "creatorID", "template", "sortOrder", "isDoc", "isDraft" }; - private readonly string[] _strAttributes = { "nodeName", "urlName", "writerName", "creatorName", "path" }; - private readonly string[] _dateAttributes = { "createDate", "updateDate" }; - private readonly string[] _guidAttributes = { "key", "version" }; - - private XmlDocument Build(int children) - { - var xml = new XmlDocument(); - var root = Build(xml, "Home", 10); - for (int i = 0; i < children; i++) - { - var child = Build(xml, "child" + i, 10); - root.AppendChild(child); - } - xml.AppendChild(root); - return xml; - } - - private XmlElement Build(XmlDocument xml, string name, int propertyCount) - { - var random = new Random(); - var content = xml.CreateElement(name); - foreach (var p in _intAttributes) - { - var a = xml.CreateAttribute(p); - a.Value = random.Next(1, 9).ToInvariantString(); - content.Attributes.Append(a); - } - foreach (var p in _strAttributes) - { - var a = xml.CreateAttribute(p); - a.Value = Guid.NewGuid().ToString(); - content.Attributes.Append(a); - } - foreach (var p in _guidAttributes) - { - var a = xml.CreateAttribute(p); - a.Value = Guid.NewGuid().ToString(); - content.Attributes.Append(a); - } - foreach (var p in _dateAttributes) - { - var a = xml.CreateAttribute(p); - a.Value = DateTime.Now.ToString("o"); - content.Attributes.Append(a); - } - - for (int i = 0; i < propertyCount; i++) - { - var prop = xml.CreateElement("prop" + i); - var cdata = xml.CreateCDataSection(string.Join("", Enumerable.Range(0, 10).Select(x => Guid.NewGuid().ToString()))); - prop.AppendChild(cdata); - content.AppendChild(prop); - } - - return content; - } - - private readonly XmlDocument _xml10; - private readonly XmlDocument _xml100; - private readonly XmlDocument _xml1000; - private readonly XmlDocument _xml10000; - - //out props - int id, nodeType, level, writerId, creatorId, template, sortOrder; - Guid key, version; - string name, urlName, writerName, creatorName, docTypeAlias, path; - bool isDraft; - bool isPublished; - DateTime createDate, updateDate; - PublishedContentType publishedContentType; - Dictionary properties; - - [Benchmark(Baseline = true, OperationsPerInvoke = 10)] - public void Original_10_Children() - { - OriginalInitializeNode(_xml10.DocumentElement, false, false, - out id, out key, out template, out sortOrder, out name, out writerName, out urlName, - out creatorName, out creatorId, out writerId, out docTypeAlias, out nodeType, out path, - out version, out createDate, out updateDate, out level, out isDraft, out isPublished, out publishedContentType, - out properties); - } - - [Benchmark(OperationsPerInvoke = 10)] - public void Original_100_Children() - { - OriginalInitializeNode(_xml100.DocumentElement, false, false, - out id, out key, out template, out sortOrder, out name, out writerName, out urlName, - out creatorName, out creatorId, out writerId, out docTypeAlias, out nodeType, out path, - out version, out createDate, out updateDate, out level, out isDraft, out isPublished, out publishedContentType, - out properties); - } - - [Benchmark(OperationsPerInvoke = 10)] - public void Original_1000_Children() - { - OriginalInitializeNode(_xml1000.DocumentElement, false, false, - out id, out key, out template, out sortOrder, out name, out writerName, out urlName, - out creatorName, out creatorId, out writerId, out docTypeAlias, out nodeType, out path, - out version, out createDate, out updateDate, out level, out isDraft, out isPublished, out publishedContentType, - out properties); - } - - [Benchmark(OperationsPerInvoke = 10)] - public void Original_10000_Children() - { - OriginalInitializeNode(_xml10000.DocumentElement, false, false, - out id, out key, out template, out sortOrder, out name, out writerName, out urlName, - out creatorName, out creatorId, out writerId, out docTypeAlias, out nodeType, out path, - out version, out createDate, out updateDate, out level, out isDraft, out isPublished, out publishedContentType, - out properties); - } - - [Benchmark(OperationsPerInvoke = 10)] - public void Enhanced_10_Children() - { - XmlPublishedContent.InitializeNode(null, _xml10.DocumentElement, false, - out id, out key, out template, out sortOrder, out name, out writerName, out urlName, - out creatorName, out creatorId, out writerId, out docTypeAlias, out nodeType, out path, - out createDate, out updateDate, out level, out isDraft, out publishedContentType, - out properties, GetPublishedContentType); - } - - [Benchmark(OperationsPerInvoke = 10)] - public void Enhanced_100_Children() - { - XmlPublishedContent.InitializeNode(null, _xml100.DocumentElement, false, - out id, out key, out template, out sortOrder, out name, out writerName, out urlName, - out creatorName, out creatorId, out writerId, out docTypeAlias, out nodeType, out path, - out createDate, out updateDate, out level, out isDraft, out publishedContentType, - out properties, GetPublishedContentType); - } - - [Benchmark(OperationsPerInvoke = 10)] - public void Enhanced_1000_Children() - { - XmlPublishedContent.InitializeNode(null, _xml1000.DocumentElement, false, - out id, out key, out template, out sortOrder, out name, out writerName, out urlName, - out creatorName, out creatorId, out writerId, out docTypeAlias, out nodeType, out path, - out createDate, out updateDate, out level, out isDraft,out publishedContentType, - out properties, GetPublishedContentType); - } - - [Benchmark(OperationsPerInvoke = 10)] - public void Enhanced_10000_Children() - { - XmlPublishedContent.InitializeNode(null, _xml10000.DocumentElement, false, - out id, out key, out template, out sortOrder, out name, out writerName, out urlName, - out creatorName, out creatorId, out writerId, out docTypeAlias, out nodeType, out path, - out createDate, out updateDate, out level, out isDraft,out publishedContentType, - out properties, GetPublishedContentType); - } - - - internal static void OriginalInitializeNode(XmlNode xmlNode, bool legacy, bool isPreviewing, - out int id, out Guid key, out int template, out int sortOrder, out string name, out string writerName, out string urlName, - out string creatorName, out int creatorId, out int writerId, out string docTypeAlias, out int docTypeId, out string path, - out Guid version, out DateTime createDate, out DateTime updateDate, out int level, out bool isDraft, out bool isPublished, - out PublishedContentType contentType, out Dictionary properties) - { - //initialize the out params with defaults: - writerName = null; - docTypeAlias = null; - id = template = sortOrder = template = creatorId = writerId = docTypeId = level = default(int); - key = version = default(Guid); - name = writerName = urlName = creatorName = docTypeAlias = path = null; - createDate = updateDate = default(DateTime); - isDraft = false; - isPublished = true; - contentType = null; - properties = null; - - //return if this is null - if (xmlNode == null) - { - return; - } - - if (xmlNode.Attributes != null) - { - id = int.Parse(xmlNode.Attributes.GetNamedItem("id").Value); - if (xmlNode.Attributes.GetNamedItem("key") != null) // because, migration - key = Guid.Parse(xmlNode.Attributes.GetNamedItem("key").Value); - if (xmlNode.Attributes.GetNamedItem("template") != null) - template = int.Parse(xmlNode.Attributes.GetNamedItem("template").Value); - if (xmlNode.Attributes.GetNamedItem("sortOrder") != null) - sortOrder = int.Parse(xmlNode.Attributes.GetNamedItem("sortOrder").Value); - if (xmlNode.Attributes.GetNamedItem("nodeName") != null) - name = xmlNode.Attributes.GetNamedItem("nodeName").Value; - if (xmlNode.Attributes.GetNamedItem("writerName") != null) - writerName = xmlNode.Attributes.GetNamedItem("writerName").Value; - if (xmlNode.Attributes.GetNamedItem("urlName") != null) - urlName = xmlNode.Attributes.GetNamedItem("urlName").Value; - // Creatorname is new in 2.1, so published xml might not have it! - try - { - creatorName = xmlNode.Attributes.GetNamedItem("creatorName").Value; - } - catch - { - creatorName = writerName; - } - - //Added the actual userID, as a user cannot be looked up via full name only... - if (xmlNode.Attributes.GetNamedItem("creatorID") != null) - creatorId = int.Parse(xmlNode.Attributes.GetNamedItem("creatorID").Value); - if (xmlNode.Attributes.GetNamedItem("writerID") != null) - writerId = int.Parse(xmlNode.Attributes.GetNamedItem("writerID").Value); - - if (legacy) - { - if (xmlNode.Attributes.GetNamedItem("nodeTypeAlias") != null) - docTypeAlias = xmlNode.Attributes.GetNamedItem("nodeTypeAlias").Value; - } - else - { - docTypeAlias = xmlNode.Name; - } - - if (xmlNode.Attributes.GetNamedItem("nodeType") != null) - docTypeId = int.Parse(xmlNode.Attributes.GetNamedItem("nodeType").Value); - if (xmlNode.Attributes.GetNamedItem("path") != null) - path = xmlNode.Attributes.GetNamedItem("path").Value; - if (xmlNode.Attributes.GetNamedItem("version") != null) - version = new Guid(xmlNode.Attributes.GetNamedItem("version").Value); - if (xmlNode.Attributes.GetNamedItem("createDate") != null) - createDate = DateTime.Parse(xmlNode.Attributes.GetNamedItem("createDate").Value); - if (xmlNode.Attributes.GetNamedItem("updateDate") != null) - updateDate = DateTime.Parse(xmlNode.Attributes.GetNamedItem("updateDate").Value); - if (xmlNode.Attributes.GetNamedItem("level") != null) - level = int.Parse(xmlNode.Attributes.GetNamedItem("level").Value); - - isDraft = (xmlNode.Attributes.GetNamedItem("isDraft") != null); - } - - // load data - - var dataXPath = legacy ? "data" : "* [not(@isDoc)]"; - var nodes = xmlNode.SelectNodes(dataXPath); - - contentType = GetPublishedContentType(PublishedItemType.Content, docTypeAlias); - - var propertyNodes = new Dictionary(); - if (nodes != null) - foreach (XmlNode n in nodes) - { - var attrs = n.Attributes; - if (attrs == null) continue; - var alias = legacy - ? attrs.GetNamedItem("alias").Value - : n.Name; - propertyNodes[alias.ToLowerInvariant()] = n; - } - properties = contentType.PropertyTypes.Select(p => - { - XmlNode n; - return propertyNodes.TryGetValue(p.Alias.ToLowerInvariant(), out n) - ? new XmlPublishedProperty(p, null, isPreviewing, n) - : new XmlPublishedProperty(p, null, isPreviewing); - }).Cast().ToDictionary( - x => x.Alias, - x => x, - StringComparer.OrdinalIgnoreCase); - } - - private static PublishedContentType GetPublishedContentType(PublishedItemType type, string alias) - { - var dataType = new DataType(new VoidEditor(Mock.Of())) { Id = 1 }; - - var dataTypeService = Mock.Of(); - Mock.Get(dataTypeService) - .Setup(x => x.GetDataType(It.IsAny())) - .Returns(id => id == 1 ? dataType : null); - Mock.Get(dataTypeService) - .Setup(x => x.GetAll()) - .Returns(new[] { dataType }); - - var factory = new PublishedContentTypeFactory(Mock.Of(), new PropertyValueConverterCollection(Array.Empty()), dataTypeService); - return factory.CreateContentType(0, alias, new string[] {}, - new List(Enumerable.Range(0, 10).Select(x => factory.CreatePropertyType("prop" + x, 1)))); - } - } -} diff --git a/src/Umbraco.Tests/Cache/PublishedCache/PublishedContentCacheTests.cs b/src/Umbraco.Tests/Cache/PublishedCache/PublishedContentCacheTests.cs index e868e32b07..87ec4215ac 100644 --- a/src/Umbraco.Tests/Cache/PublishedCache/PublishedContentCacheTests.cs +++ b/src/Umbraco.Tests/Cache/PublishedCache/PublishedContentCacheTests.cs @@ -7,12 +7,12 @@ using Umbraco.Core.Composing; using Umbraco.Core.Configuration; using Umbraco.Core.Configuration.UmbracoSettings; using Umbraco.Core.Services; +using Umbraco.Tests.LegacyXmlPublishedCache; using Umbraco.Tests.TestHelpers; using Umbraco.Tests.Testing; using Umbraco.Tests.Testing.Objects.Accessors; using Umbraco.Web; using Umbraco.Web.PublishedCache; -using Umbraco.Web.PublishedCache.XmlPublishedCache; using Umbraco.Web.Routing; using Umbraco.Web.Security; @@ -66,7 +66,7 @@ namespace Umbraco.Tests.Cache.PublishedCache var xmlStore = new XmlStore(() => _xml, null, null, null); var appCache = new DictionaryAppCache(); var domainCache = new DomainCache(ServiceContext.DomainService, DefaultCultureAccessor); - var publishedShapshot = new Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedSnapshot( + var publishedShapshot = new PublishedSnapshot( new PublishedContentCache(xmlStore, domainCache, appCache, globalSettings, new SiteDomainHelper(), umbracoContextAccessor, ContentTypesCache, null, null), new PublishedMediaCache(xmlStore, ServiceContext.MediaService, ServiceContext.UserService, appCache, ContentTypesCache, Factory.GetInstance(), umbracoContextAccessor), new PublishedMemberCache(null, appCache, Current.Services.MemberService, ContentTypesCache, umbracoContextAccessor), diff --git a/src/Umbraco.Tests/Cache/PublishedCache/PublishedMediaCacheTests.cs b/src/Umbraco.Tests/Cache/PublishedCache/PublishedMediaCacheTests.cs index 07a6a6ee82..08eeb8ef4d 100644 --- a/src/Umbraco.Tests/Cache/PublishedCache/PublishedMediaCacheTests.cs +++ b/src/Umbraco.Tests/Cache/PublishedCache/PublishedMediaCacheTests.cs @@ -10,12 +10,12 @@ using Umbraco.Core.Composing; using Umbraco.Core.Models.PublishedContent; using Umbraco.Core.Strings; using Umbraco.Tests.TestHelpers; -using Umbraco.Web.PublishedCache.XmlPublishedCache; using Umbraco.Tests.Testing; using Current = Umbraco.Web.Composing.Current; using Umbraco.Core.Models; using Umbraco.Core.Models.Membership; using Umbraco.Core.Services; +using Umbraco.Tests.LegacyXmlPublishedCache; using Umbraco.Tests.PublishedContent; using Umbraco.Web; diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DictionaryPublishedContent.cs b/src/Umbraco.Tests/LegacyXmlPublishedCache/DictionaryPublishedContent.cs similarity index 99% rename from src/Umbraco.Web/PublishedCache/XmlPublishedCache/DictionaryPublishedContent.cs rename to src/Umbraco.Tests/LegacyXmlPublishedCache/DictionaryPublishedContent.cs index 74043a9519..d3cbf1f183 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DictionaryPublishedContent.cs +++ b/src/Umbraco.Tests/LegacyXmlPublishedCache/DictionaryPublishedContent.cs @@ -8,10 +8,12 @@ using Umbraco.Core; using Umbraco.Core.Cache; using Umbraco.Core.Logging; using Umbraco.Core.Models.PublishedContent; +using Umbraco.Web; using Umbraco.Web.Composing; using Umbraco.Web.Models; +using Umbraco.Web.PublishedCache; -namespace Umbraco.Web.PublishedCache.XmlPublishedCache +namespace Umbraco.Tests.LegacyXmlPublishedCache { /// /// An IPublishedContent that is represented all by a dictionary. diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DomainCache.cs b/src/Umbraco.Tests/LegacyXmlPublishedCache/DomainCache.cs similarity index 94% rename from src/Umbraco.Web/PublishedCache/XmlPublishedCache/DomainCache.cs rename to src/Umbraco.Tests/LegacyXmlPublishedCache/DomainCache.cs index 4571e9d42b..cde2077551 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DomainCache.cs +++ b/src/Umbraco.Tests/LegacyXmlPublishedCache/DomainCache.cs @@ -1,11 +1,12 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; -using Umbraco.Web.Routing; using Umbraco.Core; using Umbraco.Core.Services; +using Umbraco.Web.PublishedCache; +using Umbraco.Web.Routing; -namespace Umbraco.Web.PublishedCache.XmlPublishedCache +namespace Umbraco.Tests.LegacyXmlPublishedCache { internal class DomainCache : IDomainCache { diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PreviewContent.cs b/src/Umbraco.Tests/LegacyXmlPublishedCache/PreviewContent.cs similarity index 99% rename from src/Umbraco.Web/PublishedCache/XmlPublishedCache/PreviewContent.cs rename to src/Umbraco.Tests/LegacyXmlPublishedCache/PreviewContent.cs index 515fb96679..84b6f2b91c 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PreviewContent.cs +++ b/src/Umbraco.Tests/LegacyXmlPublishedCache/PreviewContent.cs @@ -7,7 +7,7 @@ using Umbraco.Core.IO; using Umbraco.Core.Logging; using Umbraco.Web.Composing; -namespace Umbraco.Web.PublishedCache.XmlPublishedCache +namespace Umbraco.Tests.LegacyXmlPublishedCache { class PreviewContent { diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs b/src/Umbraco.Tests/LegacyXmlPublishedCache/PublishedContentCache.cs similarity index 99% rename from src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs rename to src/Umbraco.Tests/LegacyXmlPublishedCache/PublishedContentCache.cs index 6fd9f1da2b..51c6668913 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs +++ b/src/Umbraco.Tests/LegacyXmlPublishedCache/PublishedContentCache.cs @@ -1,17 +1,19 @@ using System; using System.Collections.Generic; using System.Globalization; +using System.Linq; using System.Xml; using System.Xml.XPath; -using Umbraco.Core.Configuration; using Umbraco.Core; +using Umbraco.Core.Cache; +using Umbraco.Core.Configuration; using Umbraco.Core.Models.PublishedContent; using Umbraco.Core.Xml; +using Umbraco.Web; +using Umbraco.Web.PublishedCache; using Umbraco.Web.Routing; -using System.Linq; -using Umbraco.Core.Cache; -namespace Umbraco.Web.PublishedCache.XmlPublishedCache +namespace Umbraco.Tests.LegacyXmlPublishedCache { internal class PublishedContentCache : PublishedCacheBase, IPublishedContentCache { diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs b/src/Umbraco.Tests/LegacyXmlPublishedCache/PublishedMediaCache.cs similarity index 99% rename from src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs rename to src/Umbraco.Tests/LegacyXmlPublishedCache/PublishedMediaCache.cs index 7f9a21d24b..8cfc06c501 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs +++ b/src/Umbraco.Tests/LegacyXmlPublishedCache/PublishedMediaCache.cs @@ -6,21 +6,21 @@ using System.Linq; using System.Threading; using System.Xml.XPath; using Examine; -using Examine.Providers; using Examine.Search; using Lucene.Net.Store; using Umbraco.Core; +using Umbraco.Core.Cache; using Umbraco.Core.Logging; using Umbraco.Core.Models; using Umbraco.Core.Models.PublishedContent; +using Umbraco.Core.Services; using Umbraco.Core.Xml; using Umbraco.Examine; -using Umbraco.Core.Cache; -using Umbraco.Core.Services; -using Umbraco.Core.Services.Implement; +using Umbraco.Web; using Umbraco.Web.Composing; +using Umbraco.Web.PublishedCache; -namespace Umbraco.Web.PublishedCache.XmlPublishedCache +namespace Umbraco.Tests.LegacyXmlPublishedCache { /// /// An IPublishedMediaStore that first checks for the media in Examine, and then reverts to the database diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMemberCache.cs b/src/Umbraco.Tests/LegacyXmlPublishedCache/PublishedMemberCache.cs similarity index 98% rename from src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMemberCache.cs rename to src/Umbraco.Tests/LegacyXmlPublishedCache/PublishedMemberCache.cs index db6d85fb2d..c882488f20 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMemberCache.cs +++ b/src/Umbraco.Tests/LegacyXmlPublishedCache/PublishedMemberCache.cs @@ -6,9 +6,11 @@ using Umbraco.Core.Models; using Umbraco.Core.Models.PublishedContent; using Umbraco.Core.Security; using Umbraco.Core.Services; +using Umbraco.Web; +using Umbraco.Web.PublishedCache; using Umbraco.Web.Security; -namespace Umbraco.Web.PublishedCache.XmlPublishedCache +namespace Umbraco.Tests.LegacyXmlPublishedCache { class PublishedMemberCache : IPublishedMemberCache { diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedSnapshot.cs b/src/Umbraco.Tests/LegacyXmlPublishedCache/PublishedSnapshot.cs similarity index 95% rename from src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedSnapshot.cs rename to src/Umbraco.Tests/LegacyXmlPublishedCache/PublishedSnapshot.cs index b9243309a2..bfef187371 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedSnapshot.cs +++ b/src/Umbraco.Tests/LegacyXmlPublishedCache/PublishedSnapshot.cs @@ -1,8 +1,9 @@ using System; using Umbraco.Core; using Umbraco.Core.Cache; +using Umbraco.Web.PublishedCache; -namespace Umbraco.Web.PublishedCache.XmlPublishedCache +namespace Umbraco.Tests.LegacyXmlPublishedCache { /// /// Implements a published snapshot. diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedSnapshotService.cs b/src/Umbraco.Tests/LegacyXmlPublishedCache/PublishedSnapshotService.cs similarity index 99% rename from src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedSnapshotService.cs rename to src/Umbraco.Tests/LegacyXmlPublishedCache/PublishedSnapshotService.cs index d96bfd8a0a..4a201ae44c 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedSnapshotService.cs +++ b/src/Umbraco.Tests/LegacyXmlPublishedCache/PublishedSnapshotService.cs @@ -11,11 +11,12 @@ using Umbraco.Core.Models.PublishedContent; using Umbraco.Core.Persistence.Repositories; using Umbraco.Core.Scoping; using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Web; using Umbraco.Web.Cache; +using Umbraco.Web.PublishedCache; using Umbraco.Web.Routing; -namespace Umbraco.Web.PublishedCache.XmlPublishedCache +namespace Umbraco.Tests.LegacyXmlPublishedCache { /// /// Implements a published snapshot service. diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/RoutesCache.cs b/src/Umbraco.Tests/LegacyXmlPublishedCache/RoutesCache.cs similarity index 95% rename from src/Umbraco.Web/PublishedCache/XmlPublishedCache/RoutesCache.cs rename to src/Umbraco.Tests/LegacyXmlPublishedCache/RoutesCache.cs index fb227fe65f..71f2f421ff 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/RoutesCache.cs +++ b/src/Umbraco.Tests/LegacyXmlPublishedCache/RoutesCache.cs @@ -1,10 +1,7 @@ -using System; -using System.Collections.Concurrent; +using System.Collections.Concurrent; using System.Collections.Generic; -using System.Linq; -using System.Text; -namespace Umbraco.Web.PublishedCache.XmlPublishedCache +namespace Umbraco.Tests.LegacyXmlPublishedCache { // Note: RoutesCache closely follows the caching strategy dating from v4, which // is obviously broken in many ways (eg it's a global cache but relying to some diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/SafeXmlReaderWriter.cs b/src/Umbraco.Tests/LegacyXmlPublishedCache/SafeXmlReaderWriter.cs similarity index 98% rename from src/Umbraco.Web/PublishedCache/XmlPublishedCache/SafeXmlReaderWriter.cs rename to src/Umbraco.Tests/LegacyXmlPublishedCache/SafeXmlReaderWriter.cs index 37a6b666d4..c0b9383b57 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/SafeXmlReaderWriter.cs +++ b/src/Umbraco.Tests/LegacyXmlPublishedCache/SafeXmlReaderWriter.cs @@ -3,7 +3,7 @@ using System.Xml; using Umbraco.Core; using Umbraco.Core.Scoping; -namespace Umbraco.Web.PublishedCache.XmlPublishedCache +namespace Umbraco.Tests.LegacyXmlPublishedCache { // TODO: should be a ScopeContextualBase internal class SafeXmlReaderWriter : IDisposable diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/UmbracoContextCache.cs b/src/Umbraco.Tests/LegacyXmlPublishedCache/UmbracoContextCache.cs similarity index 81% rename from src/Umbraco.Web/PublishedCache/XmlPublishedCache/UmbracoContextCache.cs rename to src/Umbraco.Tests/LegacyXmlPublishedCache/UmbracoContextCache.cs index 6b82a7ee3d..fc6dbe3f30 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/UmbracoContextCache.cs +++ b/src/Umbraco.Tests/LegacyXmlPublishedCache/UmbracoContextCache.cs @@ -1,11 +1,8 @@ -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; -using System.Text; +using System.Collections.Concurrent; using System.Runtime.CompilerServices; +using Umbraco.Web; -namespace Umbraco.Web.PublishedCache.XmlPublishedCache +namespace Umbraco.Tests.LegacyXmlPublishedCache { static class UmbracoContextCache { diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs b/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlPublishedContent.cs similarity index 99% rename from src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs rename to src/Umbraco.Tests/LegacyXmlPublishedCache/XmlPublishedContent.cs index 9a4c1f239c..e1819bf0be 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedContent.cs +++ b/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlPublishedContent.cs @@ -7,10 +7,12 @@ using System.Xml.XPath; using Umbraco.Core; using Umbraco.Core.Cache; using Umbraco.Core.Models.PublishedContent; +using Umbraco.Web; using Umbraco.Web.Composing; using Umbraco.Web.Models; +using Umbraco.Web.PublishedCache; -namespace Umbraco.Web.PublishedCache.XmlPublishedCache +namespace Umbraco.Tests.LegacyXmlPublishedCache { /// diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedProperty.cs b/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlPublishedProperty.cs similarity index 98% rename from src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedProperty.cs rename to src/Umbraco.Tests/LegacyXmlPublishedCache/XmlPublishedProperty.cs index 805f7d9325..0c90c8d1ff 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlPublishedProperty.cs +++ b/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlPublishedProperty.cs @@ -5,7 +5,7 @@ using Umbraco.Core.Models.PublishedContent; using Umbraco.Core.PropertyEditors; using Umbraco.Core.Xml; -namespace Umbraco.Web.PublishedCache.XmlPublishedCache +namespace Umbraco.Tests.LegacyXmlPublishedCache { /// diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlStore.cs b/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlStore.cs similarity index 99% rename from src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlStore.cs rename to src/Umbraco.Tests/LegacyXmlPublishedCache/XmlStore.cs index 36a8334782..3fb3d40e5b 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlStore.cs +++ b/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlStore.cs @@ -12,7 +12,6 @@ using Umbraco.Core.IO; using Umbraco.Core.Logging; using Umbraco.Core.Models; using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; using Umbraco.Core.Persistence.Dtos; using Umbraco.Core.Persistence.Repositories; using Umbraco.Core.Persistence.Repositories.Implement; @@ -20,15 +19,15 @@ using Umbraco.Core.Scoping; using Umbraco.Core.Services; using Umbraco.Core.Services.Changes; using Umbraco.Core.Services.Implement; -using Umbraco.Core.Strings; using Umbraco.Core.Xml; using Umbraco.Web.Cache; using Umbraco.Web.Composing; +using Umbraco.Web.PublishedCache; using Umbraco.Web.Scheduling; using File = System.IO.File; using Task = System.Threading.Tasks.Task; -namespace Umbraco.Web.PublishedCache.XmlPublishedCache +namespace Umbraco.Tests.LegacyXmlPublishedCache { /// /// Represents the Xml storage for the Xml published cache. diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlStoreFilePersister.cs b/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlStoreFilePersister.cs similarity index 98% rename from src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlStoreFilePersister.cs rename to src/Umbraco.Tests/LegacyXmlPublishedCache/XmlStoreFilePersister.cs index 83d25d3e49..145a19872a 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlStoreFilePersister.cs +++ b/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlStoreFilePersister.cs @@ -1,11 +1,10 @@ using System; using System.Threading; -using System.Threading.Tasks; using Umbraco.Core; using Umbraco.Core.Logging; using Umbraco.Web.Scheduling; -namespace Umbraco.Web.PublishedCache.XmlPublishedCache +namespace Umbraco.Tests.LegacyXmlPublishedCache { /// /// This is the background task runner that persists the xml file to the file system diff --git a/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs b/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs index bc1d8c2b70..a9022554c9 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs @@ -8,7 +8,6 @@ using Umbraco.Tests.TestHelpers; using Umbraco.Tests.TestHelpers.Entities; using Umbraco.Tests.UmbracoExamine; using Umbraco.Web; -using Umbraco.Web.PublishedCache.XmlPublishedCache; using System.Linq; using System.Threading; using System.Xml; @@ -23,6 +22,7 @@ using Umbraco.Core.Composing; using Umbraco.Core.Models.Membership; using Umbraco.Core.PropertyEditors; using Umbraco.Core.Services; +using Umbraco.Tests.LegacyXmlPublishedCache; namespace Umbraco.Tests.PublishedContent { diff --git a/src/Umbraco.Tests/Routing/RoutesCacheTests.cs b/src/Umbraco.Tests/Routing/RoutesCacheTests.cs index 76c2a45ab2..46af27c56e 100644 --- a/src/Umbraco.Tests/Routing/RoutesCacheTests.cs +++ b/src/Umbraco.Tests/Routing/RoutesCacheTests.cs @@ -4,9 +4,9 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using NUnit.Framework; +using Umbraco.Tests.LegacyXmlPublishedCache; using Umbraco.Tests.TestHelpers; using Umbraco.Tests.Testing; -using Umbraco.Web.PublishedCache.XmlPublishedCache; namespace Umbraco.Tests.Routing { diff --git a/src/Umbraco.Tests/Routing/UrlProviderTests.cs b/src/Umbraco.Tests/Routing/UrlProviderTests.cs index f223f2fbea..34a038cffe 100644 --- a/src/Umbraco.Tests/Routing/UrlProviderTests.cs +++ b/src/Umbraco.Tests/Routing/UrlProviderTests.cs @@ -9,11 +9,11 @@ using Umbraco.Core.Composing; using Umbraco.Core.Configuration; using Umbraco.Core.Models; using Umbraco.Core.Models.PublishedContent; +using Umbraco.Tests.LegacyXmlPublishedCache; using Umbraco.Tests.TestHelpers; using Umbraco.Tests.TestHelpers.Stubs; using Umbraco.Tests.Testing; using Umbraco.Web.PublishedCache; -using Umbraco.Web.PublishedCache.XmlPublishedCache; using Umbraco.Web.Routing; namespace Umbraco.Tests.Routing diff --git a/src/Umbraco.Tests/Routing/UrlRoutesTests.cs b/src/Umbraco.Tests/Routing/UrlRoutesTests.cs index 4928cd01dc..a794e226f1 100644 --- a/src/Umbraco.Tests/Routing/UrlRoutesTests.cs +++ b/src/Umbraco.Tests/Routing/UrlRoutesTests.cs @@ -4,9 +4,9 @@ using NUnit.Framework; using Umbraco.Core.Composing; using Umbraco.Core.Configuration; using Umbraco.Core.Models; +using Umbraco.Tests.LegacyXmlPublishedCache; using Umbraco.Tests.TestHelpers; using Umbraco.Tests.Testing; -using Umbraco.Web.PublishedCache.XmlPublishedCache; namespace Umbraco.Tests.Routing { diff --git a/src/Umbraco.Tests/Routing/UrlsProviderWithDomainsTests.cs b/src/Umbraco.Tests/Routing/UrlsProviderWithDomainsTests.cs index dc9a52835b..be654b4a09 100644 --- a/src/Umbraco.Tests/Routing/UrlsProviderWithDomainsTests.cs +++ b/src/Umbraco.Tests/Routing/UrlsProviderWithDomainsTests.cs @@ -8,8 +8,8 @@ using Umbraco.Core.Composing; using Umbraco.Core.Configuration; using Umbraco.Core.Models; using Umbraco.Core.Services; +using Umbraco.Tests.LegacyXmlPublishedCache; using Umbraco.Tests.TestHelpers; -using Umbraco.Web.PublishedCache.XmlPublishedCache; using Umbraco.Web.Routing; namespace Umbraco.Tests.Routing diff --git a/src/Umbraco.Tests/Routing/UrlsWithNestedDomains.cs b/src/Umbraco.Tests/Routing/UrlsWithNestedDomains.cs index bb06ff894b..3d3533697c 100644 --- a/src/Umbraco.Tests/Routing/UrlsWithNestedDomains.cs +++ b/src/Umbraco.Tests/Routing/UrlsWithNestedDomains.cs @@ -6,9 +6,9 @@ using Umbraco.Core.Composing; using Umbraco.Core.Configuration; using Umbraco.Core.Models; using Umbraco.Tests.TestHelpers; -using Umbraco.Web.PublishedCache.XmlPublishedCache; using Umbraco.Web.Routing; using Umbraco.Core.Services; +using Umbraco.Tests.LegacyXmlPublishedCache; namespace Umbraco.Tests.Routing { diff --git a/src/Umbraco.Tests/Scoping/ScopedXmlTests.cs b/src/Umbraco.Tests/Scoping/ScopedXmlTests.cs index 11479ea3eb..f1fd0c592b 100644 --- a/src/Umbraco.Tests/Scoping/ScopedXmlTests.cs +++ b/src/Umbraco.Tests/Scoping/ScopedXmlTests.cs @@ -12,11 +12,11 @@ using Umbraco.Core.Models; using Umbraco.Core.Services; using Umbraco.Core.Services.Implement; using Umbraco.Core.Sync; +using Umbraco.Tests.LegacyXmlPublishedCache; using Umbraco.Tests.TestHelpers; using Umbraco.Tests.Testing; using Umbraco.Web.Cache; using Umbraco.Web.PublishedCache; -using Umbraco.Web.PublishedCache.XmlPublishedCache; namespace Umbraco.Tests.Scoping { diff --git a/src/Umbraco.Tests/TestHelpers/TestWithDatabaseBase.cs b/src/Umbraco.Tests/TestHelpers/TestWithDatabaseBase.cs index 76b163a2df..2bfc1b6dc8 100644 --- a/src/Umbraco.Tests/TestHelpers/TestWithDatabaseBase.cs +++ b/src/Umbraco.Tests/TestHelpers/TestWithDatabaseBase.cs @@ -19,7 +19,6 @@ using Umbraco.Core.PropertyEditors; using Umbraco.Core.Services; using Umbraco.Web; using Umbraco.Web.PublishedCache; -using Umbraco.Web.PublishedCache.XmlPublishedCache; using Umbraco.Web.Security; using Umbraco.Web.Routing; using File = System.IO.File; @@ -30,6 +29,7 @@ using Umbraco.Tests.Testing; using Umbraco.Core.Migrations.Install; using Umbraco.Core.Models.PublishedContent; using Umbraco.Core.Persistence.Repositories; +using Umbraco.Tests.LegacyXmlPublishedCache; using Umbraco.Tests.Testing.Objects.Accessors; namespace Umbraco.Tests.TestHelpers diff --git a/src/Umbraco.Tests/Umbraco.Tests.csproj b/src/Umbraco.Tests/Umbraco.Tests.csproj index 03d0d4f8cb..8c86873e0a 100644 --- a/src/Umbraco.Tests/Umbraco.Tests.csproj +++ b/src/Umbraco.Tests/Umbraco.Tests.csproj @@ -493,6 +493,21 @@ + + + + + + + + + + + + + + + diff --git a/src/Umbraco.Tests/Web/Mvc/UmbracoViewPageTests.cs b/src/Umbraco.Tests/Web/Mvc/UmbracoViewPageTests.cs index fee18cb382..c5c8b5c77d 100644 --- a/src/Umbraco.Tests/Web/Mvc/UmbracoViewPageTests.cs +++ b/src/Umbraco.Tests/Web/Mvc/UmbracoViewPageTests.cs @@ -12,13 +12,13 @@ using Umbraco.Core.Logging; using Umbraco.Core.Models.PublishedContent; using Umbraco.Core.Services; using Umbraco.Core.Strings; +using Umbraco.Tests.LegacyXmlPublishedCache; using Umbraco.Tests.TestHelpers; using Umbraco.Tests.Testing; using Umbraco.Tests.Testing.Objects.Accessors; using Umbraco.Web; using Umbraco.Web.Models; using Umbraco.Web.Mvc; -using Umbraco.Web.PublishedCache.XmlPublishedCache; using Umbraco.Web.Routing; using Umbraco.Web.Security; diff --git a/src/Umbraco.Web.UI.Client/src/views/dashboard/settings/xmldataintegrityreport.controller.js b/src/Umbraco.Web.UI.Client/src/views/dashboard/settings/xmldataintegrityreport.controller.js deleted file mode 100644 index bb8696aca0..0000000000 --- a/src/Umbraco.Web.UI.Client/src/views/dashboard/settings/xmldataintegrityreport.controller.js +++ /dev/null @@ -1,62 +0,0 @@ -function XmlDataIntegrityReportController($scope, umbRequestHelper, $log, $http) { - - function check(item) { - var action = item.check; - umbRequestHelper.resourcePromise( - $http.get(umbRequestHelper.getApiUrl("xmlDataIntegrityBaseUrl", action)), - 'Failed to retrieve data integrity status') - .then(function(result) { - item.checking = false; - item.invalid = result === "false"; - }); - } - - $scope.fix = function(item) { - var action = item.fix; - if (item.fix) { - if (confirm("This will cause all xml structures for this type to be rebuilt. " + - "Depending on how much content there is in your site this could take a while. " + - "It is not recommended to rebuild xml structures if they are not out of sync, during times of high website traffic " + - "or when editors are editing content.")) { - item.fixing = true; - umbRequestHelper.resourcePromise( - $http.post(umbRequestHelper.getApiUrl("xmlDataIntegrityBaseUrl", action)), - 'Failed to retrieve data integrity status') - .then(function(result) { - item.fixing = false; - item.invalid = result === "false"; - }); - } - } - } - - $scope.items = { - "contentXml": { - label: "Content in the cmsContentXml table", - checking: true, - fixing: false, - fix: "FixContentXmlTable", - check: "CheckContentXmlTable" - }, - "mediaXml": { - label: "Media in the cmsContentXml table", - checking: true, - fixing: false, - fix: "FixMediaXmlTable", - check: "CheckMediaXmlTable" - }, - "memberXml": { - label: "Members in the cmsContentXml table", - checking: true, - fixing: false, - fix: "FixMembersXmlTable", - check: "CheckMembersXmlTable" - } - }; - - for (var i in $scope.items) { - check($scope.items[i]); - } -} - -angular.module("umbraco").controller("Umbraco.Dashboard.XmlDataIntegrityReportController", XmlDataIntegrityReportController); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/dashboard/settings/xmldataintegrityreport.html b/src/Umbraco.Web.UI.Client/src/views/dashboard/settings/xmldataintegrityreport.html deleted file mode 100644 index 11f1834ae4..0000000000 --- a/src/Umbraco.Web.UI.Client/src/views/dashboard/settings/xmldataintegrityreport.html +++ /dev/null @@ -1,29 +0,0 @@ -
    - -

    Xml Cache Data integrity

    - -
    - Loading... -
    - -

    - This checks the data integrity for the xml structures for content, media and members that are stored in the cmsContentXml table. - This does not check the data integrity of the xml cache file, only the xml structures stored in the database used to create the xml cache file. -

    -
    - {{value.label}} ... - Checking... - Ok - Error -
    - -
    -
    -
    -
    -
    - -
    diff --git a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs index a0f8cd6062..83bb152e0a 100644 --- a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs +++ b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs @@ -265,10 +265,6 @@ namespace Umbraco.Web.Editors "examineMgmtBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl( controller => controller.GetIndexerDetails()) }, - { - "xmlDataIntegrityBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl( - controller => controller.CheckContentXmlTable()) - }, { "healthCheckBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl( controller => controller.GetAllHealthChecks()) diff --git a/src/Umbraco.Web/Editors/PublishedStatusController.cs b/src/Umbraco.Web/Editors/PublishedStatusController.cs index 937d3f3137..a6272108e9 100644 --- a/src/Umbraco.Web/Editors/PublishedStatusController.cs +++ b/src/Umbraco.Web/Editors/PublishedStatusController.cs @@ -17,9 +17,6 @@ namespace Umbraco.Web.Editors [HttpGet] public string GetPublishedStatusUrl() { - if (_publishedSnapshotService is PublishedCache.XmlPublishedCache.PublishedSnapshotService) - return "views/dashboard/settings/xmldataintegrityreport.html"; - //if (service is PublishedCache.PublishedNoCache.PublishedSnapshotService) // return "views/dashboard/developer/nocache.html"; diff --git a/src/Umbraco.Web/Editors/XmlDataIntegrityController.cs b/src/Umbraco.Web/Editors/XmlDataIntegrityController.cs deleted file mode 100644 index 4862b86f69..0000000000 --- a/src/Umbraco.Web/Editors/XmlDataIntegrityController.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Web.Http; -using Umbraco.Web.PublishedCache; -using Umbraco.Web.PublishedCache.XmlPublishedCache; -using Umbraco.Web.WebApi; -using Umbraco.Web.WebApi.Filters; - -namespace Umbraco.Web.Editors -{ - [ValidateAngularAntiForgeryToken] - public class XmlDataIntegrityController : UmbracoAuthorizedApiController - { - private readonly PublishedSnapshotService _publishedSnapshotService; - - public XmlDataIntegrityController(IPublishedSnapshotService publishedSnapshotService) - { - if (publishedSnapshotService == null) throw new ArgumentNullException(nameof(publishedSnapshotService)); - _publishedSnapshotService = publishedSnapshotService as PublishedSnapshotService; - if (_publishedSnapshotService == null) throw new NotSupportedException("Unsupported IPublishedSnapshotService, only the Xml one is supported."); - } - - [HttpPost] - public bool FixContentXmlTable() - { - _publishedSnapshotService.RebuildContentAndPreviewXml(); - return _publishedSnapshotService.VerifyContentAndPreviewXml(); - } - - [HttpPost] - public bool FixMediaXmlTable() - { - _publishedSnapshotService.RebuildMediaXml(); - return _publishedSnapshotService.VerifyMediaXml(); - } - - [HttpPost] - public bool FixMembersXmlTable() - { - _publishedSnapshotService.RebuildMemberXml(); - return _publishedSnapshotService.VerifyMemberXml(); - } - - [HttpGet] - public bool CheckContentXmlTable() - { - return _publishedSnapshotService.VerifyContentAndPreviewXml(); - } - - [HttpGet] - public bool CheckMediaXmlTable() - { - return _publishedSnapshotService.VerifyMediaXml(); - } - - [HttpGet] - public bool CheckMembersXmlTable() - { - return _publishedSnapshotService.VerifyMemberXml(); - } - } -} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 91ffbe68b5..93d26a7e0e 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -536,15 +536,6 @@ - - - - - - - - - @@ -1023,7 +1014,6 @@ - @@ -1031,8 +1021,6 @@ - - @@ -1139,10 +1127,7 @@ - - - @@ -1194,7 +1179,6 @@ Component -
    From 2287c0e402e228836febdb123b7fce111421552b Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 30 Jan 2019 08:24:47 +0100 Subject: [PATCH 383/437] #3645 - remove badge again in preview mode + added spinner --- src/Umbraco.Web.UI.Client/package-lock.json | 96 +++++++++---------- .../src/preview/preview.controller.js | 16 +++- 2 files changed, 61 insertions(+), 51 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/package-lock.json b/src/Umbraco.Web.UI.Client/package-lock.json index fe657ae470..ed28a93caf 100644 --- a/src/Umbraco.Web.UI.Client/package-lock.json +++ b/src/Umbraco.Web.UI.Client/package-lock.json @@ -937,7 +937,7 @@ }, "ansi-colors": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", "dev": true, "requires": { @@ -955,7 +955,7 @@ }, "ansi-escapes": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "resolved": "http://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", "dev": true }, @@ -1170,7 +1170,7 @@ "array-slice": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", - "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", + "integrity": "sha1-42jqFfibxwaff/uJrsOmx9SsItQ=", "dev": true }, "array-sort": { @@ -1216,7 +1216,7 @@ "arraybuffer.slice": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", - "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==", + "integrity": "sha1-O7xCdd1YTMGxCAm4nU6LY6aednU=", "dev": true }, "asap": { @@ -1269,7 +1269,7 @@ "async-limiter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", - "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==", + "integrity": "sha1-ePrtjD0HSrgfIrTphdeehzj3IPg=", "dev": true }, "asynckit": { @@ -2379,7 +2379,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { @@ -2459,7 +2459,7 @@ "content-type": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "integrity": "sha1-4TjMdeBAxyexlm/l5fjJruJW/js=", "dev": true }, "continuable-cache": { @@ -2502,7 +2502,7 @@ "core-js": { "version": "2.5.7", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", - "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", + "integrity": "sha1-+XJgj/DOrWi4QaFqky0LGDeRgU4=", "dev": true }, "core-util-is": { @@ -3425,7 +3425,7 @@ "doctrine": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "integrity": "sha1-XNAfwQFiG0LEzX9dGmYkNxbT850=", "dev": true, "requires": { "esutils": "^2.0.2" @@ -3953,7 +3953,7 @@ "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "dev": true, "requires": { "ms": "2.0.0" @@ -3989,7 +3989,7 @@ "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "dev": true, "requires": { "ms": "2.0.0" @@ -4153,7 +4153,7 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", "dev": true, "optional": true } @@ -4248,7 +4248,7 @@ "eslint-scope": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", - "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", + "integrity": "sha1-UL8wcekzi83EMzF5Sgy1M/ATYXI=", "dev": true, "requires": { "esrecurse": "^4.1.0", @@ -4258,13 +4258,13 @@ "eslint-utils": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", - "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", + "integrity": "sha1-moUbqJ7nxGA0b5fPiTnHKYgn5RI=", "dev": true }, "eslint-visitor-keys": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "integrity": "sha1-PzGA+y4pEBdxastMnW1bXDSmqB0=", "dev": true }, "espree": { @@ -4287,7 +4287,7 @@ "esquery": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", - "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "integrity": "sha1-QGxRZYsfWZGl+bYrHcJbAOPlxwg=", "dev": true, "requires": { "estraverse": "^4.0.0" @@ -4296,7 +4296,7 @@ "esrecurse": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "integrity": "sha1-AHo7n9vCs7uH5IeeoZyS/b05Qs8=", "dev": true, "requires": { "estraverse": "^4.1.0" @@ -4356,7 +4356,7 @@ "eventemitter3": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz", - "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==", + "integrity": "sha1-CQtNbNvWRe0Qv3UNS1QHlC17oWM=", "dev": true }, "exec-buffer": { @@ -4571,7 +4571,7 @@ "fill-range": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", - "integrity": "sha1-6x53OrsFbc2N8r/favWbizqTZWU=", + "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", "dev": true, "requires": { "is-number": "^2.1.0", @@ -5891,7 +5891,7 @@ "global-modules": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "integrity": "sha1-bXcPDrUjrHgWTXK15xqIdyZcw+o=", "dev": true, "requires": { "global-prefix": "^1.0.1", @@ -6461,7 +6461,7 @@ "gulp-eslint": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/gulp-eslint/-/gulp-eslint-5.0.0.tgz", - "integrity": "sha512-9GUqCqh85C7rP9120cpxXuZz2ayq3BZc85pCTuPJS03VQYxne0aWPIXWx6LSvsGPa3uRqtSO537vaugOh+5cXg==", + "integrity": "sha1-KiaECV93Syz3kxAmIHjFbMehK1I=", "dev": true, "requires": { "eslint": "^5.0.1", @@ -7415,7 +7415,7 @@ "has-binary2": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", - "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", + "integrity": "sha1-d3asYn8+p3JQz8My2rfd9eT10R0=", "dev": true, "requires": { "isarray": "2.0.1" @@ -7566,7 +7566,7 @@ "http-proxy": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz", - "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==", + "integrity": "sha1-etOElGWPhGBeL220Q230EPTlvpo=", "dev": true, "requires": { "eventemitter3": "^3.0.0", @@ -7860,7 +7860,7 @@ "is-absolute": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "integrity": "sha1-OV4a6EsR8mrReV5zwXN45IowFXY=", "dev": true, "requires": { "is-relative": "^1.0.0", @@ -8155,7 +8155,7 @@ "is-relative": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "integrity": "sha1-obtpNc6MXboei5dUubLcwCDiJg0=", "dev": true, "requires": { "is-unc-path": "^1.0.0" @@ -8164,7 +8164,7 @@ "is-resolvable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", + "integrity": "sha1-+xj4fOH+uSUWnJpAfBkxijIG7Yg=", "dev": true }, "is-retry-allowed": { @@ -8212,7 +8212,7 @@ "is-unc-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "integrity": "sha1-1zHoiY7QkKEsNSrS6u1Qla0yLJ0=", "dev": true, "requires": { "unc-path-regex": "^0.1.2" @@ -8369,7 +8369,7 @@ "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA=", "dev": true }, "json-stable-stringify-without-jsonify": { @@ -8496,7 +8496,7 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", "dev": true } } @@ -9146,7 +9146,7 @@ "make-iterator": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", - "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "integrity": "sha1-KbM/MSqo9UfEpeSQ9Wr87JkTOtY=", "dev": true, "requires": { "kind-of": "^6.0.2" @@ -9327,7 +9327,7 @@ "mimic-fn": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "integrity": "sha1-ggyGo5M0ZA6ZUWkovQP8qIBX0CI=", "dev": true }, "minimatch": { @@ -12855,7 +12855,7 @@ "pluralize": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", - "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", + "integrity": "sha1-KYuJ34uTsCIdv0Ia0rGx6iP8Z3c=", "dev": true }, "posix-character-classes": { @@ -13345,7 +13345,7 @@ "qjobs": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", - "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", + "integrity": "sha1-xF6cYYAL0IfviNfiVkI73Unl0HE=", "dev": true }, "qs": { @@ -13541,7 +13541,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { @@ -14039,7 +14039,7 @@ "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=", "dev": true }, "sax": { @@ -14226,7 +14226,7 @@ "setprototypeof": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "integrity": "sha1-0L2FU2iHtv58DYGMuWLZ2RxU5lY=", "dev": true }, "shebang-command": { @@ -14516,7 +14516,7 @@ "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "dev": true, "requires": { "ms": "2.0.0" @@ -14796,7 +14796,7 @@ "stream-consume": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.1.tgz", - "integrity": "sha512-tNa3hzgkjEP7XbCkbRXe1jpg+ievoa0O4SCFlMOYEscGSS4JJsckGL8swUyAa/ApGU3Ae4t6Honor4HhL+tRyg==", + "integrity": "sha1-0721mMK9CugrjKx6xQsRB6eZbEg=", "dev": true }, "stream-shift": { @@ -14808,7 +14808,7 @@ "streamroller": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-0.7.0.tgz", - "integrity": "sha512-WREzfy0r0zUqp3lGO096wRuUp7ho1X6uo/7DJfTlEi0Iv/4gT7YHqXDjKC2ioVGBZtE8QzsQD9nx1nIuoZ57jQ==", + "integrity": "sha1-odG3z4PTmvsNYwSaWsv5NJO99ks=", "dev": true, "requires": { "date-format": "^1.2.0", @@ -14835,7 +14835,7 @@ "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", "dev": true, "requires": { "core-util-is": "~1.0.0", @@ -14850,7 +14850,7 @@ "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", "dev": true, "requires": { "safe-buffer": "~5.1.0" @@ -14867,7 +14867,7 @@ "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", "dev": true, "requires": { "is-fullwidth-code-point": "^2.0.0", @@ -15409,7 +15409,7 @@ "tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "integrity": "sha1-bTQzWIl2jSGyvNoKonfO07G/rfk=", "dev": true, "requires": { "os-tmpdir": "~1.0.2" @@ -15573,7 +15573,7 @@ "type-is": { "version": "1.6.16", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", - "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", + "integrity": "sha1-+JzjQVQcZysl7nrjxz3uOyvlAZQ=", "dev": true, "requires": { "media-typer": "0.3.0", @@ -15615,7 +15615,7 @@ "ultron": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", - "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", + "integrity": "sha1-n+FTahCmZKZSZqHjzPhf02MCvJw=", "dev": true }, "unc-path-regex": { @@ -15777,13 +15777,13 @@ "upath": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", - "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", + "integrity": "sha1-NSVll+RqWB20eT0M5H+prr/J+r0=", "dev": true }, "uri-js": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "integrity": "sha1-lMVA4f93KVbiKZUHwBCupsiDjrA=", "dev": true, "requires": { "punycode": "^2.1.0" @@ -16218,7 +16218,7 @@ "ws": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", - "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", + "integrity": "sha1-8c+E/i1ekB686U767OeF8YeiKPI=", "dev": true, "requires": { "async-limiter": "~1.0.0", diff --git a/src/Umbraco.Web.UI.Client/src/preview/preview.controller.js b/src/Umbraco.Web.UI.Client/src/preview/preview.controller.js index 5eb985a582..7d6584d2f1 100644 --- a/src/Umbraco.Web.UI.Client/src/preview/preview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/preview/preview.controller.js @@ -134,9 +134,11 @@ var app = angular.module("umbraco.preview", ['umbraco.resources', 'umbraco.servi /* Change culture */ /*****************************************************************************/ $scope.changeCulture = function (culture) { - // $scope.frameLoaded = false; - $location.search("culture", culture); - setPageUrl(); + if($location.search().culture !== culture){ + $scope.frameLoaded = false; + $location.search("culture", culture); + setPageUrl(); + } }; }) @@ -155,11 +157,19 @@ var app = angular.module("umbraco.preview", ['umbraco.resources', 'umbraco.servi function iframeReady() { var iframe = $element.find("#resultFrame").get(0); + hideUmbracoPreviewBadge(iframe); angularHelper.safeApply($scope, function () { vm.onLoaded({ iframe: iframe }); + $scope.frameLoaded = true; }); } + function hideUmbracoPreviewBadge (iframe) { + if (iframe && iframe.contentDocument && iframe.contentDocument.getElementById("umbracoPreviewBadge")) { + iframe.contentDocument.getElementById("umbracoPreviewBadge").style.display = "none"; + } + }; + }, controllerAs: "vm", From 7ba4fd7ad1e4841105f358cf22aea476d1842bbe Mon Sep 17 00:00:00 2001 From: Stephan Date: Wed, 30 Jan 2019 08:35:19 +0100 Subject: [PATCH 384/437] Cleanup Umbraco module --- src/Umbraco.Core/RuntimeLevelReason.cs | 5 + src/Umbraco.Core/RuntimeState.cs | 21 +-- .../Routing/Resources/Booting.html | 9 -- src/Umbraco.Web/Routing/Resources/Failed.html | 8 -- .../Routing/Resources/HtmlPages.Designer.cs | 99 -------------- .../Routing/Resources/HtmlPages.resx | 127 ------------------ src/Umbraco.Web/Umbraco.Web.csproj | 11 -- src/Umbraco.Web/UmbracoInjectedModule.cs | 33 +---- 8 files changed, 14 insertions(+), 299 deletions(-) delete mode 100644 src/Umbraco.Web/Routing/Resources/Booting.html delete mode 100644 src/Umbraco.Web/Routing/Resources/Failed.html delete mode 100644 src/Umbraco.Web/Routing/Resources/HtmlPages.Designer.cs delete mode 100644 src/Umbraco.Web/Routing/Resources/HtmlPages.resx diff --git a/src/Umbraco.Core/RuntimeLevelReason.cs b/src/Umbraco.Core/RuntimeLevelReason.cs index c10ac8b206..587334d033 100644 --- a/src/Umbraco.Core/RuntimeLevelReason.cs +++ b/src/Umbraco.Core/RuntimeLevelReason.cs @@ -5,6 +5,11 @@ ///
    public enum RuntimeLevelReason { + /// + /// The reason is unknown. + /// + Unknown, + /// /// The code version is lower than the version indicated in web.config, and /// downgrading Umbraco is not supported. diff --git a/src/Umbraco.Core/RuntimeState.cs b/src/Umbraco.Core/RuntimeState.cs index b21c02fdb9..9ddbb09748 100644 --- a/src/Umbraco.Core/RuntimeState.cs +++ b/src/Umbraco.Core/RuntimeState.cs @@ -25,7 +25,6 @@ namespace Umbraco.Core private readonly HashSet _applicationUrls = new HashSet(); private readonly Lazy _mainDom; private readonly Lazy _serverRegistrar; - private RuntimeLevel _level = RuntimeLevel.Unknown; /// /// Initializes a new instance of the class. @@ -87,14 +86,10 @@ namespace Umbraco.Core public string FinalMigrationState { get; internal set; } /// - public RuntimeLevel Level - { - get => _level; - internal set { _level = value; if (value == RuntimeLevel.Run) _runLevel.Set(); } - } + public RuntimeLevel Level { get; internal set; } = RuntimeLevel.Unknown; /// - public RuntimeLevelReason Reason { get; internal set; } + public RuntimeLevelReason Reason { get; internal set; } = RuntimeLevelReason.Unknown; /// /// Ensures that the property has a value. @@ -117,18 +112,6 @@ namespace Umbraco.Core ApplicationUrl = new Uri(ApplicationUrlHelper.GetApplicationUrl(_logger, _globalSettings, _settings, ServerRegistrar, request)); } - private readonly ManualResetEventSlim _runLevel = new ManualResetEventSlim(false); - - /// - /// Waits for the runtime level to become RuntimeLevel.Run. - /// - /// A timeout. - /// True if the runtime level became RuntimeLevel.Run before the timeout, otherwise false. - internal bool WaitForRunLevel(TimeSpan timeout) - { - return _runLevel.WaitHandle.WaitOne(timeout); - } - /// public BootFailedException BootFailedException { get; internal set; } diff --git a/src/Umbraco.Web/Routing/Resources/Booting.html b/src/Umbraco.Web/Routing/Resources/Booting.html deleted file mode 100644 index 7980301c6a..0000000000 --- a/src/Umbraco.Web/Routing/Resources/Booting.html +++ /dev/null @@ -1,9 +0,0 @@ - - - The website is restarting - - -

    The website is restarting

    -

    Please wait while we prepare to serve the page you have requested...

    - - diff --git a/src/Umbraco.Web/Routing/Resources/Failed.html b/src/Umbraco.Web/Routing/Resources/Failed.html deleted file mode 100644 index 2f4856820d..0000000000 --- a/src/Umbraco.Web/Routing/Resources/Failed.html +++ /dev/null @@ -1,8 +0,0 @@ - - - The website cannot start - - -

    The website failed to start :(

    - - diff --git a/src/Umbraco.Web/Routing/Resources/HtmlPages.Designer.cs b/src/Umbraco.Web/Routing/Resources/HtmlPages.Designer.cs deleted file mode 100644 index 206732265e..0000000000 --- a/src/Umbraco.Web/Routing/Resources/HtmlPages.Designer.cs +++ /dev/null @@ -1,99 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Umbraco.Web.Routing.Resources { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class HtmlPages { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal HtmlPages() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Umbraco.Web.Routing.Resources.HtmlPages", typeof(HtmlPages).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to <html> - ///<head> - /// <title>The website is restarting</title> - ///</head> - ///<body> - /// <h1>The website is restarting</h1> - /// <p>Please wait while we prepare to serve the page you have requested...</p> - ///</body> - ///</html> - ///. - /// - internal static string Booting { - get { - return ResourceManager.GetString("Booting", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <html> - ///<head> - /// <title>The website is restarting</title> - ///</head> - ///<body> - /// <h1>The website is restarting</h1> - /// <p>Please wait while we prepare to serve the page you have requested...</p> - ///</body> - ///</html> - ///. - /// - internal static string Failed { - get { - return ResourceManager.GetString("Failed", resourceCulture); - } - } - } -} diff --git a/src/Umbraco.Web/Routing/Resources/HtmlPages.resx b/src/Umbraco.Web/Routing/Resources/HtmlPages.resx deleted file mode 100644 index ac636df305..0000000000 --- a/src/Umbraco.Web/Routing/Resources/HtmlPages.resx +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - booting.html;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 - - - failed.html;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 - - \ No newline at end of file diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 91ffbe68b5..7c6cd630d1 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -182,11 +182,6 @@ - - True - True - HtmlPages.resx - @@ -1210,17 +1205,11 @@ - - ResXFileCodeGenerator - HtmlPages.Designer.cs - - - diff --git a/src/Umbraco.Web/UmbracoInjectedModule.cs b/src/Umbraco.Web/UmbracoInjectedModule.cs index 6da3f90ed9..95819e79d7 100644 --- a/src/Umbraco.Web/UmbracoInjectedModule.cs +++ b/src/Umbraco.Web/UmbracoInjectedModule.cs @@ -257,37 +257,18 @@ namespace Umbraco.Web private bool EnsureRuntime(HttpContextBase httpContext, Uri uri) { - var debug = _runtime.Debug; var level = _runtime.Level; switch (level) { + // we should never handle Unknown nor Boot: the runtime boots in Application_Start + // and as long as it has not booted, no request other than the initial request is + // going to be served (see https://stackoverflow.com/a/21402100) + // we should never handle BootFailed: if boot failed, the pipeline should not run + // at all case RuntimeLevel.Unknown: case RuntimeLevel.Boot: - // not ready yet, but wait - ReportRuntime(level, "Umbraco is booting."); - - // let requests pile up and wait for 10s then show the splash anyway - //fixme: Do we want this for some insane reason? no other site in history has this - if (((RuntimeState) _runtime).WaitForRunLevel(TimeSpan.FromSeconds(10))) return true; - - // redirect to booting page - httpContext.Response.StatusCode = 503; // temp not available - var bootHtml = Routing.Resources.HtmlPages.Booting; - httpContext.Response.AddHeader("Retry-After", debug ? "1" : "30"); // seconds - httpContext.Response.Write(bootHtml); - httpContext.Response.Flush(); - return false; // cannot serve content - case RuntimeLevel.BootFailed: - // redirect to death page - ReportRuntime(level, "Umbraco has failed."); - - httpContext.Response.StatusCode = 503; // temp not available - var deathHtml = Routing.Resources.HtmlPages.Failed; - httpContext.Response.AddHeader("Retry-After", debug ? "1" : "300"); // seconds - httpContext.Response.Write(deathHtml); - httpContext.Response.Flush(); - return false; // cannot serve content + throw new Exception($"panic: Unexpected runtime level: {level}."); case RuntimeLevel.Run: // ok @@ -303,7 +284,7 @@ namespace Umbraco.Web return false; // cannot serve content default: - throw new NotSupportedException($"Unexpected runtime level: {Current.RuntimeState.Level}."); + throw new NotSupportedException($"Unexpected runtime level: {level}."); } } From 6c0321ce72959877e611ced85a1cff8ca41dec33 Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 30 Jan 2019 19:48:42 +1100 Subject: [PATCH 385/437] Fixing trees regression issue --- .../FormDataCollectionExtensions.cs | 19 +++++++++++++++++++ .../Trees/ApplicationTreeController.cs | 10 +++++----- .../Trees/ContentTreeControllerBase.cs | 2 +- src/Umbraco.Web/Trees/MemberTreeController.cs | 4 ++-- .../Trees/TemplatesTreeController.cs | 2 +- 5 files changed, 28 insertions(+), 9 deletions(-) diff --git a/src/Umbraco.Web/FormDataCollectionExtensions.cs b/src/Umbraco.Web/FormDataCollectionExtensions.cs index 95c418525a..52f86dcc59 100644 --- a/src/Umbraco.Web/FormDataCollectionExtensions.cs +++ b/src/Umbraco.Web/FormDataCollectionExtensions.cs @@ -81,5 +81,24 @@ namespace Umbraco.Web ? converted.Result : default(T); } + + /// + /// Returns the object based in the collection based on it's key. This does this with a conversion so if it doesn't convert or the query string is no there an exception is thrown + /// + /// + /// + /// + /// + public static T GetRequiredValue(this FormDataCollection items, string key) + { + var val = items.Get(key); + if (string.IsNullOrEmpty(val)) + throw new InvalidOperationException($"The required query string parameter {key} is missing"); + + var converted = val.TryConvertTo(); + return converted.Success + ? converted.Result + : throw new InvalidOperationException($"The required query string parameter {key} cannot be converted to type {typeof(T)}"); + } } } diff --git a/src/Umbraco.Web/Trees/ApplicationTreeController.cs b/src/Umbraco.Web/Trees/ApplicationTreeController.cs index 28bc464d55..605d5e4352 100644 --- a/src/Umbraco.Web/Trees/ApplicationTreeController.cs +++ b/src/Umbraco.Web/Trees/ApplicationTreeController.cs @@ -47,11 +47,11 @@ namespace Umbraco.Web.Trees ///
    /// The application to load tree for /// An optional single tree alias, if specified will only load the single tree for the request app - /// + /// /// Tree use. /// [HttpQueryStringFilter("queryStrings")] - public async Task GetApplicationTrees(string application, string tree, FormDataCollection querystring, TreeUse use = TreeUse.Main) + public async Task GetApplicationTrees(string application, string tree, FormDataCollection queryStrings, TreeUse use = TreeUse.Main) { application = application.CleanForXss(); @@ -75,7 +75,7 @@ namespace Umbraco.Web.Trees if (t == null) throw new HttpResponseException(HttpStatusCode.NotFound); - var treeRootNode = await GetTreeRootNode(t, Constants.System.Root, querystring); + var treeRootNode = await GetTreeRootNode(t, Constants.System.Root, queryStrings); if (treeRootNode != null) return treeRootNode; @@ -89,7 +89,7 @@ namespace Umbraco.Web.Trees var nodes = new TreeNodeCollection(); foreach (var t in allTrees) { - var node = await TryGetRootNode(t, querystring); + var node = await TryGetRootNode(t, queryStrings); if (node != null) nodes.Add(node); } @@ -115,7 +115,7 @@ namespace Umbraco.Web.Trees var nodes = new TreeNodeCollection(); foreach (var t in trees) { - var node = await TryGetRootNode(t, querystring); + var node = await TryGetRootNode(t, queryStrings); if (node != null) nodes.Add(node); } diff --git a/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs b/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs index bd35fd665f..ca2f2031bb 100644 --- a/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs +++ b/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs @@ -281,7 +281,7 @@ namespace Umbraco.Web.Trees Services.TextService.Localize("general/recycleBin"), "icon-trash", RecycleBinSmells, - queryStrings.GetValue("application") + TreeAlias.EnsureStartsWith('/') + "/recyclebin")); + queryStrings.GetRequiredValue("application") + TreeAlias.EnsureStartsWith('/') + "/recyclebin")); } diff --git a/src/Umbraco.Web/Trees/MemberTreeController.cs b/src/Umbraco.Web/Trees/MemberTreeController.cs index 03c68dd67a..430c5d2111 100644 --- a/src/Umbraco.Web/Trees/MemberTreeController.cs +++ b/src/Umbraco.Web/Trees/MemberTreeController.cs @@ -125,14 +125,14 @@ namespace Umbraco.Web.Trees { nodes.Add( CreateTreeNode(Constants.Conventions.MemberTypes.AllMembersListId, id, queryStrings, Services.TextService.Localize("member/allMembers"), "icon-users", true, - queryStrings.GetValue("application") + TreeAlias.EnsureStartsWith('/') + "/list/" + Constants.Conventions.MemberTypes.AllMembersListId)); + queryStrings.GetRequiredValue("application") + TreeAlias.EnsureStartsWith('/') + "/list/" + Constants.Conventions.MemberTypes.AllMembersListId)); if (_isUmbracoProvider) { nodes.AddRange(Services.MemberTypeService.GetAll() .Select(memberType => CreateTreeNode(memberType.Alias, id, queryStrings, memberType.Name, "icon-users", true, - queryStrings.GetValue("application") + TreeAlias.EnsureStartsWith('/') + "/list/" + memberType.Alias))); + queryStrings.GetRequiredValue("application") + TreeAlias.EnsureStartsWith('/') + "/list/" + memberType.Alias))); } } diff --git a/src/Umbraco.Web/Trees/TemplatesTreeController.cs b/src/Umbraco.Web/Trees/TemplatesTreeController.cs index 79a59435a0..916e5d4b4d 100644 --- a/src/Umbraco.Web/Trees/TemplatesTreeController.cs +++ b/src/Umbraco.Web/Trees/TemplatesTreeController.cs @@ -75,7 +75,7 @@ namespace Umbraco.Web.Trees //Create the normal create action var item = menu.Items.Add(Services.TextService, opensDialog: true); - item.NavigateToRoute($"{queryStrings.GetValue("application")}/templates/edit/{id}?create=true"); + item.NavigateToRoute($"{queryStrings.GetRequiredValue("application")}/templates/edit/{id}?create=true"); if (id == Constants.System.Root.ToInvariantString()) { From 6ff787046b595c9b19e4d18fd588f039766173e9 Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 30 Jan 2019 19:52:24 +1100 Subject: [PATCH 386/437] Fixing trees regression issue --- src/Umbraco.Web/Trees/LogViewerTreeController.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Umbraco.Web/Trees/LogViewerTreeController.cs b/src/Umbraco.Web/Trees/LogViewerTreeController.cs index 3d9490b9a0..7452828d00 100644 --- a/src/Umbraco.Web/Trees/LogViewerTreeController.cs +++ b/src/Umbraco.Web/Trees/LogViewerTreeController.cs @@ -9,6 +9,7 @@ namespace Umbraco.Web.Trees [UmbracoTreeAuthorize(Constants.Trees.LogViewer)] [Tree(Constants.Applications.Settings, Constants.Trees.LogViewer, SortOrder= 9, TreeGroup = Constants.Trees.Groups.Settings)] [PluginController("UmbracoTrees")] + [CoreTree] public class LogViewerTreeController : TreeController { protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) From bf7372c6ba8c3cc26fb1b4a55eee23fefff5133b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Wed, 30 Jan 2019 10:16:32 +0100 Subject: [PATCH 387/437] V8: Color corrections for several components --- .../src/less/components/html/umb-alert.less | 2 +- .../src/less/components/umb-grid.less | 39 ++++++++++--------- .../less/components/umb-group-builder.less | 2 +- .../src/less/components/umb-lightbox.less | 8 +++- .../less/components/umb-load-indicator.less | 6 +-- .../less/components/umb-nested-content.less | 6 +-- .../src/less/components/umb-node-preview.less | 8 ++-- .../src/less/components/umb-packages.less | 15 ++++--- .../src/less/components/umb-querybuilder.less | 8 ++-- .../src/less/components/umb-range-slider.less | 3 +- .../src/less/components/umb-sub-views.less | 3 +- .../src/less/components/umb-tabs.less | 2 +- .../src/less/dashboards.less | 2 +- .../src/less/gridview.less | 16 ++++---- .../src/less/healthcheck.less | 2 +- src/Umbraco.Web.UI.Client/src/less/main.less | 4 +- .../src/less/variables.less | 4 +- 17 files changed, 69 insertions(+), 61 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/components/html/umb-alert.less b/src/Umbraco.Web.UI.Client/src/less/components/html/umb-alert.less index 934992fc6e..133f9da358 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/html/umb-alert.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/html/umb-alert.less @@ -1,7 +1,7 @@ .umb-alert { padding: 15px; box-sizing: border-box; - background-color: @turquoise-washed; + background-color: @blueLight; border: 1px solid @blueMid; } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-grid.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-grid.less index 9dc6aa1906..e7f24d08fa 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-grid.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-grid.less @@ -15,7 +15,7 @@ // sortable-helper .umb-grid .ui-sortable-helper { position: absolute !important; - background-color: @turquoise !important; + background-color: @blueMid !important; height: 42px !important; width: 42px !important; overflow: hidden; @@ -47,7 +47,7 @@ position: absolute; left: 0; right: 0; - background-color: @turquoise; + background-color: @blueMid; height: 2px; margin-bottom: 20px; @@ -56,7 +56,7 @@ top: -9px; font-family: "icomoon"; font-size: 18px; - color: @turquoise; + color: @blueMid; } &:before { @@ -169,7 +169,7 @@ transition: border-color 100ms linear; &:hover { - border-color: @turquoise; + border-color: @blueMid; cursor: pointer; } } @@ -202,13 +202,14 @@ cursor: pointer; float: right; &:hover { - color: @turquoise-d1; + color: @ui-action-type-hover; } } .umb-grid .cell-tools-add { - color: @turquoise-d1; + color: @ui-action-type; &:focus, &:hover { + color: @ui-action-type-hover; text-decoration: none; } } @@ -218,7 +219,7 @@ top: 50%; left: 50%; transform: translate(-50%, -50%); - color: @turquoise-d1; + color: @ui-action-type; } .umb-grid .cell-tools-add.-bar { @@ -306,7 +307,7 @@ } .umb-control-collapsed:hover { - border-color: @turquoise; + border-color: @ui-action-border-hover } .umb-grid .umb-control-click-overlay { @@ -319,7 +320,7 @@ opacity: 0; cursor: pointer; &:hover { - background-color: @turquoise; + background-color: @ui-action-type-hover; opacity: 0.1; transition: opacity 0.1s; } @@ -411,7 +412,7 @@ // Row states .umb-grid .umb-row.-active { - background-color: @turquoise-d1; + background-color: @ui-action-type; .umb-row-title-bar { cursor: move; @@ -474,7 +475,7 @@ .umb-cell-content.-has-editors { box-shadow: 3px 3px 6px rgba(0, 0, 0, .07); - border-color: @turquoise; + border-color: @ui-action-border; } } @@ -577,9 +578,9 @@ margin: 2px; &:hover, &:hover * { - background: @turquoise !important; + background: @ui-action-type-hover !important; color: @white !important; - border-color: @turquoise !important; + border-color: @ui-action-type-hover !important; text-decoration: none; } } @@ -709,7 +710,7 @@ } .umb-grid .umb-control.-active { - border-color: @turquoise; + border-color: @ui-action-border; } .umb-grid .umb-templates-columns { @@ -722,7 +723,7 @@ .umb-grid .umb-control-bar { opacity: 0; - background: @turquoise; + background: @ui-action-type; padding: 2px 5px; color: @white; font-size: 12px; @@ -775,7 +776,7 @@ } .umb-grid .umb-templates-template a.tb:hover { - border: 5px solid @turquoise; + border: 5px solid @blueMid; } .umb-grid .umb-templates-template .tb { @@ -805,7 +806,7 @@ .umb-grid a.umb-templates-column:hover, .umb-grid a.umb-templates-column.selected { - background-color: @turquoise; + background-color: @blueMid; } @@ -855,7 +856,7 @@ } &:hover { - border-color: @turquoise; + border-color: @blueMid; cursor: pointer; } @@ -997,7 +998,7 @@ font-size: 12px; &:hover, &:hover * { - background: @turquoise; + background: @blueMid; color: @white; } } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-group-builder.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-group-builder.less index 33df17c754..331fd9eb66 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-group-builder.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-group-builder.less @@ -93,7 +93,7 @@ } .umb-group-builder__group-title.-active { - border-color: @turquoise; + border-color: @blueMid; } .umb-group-builder__group-title.-placeholder { diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-lightbox.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-lightbox.less index dca263ea0c..96636a3096 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-lightbox.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-lightbox.less @@ -64,6 +64,11 @@ justify-content: center; cursor: pointer; position: absolute; + &:hover { + .umb-lightbox__control-icon, &::before { + color: @ui-active-type-hover; + } + } } .umb-lightbox__control.-next { @@ -79,6 +84,7 @@ } .umb-lightbox__control-icon { - color: @turquoise; + color: @ui-active-type; font-size: 20px; + } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-load-indicator.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-load-indicator.less index 38e0b643a2..7960ff8603 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-load-indicator.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-load-indicator.less @@ -20,7 +20,7 @@ margin: 0; height: 6px; width: 6px; - border: 2px solid @turquoise-d1; + border: 2px solid @blueMid; border-radius: 100%; transform: transformZ(0); animation: umbLoadIndicatorAnimation 1.4s infinite; @@ -44,7 +44,7 @@ @keyframes umbLoadIndicatorAnimation { 0% { transform: scale(0.5); - background: @turquoise-d1; + background: @blueMid; } 50% { transform: scale(1); @@ -52,6 +52,6 @@ } 100% { transform: scale(0.5); - background: @turquoise-d1; + background: @blueMid; } } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-nested-content.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-nested-content.less index 6ddd9d8d50..631ef5c2bd 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-nested-content.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-nested-content.less @@ -131,8 +131,8 @@ .umb-nested-content__icon--active { color: @white; - background: @turquoise-d1; - border-color: @turquoise-d1; + background: @blueMid; + border-color: @blueMid; text-decoration: none; } @@ -224,4 +224,4 @@ .umb-textarea, .umb-textstring { width:100%; } -} \ No newline at end of file +} diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less index 5b27206fc2..b054ddf907 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less @@ -89,16 +89,16 @@ display: flex; align-items: center; justify-content: center; - border: 1px dashed @gray-7; - color: @ui-action-type; + border: 1px dashed @ui-action-disgrete-border; + color: @ui-action-disgrete-type; font-weight: bold; padding: 5px 15px; box-sizing: border-box; } .umb-node-preview-add:hover { - color: @ui-action-type-hover; - border-color: @ui-action-type-hover; + color: @ui-action-disgrete-type-hover; + border-color: @ui-action-disgrete-border-hover; text-decoration: none; } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-packages.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-packages.less index a517605c4a..45170c9602 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-packages.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-packages.less @@ -73,7 +73,7 @@ box-shadow: 0 1px 1px 0 rgba(0,0,0,0.16); &:hover { - border-color: @turquoise; + border-color: @blueMid; } } @@ -236,10 +236,13 @@ } -.umb-packages-category:hover, -.umb-packages-category.-active { +.umb-packages-category:hover { + color: @ui-active-type-hover; text-decoration: none; - color: @turquoise; +} +.umb-packages-category.-active { + color: @ui-active-type; + background-color: @ui-active; } .umb-packages-category.-first { @@ -403,7 +406,7 @@ a.umb-package-details__back-link { .umb-gallery__thumbnail { flex: 0 1 100px; - border: 1px solid @gray-8; + border: 1px solid @ui-action-disgrete-border; border-radius: 3px; margin: 5px; padding: 10px; @@ -413,7 +416,7 @@ a.umb-package-details__back-link { .umb-gallery__thumbnail:hover { cursor: pointer; - border-color: @turquoise; + border-color: @ui-action-disgrete-border-hover; } /* PACKAGE LIST */ diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-querybuilder.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-querybuilder.less index 151415f0db..4d6054009f 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-querybuilder.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-querybuilder.less @@ -7,8 +7,8 @@ padding: 5px 8px; margin: 0 5px; font-weight: bold; - background-color: @turquoise-washed; - border: 1px solid @turquoise-l1; + background-color: @ui-action; + border: 1px solid @ui-action-border; border-radius: 3px; text-align: center; display: inline-block; @@ -16,8 +16,8 @@ } .umb-querybuilder .row a.btn:hover { - background-color: @turquoise-washed; - border: 1px solid @turquoise-d1; + background-color: @ui-action-hover; + border: 1px solid @ui-action-border-hover; text-decoration: none; } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-range-slider.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-range-slider.less index 1c21c5a148..1461d0f223 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-range-slider.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-range-slider.less @@ -14,7 +14,7 @@ box-shadow: none; width: 20px !important; height: 20px !important; - background-color: @turquoise; + background-color: @blueMid; } .umb-range-slider .noUi-handle::before { @@ -36,4 +36,3 @@ .umb-range-slider .noUi-marker.noUi-marker-horizontal { width: 1px; } - diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-sub-views.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-sub-views.less index 6c64787d23..d3ce368356 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-sub-views.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-sub-views.less @@ -21,7 +21,7 @@ margin-left: 15px; &.is-active { .btn-link { - color: @turquoise-d1 !important; + color: @blueMid !important; } } } @@ -37,4 +37,3 @@ } } - diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-tabs.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-tabs.less index f22d8b3a16..ee784787fa 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-tabs.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-tabs.less @@ -91,7 +91,7 @@ } .umb-tabs-tray-item--active { - border-left: 2px solid @turquoise; + border-left: 2px solid @ui-active; } .umb-tab--expand > a > i { diff --git a/src/Umbraco.Web.UI.Client/src/less/dashboards.less b/src/Umbraco.Web.UI.Client/src/less/dashboards.less index 0ddef2e8b1..7bf38e1583 100644 --- a/src/Umbraco.Web.UI.Client/src/less/dashboards.less +++ b/src/Umbraco.Web.UI.Client/src/less/dashboards.less @@ -95,7 +95,7 @@ } .video_player video:hover + .video-controls .progress-bar, .video-controls:hover .progress-bar { - background: @turquoise-d1; + background: @blueMid; } } diff --git a/src/Umbraco.Web.UI.Client/src/less/gridview.less b/src/Umbraco.Web.UI.Client/src/less/gridview.less index 6240c8c365..469ab2becf 100644 --- a/src/Umbraco.Web.UI.Client/src/less/gridview.less +++ b/src/Umbraco.Web.UI.Client/src/less/gridview.less @@ -249,11 +249,11 @@ } .usky-grid .infohighlight, .usky-grid .td.last.infohighlight{ - border: 1px dashed @turquoise !important; + border: 1px dashed @blueMid !important; } .usky-grid .warnhighlight > ins.item-label{border-color: @red; color: @red;} -.usky-grid .infohighlight > ins.item-label{border-color: @turquoise; color: @turquoise;} +.usky-grid .infohighlight > ins.item-label{border-color: @blueMid; color: @blueMid;} .usky-grid ins.item-label { @@ -395,9 +395,9 @@ } .usky-grid .iconBox:hover, .usky-grid .iconBox:hover *{ - background: @turquoise !important; + background: @blueMid !important; color: @white !important; - border-color: @turquoise !important; + border-color: @blueMid !important; text-decoration:none; } @@ -589,7 +589,7 @@ } .usky-grid .uSky-templates-template a.tb:hover { - border:5px solid @turquoise; + border:5px solid @blueMid; } .usky-grid .uSky-templates-template .tb { @@ -618,7 +618,7 @@ } .usky-grid a.uSky-templates-column:hover, .usky-grid a.uSky-templates-column.selected{ - background-color: @turquoise; + background-color: @blueMid; } @@ -672,7 +672,7 @@ } &:hover { - border-color: @turquoise; + border-color: @blueMid; cursor: pointer; } @@ -802,7 +802,7 @@ } .usky-grid .elements li:hover, .usky-grid .elements li:hover *{ - background: @turquoise; + background: @blueMid; color: @white; } diff --git a/src/Umbraco.Web.UI.Client/src/less/healthcheck.less b/src/Umbraco.Web.UI.Client/src/less/healthcheck.less index 9e1362d50a..23bbbf4931 100644 --- a/src/Umbraco.Web.UI.Client/src/less/healthcheck.less +++ b/src/Umbraco.Web.UI.Client/src/less/healthcheck.less @@ -133,7 +133,7 @@ } .umb-healthcheck-group__details-group-title { - background-color: @purple-l1; + background-color: @blueExtraDark; padding: 10px 20px; display: flex; align-items: center; diff --git a/src/Umbraco.Web.UI.Client/src/less/main.less b/src/Umbraco.Web.UI.Client/src/less/main.less index b363170ebc..bf30b26777 100644 --- a/src/Umbraco.Web.UI.Client/src/less/main.less +++ b/src/Umbraco.Web.UI.Client/src/less/main.less @@ -51,10 +51,10 @@ h5.-black { width: auto !important; td { &.active, span.active { - background: @turquoise !important; + background: @blueMid !important; } &.today:not(.active):before { - border-bottom-color: @purple-l1 !important; + border-bottom-color: @pinkLight !important; } a[data-action] { padding: 0 !important; diff --git a/src/Umbraco.Web.UI.Client/src/less/variables.less b/src/Umbraco.Web.UI.Client/src/less/variables.less index 8add7c9002..e66c3de597 100644 --- a/src/Umbraco.Web.UI.Client/src/less/variables.less +++ b/src/Umbraco.Web.UI.Client/src/less/variables.less @@ -162,9 +162,9 @@ @ui-action-disgrete: white; @ui-action-disgrete-hover: @sand-7; -@ui-action-disgrete-type: @gray-4; +@ui-action-disgrete-type: @blueExtraDark; @ui-action-disgrete-type-hover: @blueMid; -@ui-action-disgrete-border: @gray-4; +@ui-action-disgrete-border: @gray-7; @ui-action-disgrete-border-hover: @blueMid; @type-white: @white; From c213408b925dd827777b7feb2f77b32b0f63ef2c Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 30 Jan 2019 20:24:42 +1100 Subject: [PATCH 388/437] Changes OperatorFactory to internal --- .../Models/TemplateQuery/OperatorFactory.cs | 4 +- .../Models/TemplateQuery/QueryCondition.cs | 73 +------------------ 2 files changed, 3 insertions(+), 74 deletions(-) diff --git a/src/Umbraco.Web/Models/TemplateQuery/OperatorFactory.cs b/src/Umbraco.Web/Models/TemplateQuery/OperatorFactory.cs index 0b595723f1..0bae72186a 100644 --- a/src/Umbraco.Web/Models/TemplateQuery/OperatorFactory.cs +++ b/src/Umbraco.Web/Models/TemplateQuery/OperatorFactory.cs @@ -2,7 +2,7 @@ using System; namespace Umbraco.Web.Models.TemplateQuery { - public static class OperatorFactory + internal static class OperatorFactory { public static Operator FromString(string stringOperator) { @@ -29,4 +29,4 @@ namespace Umbraco.Web.Models.TemplateQuery } } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Web/Models/TemplateQuery/QueryCondition.cs b/src/Umbraco.Web/Models/TemplateQuery/QueryCondition.cs index a58badcf2c..27cf901e49 100644 --- a/src/Umbraco.Web/Models/TemplateQuery/QueryCondition.cs +++ b/src/Umbraco.Web/Models/TemplateQuery/QueryCondition.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Reflection; +using System.Collections.Generic; using Umbraco.Core.Models.PublishedContent; namespace Umbraco.Web.Models.TemplateQuery @@ -12,72 +9,4 @@ namespace Umbraco.Web.Models.TemplateQuery public OperatorTerm Term { get; set; } public string ConstraintValue { get; set; } } - - internal static class QueryConditionExtensions - { - private static Lazy StringContainsMethodInfo => - new Lazy(() => typeof(string).GetMethod("Contains", new[] {typeof(string)})); - - public static Expression> BuildCondition(this QueryCondition condition, string parameterAlias) - { - object constraintValue; - switch (condition.Property.Type.ToLowerInvariant()) - { - case "string": - constraintValue = condition.ConstraintValue; - break; - case "datetime": - constraintValue = DateTime.Parse(condition.ConstraintValue); - break; - case "boolean": - constraintValue = Boolean.Parse(condition.ConstraintValue); - break; - default: - constraintValue = Convert.ChangeType(condition.ConstraintValue, typeof(int)); - break; - } - - var parameterExpression = Expression.Parameter(typeof(T), parameterAlias); - var propertyExpression = Expression.Property(parameterExpression, condition.Property.Alias); - - var valueExpression = Expression.Constant(constraintValue); - Expression bodyExpression; - switch (condition.Term.Operator) - { - case Operator.NotEquals: - bodyExpression = Expression.NotEqual(propertyExpression, valueExpression); - break; - case Operator.GreaterThan: - bodyExpression = Expression.GreaterThan(propertyExpression, valueExpression); - break; - case Operator.GreaterThanEqualTo: - bodyExpression = Expression.GreaterThanOrEqual(propertyExpression, valueExpression); - break; - case Operator.LessThan: - bodyExpression = Expression.LessThan(propertyExpression, valueExpression); - break; - case Operator.LessThanEqualTo: - bodyExpression = Expression.LessThanOrEqual(propertyExpression, valueExpression); - break; - case Operator.Contains: - bodyExpression = Expression.Call(propertyExpression, StringContainsMethodInfo.Value, - valueExpression); - break; - case Operator.NotContains: - var tempExpression = Expression.Call(propertyExpression, StringContainsMethodInfo.Value, - valueExpression); - bodyExpression = Expression.Equal(tempExpression, Expression.Constant(false)); - break; - default: - case Operator.Equals: - bodyExpression = Expression.Equal(propertyExpression, valueExpression); - break; - } - - var predicate = - Expression.Lambda>(bodyExpression.Reduce(), parameterExpression); - - return predicate; - } - } } From 7bb0eb109abd38db2759331f08ce137c18e5a916 Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 30 Jan 2019 20:31:44 +1100 Subject: [PATCH 389/437] moves class to separate file --- .../TemplateQuery/QueryConditionExtensions.cs | 74 +++++++++++++++++++ src/Umbraco.Web/Umbraco.Web.csproj | 1 + 2 files changed, 75 insertions(+) create mode 100644 src/Umbraco.Web/Models/TemplateQuery/QueryConditionExtensions.cs diff --git a/src/Umbraco.Web/Models/TemplateQuery/QueryConditionExtensions.cs b/src/Umbraco.Web/Models/TemplateQuery/QueryConditionExtensions.cs new file mode 100644 index 0000000000..f01d247b1f --- /dev/null +++ b/src/Umbraco.Web/Models/TemplateQuery/QueryConditionExtensions.cs @@ -0,0 +1,74 @@ +using System; +using System.Linq.Expressions; +using System.Reflection; + +namespace Umbraco.Web.Models.TemplateQuery +{ + internal static class QueryConditionExtensions + { + private static Lazy StringContainsMethodInfo => + new Lazy(() => typeof(string).GetMethod("Contains", new[] {typeof(string)})); + + public static Expression> BuildCondition(this QueryCondition condition, string parameterAlias) + { + object constraintValue; + switch (condition.Property.Type.ToLowerInvariant()) + { + case "string": + constraintValue = condition.ConstraintValue; + break; + case "datetime": + constraintValue = DateTime.Parse(condition.ConstraintValue); + break; + case "boolean": + constraintValue = Boolean.Parse(condition.ConstraintValue); + break; + default: + constraintValue = Convert.ChangeType(condition.ConstraintValue, typeof(int)); + break; + } + + var parameterExpression = Expression.Parameter(typeof(T), parameterAlias); + var propertyExpression = Expression.Property(parameterExpression, condition.Property.Alias); + + var valueExpression = Expression.Constant(constraintValue); + Expression bodyExpression; + switch (condition.Term.Operator) + { + case Operator.NotEquals: + bodyExpression = Expression.NotEqual(propertyExpression, valueExpression); + break; + case Operator.GreaterThan: + bodyExpression = Expression.GreaterThan(propertyExpression, valueExpression); + break; + case Operator.GreaterThanEqualTo: + bodyExpression = Expression.GreaterThanOrEqual(propertyExpression, valueExpression); + break; + case Operator.LessThan: + bodyExpression = Expression.LessThan(propertyExpression, valueExpression); + break; + case Operator.LessThanEqualTo: + bodyExpression = Expression.LessThanOrEqual(propertyExpression, valueExpression); + break; + case Operator.Contains: + bodyExpression = Expression.Call(propertyExpression, StringContainsMethodInfo.Value, + valueExpression); + break; + case Operator.NotContains: + var tempExpression = Expression.Call(propertyExpression, StringContainsMethodInfo.Value, + valueExpression); + bodyExpression = Expression.Equal(tempExpression, Expression.Constant(false)); + break; + default: + case Operator.Equals: + bodyExpression = Expression.Equal(propertyExpression, valueExpression); + break; + } + + var predicate = + Expression.Lambda>(bodyExpression.Reduce(), parameterExpression); + + return predicate; + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index c399f3f3ae..9bce93b0ff 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -182,6 +182,7 @@ + From 90eae73d9bfd4712155828cc1004716f9f227cd9 Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 30 Jan 2019 20:33:14 +1100 Subject: [PATCH 390/437] By default allow all trees to support both main and dialog usages --- src/Umbraco.Web/Trees/TreeAttribute.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Trees/TreeAttribute.cs b/src/Umbraco.Web/Trees/TreeAttribute.cs index 5b51d8605e..56de7023f8 100644 --- a/src/Umbraco.Web/Trees/TreeAttribute.cs +++ b/src/Umbraco.Web/Trees/TreeAttribute.cs @@ -40,7 +40,7 @@ namespace Umbraco.Web.Trees /// /// Gets the usage of the tree. /// - public TreeUse TreeUse { get; set; } = TreeUse.Main; + public TreeUse TreeUse { get; set; } = TreeUse.Main | TreeUse.Dialog; /// /// Gets or sets the tree icon when closed. From 0cdccc1a9be6b631d0d684ad6f556433a94cce93 Mon Sep 17 00:00:00 2001 From: Callum Whyte Date: Wed, 30 Jan 2019 22:01:57 +1100 Subject: [PATCH 391/437] V8: Removing legacy content tree menu items (#4278) --- src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 1 + src/Umbraco.Web/Models/Trees/MenuItem.cs | 41 +++------- .../Trees/ContentTreeController.cs | 20 +++-- .../Trees/LegacyTreeDataConverter.cs | 76 ------------------- src/Umbraco.Web/Umbraco.Web.csproj | 1 - 5 files changed, 24 insertions(+), 115 deletions(-) delete mode 100644 src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index 600bfc9775..38f43f344f 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -166,6 +166,7 @@ + diff --git a/src/Umbraco.Web/Models/Trees/MenuItem.cs b/src/Umbraco.Web/Models/Trees/MenuItem.cs index 9dd5524f76..9d4c76eea1 100644 --- a/src/Umbraco.Web/Models/Trees/MenuItem.cs +++ b/src/Umbraco.Web/Models/Trees/MenuItem.cs @@ -3,11 +3,8 @@ using System.Runtime.Serialization; using Umbraco.Web.Trees; using System.Collections.Generic; using Umbraco.Core; -using Umbraco.Core.Models.Entities; using Umbraco.Core.Services; using Umbraco.Web.Actions; -using Umbraco.Web.Composing; - namespace Umbraco.Web.Models.Trees { @@ -157,7 +154,7 @@ namespace Umbraco.Web.Models.Trees public void LaunchDialogView(string view, string dialogTitle) { SetDialogTitle(dialogTitle); - AdditionalData[ActionViewKey] = view; + SetActionView(view); } /// @@ -186,6 +183,15 @@ namespace Umbraco.Web.Models.Trees AdditionalData[DialogTitleKey] = dialogTitle; } + /// + /// Configures the menu item to launch a specific view + /// + /// + private void SetActionView(string view) + { + AdditionalData[ActionViewKey] = view; + } + /// /// Configures the menu item to launch a URL with the specified action (dialog or new window) /// @@ -197,33 +203,6 @@ namespace Umbraco.Web.Models.Trees AdditionalData[ActionUrlMethodKey] = method; } - internal void ConvertLegacyMenuItem(IUmbracoEntity item, string nodeType, string currentSection) - { - // try to get a URL/title from the legacy action, - // in some edge cases, item can be null so we'll just convert those to "-1" and "" for id and name since these edge cases don't need that. - var attempt = LegacyTreeDataConverter.GetUrlAndTitleFromLegacyAction(Action, - item == null ? "-1" : item.Id.ToInvariantString(), - nodeType, - item == null ? "" : item.Name, currentSection); - if (attempt) - { - var action = attempt.Result; - LaunchDialogUrl(action.Url, action.DialogTitle); - } - else - { - // if that doesn't work, try to get the legacy confirm view - var attempt2 = LegacyTreeDataConverter.GetLegacyConfirmView(Action); - if (attempt2) - { - var view = attempt2.Result; - var textService = Current.Services.TextService; - LaunchDialogView(view, textService.Localize("defaultdialogs/confirmdelete") + " '" + (item == null ? "" : item.Name) + "' ?"); - } - } - } - #endregion - } } diff --git a/src/Umbraco.Web/Trees/ContentTreeController.cs b/src/Umbraco.Web/Trees/ContentTreeController.cs index 1609e966e5..b90e1964b8 100644 --- a/src/Umbraco.Web/Trees/ContentTreeController.cs +++ b/src/Umbraco.Web/Trees/ContentTreeController.cs @@ -214,7 +214,9 @@ namespace Umbraco.Web.Trees // set names according to variations foreach (var entity in result) + { EnsureName(entity, cultureVal); + } return result; } @@ -235,7 +237,8 @@ namespace Umbraco.Web.Trees AddActionNode(item, menu, true); AddActionNode(item, menu, opensDialog: true); AddActionNode(item, menu, opensDialog: true); - AddActionNode(item, menu, true, convert: true, opensDialog: true); + AddActionNode(item, menu, true, opensDialog: true); + if (EmailSender.CanSendRequiredEmail) { menu.Items.Add(new MenuItem("notify", Services.TextService) @@ -267,7 +270,6 @@ namespace Umbraco.Web.Trees return menu; } - /// /// set name according to variations @@ -279,12 +281,17 @@ namespace Umbraco.Web.Trees if (culture == null) { if (string.IsNullOrWhiteSpace(entity.Name)) + { entity.Name = "[[" + entity.Id + "]]"; + } + return; } if (!(entity is IDocumentEntitySlim docEntity)) + { throw new InvalidOperationException($"Cannot render a tree node for a culture when the entity isn't {typeof(IDocumentEntitySlim)}, instead it is {entity.GetType()}"); + } // we are getting the tree for a given culture, // for those items that DO support cultures, we need to get the proper name, IF it exists @@ -304,16 +311,15 @@ namespace Umbraco.Web.Trees } if (string.IsNullOrWhiteSpace(entity.Name)) + { entity.Name = "[[" + entity.Id + "]]"; + } } - // TODO: Remove the need for converting to legacy - private void AddActionNode(IUmbracoEntity item, MenuItemCollection menu, bool hasSeparator = false, bool convert = false, bool opensDialog = false) + private void AddActionNode(IUmbracoEntity item, MenuItemCollection menu, bool hasSeparator = false, bool opensDialog = false) where TAction : IAction { - var menuItem = menu.Items.Add(Services.TextService.Localize("actions", _actions.GetAction().Alias), hasSeparator); - if (convert) menuItem.ConvertLegacyMenuItem(item, "content", "content"); - menuItem.OpensDialog = opensDialog; + var menuItem = menu.Items.Add(Services.TextService.Localize("actions", _actions.GetAction().Alias), hasSeparator, opensDialog); } public IEnumerable Search(string query, int pageSize, long pageIndex, out long totalFound, string searchFrom = null) diff --git a/src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs b/src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs deleted file mode 100644 index 4936ce6541..0000000000 --- a/src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using Umbraco.Core; -using Umbraco.Core.Services; -using Umbraco.Web.Actions; - -using Umbraco.Web.Composing; - -namespace Umbraco.Web.Trees -{ - /// - /// Converts the legacy tree data to the new format - /// - internal class LegacyTreeDataConverter - { - // TODO: remove this whole class when everything is angularized - - /// - /// This will look at the legacy IAction's JsFunctionName and convert it to a confirmation dialog view if possible - /// - /// - /// - internal static Attempt GetLegacyConfirmView(IAction action) - { - switch (action) - { - case ActionDelete actionDelete: - return Attempt.Succeed( - Current.Configs.Global().Path.EnsureEndsWith('/') + "views/common/dialogs/legacydelete.html"); - } - - return Attempt.Fail(); - } - - /// - /// This will look at a legacy IAction's JsFunctionName and convert it to a URL if possible. - /// - /// - /// - /// - /// - /// - internal static Attempt GetUrlAndTitleFromLegacyAction(IAction action, string nodeId, string nodeType, string nodeName, string currentSection) - { - switch (action) - - { - case ActionNew actionNew: - return Attempt.Succeed( - new LegacyUrlAction( - "create.aspx?nodeId=" + nodeId + "&nodeType=" + nodeType + "&nodeName=" + nodeName + "&rnd=" + DateTime.UtcNow.Ticks, - Current.Services.TextService.Localize("actions/create"))); - } - return Attempt.Fail(); - } - - internal class LegacyUrlAction - { - public LegacyUrlAction(string url, string dialogTitle) - : this(url, dialogTitle, ActionUrlMethod.Dialog) - { - - } - - public LegacyUrlAction(string url, string dialogTitle, ActionUrlMethod actionMethod) - { - Url = url; - ActionMethod = actionMethod; - DialogTitle = dialogTitle; - } - - public string Url { get; private set; } - public ActionUrlMethod ActionMethod { get; private set; } - public string DialogTitle { get; private set; } - } - } -} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 8144056128..301ffffc98 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -257,7 +257,6 @@ - From 31765a7a471538afe2d03e9abddecd8b51c296ec Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Tue, 29 Jan 2019 21:38:37 +0100 Subject: [PATCH 392/437] Remove the tooltip position flickering --- .../directives/components/umbtooltip.directive.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbtooltip.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbtooltip.directive.js index 34006a3cec..ef7006be2c 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbtooltip.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbtooltip.directive.js @@ -69,7 +69,7 @@ Use this directive to render a tooltip. (function() { 'use strict'; - function TooltipDirective($timeout) { + function TooltipDirective() { function link(scope, el, attr, ctrl) { @@ -77,14 +77,6 @@ Use this directive to render a tooltip. scope.tooltipStyles.left = 0; scope.tooltipStyles.top = 0; - function activate() { - - $timeout(function() { - setTooltipPosition(scope.event); - }); - - } - function setTooltipPosition(event) { var container = $("#contentwrapper"); @@ -141,7 +133,7 @@ Use this directive to render a tooltip. } - activate(); + setTooltipPosition(scope.event); } From fccfa4f412c334ce4fae5441c3b6b60f5ae166dd Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 30 Jan 2019 23:42:25 +1100 Subject: [PATCH 393/437] Removes umbraco settings: ImageTagAllowedAttributes, UploadAllowDirectories, ensureUniqueNaming, ImageTagAllowedAttributes, ScriptEditorDisable, ScriptFolderPath, UploadAllowDirectories --- .../UmbracoSettings/ContentElement.cs | 21 -- .../UmbracoSettings/ContentImagingElement.cs | 12 - .../ContentScriptEditorElement.cs | 27 -- .../UmbracoSettings/IContentSection.cs | 12 - src/Umbraco.Core/IO/IOHelper.cs | 2 +- .../OriginalMediaPathScheme.cs | 6 +- .../Implement/DocumentBlueprintRepository.cs | 7 +- .../Implement/DocumentRepository.cs | 8 +- .../Repositories/Implement/MediaRepository.cs | 10 +- .../Implement/ScriptRepository.cs | 2 +- src/Umbraco.Core/Umbraco.Core.csproj | 1 - .../UmbracoSettings/ContentElementTests.cs | 34 +-- .../Repositories/ContentTypeRepositoryTest.cs | 2 +- .../Repositories/DocumentRepositoryTest.cs | 2 +- .../Repositories/DomainRepositoryTest.cs | 2 +- .../Repositories/MediaRepositoryTest.cs | 2 +- .../PublicAccessRepositoryTest.cs | 2 +- .../Repositories/TagRepositoryTest.cs | 4 +- .../Repositories/TemplateRepositoryTest.cs | 2 +- .../Repositories/UserRepositoryTest.cs | 4 +- .../Services/ContentServicePerformanceTest.cs | 8 +- .../Services/ContentServiceTests.cs | 2 +- .../config/umbracoSettings.Release.config | 6 +- .../config/umbracoSettings.config | 279 +++++++++--------- ...404.cs => ContentFinderByConfigured404.cs} | 12 +- src/Umbraco.Web/Runtime/WebRuntimeComposer.cs | 2 +- src/Umbraco.Web/Umbraco.Web.csproj | 2 +- 27 files changed, 175 insertions(+), 298 deletions(-) delete mode 100644 src/Umbraco.Core/Configuration/UmbracoSettings/ContentScriptEditorElement.cs rename src/Umbraco.Web/Routing/{ContentFinderByLegacy404.cs => ContentFinderByConfigured404.cs} (84%) diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs index abeaa8542a..de2f9d4c9e 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs @@ -11,15 +11,9 @@ namespace Umbraco.Core.Configuration.UmbracoSettings [ConfigurationProperty("imaging")] internal ContentImagingElement Imaging => (ContentImagingElement) this["imaging"]; - [ConfigurationProperty("scripteditor")] - internal ContentScriptEditorElement ScriptEditor => (ContentScriptEditorElement) this["scripteditor"]; - [ConfigurationProperty("ResolveUrlsFromTextString")] internal InnerTextConfigurationElement ResolveUrlsFromTextString => GetOptionalTextElement("ResolveUrlsFromTextString", false); - [ConfigurationProperty("UploadAllowDirectories")] - internal InnerTextConfigurationElement UploadAllowDirectories => GetOptionalTextElement("UploadAllowDirectories", true); - public IEnumerable Error404Collection => Errors.Error404Collection; [ConfigurationProperty("errors", IsRequired = true)] @@ -28,9 +22,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings [ConfigurationProperty("notifications", IsRequired = true)] internal NotificationsElement Notifications => (NotificationsElement) base["notifications"]; - [ConfigurationProperty("ensureUniqueNaming")] - internal InnerTextConfigurationElement EnsureUniqueNaming => GetOptionalTextElement("ensureUniqueNaming", true); - [ConfigurationProperty("XmlCacheEnabled")] internal InnerTextConfigurationElement XmlCacheEnabled => GetOptionalTextElement("XmlCacheEnabled", true); @@ -85,22 +76,10 @@ namespace Umbraco.Core.Configuration.UmbracoSettings IEnumerable IContentSection.ImageFileTypes => Imaging.ImageFileTypes; - IEnumerable IContentSection.ImageTagAllowedAttributes => Imaging.ImageTagAllowedAttributes; - IEnumerable IContentSection.ImageAutoFillProperties => Imaging.ImageAutoFillProperties; - bool IContentSection.ScriptEditorDisable => ScriptEditor.ScriptEditorDisable; - - string IContentSection.ScriptFolderPath => ScriptEditor.ScriptFolderPath; - - IEnumerable IContentSection.ScriptFileTypes => ScriptEditor.ScriptFileTypes; - bool IContentSection.ResolveUrlsFromTextString => ResolveUrlsFromTextString; - bool IContentSection.UploadAllowDirectories => UploadAllowDirectories; - - bool IContentSection.EnsureUniqueNaming => EnsureUniqueNaming; - bool IContentSection.XmlCacheEnabled => XmlCacheEnabled; bool IContentSection.ContinouslyUpdateXmlDiskCache => ContinouslyUpdateXmlDiskCache; diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentImagingElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentImagingElement.cs index 93537fe870..1814ef23e8 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentImagingElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentImagingElement.cs @@ -22,18 +22,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings return new[] {"jpeg", "jpg", "gif", "bmp", "png", "tiff", "tif"}; } - [ConfigurationProperty("allowedAttributes")] - internal CommaDelimitedConfigurationElement ImageTagAllowedAttributes - { - get - { - return new OptionalCommaDelimitedConfigurationElement( - (CommaDelimitedConfigurationElement)this["allowedAttributes"], - //set the default - new[] { "src", "alt", "border", "class", "style", "align", "id", "name", "onclick", "usemap" }); - } - } - private ImagingAutoFillPropertiesCollection _defaultImageAutoFill; [ConfigurationCollection(typeof(ImagingAutoFillPropertiesCollection), AddItemName = "uploadField")] diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentScriptEditorElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentScriptEditorElement.cs deleted file mode 100644 index c218138e31..0000000000 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentScriptEditorElement.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Collections.Generic; -using System.Configuration; - -namespace Umbraco.Core.Configuration.UmbracoSettings -{ - internal class ContentScriptEditorElement : UmbracoConfigurationElement - { - [ConfigurationProperty("scriptFolderPath")] - internal InnerTextConfigurationElement ScriptFolderPath - { - get { return GetOptionalTextElement("scriptFolderPath", "/scripts"); } - } - - [ConfigurationProperty("scriptFileTypes")] - internal OptionalCommaDelimitedConfigurationElement ScriptFileTypes - { - get { return GetOptionalDelimitedElement("scriptFileTypes", new[] {"js", "xml"}); } - } - - [ConfigurationProperty("scriptDisableEditor")] - internal InnerTextConfigurationElement ScriptEditorDisable - { - get { return GetOptionalTextElement("scriptDisableEditor", false); } - } - - } -} diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs index 00dc7f073d..7701bc64cd 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs @@ -11,24 +11,12 @@ namespace Umbraco.Core.Configuration.UmbracoSettings IEnumerable ImageFileTypes { get; } - IEnumerable ImageTagAllowedAttributes { get; } - IEnumerable ImageAutoFillProperties { get; } - string ScriptFolderPath { get; } - - IEnumerable ScriptFileTypes { get; } - - bool ScriptEditorDisable { get; } - bool ResolveUrlsFromTextString { get; } - bool UploadAllowDirectories { get; } - IEnumerable Error404Collection { get; } - bool EnsureUniqueNaming { get; } - bool XmlCacheEnabled { get; } bool ContinouslyUpdateXmlDiskCache { get; } diff --git a/src/Umbraco.Core/IO/IOHelper.cs b/src/Umbraco.Core/IO/IOHelper.cs index a92b556240..53aa5a8179 100644 --- a/src/Umbraco.Core/IO/IOHelper.cs +++ b/src/Umbraco.Core/IO/IOHelper.cs @@ -185,7 +185,7 @@ namespace Umbraco.Core.IO /// The filepath to validate. /// The valid extensions. /// A value indicating whether the filepath is valid. - internal static bool VerifyFileExtension(string filePath, List validFileExtensions) + internal static bool VerifyFileExtension(string filePath, IEnumerable validFileExtensions) { var ext = Path.GetExtension(filePath); return ext != null && validFileExtensions.Contains(ext.TrimStart('.')); diff --git a/src/Umbraco.Core/IO/MediaPathSchemes/OriginalMediaPathScheme.cs b/src/Umbraco.Core/IO/MediaPathSchemes/OriginalMediaPathScheme.cs index 1948a9f662..52f84e9901 100644 --- a/src/Umbraco.Core/IO/MediaPathSchemes/OriginalMediaPathScheme.cs +++ b/src/Umbraco.Core/IO/MediaPathSchemes/OriginalMediaPathScheme.cs @@ -31,7 +31,7 @@ namespace Umbraco.Core.IO.MediaPathSchemes // prevpath should be "/" OR "-" // and we want to reuse the "" part, so try to find it - var sep = Current.Configs.Settings().Content.UploadAllowDirectories ? "/" : "-"; + const string sep = "/"; var pos = previous.IndexOf(sep, StringComparison.Ordinal); var s = pos > 0 ? previous.Substring(0, pos) : null; @@ -45,9 +45,7 @@ namespace Umbraco.Core.IO.MediaPathSchemes if (directory == null) throw new InvalidOperationException("Cannot use a null directory."); - return Current.Configs.Settings().Content.UploadAllowDirectories - ? Path.Combine(directory, filename).Replace('\\', '/') - : directory + "-" + filename; + return Path.Combine(directory, filename).Replace('\\', '/'); } /// diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentBlueprintRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentBlueprintRepository.cs index 7176e092c9..d137d7ac76 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentBlueprintRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentBlueprintRepository.cs @@ -17,12 +17,13 @@ namespace Umbraco.Core.Persistence.Repositories.Implement /// internal class DocumentBlueprintRepository : DocumentRepository, IDocumentBlueprintRepository { - public DocumentBlueprintRepository(IScopeAccessor scopeAccessor, AppCaches appCaches, ILogger logger, IContentTypeRepository contentTypeRepository, ITemplateRepository templateRepository, ITagRepository tagRepository, ILanguageRepository languageRepository, IContentSection settings) - : base(scopeAccessor, appCaches, logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, settings) + public DocumentBlueprintRepository(IScopeAccessor scopeAccessor, AppCaches appCaches, ILogger logger, IContentTypeRepository contentTypeRepository, ITemplateRepository templateRepository, ITagRepository tagRepository, ILanguageRepository languageRepository) + : base(scopeAccessor, appCaches, logger, contentTypeRepository, templateRepository, tagRepository, languageRepository) { - EnsureUniqueNaming = false; // duplicates are allowed } + protected override bool EnsureUniqueNaming => false; // duplicates are allowed + protected override Guid NodeObjectTypeId => Constants.ObjectTypes.DocumentBlueprint; } } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs index dcac7f4ff4..6af7031883 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs @@ -30,7 +30,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement private readonly ContentByGuidReadRepository _contentByGuidReadRepository; private readonly IScopeAccessor _scopeAccessor; - public DocumentRepository(IScopeAccessor scopeAccessor, AppCaches appCaches, ILogger logger, IContentTypeRepository contentTypeRepository, ITemplateRepository templateRepository, ITagRepository tagRepository, ILanguageRepository languageRepository, IContentSection settings) + public DocumentRepository(IScopeAccessor scopeAccessor, AppCaches appCaches, ILogger logger, IContentTypeRepository contentTypeRepository, ITemplateRepository templateRepository, ITagRepository tagRepository, ILanguageRepository languageRepository) : base(scopeAccessor, appCaches, languageRepository, logger) { _contentTypeRepository = contentTypeRepository ?? throw new ArgumentNullException(nameof(contentTypeRepository)); @@ -39,12 +39,14 @@ namespace Umbraco.Core.Persistence.Repositories.Implement _appCaches = appCaches; _scopeAccessor = scopeAccessor; _contentByGuidReadRepository = new ContentByGuidReadRepository(this, scopeAccessor, appCaches, logger); - EnsureUniqueNaming = settings.EnsureUniqueNaming; } protected override DocumentRepository This => this; - public bool EnsureUniqueNaming { get; set; } + /// + /// Default is to always ensure all documents have unique names + /// + protected virtual bool EnsureUniqueNaming { get; } = true; // note: is ok to 'new' the repo here as it's a sub-repo really private PermissionRepository PermissionRepository => _permissionRepository diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs index 38558e1ca5..65043c4c67 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs @@ -26,18 +26,16 @@ namespace Umbraco.Core.Persistence.Repositories.Implement private readonly ITagRepository _tagRepository; private readonly MediaByGuidReadRepository _mediaByGuidReadRepository; - public MediaRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger, IMediaTypeRepository mediaTypeRepository, ITagRepository tagRepository, IContentSection contentSection, ILanguageRepository languageRepository) + public MediaRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger, IMediaTypeRepository mediaTypeRepository, ITagRepository tagRepository, ILanguageRepository languageRepository) : base(scopeAccessor, cache, languageRepository, logger) { _mediaTypeRepository = mediaTypeRepository ?? throw new ArgumentNullException(nameof(mediaTypeRepository)); _tagRepository = tagRepository ?? throw new ArgumentNullException(nameof(tagRepository)); _mediaByGuidReadRepository = new MediaByGuidReadRepository(this, scopeAccessor, cache, logger); - EnsureUniqueNaming = contentSection.EnsureUniqueNaming; } protected override MediaRepository This => this; - public bool EnsureUniqueNaming { get; set; } #region Repository Base @@ -543,10 +541,6 @@ namespace Umbraco.Core.Persistence.Repositories.Implement media.ResetDirtyProperties(false); return media; } - - protected override string EnsureUniqueNodeName(int parentId, string nodeName, int id = 0) - { - return EnsureUniqueNaming == false ? nodeName : base.EnsureUniqueNodeName(parentId, nodeName, id); - } + } } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ScriptRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ScriptRepository.cs index 85b41a2a1c..5806a17970 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ScriptRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ScriptRepository.cs @@ -102,7 +102,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // validate path & extension var validDir = SystemDirectories.Scripts; var isValidPath = IOHelper.VerifyEditPath(fullPath, validDir); - var validExts = _contentConfig.ScriptFileTypes.ToList(); + var validExts = new[] {"js"}; var isValidExtension = IOHelper.VerifyFileExtension(script.Path, validExts); return isValidPath && isValidExtension; } diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 366326cd8b..1f10085e14 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -249,7 +249,6 @@ - diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs index d1b86c6c37..dceb6a2a8f 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs @@ -42,32 +42,12 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings Assert.IsFalse(SettingsSection.Content.Error404Collection.ElementAt(2).HasContentId); } - [Test] - public void ScriptFolderPath() - { - Assert.AreEqual(SettingsSection.Content.ScriptFolderPath, "/scripts"); - } - [Test] - public void ScriptFileTypes() - { - Assert.IsTrue(SettingsSection.Content.ScriptFileTypes.All(x => "js,xml".Split(',').Contains(x))); - } - [Test] - public void DisableScriptEditor() - { - Assert.AreEqual(SettingsSection.Content.ScriptEditorDisable, false); - } - [Test] public void ImageFileTypes() { Assert.IsTrue(SettingsSection.Content.ImageFileTypes.All(x => "jpeg,jpg,gif,bmp,png,tiff,tif".Split(',').Contains(x))); } - [Test] - public void AllowedAttributes() - { - Assert.IsTrue(SettingsSection.Content.ImageTagAllowedAttributes.All(x => "src,alt,border,class,style,align,id,name,onclick,usemap".Split(',').Contains(x))); - } + [Test] public virtual void ImageAutoFillProperties() { @@ -83,12 +63,7 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings Assert.AreEqual(SettingsSection.Content.ImageAutoFillProperties.ElementAt(1).LengthFieldAlias, "umbracoBytes2"); Assert.AreEqual(SettingsSection.Content.ImageAutoFillProperties.ElementAt(1).ExtensionFieldAlias, "umbracoExtension2"); } - - [Test] - public void UploadAllowDirectories() - { - Assert.IsTrue(SettingsSection.Content.UploadAllowDirectories); - } + [Test] public void DefaultDocumentTypeProperty() { @@ -104,11 +79,6 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings { Assert.IsTrue(SettingsSection.Content.CloneXmlContent); } - [Test] - public void EnsureUniqueNaming() - { - Assert.IsTrue(SettingsSection.Content.EnsureUniqueNaming); - } [Test] public void ForceSafeAliases() diff --git a/src/Umbraco.Tests/Persistence/Repositories/ContentTypeRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/ContentTypeRepositoryTest.cs index 96809c7bf6..2d45c24d0f 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/ContentTypeRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/ContentTypeRepositoryTest.cs @@ -37,7 +37,7 @@ namespace Umbraco.Tests.Persistence.Repositories var tagRepository = new TagRepository(scopeAccessor, cacheHelper, Logger); contentTypeRepository = new ContentTypeRepository(scopeAccessor, cacheHelper, Logger, templateRepository); var languageRepository = new LanguageRepository(scopeAccessor, cacheHelper, Logger); - var repository = new DocumentRepository(scopeAccessor, cacheHelper, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of()); + var repository = new DocumentRepository(scopeAccessor, cacheHelper, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository); return repository; } diff --git a/src/Umbraco.Tests/Persistence/Repositories/DocumentRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/DocumentRepositoryTest.cs index bb2d981b07..c2bfd77266 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/DocumentRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/DocumentRepositoryTest.cs @@ -68,7 +68,7 @@ namespace Umbraco.Tests.Persistence.Repositories var tagRepository = new TagRepository(scopeAccessor, appCaches, Logger); contentTypeRepository = new ContentTypeRepository(scopeAccessor, appCaches, Logger, templateRepository); var languageRepository = new LanguageRepository(scopeAccessor, appCaches, Logger); - var repository = new DocumentRepository(scopeAccessor, appCaches, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of()); + var repository = new DocumentRepository(scopeAccessor, appCaches, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository); return repository; } diff --git a/src/Umbraco.Tests/Persistence/Repositories/DomainRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/DomainRepositoryTest.cs index 28df4b366a..d0da875332 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/DomainRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/DomainRepositoryTest.cs @@ -24,7 +24,7 @@ namespace Umbraco.Tests.Persistence.Repositories var tagRepository = new TagRepository(accessor, Core.Cache.AppCaches.Disabled, Logger); contentTypeRepository = new ContentTypeRepository(accessor, Core.Cache.AppCaches.Disabled, Logger, templateRepository); languageRepository = new LanguageRepository(accessor, Core.Cache.AppCaches.Disabled, Logger); - documentRepository = new DocumentRepository(accessor, Core.Cache.AppCaches.Disabled, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of()); + documentRepository = new DocumentRepository(accessor, Core.Cache.AppCaches.Disabled, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository); var domainRepository = new DomainRepository(accessor, Core.Cache.AppCaches.Disabled, Logger); return domainRepository; } diff --git a/src/Umbraco.Tests/Persistence/Repositories/MediaRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/MediaRepositoryTest.cs index eaf0425edf..cbd591950a 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/MediaRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/MediaRepositoryTest.cs @@ -37,7 +37,7 @@ namespace Umbraco.Tests.Persistence.Repositories mediaTypeRepository = new MediaTypeRepository(scopeAccessor, appCaches, Logger); var tagRepository = new TagRepository(scopeAccessor, appCaches, Logger); - var repository = new MediaRepository(scopeAccessor, appCaches, Logger, mediaTypeRepository, tagRepository, Mock.Of(), Mock.Of()); + var repository = new MediaRepository(scopeAccessor, appCaches, Logger, mediaTypeRepository, tagRepository, Mock.Of()); return repository; } diff --git a/src/Umbraco.Tests/Persistence/Repositories/PublicAccessRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/PublicAccessRepositoryTest.cs index b140aa078e..684c8f9a22 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/PublicAccessRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/PublicAccessRepositoryTest.cs @@ -309,7 +309,7 @@ namespace Umbraco.Tests.Persistence.Repositories var tagRepository = new TagRepository(accessor, AppCaches, Logger); contentTypeRepository = new ContentTypeRepository(accessor, AppCaches, Logger, templateRepository); var languageRepository = new LanguageRepository(accessor, AppCaches, Logger); - var repository = new DocumentRepository(accessor, AppCaches, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of()); + var repository = new DocumentRepository(accessor, AppCaches, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository); return repository; } diff --git a/src/Umbraco.Tests/Persistence/Repositories/TagRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/TagRepositoryTest.cs index 6acd63b2b3..ddbf3bfc9d 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/TagRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/TagRepositoryTest.cs @@ -957,7 +957,7 @@ namespace Umbraco.Tests.Persistence.Repositories var tagRepository = new TagRepository(accessor, AppCaches.Disabled, Logger); contentTypeRepository = new ContentTypeRepository(accessor, AppCaches.Disabled, Logger, templateRepository); var languageRepository = new LanguageRepository(accessor, AppCaches.Disabled, Logger); - var repository = new DocumentRepository(accessor, AppCaches.Disabled, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of()); + var repository = new DocumentRepository(accessor, AppCaches.Disabled, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository); return repository; } @@ -966,7 +966,7 @@ namespace Umbraco.Tests.Persistence.Repositories var accessor = (IScopeAccessor) provider; var tagRepository = new TagRepository(accessor, AppCaches.Disabled, Logger); mediaTypeRepository = new MediaTypeRepository(accessor, AppCaches.Disabled, Logger); - var repository = new MediaRepository(accessor, AppCaches.Disabled, Logger, mediaTypeRepository, tagRepository, Mock.Of(), Mock.Of()); + var repository = new MediaRepository(accessor, AppCaches.Disabled, Logger, mediaTypeRepository, tagRepository, Mock.Of()); return repository; } } diff --git a/src/Umbraco.Tests/Persistence/Repositories/TemplateRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/TemplateRepositoryTest.cs index a9fbfdf322..8f0150277d 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/TemplateRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/TemplateRepositoryTest.cs @@ -240,7 +240,7 @@ namespace Umbraco.Tests.Persistence.Repositories var tagRepository = new TagRepository((IScopeAccessor) ScopeProvider, AppCaches.Disabled, Logger); var contentTypeRepository = new ContentTypeRepository((IScopeAccessor) ScopeProvider, AppCaches.Disabled, Logger, templateRepository); var languageRepository = new LanguageRepository((IScopeAccessor) ScopeProvider, AppCaches.Disabled, Logger); - var contentRepo = new DocumentRepository((IScopeAccessor) ScopeProvider, AppCaches.Disabled, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of()); + var contentRepo = new DocumentRepository((IScopeAccessor) ScopeProvider, AppCaches.Disabled, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository); var contentType = MockedContentTypes.CreateSimpleContentType("umbTextpage2", "Textpage"); ServiceContext.FileService.SaveTemplate(contentType.DefaultTemplate); // else, FK violation on contentType! diff --git a/src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs index 779ec45a35..8f750f9238 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs @@ -28,7 +28,7 @@ namespace Umbraco.Tests.Persistence.Repositories var accessor = (IScopeAccessor) provider; mediaTypeRepository = new MediaTypeRepository(accessor, AppCaches, Mock.Of()); var tagRepository = new TagRepository(accessor, AppCaches, Mock.Of()); - var repository = new MediaRepository(accessor, AppCaches, Mock.Of(), mediaTypeRepository, tagRepository, Mock.Of(), Mock.Of()); + var repository = new MediaRepository(accessor, AppCaches, Mock.Of(), mediaTypeRepository, tagRepository, Mock.Of()); return repository; } @@ -45,7 +45,7 @@ namespace Umbraco.Tests.Persistence.Repositories var tagRepository = new TagRepository(accessor, AppCaches, Logger); contentTypeRepository = new ContentTypeRepository(accessor, AppCaches, Logger, templateRepository); var languageRepository = new LanguageRepository(accessor, AppCaches, Logger); - var repository = new DocumentRepository(accessor, AppCaches, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of()); + var repository = new DocumentRepository(accessor, AppCaches, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository); return repository; } diff --git a/src/Umbraco.Tests/Services/ContentServicePerformanceTest.cs b/src/Umbraco.Tests/Services/ContentServicePerformanceTest.cs index bf74f6fd59..cb7a984ff3 100644 --- a/src/Umbraco.Tests/Services/ContentServicePerformanceTest.cs +++ b/src/Umbraco.Tests/Services/ContentServicePerformanceTest.cs @@ -167,7 +167,7 @@ namespace Umbraco.Tests.Services var tagRepo = new TagRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger); var ctRepository = new ContentTypeRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, tRepository); var languageRepository = new LanguageRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger); - var repository = new DocumentRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, ctRepository, tRepository, tagRepo, languageRepository, Mock.Of()); + var repository = new DocumentRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, ctRepository, tRepository, tagRepo, languageRepository); // Act Stopwatch watch = Stopwatch.StartNew(); @@ -200,7 +200,7 @@ namespace Umbraco.Tests.Services var tagRepo = new TagRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger); var ctRepository = new ContentTypeRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, tRepository); var languageRepository = new LanguageRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger); - var repository = new DocumentRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, ctRepository, tRepository, tagRepo, languageRepository, Mock.Of()); + var repository = new DocumentRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, ctRepository, tRepository, tagRepo, languageRepository); // Act Stopwatch watch = Stopwatch.StartNew(); @@ -231,7 +231,7 @@ namespace Umbraco.Tests.Services var tagRepo = new TagRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger); var ctRepository = new ContentTypeRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, tRepository); var languageRepository = new LanguageRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger); - var repository = new DocumentRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, ctRepository, tRepository, tagRepo, languageRepository, Mock.Of()); + var repository = new DocumentRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, ctRepository, tRepository, tagRepo, languageRepository); // Act var contents = repository.GetMany(); @@ -265,7 +265,7 @@ namespace Umbraco.Tests.Services var tagRepo = new TagRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger); var ctRepository = new ContentTypeRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, tRepository); var languageRepository = new LanguageRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger); - var repository = new DocumentRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, ctRepository, tRepository, tagRepo, languageRepository, Mock.Of()); + var repository = new DocumentRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, ctRepository, tRepository, tagRepo, languageRepository); // Act var contents = repository.GetMany(); diff --git a/src/Umbraco.Tests/Services/ContentServiceTests.cs b/src/Umbraco.Tests/Services/ContentServiceTests.cs index f633c003ba..37d34557bb 100644 --- a/src/Umbraco.Tests/Services/ContentServiceTests.cs +++ b/src/Umbraco.Tests/Services/ContentServiceTests.cs @@ -3041,7 +3041,7 @@ namespace Umbraco.Tests.Services var tagRepository = new TagRepository(accessor, AppCaches.Disabled, Logger); contentTypeRepository = new ContentTypeRepository(accessor, AppCaches.Disabled, Logger, templateRepository); var languageRepository = new LanguageRepository(accessor, AppCaches.Disabled, Logger); - var repository = new DocumentRepository(accessor, AppCaches.Disabled, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of()); + var repository = new DocumentRepository(accessor, AppCaches.Disabled, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository); return repository; } } diff --git a/src/Umbraco.Web.UI/config/umbracoSettings.Release.config b/src/Umbraco.Web.UI/config/umbracoSettings.Release.config index 3a1312898b..616eca9d6b 100644 --- a/src/Umbraco.Web.UI/config/umbracoSettings.Release.config +++ b/src/Umbraco.Web.UI/config/umbracoSettings.Release.config @@ -18,14 +18,14 @@ 1 diff --git a/src/Umbraco.Web.UI/config/umbracoSettings.config b/src/Umbraco.Web.UI/config/umbracoSettings.config index 026bfa17b5..07aee4481c 100644 --- a/src/Umbraco.Web.UI/config/umbracoSettings.config +++ b/src/Umbraco.Web.UI/config/umbracoSettings.config @@ -5,189 +5,174 @@ - - - - jpeg,jpg,gif,bmp,png,tiff,tif,svg - - src,alt,border,class,style,align,id,name,onclick,usemap - - - - umbracoWidth - umbracoHeight - umbracoBytes - umbracoExtension - - + + + + jpeg,jpg,gif,bmp,png,tiff,tif,svg + + + + umbracoWidth + umbracoHeight + umbracoBytes + umbracoExtension + + - - - - /scripts - - js,xml - - false - + - - True - - - + - - 1 - 1079 - 1080 - - - - - - your@email.here - + + 1 + 1079 + 1080 + + + + + + your@email.here + - - True + + + true - - - true + + True - - True + + True - - True + + False - - False + + text - - text - - - - + + In Preview Mode - click to end - ]]> + ]]> + - - - - false + + + + false - - throw + throw - - ashx,aspx,ascx,config,cshtml,vbhtml,asmx,air,axd,swf,xml,xhtml,html,htm,php,htaccess + + ashx,aspx,ascx,config,cshtml,vbhtml,asmx,air,axd,swf,xml,xhtml,html,htm,php,htaccess - - + + - - Textstring + + Textstring - false + false - - + - - assets/img/installer.jpg + + assets/img/installer.jpg - + - - - true + + + true - - false + + false - - true + + true - + - - - false - - true - - - - - - - - - - - - - plus - star - - - ae - oe - aa - ae - oe - ue - ss - ae - oe - - - - - - + + + false + + true + + - + + + + + + + + + + plus + star + + + ae + oe + aa + ae + oe + ue + ss + ae + oe + - + + + + - - - true - true - - - - - - - + + true + true + + + + + + + - - - - + + + + - - - - - UsersMembershipProvider - - + + + + + UsersMembershipProvider + + - - - + + diff --git a/src/Umbraco.Web/Routing/ContentFinderByLegacy404.cs b/src/Umbraco.Web/Routing/ContentFinderByConfigured404.cs similarity index 84% rename from src/Umbraco.Web/Routing/ContentFinderByLegacy404.cs rename to src/Umbraco.Web/Routing/ContentFinderByConfigured404.cs index 1f01270bc6..382ee6fe12 100644 --- a/src/Umbraco.Web/Routing/ContentFinderByLegacy404.cs +++ b/src/Umbraco.Web/Routing/ContentFinderByConfigured404.cs @@ -11,14 +11,14 @@ namespace Umbraco.Web.Routing /// /// Provides an implementation of that runs the legacy 404 logic. /// - public class ContentFinderByLegacy404 : IContentLastChanceFinder + public class ContentFinderByConfigured404 : IContentLastChanceFinder { private readonly ILogger _logger; private readonly IEntityService _entityService; private readonly IContentSection _contentConfigSection; - public ContentFinderByLegacy404(ILogger logger, IEntityService entityService, IContentSection contentConfigSection) + public ContentFinderByConfigured404(ILogger logger, IEntityService entityService, IContentSection contentConfigSection) { _logger = logger; _entityService = entityService; @@ -32,7 +32,7 @@ namespace Umbraco.Web.Routing /// A value indicating whether an Umbraco document was found and assigned. public bool TryFindContent(PublishedRequest frequest) { - _logger.Debug("Looking for a page to handle 404."); + _logger.Debug("Looking for a page to handle 404."); // try to find a culture as best as we can var errorCulture = CultureInfo.CurrentUICulture; @@ -70,17 +70,17 @@ namespace Umbraco.Web.Routing if (error404.HasValue) { - _logger.Debug("Got id={ErrorNodeId}.", error404.Value); + _logger.Debug("Got id={ErrorNodeId}.", error404.Value); content = frequest.UmbracoContext.ContentCache.GetById(error404.Value); - _logger.Debug(content == null + _logger.Debug(content == null ? "Could not find content with that id." : "Found corresponding content."); } else { - _logger.Debug("Got nothing."); + _logger.Debug("Got nothing."); } frequest.PublishedContent = content; diff --git a/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs b/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs index 3c593d383f..de3ca47b38 100644 --- a/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs +++ b/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs @@ -151,7 +151,7 @@ namespace Umbraco.Web.Runtime .Append() .Append(); - composition.RegisterUnique(); + composition.RegisterUnique(); composition.WithCollectionBuilder() // all built-in finders in the correct order, diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 8144056128..c235f8652a 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -1100,7 +1100,7 @@ - + From 3dce2c870e79741f55fe6b538d23722990e35cbc Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 30 Jan 2019 23:52:35 +1100 Subject: [PATCH 394/437] removes XmlCacheEnabled, ContinouslyUpdateXmlDiskCache, XmlContentCheckForDiskChanges from umb settings --- .../UmbracoSettings/ContentElement.cs | 15 ------------ .../UmbracoSettings/IContentSection.cs | 6 ----- .../ContentElementDefaultTests.cs | 7 +----- .../UmbracoSettings/ContentElementTests.cs | 15 ------------ .../UmbracoSettings/umbracoSettings.config | 24 +------------------ .../LegacyXmlPublishedCache/XmlStore.cs | 6 ++--- src/Umbraco.Tests/Scoping/ScopedXmlTests.cs | 9 ------- .../config/umbracoSettings.config | 10 +------- 8 files changed, 6 insertions(+), 86 deletions(-) diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs index de2f9d4c9e..d0e80e2c0d 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs @@ -22,15 +22,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings [ConfigurationProperty("notifications", IsRequired = true)] internal NotificationsElement Notifications => (NotificationsElement) base["notifications"]; - [ConfigurationProperty("XmlCacheEnabled")] - internal InnerTextConfigurationElement XmlCacheEnabled => GetOptionalTextElement("XmlCacheEnabled", true); - - [ConfigurationProperty("ContinouslyUpdateXmlDiskCache")] - internal InnerTextConfigurationElement ContinouslyUpdateXmlDiskCache => GetOptionalTextElement("ContinouslyUpdateXmlDiskCache", true); - - [ConfigurationProperty("XmlContentCheckForDiskChanges")] - internal InnerTextConfigurationElement XmlContentCheckForDiskChanges => GetOptionalTextElement("XmlContentCheckForDiskChanges", false); - [ConfigurationProperty("PropertyContextHelpOption")] internal InnerTextConfigurationElement PropertyContextHelpOption => GetOptionalTextElement("PropertyContextHelpOption", "text"); @@ -80,12 +71,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings bool IContentSection.ResolveUrlsFromTextString => ResolveUrlsFromTextString; - bool IContentSection.XmlCacheEnabled => XmlCacheEnabled; - - bool IContentSection.ContinouslyUpdateXmlDiskCache => ContinouslyUpdateXmlDiskCache; - - bool IContentSection.XmlContentCheckForDiskChanges => XmlContentCheckForDiskChanges; - string IContentSection.PropertyContextHelpOption => PropertyContextHelpOption; bool IContentSection.ForceSafeAliases => ForceSafeAliases; diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs index 7701bc64cd..5fb3ff538e 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs @@ -17,12 +17,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings IEnumerable Error404Collection { get; } - bool XmlCacheEnabled { get; } - - bool ContinouslyUpdateXmlDiskCache { get; } - - bool XmlContentCheckForDiskChanges { get; } - string PropertyContextHelpOption { get; } bool ForceSafeAliases { get; } diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementDefaultTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementDefaultTests.cs index 31772ef737..5fb896abb2 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementDefaultTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementDefaultTests.cs @@ -35,11 +35,6 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings Assert.IsTrue(SettingsSection.Content.ImageAutoFillProperties.ElementAt(0).LengthFieldAlias == "umbracoBytes"); Assert.IsTrue(SettingsSection.Content.ImageAutoFillProperties.ElementAt(0).ExtensionFieldAlias == "umbracoExtension"); } - - [Test] - public override void XmlContentCheckForDiskChanges() - { - Assert.IsTrue(SettingsSection.Content.XmlContentCheckForDiskChanges == false); - } + } } diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs index dceb6a2a8f..4f34b32164 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs @@ -85,21 +85,6 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings { Assert.IsTrue(SettingsSection.Content.ForceSafeAliases); } - [Test] - public void XmlCacheEnabled() - { - Assert.IsTrue(SettingsSection.Content.XmlCacheEnabled); - } - [Test] - public void ContinouslyUpdateXmlDiskCache() - { - Assert.IsTrue(SettingsSection.Content.ContinouslyUpdateXmlDiskCache); - } - [Test] - public virtual void XmlContentCheckForDiskChanges() - { - Assert.IsTrue(SettingsSection.Content.XmlContentCheckForDiskChanges); - } [Test] public void PropertyContextHelpOption() diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config index b3ca1524c9..85d1321bfb 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config @@ -4,8 +4,6 @@ jpeg,jpg,gif,bmp,png,tiff,tif - - src,alt,border,class,style,align,id,name,onclick,usemap @@ -22,18 +20,7 @@ - - - /scripts - - js,xml - - false - - - - True + True - - True - - - True - - - True - text diff --git a/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlStore.cs b/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlStore.cs index 3fb3d40e5b..e7aa4a216e 100644 --- a/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlStore.cs +++ b/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlStore.cs @@ -254,13 +254,13 @@ namespace Umbraco.Tests.LegacyXmlPublishedCache private readonly bool _xmlFileEnabled = true; // whether the disk cache is enabled - private bool XmlFileEnabled => _xmlFileEnabled && Current.Configs.Settings().Content.XmlCacheEnabled; + private bool XmlFileEnabled => true; // whether the disk cache is enabled and to update the disk cache when xml changes - private bool SyncToXmlFile => XmlFileEnabled && Current.Configs.Settings().Content.ContinouslyUpdateXmlDiskCache; + private bool SyncToXmlFile => true; // whether the disk cache is enabled and to reload from disk cache if it changes - private bool SyncFromXmlFile => XmlFileEnabled && Current.Configs.Settings().Content.XmlContentCheckForDiskChanges; + private bool SyncFromXmlFile => false; // whether _xml is immutable or not (achieved by cloning before changing anything) private static bool XmlIsImmutable => Current.Configs.Settings().Content.CloneXmlContent; diff --git a/src/Umbraco.Tests/Scoping/ScopedXmlTests.cs b/src/Umbraco.Tests/Scoping/ScopedXmlTests.cs index f1fd0c592b..1d07ec074f 100644 --- a/src/Umbraco.Tests/Scoping/ScopedXmlTests.cs +++ b/src/Umbraco.Tests/Scoping/ScopedXmlTests.cs @@ -85,10 +85,6 @@ namespace Umbraco.Tests.Scoping Assert.AreSame(umbracoContext, Umbraco.Web.Composing.Current.UmbracoContext); Assert.AreSame(XmlStore, ((PublishedContentCache) umbracoContext.ContentCache).XmlStore); - // settings - var contentMock = Mock.Get(Factory.GetInstance().Content); - contentMock.Setup(x => x.XmlCacheEnabled).Returns(false); - // create document type, document var contentType = new ContentType(-1) { Alias = "CustomDocument", Name = "Custom Document" }; Current.Services.ContentTypeService.Save(contentType); @@ -203,11 +199,6 @@ namespace Umbraco.Tests.Scoping Assert.AreSame(umbracoContext, Umbraco.Web.Composing.Current.UmbracoContext); Assert.AreSame(XmlStore, ((PublishedContentCache)umbracoContext.ContentCache).XmlStore); - // settings - var settings = SettingsForTests.GenerateMockUmbracoSettings(); - var contentMock = Mock.Get(Factory.GetInstance().Content); - contentMock.Setup(x => x.XmlCacheEnabled).Returns(false); - // create document type var contentType = new ContentType(-1) { Alias = "CustomDocument", Name = "Custom Document" }; Current.Services.ContentTypeService.Save(contentType); diff --git a/src/Umbraco.Web.UI/config/umbracoSettings.config b/src/Umbraco.Web.UI/config/umbracoSettings.config index 07aee4481c..9a7d39a5a4 100644 --- a/src/Umbraco.Web.UI/config/umbracoSettings.config +++ b/src/Umbraco.Web.UI/config/umbracoSettings.config @@ -41,17 +41,9 @@ + true - - True - - - True - - - False - text From f1b168fc46bdd2023af94e1469592fdfa4ff592f Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 30 Jan 2019 23:58:54 +1100 Subject: [PATCH 395/437] removes ForceSafeAliases from umbraco settings, etc... --- .../UmbracoSettings/ContentElement.cs | 5 ---- .../UmbracoSettings/IContentSection.cs | 2 -- .../Services/Implement/EntityXmlSerializer.cs | 9 +++----- src/Umbraco.Core/StringExtensions.cs | 23 ------------------- .../Strings/DefaultShortStringHelperConfig.cs | 6 +---- .../UmbracoSettings/ContentElementTests.cs | 6 ----- .../UmbracoSettings/umbracoSettings.config | 2 -- src/Umbraco.Tests/Models/ContentXmlTest.cs | 2 +- src/Umbraco.Tests/Models/MediaXmlTest.cs | 2 +- .../TestHelpers/SettingsForTests.cs | 1 - .../config/umbracoSettings.config | 5 ---- 11 files changed, 6 insertions(+), 57 deletions(-) diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs index d0e80e2c0d..a014718882 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs @@ -25,9 +25,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings [ConfigurationProperty("PropertyContextHelpOption")] internal InnerTextConfigurationElement PropertyContextHelpOption => GetOptionalTextElement("PropertyContextHelpOption", "text"); - [ConfigurationProperty("ForceSafeAliases")] - internal InnerTextConfigurationElement ForceSafeAliases => GetOptionalTextElement("ForceSafeAliases", true); - [ConfigurationProperty("PreviewBadge")] internal InnerTextConfigurationElement PreviewBadge => GetOptionalTextElement("PreviewBadge", DefaultPreviewBadge); @@ -73,8 +70,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings string IContentSection.PropertyContextHelpOption => PropertyContextHelpOption; - bool IContentSection.ForceSafeAliases => ForceSafeAliases; - string IContentSection.PreviewBadge => PreviewBadge; MacroErrorBehaviour IContentSection.MacroErrorBehaviour => MacroErrors; diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs index 5fb3ff538e..8e77d9b722 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs @@ -19,8 +19,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings string PropertyContextHelpOption { get; } - bool ForceSafeAliases { get; } - string PreviewBadge { get; } MacroErrorBehaviour MacroErrorBehaviour { get; } diff --git a/src/Umbraco.Core/Services/Implement/EntityXmlSerializer.cs b/src/Umbraco.Core/Services/Implement/EntityXmlSerializer.cs index 6a8514f0a0..863ecc0b1b 100644 --- a/src/Umbraco.Core/Services/Implement/EntityXmlSerializer.cs +++ b/src/Umbraco.Core/Services/Implement/EntityXmlSerializer.cs @@ -51,8 +51,7 @@ namespace Umbraco.Core.Services.Implement { if (content == null) throw new ArgumentNullException(nameof(content)); - // nodeName should match Casing.SafeAliasWithForcingCheck(content.ContentType.Alias); - var nodeName = content.ContentType.Alias.ToSafeAliasWithForcingCheck(); + var nodeName = content.ContentType.Alias.ToSafeAlias(); var xml = SerializeContentBase(content, content.GetUrlSegment(_urlSegmentProviders), nodeName, published); @@ -98,8 +97,7 @@ namespace Umbraco.Core.Services.Implement if (media == null) throw new ArgumentNullException(nameof(media)); if (_urlSegmentProviders == null) throw new ArgumentNullException(nameof(_urlSegmentProviders)); - // nodeName should match Casing.SafeAliasWithForcingCheck(content.ContentType.Alias); - var nodeName = media.ContentType.Alias.ToSafeAliasWithForcingCheck(); + var nodeName = media.ContentType.Alias.ToSafeAlias(); const bool published = false; // always false for media var xml = SerializeContentBase(media, media.GetUrlSegment(_urlSegmentProviders), nodeName, published); @@ -134,8 +132,7 @@ namespace Umbraco.Core.Services.Implement /// public XElement Serialize(IMember member) { - // nodeName should match Casing.SafeAliasWithForcingCheck(content.ContentType.Alias); - var nodeName = member.ContentType.Alias.ToSafeAliasWithForcingCheck(); + var nodeName = member.ContentType.Alias.ToSafeAlias(); const bool published = false; // always false for member var xml = SerializeContentBase(member, "", nodeName, published); diff --git a/src/Umbraco.Core/StringExtensions.cs b/src/Umbraco.Core/StringExtensions.cs index 95c8d3e17f..b80149a4ef 100644 --- a/src/Umbraco.Core/StringExtensions.cs +++ b/src/Umbraco.Core/StringExtensions.cs @@ -1108,29 +1108,6 @@ namespace Umbraco.Core return Current.ShortStringHelper.CleanStringForSafeAlias(alias, culture); } - /// - /// Cleans (but only if required) a string to produce a string that can safely be used in an alias. - /// - /// The text to filter. - /// The safe alias. - /// Checks UmbracoSettings.ForceSafeAliases to determine whether it should filter the text. - public static string ToSafeAliasWithForcingCheck(this string alias) - { - return Current.Configs.Settings().Content.ForceSafeAliases ? alias.ToSafeAlias() : alias; - } - - /// - /// Cleans (but only if required) a string, in the context of a specified culture, to produce a string that can safely be used in an alias. - /// - /// The text to filter. - /// The culture. - /// The safe alias. - /// Checks UmbracoSettings.ForceSafeAliases to determine whether it should filter the text. - public static string ToSafeAliasWithForcingCheck(this string alias, string culture) - { - return Current.Configs.Settings().Content.ForceSafeAliases ? alias.ToSafeAlias(culture) : alias; - } - // the new methods to get a url segment /// diff --git a/src/Umbraco.Core/Strings/DefaultShortStringHelperConfig.cs b/src/Umbraco.Core/Strings/DefaultShortStringHelperConfig.cs index f75b8e4d1f..e75e00defb 100644 --- a/src/Umbraco.Core/Strings/DefaultShortStringHelperConfig.cs +++ b/src/Umbraco.Core/Strings/DefaultShortStringHelperConfig.cs @@ -14,7 +14,6 @@ namespace Umbraco.Core.Strings var config = new DefaultShortStringHelperConfig { DefaultCulture = DefaultCulture, - ForceSafeAliases = ForceSafeAliases, UrlReplaceCharacters = UrlReplaceCharacters }; @@ -31,9 +30,7 @@ namespace Umbraco.Core.Strings public string DefaultCulture { get; set; } = ""; // invariant public Dictionary UrlReplaceCharacters { get; set; } - - public bool ForceSafeAliases { get; set; } - + public DefaultShortStringHelperConfig WithConfig(Config config) { return WithConfig(DefaultCulture, CleanStringType.RoleMask, config); @@ -62,7 +59,6 @@ namespace Umbraco.Core.Strings /// The short string helper. public DefaultShortStringHelperConfig WithDefault(IUmbracoSettingsSection umbracoSettings) { - ForceSafeAliases = umbracoSettings.Content.ForceSafeAliases; UrlReplaceCharacters = umbracoSettings.RequestHandler.CharCollection .Where(x => string.IsNullOrEmpty(x.Char) == false) .ToDictionary(x => x.Char, x => x.Replacement); diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs index 4f34b32164..1933911bb2 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs @@ -79,12 +79,6 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings { Assert.IsTrue(SettingsSection.Content.CloneXmlContent); } - - [Test] - public void ForceSafeAliases() - { - Assert.IsTrue(SettingsSection.Content.ForceSafeAliases); - } [Test] public void PropertyContextHelpOption() diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config index 85d1321bfb..ee12a66ba8 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config @@ -48,8 +48,6 @@ true - true - In Preview Mode - click to end diff --git a/src/Umbraco.Tests/Models/ContentXmlTest.cs b/src/Umbraco.Tests/Models/ContentXmlTest.cs index 5cc86a4322..fbef2cc103 100644 --- a/src/Umbraco.Tests/Models/ContentXmlTest.cs +++ b/src/Umbraco.Tests/Models/ContentXmlTest.cs @@ -27,7 +27,7 @@ namespace Umbraco.Tests.Models var content = MockedContent.CreateTextpageContent(contentType, "Root Home", -1); ServiceContext.ContentService.Save(content, Constants.Security.SuperUserId); - var nodeName = content.ContentType.Alias.ToSafeAliasWithForcingCheck(); + var nodeName = content.ContentType.Alias.ToSafeAlias(); var urlName = content.GetUrlSegment(new[]{new DefaultUrlSegmentProvider() }); // Act diff --git a/src/Umbraco.Tests/Models/MediaXmlTest.cs b/src/Umbraco.Tests/Models/MediaXmlTest.cs index d0d00c64a6..3ae9414dc1 100644 --- a/src/Umbraco.Tests/Models/MediaXmlTest.cs +++ b/src/Umbraco.Tests/Models/MediaXmlTest.cs @@ -47,7 +47,7 @@ namespace Umbraco.Tests.Models media.SetValue(Constants.Conventions.Media.Bytes, "100"); media.SetValue(Constants.Conventions.Media.Extension, "png"); - var nodeName = media.ContentType.Alias.ToSafeAliasWithForcingCheck(); + var nodeName = media.ContentType.Alias.ToSafeAlias(); var urlName = media.GetUrlSegment(new[] { new DefaultUrlSegmentProvider() }); // Act diff --git a/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs b/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs index ad6699b6d5..df4ec37a19 100644 --- a/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs +++ b/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs @@ -51,7 +51,6 @@ namespace Umbraco.Tests.TestHelpers settings.Setup(x => x.WebRouting).Returns(routing.Object); //Now configure some defaults - the defaults in the config section classes do NOT pertain to the mocked data!! - settings.Setup(x => x.Content.ForceSafeAliases).Returns(true); settings.Setup(x => x.Content.ImageAutoFillProperties).Returns(ContentImagingElement.GetDefaultImageAutoFillProperties()); settings.Setup(x => x.Content.ImageFileTypes).Returns(ContentImagingElement.GetDefaultImageFileTypes()); settings.Setup(x => x.RequestHandler.AddTrailingSlash).Returns(true); diff --git a/src/Umbraco.Web.UI/config/umbracoSettings.config b/src/Umbraco.Web.UI/config/umbracoSettings.config index 9a7d39a5a4..fcc2dd6bfb 100644 --- a/src/Umbraco.Web.UI/config/umbracoSettings.config +++ b/src/Umbraco.Web.UI/config/umbracoSettings.config @@ -39,11 +39,6 @@ your@email.here - - - - true - text From 69af591b781d552d78872c7b5bf2fb27455e6d08 Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Wed, 30 Jan 2019 14:01:22 +0100 Subject: [PATCH 396/437] v8: Fix general localization (#4274) --- .../umbmembergroupnodeinfo.directive.js | 58 ++++++++++ .../src/views/common/drawers/help/help.html | 101 +++++++++--------- .../member/umb-membergroup-node-info.html | 30 ++++++ .../views/macros/macros.edit.controller.js | 42 +++++--- .../views/macro.parameters.controller.js | 1 - .../src/views/macros/views/parameters.html | 4 +- .../src/views/membergroups/edit.html | 5 +- src/Umbraco.Web.UI/Umbraco/config/lang/da.xml | 41 ++++--- src/Umbraco.Web.UI/Umbraco/config/lang/en.xml | 44 +++++--- .../Umbraco/config/lang/en_us.xml | 22 ++-- .../Editors/MemberGroupController.cs | 6 +- 11 files changed, 247 insertions(+), 107 deletions(-) create mode 100644 src/Umbraco.Web.UI.Client/src/common/directives/components/member/umbmembergroupnodeinfo.directive.js create mode 100644 src/Umbraco.Web.UI.Client/src/views/components/member/umb-membergroup-node-info.html diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/member/umbmembergroupnodeinfo.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/member/umbmembergroupnodeinfo.directive.js new file mode 100644 index 0000000000..10e1291731 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/member/umbmembergroupnodeinfo.directive.js @@ -0,0 +1,58 @@ +(function () { + 'use strict'; + + function MemberGroupNodeInfoDirective(eventsService, userService, dateHelper) { + + function link(scope, element, attrs, ctrl) { + + var evts = []; + + function onInit() { + + // make sure dates are formatted to the user's locale + formatDatesToLocal(); + } + + function formatDatesToLocal() { + // get current backoffice user and format dates + userService.getCurrentUser().then(function (currentUser) { + scope.node.createDateFormatted = dateHelper.getLocalDate(scope.node.createDate, currentUser.locale, 'LLL'); + scope.node.updateDateFormatted = dateHelper.getLocalDate(scope.node.updateDate, currentUser.locale, 'LLL'); + }); + } + + // watch for content updates - reload content when node is saved, published etc. + scope.$watch('node.updateDate', function(newValue, oldValue){ + if(!newValue) { return; } + if(newValue === oldValue) { return; } + + // Update the create and update dates + formatDatesToLocal(); + }); + + //ensure to unregister from all events! + scope.$on('$destroy', function () { + for (var e in evts) { + eventsService.unsubscribe(evts[e]); + } + }); + + onInit(); + } + + var directive = { + restrict: 'E', + replace: true, + templateUrl: 'views/components/member/umb-membergroup-node-info.html', + scope: { + node: "=" + }, + link: link + }; + + return directive; + } + + angular.module('umbraco.directives').directive('umbMembergroupNodeInfo', MemberGroupNodeInfoDirective); + +})(); diff --git a/src/Umbraco.Web.UI.Client/src/views/common/drawers/help/help.html b/src/Umbraco.Web.UI.Client/src/views/common/drawers/help/help.html index 0e777a5b9f..f38bb78929 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/drawers/help/help.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/drawers/help/help.html @@ -8,7 +8,7 @@ - +
    Tours
    @@ -47,72 +47,71 @@
    - + - - +
    -
    -
    -
    -
    {{property.caption}}
    -
    -
    +
    +
    +
    +
    {{property.caption}}
    +
    +
    - + + {{topic.description}} + + + + +
    - +
    Videos
    - -
    + +
    - + +
    Visit our.umbraco.com
    + + The friendliest community + + +
    @@ -123,7 +122,7 @@ alias="close" type="button" button-style="link" - label="Close" + label-key="general_close" action="vm.closeDrawer()"> @@ -132,4 +131,4 @@ - \ No newline at end of file + diff --git a/src/Umbraco.Web.UI.Client/src/views/components/member/umb-membergroup-node-info.html b/src/Umbraco.Web.UI.Client/src/views/components/member/umb-membergroup-node-info.html new file mode 100644 index 0000000000..1f10cf0599 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/components/member/umb-membergroup-node-info.html @@ -0,0 +1,30 @@ +
    +
    + + + + + + Member groups have no additional properties for editing. + + + + + +
    + +
    + + + + + +
    {{ node.id }}
    + {{ node.key }} +
    + +
    +
    +
    + +
    diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/macros.edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/macros/macros.edit.controller.js index 978025ceb4..fd998ce4ba 100644 --- a/src/Umbraco.Web.UI.Client/src/views/macros/macros.edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/macros/macros.edit.controller.js @@ -16,8 +16,7 @@ function MacrosEditController($scope, $q, $routeParams, macroResource, editorSta vm.page.loading = false; vm.page.saveButtonState = "init"; vm.page.menu = {} - - + vm.labels = {}; function toggleValue(key) { vm.macro[key] = !vm.macro[key]; @@ -132,21 +131,32 @@ function MacrosEditController($scope, $q, $routeParams, macroResource, editorSta vm.page.loading = false; }); - vm.page.navigation = [ - { - "name": "Settings", - "alias": "settings", - "icon": "icon-settings", - "view": "views/macros/views/settings.html", - "active": true - }, - { - "name": "Parameters", - "alias": "parameters", - "icon": "icon-list", - "view": "views/macros/views/parameters.html" - } + var labelKeys = [ + "general_settings", + "macro_parameters" ]; + + localizationService.localizeMany(labelKeys).then(function (values) { + // navigation + vm.labels.settings = values[0]; + vm.labels.parameters = values[1]; + + vm.page.navigation = [ + { + "name": vm.labels.settings, + "alias": "settings", + "icon": "icon-settings", + "view": "views/macros/views/settings.html", + "active": true + }, + { + "name": vm.labels.parameters, + "alias": "parameters", + "icon": "icon-list", + "view": "views/macros/views/parameters.html" + } + ]; + }); } init(); diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/views/macro.parameters.controller.js b/src/Umbraco.Web.UI.Client/src/views/macros/views/macro.parameters.controller.js index 851b537c3b..9ae13399fa 100644 --- a/src/Umbraco.Web.UI.Client/src/views/macros/views/macro.parameters.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/macros/views/macro.parameters.controller.js @@ -47,7 +47,6 @@ function MacrosParametersController($scope, editorService) { parameter.key = newParameter.key; parameter.label = newParameter.label; parameter.editor = newParameter.editor; - parameter.editor = newParameter.editor; $scope.model.setDirty(); }); } diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/views/parameters.html b/src/Umbraco.Web.UI.Client/src/views/macros/views/parameters.html index 91231a49b7..543059e5a8 100644 --- a/src/Umbraco.Web.UI.Client/src/views/macros/views/parameters.html +++ b/src/Umbraco.Web.UI.Client/src/views/macros/views/parameters.html @@ -2,8 +2,8 @@
    -
    Parameters
    - Define the parameters hat should be available when using his macro +
    Parameters
    + Define the parameters that should be available when using this macro.
    diff --git a/src/Umbraco.Web.UI.Client/src/views/membergroups/edit.html b/src/Umbraco.Web.UI.Client/src/views/membergroups/edit.html index bf9e5e67b6..ae61b12522 100644 --- a/src/Umbraco.Web.UI.Client/src/views/membergroups/edit.html +++ b/src/Umbraco.Web.UI.Client/src/views/membergroups/edit.html @@ -19,10 +19,11 @@ -

    Member groups have no additional properties for editing.

    + +
    - diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml index 3c57fa35d8..f4568841c9 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml @@ -300,6 +300,7 @@ Opret et nyt medlem Alle medlemmer + Medlemgrupper har ingen yderligere egenskaber til redigering. Hvor ønsker du at oprette den nye %0% @@ -622,6 +623,7 @@ Beklager, vi kan ikke finde det, du leder efter. Ingen elementer er blevet tilføjet Server + Indstillinger Vis Hvilken side skal vises efter at formularen er sendt Størrelse @@ -1020,6 +1022,11 @@ Mange hilsner fra Umbraco robotten + Validering + Valideringsfejl skal rettes før elementet kan gemmes + Fejlet + Gemt + Utilstrækkelige brugerrettigheder, kunne ikke fuldføre handlingen Annulleret Handlingen blev annulleret af et 3. part tilføjelsesprogram Property type eksisterer allerede @@ -1044,12 +1051,14 @@ Mange hilsner fra Umbraco robotten Medie gemt Medie gemt uden problemer Medlem gemt + Medlemsgruppe gemt Stylesheetegenskab gemt Stylesheet gemt Skabelon gemt Der er opstået en fejl under redigering Bruger gemt Brugertype gemt + Brugergruppe gemt Fil ikke gemt Filen kunne ikke gemmes. Tjek filrettighederne Fil gemt @@ -1057,6 +1066,7 @@ Mange hilsner fra Umbraco robotten Sprog gemt Medietype gemt Medlemstype gemt + Medlemsgruppe gemt Skabelon ikke gemt Undgå venligst at du har 2 templates med samme alias Skabelon gemt @@ -1215,6 +1225,7 @@ Mange hilsner fra Umbraco robotten Kompositioner Du har ikke tilføjet nogle faner + Tilføj gruppe Nedarvet fra Tilføj egenskab Påkrævet label @@ -1255,16 +1266,19 @@ Mange hilsner fra Umbraco robotten Dette benyttes ikke for en Element-type - Tilføj sprog - Påkrævet sprog - Egenskaber på dette sprog skal være udfyldt før noden kan blive udgivet. - Standard sprog - Et Umbraco site kan kun have et standard sprog. - Ved at skifte standardsprog kan resultere i standard indhold mangler. - Fallsback til - Ingen fallback sprog - For at tillade flersproget indhold til at falde tilbage på et andet sprog, hvis det ikke er tilgængelig i det anmodet sprog, vælg det her. - Fallback sprog + Tilføj sprog + Påkrævet sprog + Egenskaber på dette sprog skal være udfyldt før noden kan blive udgivet. + Standard sprog + Et Umbraco site kan kun have et standard sprog. + Ved at skifte standardsprog kan resultere i standard indhold mangler. + Fallsback til + Ingen fallback sprog + For at tillade flersproget indhold til at falde tilbage på et andet sprog, hvis det ikke er tilgængelig i det anmodet sprog, vælg det her. + Fallback sprog + + + Parametre Alternativt felt @@ -1337,7 +1351,7 @@ Mange hilsner fra Umbraco robotten Pakker Pakker Partial Views - Partial View Makro Filer + Partial View makrofiler Installer fra "repository" Installer Runway Runway-moduler @@ -1346,8 +1360,11 @@ Mange hilsner fra Umbraco robotten Stylesheets Skabeloner Brugertilladelser - Bruger Typer + Brugertyper Brugere + Indstillinger + Design og layout + Tredjepart Ny opdatering er klar diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml index 8135591c0c..47b969dacf 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml @@ -303,10 +303,10 @@ Cannot upload this file, it does not have an approved file type Max file size is Media root - Failed to move media - Failed to copy media - Failed to create a folder under parent id %0% - Failed to rename the folder with id %0% + Failed to move media + Failed to copy media + Failed to create a folder under parent id %0% + Failed to rename the folder with id %0% Create a new member @@ -324,7 +324,7 @@ Document Type without a template New folder New data type - New JavaScript file + New JavaScript file New empty partial view New partial view macro New partial view from snippet @@ -653,7 +653,7 @@ Permissions Scheduled Publishing Search - Sorry, we can not find what you are looking for. + Sorry, we can not find what you are looking for. No items have been added Server Settings @@ -1219,11 +1219,11 @@ To manage your website, simply open the Umbraco back office and start adding con Enter the link - Reset crop + Reset crop Save crop Add new crop - Done - Undo edits + Done + Undo edits Select a version to compare with the current version @@ -1315,7 +1315,7 @@ To manage your website, simply open the Umbraco back office and start adding con Sent For Approval Changes have been sent for approval Media saved - Member group saved + Member group saved Media saved without any errors Member saved Stylesheet Property Saved @@ -1332,6 +1332,7 @@ To manage your website, simply open the Umbraco back office and start adding con Language saved Media Type saved Member Type saved + Member Group saved Template not saved Please make sure that you do not have 2 templates with the same alias Template saved @@ -1493,6 +1494,7 @@ To manage your website, simply open the Umbraco back office and start adding con Compositions You have not added any tabs + Add group Inherited from Add property Required label @@ -1543,6 +1545,21 @@ To manage your website, simply open the Umbraco back office and start adding con An Element type is meant to be used for instance in Nested Content, and not in the tree This is not applicable for an Element type + + Add language + Mandatory language + Properties on this language have to be filled out before the node can be published. + Default language + An Umbraco site can only have one default language set. + Switching default language may result in default content missing. + Falls back to + No fall back language + To allow multi-lingual content to fall back to another language if not present in the requested language, select it here. + Fall back language + + + Parameters + Building models this can take a bit of time, don't worry @@ -1654,10 +1671,11 @@ To manage your website, simply open the Umbraco back office and start adding con Scripts Stylesheets Templates + Log Viewer Users - Settings - Templating - Third Party + Settings + Templating + Third Party New update ready 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 48ea15e3dc..197dbdc003 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml @@ -307,11 +307,11 @@ Cannot upload this file, it does not have an approved file type Max file size is Media root - Failed to move media - Parent and destination folders cannot be the same - Failed to copy media - Failed to create a folder under parent id %0% - Failed to rename the folder with id %0% + Failed to move media + Parent and destination folders cannot be the same + Failed to copy media + Failed to create a folder under parent id %0% + Failed to rename the folder with id %0% Create a new member @@ -1337,6 +1337,7 @@ To manage your website, simply open the Umbraco back office and start adding con Language saved Media Type saved Member Type saved + Member Group saved Template not saved Please make sure that you do not have 2 templates with the same alias Template saved @@ -1572,6 +1573,9 @@ To manage your website, simply open the Umbraco back office and start adding con To allow multi-lingual content to fall back to another language if not present in the requested language, select it here. Fall back language + + Parameters + Building models this can take a bit of time, don't worry @@ -1685,9 +1689,9 @@ To manage your website, simply open the Umbraco back office and start adding con Templates Log Viewer Users - Settings - Templating - Third Party + Settings + Templating + Third Party New update ready @@ -1774,7 +1778,7 @@ To manage your website, simply open the Umbraco back office and start adding con An invitation has been sent to the new user with details about how to log in to Umbraco. Hello there and welcome to Umbraco! In just 1 minute you’ll be good to go, we just need you to setup a password and add a picture for your avatar. Welcome to Umbraco! Unfortunately your invite has expired. Please contact your administrator and ask them to resend it. - Uploading a photo of yourself will make it easy for other users to recognize you. Click the circle above to upload your photo. + Uploading a photo of yourself will make it easy for other users to recognize you. Click the circle above to upload your photo. Writer Change Your profile diff --git a/src/Umbraco.Web/Editors/MemberGroupController.cs b/src/Umbraco.Web/Editors/MemberGroupController.cs index 6feaab540b..caf158f6de 100644 --- a/src/Umbraco.Web/Editors/MemberGroupController.cs +++ b/src/Umbraco.Web/Editors/MemberGroupController.cs @@ -93,7 +93,11 @@ namespace Umbraco.Web.Editors service.Save(memberGroup); var display = Mapper.Map(memberGroup); - display.AddSuccessNotification(Services.TextService.Localize("speechBubbles/memberGroupSaved"), string.Empty); + + display.AddSuccessNotification( + Services.TextService.Localize("speechBubbles/memberGroupSavedHeader"), + string.Empty); + return display; } } From c8d9e59436e4dfb88be47ae1f6f88ea7dd616a89 Mon Sep 17 00:00:00 2001 From: Stephan Date: Wed, 30 Jan 2019 14:00:54 +0100 Subject: [PATCH 397/437] Fix SqlServer version detection --- .../Persistence/SqlSyntax/SqlServerSyntaxProvider.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Persistence/SqlSyntax/SqlServerSyntaxProvider.cs b/src/Umbraco.Core/Persistence/SqlSyntax/SqlServerSyntaxProvider.cs index 8b8550b694..4e9417c760 100644 --- a/src/Umbraco.Core/Persistence/SqlSyntax/SqlServerSyntaxProvider.cs +++ b/src/Umbraco.Core/Persistence/SqlSyntax/SqlServerSyntaxProvider.cs @@ -134,7 +134,8 @@ namespace Umbraco.Core.Persistence.SqlSyntax using (var reader = command.ExecuteReader()) { reader.Read(); - version = new ServerVersionInfo(reader.GetString(0), reader.GetString(2), reader.GetString(3), (EngineEdition) reader.GetInt32(5), reader.GetString(7), reader.GetString(9)); + // InstanceName can be NULL for the default instance + version = new ServerVersionInfo(reader.GetString(0), reader.GetString(2), reader.IsDBNull(3) ? "(default)" : reader.GetString(3), (EngineEdition) reader.GetInt32(5), reader.GetString(7), reader.GetString(9)); } connection.Close(); } From 357da8ac6ea0cf8ada54d7f64122ee891badf264 Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 31 Jan 2019 00:03:03 +1100 Subject: [PATCH 398/437] removes PropertyContextHelpOption from umbraco settings --- .../Configuration/UmbracoSettings/ContentElement.cs | 2 -- .../Configuration/UmbracoSettings/IContentSection.cs | 4 +--- .../Configurations/UmbracoSettings/ContentElementTests.cs | 5 ----- .../Configurations/UmbracoSettings/umbracoSettings.config | 6 ------ src/Umbraco.Web.UI/config/umbracoSettings.config | 3 --- 5 files changed, 1 insertion(+), 19 deletions(-) diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs index a014718882..6e18c369d8 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs @@ -68,8 +68,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings bool IContentSection.ResolveUrlsFromTextString => ResolveUrlsFromTextString; - string IContentSection.PropertyContextHelpOption => PropertyContextHelpOption; - string IContentSection.PreviewBadge => PreviewBadge; MacroErrorBehaviour IContentSection.MacroErrorBehaviour => MacroErrors; diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs index 8e77d9b722..147f5745da 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs @@ -16,9 +16,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings bool ResolveUrlsFromTextString { get; } IEnumerable Error404Collection { get; } - - string PropertyContextHelpOption { get; } - + string PreviewBadge { get; } MacroErrorBehaviour MacroErrorBehaviour { get; } diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs index 1933911bb2..f6aa1fe852 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs @@ -80,11 +80,6 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings Assert.IsTrue(SettingsSection.Content.CloneXmlContent); } - [Test] - public void PropertyContextHelpOption() - { - Assert.AreEqual(SettingsSection.Content.PropertyContextHelpOption, "text"); - } [Test] public void PreviewBadge() { diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config index ee12a66ba8..fb723117ba 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config @@ -40,12 +40,6 @@ true - - True - - - text - true diff --git a/src/Umbraco.Web.UI/config/umbracoSettings.config b/src/Umbraco.Web.UI/config/umbracoSettings.config index fcc2dd6bfb..346f5021fb 100644 --- a/src/Umbraco.Web.UI/config/umbracoSettings.config +++ b/src/Umbraco.Web.UI/config/umbracoSettings.config @@ -39,9 +39,6 @@ your@email.here - - text - Date: Wed, 30 Jan 2019 14:08:50 +0100 Subject: [PATCH 399/437] V8: Align delete dialogs with the other dialogs (take two) (#4288) --- .../src/views/components/umb-confirm.html | 1 - src/Umbraco.Web.UI.Client/src/views/content/delete.html | 4 ++-- .../src/views/content/emptyrecyclebin.html | 2 +- .../src/views/contentblueprints/delete.html | 4 ++-- src/Umbraco.Web.UI.Client/src/views/datatypes/delete.html | 4 ++-- src/Umbraco.Web.UI.Client/src/views/dictionary/delete.html | 6 +++--- .../src/views/documenttypes/delete.html | 4 ++-- src/Umbraco.Web.UI.Client/src/views/macros/delete.html | 4 ++-- src/Umbraco.Web.UI.Client/src/views/media/delete.html | 4 ++-- .../src/views/media/emptyrecyclebin.html | 2 +- src/Umbraco.Web.UI.Client/src/views/mediatypes/delete.html | 4 ++-- src/Umbraco.Web.UI.Client/src/views/member/delete.html | 4 ++-- .../src/views/membergroups/delete.html | 4 ++-- src/Umbraco.Web.UI.Client/src/views/membertypes/delete.html | 4 ++-- .../src/views/partialviewmacros/delete.html | 4 ++-- .../src/views/partialviews/delete.html | 4 ++-- .../src/views/relationtypes/delete.html | 2 +- src/Umbraco.Web.UI.Client/src/views/scripts/delete.html | 4 ++-- src/Umbraco.Web.UI.Client/src/views/stylesheets/delete.html | 4 ++-- src/Umbraco.Web.UI.Client/src/views/templates/delete.html | 4 ++-- 20 files changed, 36 insertions(+), 37 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/components/umb-confirm.html b/src/Umbraco.Web.UI.Client/src/views/components/umb-confirm.html index 70839f2625..8426d03acf 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/umb-confirm.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/umb-confirm.html @@ -1,6 +1,5 @@

    {{caption}}

    -
    Cancel diff --git a/src/Umbraco.Web.UI.Client/src/views/content/delete.html b/src/Umbraco.Web.UI.Client/src/views/content/delete.html index 047776de54..28c162854c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/delete.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/delete.html @@ -1,8 +1,8 @@
    -

    - Are you sure you want to delete {{currentNode.name}} ? +

    + Are you sure you want to delete {{currentNode.name}}?

    diff --git a/src/Umbraco.Web.UI.Client/src/views/content/emptyrecyclebin.html b/src/Umbraco.Web.UI.Client/src/views/content/emptyrecyclebin.html index cdde683cf1..524bb06354 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/emptyrecyclebin.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/emptyrecyclebin.html @@ -5,7 +5,7 @@
    -

    +

    When items are deleted from the recycle bin, they will be gone forever. Are you sure?

    diff --git a/src/Umbraco.Web.UI.Client/src/views/contentblueprints/delete.html b/src/Umbraco.Web.UI.Client/src/views/contentblueprints/delete.html index 44a31254d2..324fb2ae9f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/contentblueprints/delete.html +++ b/src/Umbraco.Web.UI.Client/src/views/contentblueprints/delete.html @@ -1,8 +1,8 @@
    -

    - Are you sure you want to delete {{currentNode.name}} ? +

    + Are you sure you want to delete {{currentNode.name}}?

    diff --git a/src/Umbraco.Web.UI.Client/src/views/datatypes/delete.html b/src/Umbraco.Web.UI.Client/src/views/datatypes/delete.html index debd3ccb8c..797dff5651 100644 --- a/src/Umbraco.Web.UI.Client/src/views/datatypes/delete.html +++ b/src/Umbraco.Web.UI.Client/src/views/datatypes/delete.html @@ -1,8 +1,8 @@
    -

    - Are you sure you want to delete {{currentNode.name}} ? +

    + Are you sure you want to delete {{currentNode.name}}?

    diff --git a/src/Umbraco.Web.UI.Client/src/views/dictionary/delete.html b/src/Umbraco.Web.UI.Client/src/views/dictionary/delete.html index 61c26c09a7..2cb9bbffe2 100644 --- a/src/Umbraco.Web.UI.Client/src/views/dictionary/delete.html +++ b/src/Umbraco.Web.UI.Client/src/views/dictionary/delete.html @@ -1,12 +1,12 @@ 
    -

    - Are you sure you want to delete {{currentNode.name}} ? +

    + Are you sure you want to delete {{currentNode.name}}?

    -
    \ No newline at end of file +
    diff --git a/src/Umbraco.Web.UI.Client/src/views/documenttypes/delete.html b/src/Umbraco.Web.UI.Client/src/views/documenttypes/delete.html index d0826bf80a..2a0185e186 100644 --- a/src/Umbraco.Web.UI.Client/src/views/documenttypes/delete.html +++ b/src/Umbraco.Web.UI.Client/src/views/documenttypes/delete.html @@ -2,9 +2,9 @@
    -

    +

    Are you sure you want to delete - {{currentNode.name}} ? + {{currentNode.name}}?

    diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/delete.html b/src/Umbraco.Web.UI.Client/src/views/macros/delete.html index 2d097e110b..9d16e2d4e6 100644 --- a/src/Umbraco.Web.UI.Client/src/views/macros/delete.html +++ b/src/Umbraco.Web.UI.Client/src/views/macros/delete.html @@ -1,8 +1,8 @@
    -

    - Are you sure you want to delete {{vm.name}} ? +

    + Are you sure you want to delete {{vm.name}}?

    diff --git a/src/Umbraco.Web.UI.Client/src/views/media/delete.html b/src/Umbraco.Web.UI.Client/src/views/media/delete.html index 3c9716eb3f..af33574f55 100644 --- a/src/Umbraco.Web.UI.Client/src/views/media/delete.html +++ b/src/Umbraco.Web.UI.Client/src/views/media/delete.html @@ -1,8 +1,8 @@
    -

    - Are you sure you want to delete {{currentNode.name}} ? +

    + Are you sure you want to delete {{currentNode.name}}?

    diff --git a/src/Umbraco.Web.UI.Client/src/views/media/emptyrecyclebin.html b/src/Umbraco.Web.UI.Client/src/views/media/emptyrecyclebin.html index cc7d261a95..9d1b28edc9 100644 --- a/src/Umbraco.Web.UI.Client/src/views/media/emptyrecyclebin.html +++ b/src/Umbraco.Web.UI.Client/src/views/media/emptyrecyclebin.html @@ -6,7 +6,7 @@
    -

    +

    When items are deleted from the recycle bin, they will be gone forever. Are you sure?

    diff --git a/src/Umbraco.Web.UI.Client/src/views/mediatypes/delete.html b/src/Umbraco.Web.UI.Client/src/views/mediatypes/delete.html index 6d33b6ae0c..608eb5b0ba 100644 --- a/src/Umbraco.Web.UI.Client/src/views/mediatypes/delete.html +++ b/src/Umbraco.Web.UI.Client/src/views/mediatypes/delete.html @@ -1,8 +1,8 @@
    -

    - Are you sure you want to delete {{currentNode.name}} ? +

    + Are you sure you want to delete {{currentNode.name}}?

    diff --git a/src/Umbraco.Web.UI.Client/src/views/member/delete.html b/src/Umbraco.Web.UI.Client/src/views/member/delete.html index ce7a118dd9..a58b2edace 100644 --- a/src/Umbraco.Web.UI.Client/src/views/member/delete.html +++ b/src/Umbraco.Web.UI.Client/src/views/member/delete.html @@ -1,8 +1,8 @@
    -

    - Are you sure you want to delete {{currentNode.name}} ? +

    + Are you sure you want to delete {{currentNode.name}}?

    diff --git a/src/Umbraco.Web.UI.Client/src/views/membergroups/delete.html b/src/Umbraco.Web.UI.Client/src/views/membergroups/delete.html index 8b637a71dd..fff0348b87 100644 --- a/src/Umbraco.Web.UI.Client/src/views/membergroups/delete.html +++ b/src/Umbraco.Web.UI.Client/src/views/membergroups/delete.html @@ -1,8 +1,8 @@
    -

    - Are you sure you want to delete {{currentNode.name}} ? +

    + Are you sure you want to delete {{currentNode.name}}?

    diff --git a/src/Umbraco.Web.UI.Client/src/views/membertypes/delete.html b/src/Umbraco.Web.UI.Client/src/views/membertypes/delete.html index f1dad26a22..14be5a0761 100644 --- a/src/Umbraco.Web.UI.Client/src/views/membertypes/delete.html +++ b/src/Umbraco.Web.UI.Client/src/views/membertypes/delete.html @@ -1,8 +1,8 @@
    -

    - Are you sure you want to delete {{currentNode.name}} ? +

    + Are you sure you want to delete {{currentNode.name}}?

    diff --git a/src/Umbraco.Web.UI.Client/src/views/partialviewmacros/delete.html b/src/Umbraco.Web.UI.Client/src/views/partialviewmacros/delete.html index 6b66a48821..0adbc2aaa2 100644 --- a/src/Umbraco.Web.UI.Client/src/views/partialviewmacros/delete.html +++ b/src/Umbraco.Web.UI.Client/src/views/partialviewmacros/delete.html @@ -1,8 +1,8 @@

    -

    - Are you sure you want to delete {{currentNode.name}} ? +

    + Are you sure you want to delete {{currentNode.name}}?

    diff --git a/src/Umbraco.Web.UI.Client/src/views/partialviews/delete.html b/src/Umbraco.Web.UI.Client/src/views/partialviews/delete.html index c0fdf2c77f..fa1baa1eff 100644 --- a/src/Umbraco.Web.UI.Client/src/views/partialviews/delete.html +++ b/src/Umbraco.Web.UI.Client/src/views/partialviews/delete.html @@ -8,8 +8,8 @@
    -

    - Are you sure you want to delete {{currentNode.name}} ? +

    + Are you sure you want to delete {{currentNode.name}}?

    diff --git a/src/Umbraco.Web.UI.Client/src/views/relationtypes/delete.html b/src/Umbraco.Web.UI.Client/src/views/relationtypes/delete.html index e0fdbc6751..b937d0869d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/relationtypes/delete.html +++ b/src/Umbraco.Web.UI.Client/src/views/relationtypes/delete.html @@ -1,7 +1,7 @@
    -

    +

    Are you sure you want to delete {{currentNode.name}}?

    diff --git a/src/Umbraco.Web.UI.Client/src/views/scripts/delete.html b/src/Umbraco.Web.UI.Client/src/views/scripts/delete.html index 187db7f443..aae686d5ce 100644 --- a/src/Umbraco.Web.UI.Client/src/views/scripts/delete.html +++ b/src/Umbraco.Web.UI.Client/src/views/scripts/delete.html @@ -1,8 +1,8 @@
    -

    - Are you sure you want to delete {{currentNode.name}} ? +

    + Are you sure you want to delete {{currentNode.name}}?

    diff --git a/src/Umbraco.Web.UI.Client/src/views/stylesheets/delete.html b/src/Umbraco.Web.UI.Client/src/views/stylesheets/delete.html index fd6f6edd78..d32a7197e1 100644 --- a/src/Umbraco.Web.UI.Client/src/views/stylesheets/delete.html +++ b/src/Umbraco.Web.UI.Client/src/views/stylesheets/delete.html @@ -1,8 +1,8 @@
    -

    - Are you sure you want to delete {{currentNode.name}} ? +

    + Are you sure you want to delete {{currentNode.name}}?

    diff --git a/src/Umbraco.Web.UI.Client/src/views/templates/delete.html b/src/Umbraco.Web.UI.Client/src/views/templates/delete.html index c98677f764..7c3af5937e 100644 --- a/src/Umbraco.Web.UI.Client/src/views/templates/delete.html +++ b/src/Umbraco.Web.UI.Client/src/views/templates/delete.html @@ -8,8 +8,8 @@
    -

    - Are you sure you want to delete {{currentNode.name}} ? +

    + Are you sure you want to delete {{currentNode.name}}?

    From d852422328d412afaff3c71bfe8e48bce4dddfee Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 31 Jan 2019 00:09:30 +1100 Subject: [PATCH 400/437] removes CloneXmlContent from umbraco settings --- build/NuSpecs/tools/Web.config.install.xdt | 8 +++----- .../Configuration/UmbracoSettings/ContentElement.cs | 7 +------ .../Configuration/UmbracoSettings/IContentSection.cs | 2 -- .../Configurations/UmbracoSettings/ContentElementTests.cs | 5 ----- .../Configurations/UmbracoSettings/umbracoSettings.config | 2 -- src/Umbraco.Tests/LegacyXmlPublishedCache/XmlStore.cs | 2 +- 6 files changed, 5 insertions(+), 21 deletions(-) diff --git a/build/NuSpecs/tools/Web.config.install.xdt b/build/NuSpecs/tools/Web.config.install.xdt index 2f6fb8f61c..74a614275f 100644 --- a/build/NuSpecs/tools/Web.config.install.xdt +++ b/build/NuSpecs/tools/Web.config.install.xdt @@ -4,13 +4,11 @@
    - -
    - +
    -
    +
    @@ -25,7 +23,7 @@ - + diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs index 6e18c369d8..356b009d5c 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs @@ -36,10 +36,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings [ConfigurationProperty("allowedUploadFiles")] internal CommaDelimitedConfigurationElement AllowedUploadFiles => GetOptionalDelimitedElement("allowedUploadFiles", new string[0]); - - [ConfigurationProperty("cloneXmlContent")] - internal InnerTextConfigurationElement CloneXmlContent => GetOptionalTextElement("cloneXmlContent", true); - + [ConfigurationProperty("GlobalPreviewStorageEnabled")] internal InnerTextConfigurationElement GlobalPreviewStorageEnabled => GetOptionalTextElement("GlobalPreviewStorageEnabled", false); @@ -76,8 +73,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings IEnumerable IContentSection.AllowedUploadFiles => AllowedUploadFiles; - bool IContentSection.CloneXmlContent => CloneXmlContent; - bool IContentSection.GlobalPreviewStorageEnabled => GlobalPreviewStorageEnabled; string IContentSection.DefaultDocumentTypeProperty => DefaultDocumentTypeProperty; diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs index 147f5745da..4f3013b966 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs @@ -25,8 +25,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings IEnumerable AllowedUploadFiles { get; } - bool CloneXmlContent { get; } - bool GlobalPreviewStorageEnabled { get; } string DefaultDocumentTypeProperty { get; } diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs index f6aa1fe852..8d6aa0af6b 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs @@ -74,11 +74,6 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings { Assert.IsFalse(SettingsSection.Content.GlobalPreviewStorageEnabled); } - [Test] - public void CloneXmlContent() - { - Assert.IsTrue(SettingsSection.Content.CloneXmlContent); - } [Test] public void PreviewBadge() diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config index fb723117ba..7acb547b1c 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config @@ -40,8 +40,6 @@ true - true - In Preview Mode - click to end diff --git a/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlStore.cs b/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlStore.cs index e7aa4a216e..6dec9f2448 100644 --- a/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlStore.cs +++ b/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlStore.cs @@ -263,7 +263,7 @@ namespace Umbraco.Tests.LegacyXmlPublishedCache private bool SyncFromXmlFile => false; // whether _xml is immutable or not (achieved by cloning before changing anything) - private static bool XmlIsImmutable => Current.Configs.Settings().Content.CloneXmlContent; + private static bool XmlIsImmutable => true; // whether to keep version of everything (incl. medias & members) in cmsPreviewXml // for audit purposes - false by default, not in umbracoSettings.config From 82ba3604353cd36e565808b96e23c76f51bf72cb Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 31 Jan 2019 00:16:15 +1100 Subject: [PATCH 401/437] removes defaultDocumentTypeProperty from umbraco settings --- .../Configuration/UmbracoSettings/ContentElement.cs | 7 +------ .../Configuration/UmbracoSettings/IContentSection.cs | 4 +--- .../Configurations/UmbracoSettings/ContentElementTests.cs | 5 ----- .../Configurations/UmbracoSettings/umbracoSettings.config | 2 -- src/Umbraco.Web.UI/config/umbracoSettings.config | 3 --- 5 files changed, 2 insertions(+), 19 deletions(-) diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs index 356b009d5c..6ad44da75a 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs @@ -39,10 +39,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings [ConfigurationProperty("GlobalPreviewStorageEnabled")] internal InnerTextConfigurationElement GlobalPreviewStorageEnabled => GetOptionalTextElement("GlobalPreviewStorageEnabled", false); - - [ConfigurationProperty("defaultDocumentTypeProperty")] - internal InnerTextConfigurationElement DefaultDocumentTypeProperty => GetOptionalTextElement("defaultDocumentTypeProperty", "Textstring"); - + [ConfigurationProperty("showDeprecatedPropertyEditors")] internal InnerTextConfigurationElement ShowDeprecatedPropertyEditors => GetOptionalTextElement("showDeprecatedPropertyEditors", false); @@ -75,8 +72,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings bool IContentSection.GlobalPreviewStorageEnabled => GlobalPreviewStorageEnabled; - string IContentSection.DefaultDocumentTypeProperty => DefaultDocumentTypeProperty; - bool IContentSection.ShowDeprecatedPropertyEditors => ShowDeprecatedPropertyEditors; bool IContentSection.EnableInheritedDocumentTypes => EnableInheritedDocumentTypes; diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs index 4f3013b966..a9ef8f5d92 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs @@ -26,9 +26,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings IEnumerable AllowedUploadFiles { get; } bool GlobalPreviewStorageEnabled { get; } - - string DefaultDocumentTypeProperty { get; } - + /// /// Gets a value indicating whether to show deprecated property editors in /// a datatype list of available editors. diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs index 8d6aa0af6b..22b301dc31 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentElementTests.cs @@ -64,11 +64,6 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings Assert.AreEqual(SettingsSection.Content.ImageAutoFillProperties.ElementAt(1).ExtensionFieldAlias, "umbracoExtension2"); } - [Test] - public void DefaultDocumentTypeProperty() - { - Assert.AreEqual(SettingsSection.Content.DefaultDocumentTypeProperty, "Textstring"); - } [Test] public void GlobalPreviewStorageEnabled() { diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config index 7acb547b1c..47bcfa3ac4 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config @@ -59,8 +59,6 @@ jpg,png,gif - - Textstring diff --git a/src/Umbraco.Web.UI/config/umbracoSettings.config b/src/Umbraco.Web.UI/config/umbracoSettings.config index 346f5021fb..4f6474b658 100644 --- a/src/Umbraco.Web.UI/config/umbracoSettings.config +++ b/src/Umbraco.Web.UI/config/umbracoSettings.config @@ -66,9 +66,6 @@ - - Textstring - false From 0016962bc260190e7398a2aa0f5cb15c050170e6 Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Wed, 30 Jan 2019 14:27:58 +0100 Subject: [PATCH 402/437] v8: Edit macro parameters (#4317) --- .../src/less/components/umb-stylesheet.less | 1 - .../macros/infiniteeditors/parameter.html | 2 +- .../views/macro.parameters.controller.js | 30 ++++++++++++++----- .../src/views/macros/views/parameters.html | 13 ++++---- .../src/views/macros/views/settings.html | 2 +- .../views/rules/rules.controller.js | 2 +- .../views/stylesheets/views/rules/rules.html | 3 +- src/Umbraco.Web.UI/Umbraco/config/lang/da.xml | 10 +++++-- src/Umbraco.Web.UI/Umbraco/config/lang/en.xml | 11 +++++-- .../Umbraco/config/lang/en_us.xml | 13 ++++---- 10 files changed, 59 insertions(+), 28 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-stylesheet.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-stylesheet.less index ad7f4ea1a2..38ceba2a59 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-stylesheet.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-stylesheet.less @@ -7,7 +7,6 @@ padding: 6px; margin: 10px 0 !important; background: @gray-10; - cursor: pointer; border-radius: @baseBorderRadius; } diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/infiniteeditors/parameter.html b/src/Umbraco.Web.UI.Client/src/views/macros/infiniteeditors/parameter.html index 402c3c4984..ae46bf6057 100644 --- a/src/Umbraco.Web.UI.Client/src/views/macros/infiniteeditors/parameter.html +++ b/src/Umbraco.Web.UI.Client/src/views/macros/infiniteeditors/parameter.html @@ -21,7 +21,7 @@ - + diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/views/macro.parameters.controller.js b/src/Umbraco.Web.UI.Client/src/views/macros/views/macro.parameters.controller.js index 9ae13399fa..b651d05eda 100644 --- a/src/Umbraco.Web.UI.Client/src/views/macros/views/macro.parameters.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/macros/views/macro.parameters.controller.js @@ -6,17 +6,17 @@ * @description * The controller for editing macros parameters */ -function MacrosParametersController($scope, editorService) { +function MacrosParametersController($scope, editorService, localizationService) { $scope.sortableOptions = { axis: 'y', containment: 'parent', cursor: 'move', - items: 'div.umb-stylesheet-rules__listitem', + items: '> div.control-group', handle: '.handle', tolerance: 'pointer', update: function (e, ui) { - $scope.model.setDirty(); + setDirty(); } }; @@ -25,29 +25,29 @@ function MacrosParametersController($scope, editorService) { evt.preventDefault(); $scope.model.macro.parameters = _.without($scope.model.macro.parameters, parameter); - $scope.model.setDirty(); + setDirty(); } $scope.add = function (evt) { evt.preventDefault(); - openOverlay({}, 'Add parameter', (newParameter) => { + openOverlay({}, $scope.labels.addParameter, (newParameter) => { if (!$scope.model.macro.parameters) { $scope.model.macro.parameters = []; } $scope.model.macro.parameters.push(newParameter); - $scope.model.setDirty(); + setDirty(); }); } $scope.edit = function (parameter, evt) { evt.preventDefault(); - openOverlay(parameter,'Edit parameter', (newParameter) => { + openOverlay(parameter, $scope.labels.editParameter, (newParameter) => { parameter.key = newParameter.key; parameter.label = newParameter.label; parameter.editor = newParameter.editor; - $scope.model.setDirty(); + setDirty(); }); } @@ -72,6 +72,20 @@ function MacrosParametersController($scope, editorService) { } + function setDirty() { + $scope.model.setDirty(); + } + + function init() { + localizationService.localizeMany(["macro_addParameter", "macro_editParameter"]).then(function (data) { + $scope.labels = { + addParameter: data[0], + editParameter: data[1] + } + }); + } + + init(); } angular.module("umbraco").controller("Umbraco.Editors.Macros.ParametersController", MacrosParametersController); diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/views/parameters.html b/src/Umbraco.Web.UI.Client/src/views/macros/views/parameters.html index 543059e5a8..0aa4a47fc0 100644 --- a/src/Umbraco.Web.UI.Client/src/views/macros/views/parameters.html +++ b/src/Umbraco.Web.UI.Client/src/views/macros/views/parameters.html @@ -3,17 +3,18 @@
    Parameters
    - Define the parameters that should be available when using this macro. + Define the parameters that should be available when using this macro.
    -
    +
    -
    +
    -
    - {{parameter.label}} +
    + {{parameter.label}} ({{parameter.key}}){{parameter.editor}}
    -
    +
    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 59ccf2bc7e..0b214b9dee 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 @@ -31,7 +31,7 @@ - + diff --git a/src/Umbraco.Web.UI.Client/src/views/stylesheets/views/rules/rules.controller.js b/src/Umbraco.Web.UI.Client/src/views/stylesheets/views/rules/rules.controller.js index b3aeedeb6e..7a3a51cf2e 100644 --- a/src/Umbraco.Web.UI.Client/src/views/stylesheets/views/rules/rules.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/stylesheets/views/rules/rules.controller.js @@ -67,7 +67,7 @@ angular.module("umbraco").controller("Umbraco.Editors.StyleSheets.RulesControlle } function init() { - localizationService.localizeMany(["stylesheet_overlayTitleAddRule", "stylesheet_overlayTitleEditRule"]).then(function (data) { + localizationService.localizeMany(["stylesheet_addRule", "stylesheet_editRule"]).then(function (data) { $scope.labels = { addRule: data[0], editRule: data[1] diff --git a/src/Umbraco.Web.UI.Client/src/views/stylesheets/views/rules/rules.html b/src/Umbraco.Web.UI.Client/src/views/stylesheets/views/rules/rules.html index 018d4d3741..213499740f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/stylesheets/views/rules/rules.html +++ b/src/Umbraco.Web.UI.Client/src/views/stylesheets/views/rules/rules.html @@ -8,12 +8,13 @@
    -
    +
    {{rule.name}}
    diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml index f4568841c9..a507366b56 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml @@ -320,6 +320,7 @@ Ny partial view makro fra snippet Ny partial view makro (uden makro) Ny stylesheet-fil + Ny Rich Text Editor stylesheet-fil Til dit website @@ -1088,15 +1089,17 @@ Mange hilsner fra Umbraco robotten %0% er nu låst op + Tilføj style + Redigér style Teksteditor-styles Definér de styles, der skal være tilgængelige i teksteditoren for dette stylesheet Selector Bruger CSS-syntaks, f.eks. "h1" eller ".redheader" Rediger stylesheet Rediger CSS-egenskab - Tilføj style - Redigér style Det navn der vises i teksteditoren + Forhåndsvisning + Hvordan teksten vil se ud i teksteditoren. Styles Den CSS der skal anvendes i teksteditoren, f.eks. "color:red;" Kode @@ -1278,7 +1281,10 @@ Mange hilsner fra Umbraco robotten Fallback sprog + Tilføj parameter + Rediger parameter Parametre + Definer de parametre, der skal være tilgængelige, når du bruger denne makro. Alternativt felt diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml index 47b969dacf..e89ef44923 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml @@ -331,6 +331,7 @@ New partial view macro from snippet New partial view macro (without macro) New style sheet file + New Rich Text Editor style sheet file Browse your website @@ -1361,13 +1362,15 @@ To manage your website, simply open the Umbraco back office and start adding con An error occurred while exporting the document type + Add style + Edit style Rich text editor styles Define the styles that should be available in the rich text editor for this stylesheet Edit stylesheet Edit stylesheet property The name displayed in the editor style selector - Add style - Edit style + Preview + How the text will look like in the rich text editor. Selector Uses CSS syntax, e.g. "h1" or ".redHeader" Styles @@ -1557,8 +1560,12 @@ To manage your website, simply open the Umbraco back office and start adding con To allow multi-lingual content to fall back to another language if not present in the requested language, select it here. Fall back language + + Add parameter + Edit parameter Parameters + Define the parameters that should be available when using this macro. Building models 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 197dbdc003..bb8d9b12eb 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml @@ -1375,21 +1375,21 @@ To manage your website, simply open the Umbraco back office and start adding con The expire date cannot be before the release date + Add style + Edit style Rich text editor styles Define the styles that should be available in the rich text editor for this stylesheet Edit stylesheet Edit stylesheet property The name displayed in the editor style selector - Add style - Edit style + Preview + How the text will look like in the rich text editor. Selector Uses CSS syntax, e.g. "h1" or ".redHeader" Styles The CSS that should be applied in the rich text editor, e.g. "color:red;" Code - Rich Text Editor - Preview - How the text will look like in the rich text editor. + Rich Text Editor Failed to delete template with ID %0% @@ -1574,7 +1574,10 @@ To manage your website, simply open the Umbraco back office and start adding con Fall back language + Add parameter + Edit parameter Parameters + Define the parameters that should be available when using this macro. Building models From 9571f48bd3e9f4d791588f82768c0fb03331853e Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 31 Jan 2019 00:30:28 +1100 Subject: [PATCH 403/437] Removes AutoLegacy routing and the legacy UseDomainPrefixes from umbraco settings --- .../UmbracoSettings/IRequestHandlerSection.cs | 2 -- .../UmbracoSettings/RequestHandlerElement.cs | 11 ------- .../RequestHandlerElementTests.cs | 6 ---- .../umbracoSettings.minimal.config | 3 -- src/Umbraco.Tests/Routing/UrlProviderTests.cs | 31 ++----------------- .../Routing/UrlsProviderWithDomainsTests.cs | 26 +++------------- .../Routing/UrlsWithNestedDomains.cs | 2 -- .../TestHelpers/SettingsForTests.cs | 1 - .../config/umbracoSettings.Release.config | 3 -- .../config/umbracoSettings.config | 5 --- src/Umbraco.Web/Routing/DefaultUrlProvider.cs | 7 ----- src/Umbraco.Web/Routing/UrlProviderMode.cs | 5 --- 12 files changed, 6 insertions(+), 96 deletions(-) diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IRequestHandlerSection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IRequestHandlerSection.cs index f6d78eecf2..075c347b68 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/IRequestHandlerSection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IRequestHandlerSection.cs @@ -4,8 +4,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { public interface IRequestHandlerSection : IUmbracoConfigurationSection { - bool UseDomainPrefixes { get; } - bool AddTrailingSlash { get; } bool RemoveDoubleDashes { get; } diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/RequestHandlerElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/RequestHandlerElement.cs index b05a31537b..a5383dba87 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/RequestHandlerElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/RequestHandlerElement.cs @@ -7,12 +7,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { internal class RequestHandlerElement : UmbracoConfigurationElement, IRequestHandlerSection { - [ConfigurationProperty("useDomainPrefixes")] - public InnerTextConfigurationElement UseDomainPrefixes - { - get { return GetOptionalTextElement("useDomainPrefixes", false); } - } - [ConfigurationProperty("addTrailingSlash")] public InnerTextConfigurationElement AddTrailingSlash { @@ -94,11 +88,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings return collection; } - bool IRequestHandlerSection.UseDomainPrefixes - { - get { return UseDomainPrefixes; } - } - bool IRequestHandlerSection.AddTrailingSlash { get { return AddTrailingSlash; } diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/RequestHandlerElementTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/RequestHandlerElementTests.cs index ec2ae22e41..2d4d24f3de 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/RequestHandlerElementTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/RequestHandlerElementTests.cs @@ -7,12 +7,6 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings [TestFixture] public class RequestHandlerElementTests : UmbracoSettingsTests { - [Test] - public void UseDomainPrefixes() - { - Assert.IsTrue(SettingsSection.RequestHandler.UseDomainPrefixes == false); - - } [Test] public void AddTrailingSlash() { diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.minimal.config b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.minimal.config index bee7133051..cd9738c58f 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.minimal.config +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.minimal.config @@ -15,9 +15,6 @@ - - - 1 diff --git a/src/Umbraco.Tests/Routing/UrlProviderTests.cs b/src/Umbraco.Tests/Routing/UrlProviderTests.cs index 34a038cffe..236c198b3a 100644 --- a/src/Umbraco.Tests/Routing/UrlProviderTests.cs +++ b/src/Umbraco.Tests/Routing/UrlProviderTests.cs @@ -114,8 +114,6 @@ namespace Umbraco.Tests.Routing new DefaultUrlProvider(umbracoSettings.RequestHandler, Logger, globalSettings.Object, new SiteDomainHelper()) }, globalSettings: globalSettings.Object); - var requestMock = Mock.Get(umbracoSettings.RequestHandler); - requestMock.Setup(x => x.UseDomainPrefixes).Returns(false); var result = umbracoContext.UrlProvider.GetUrl(nodeId); Assert.AreEqual(niceUrlMatch, result); @@ -144,9 +142,7 @@ namespace Umbraco.Tests.Routing new DefaultUrlProvider(umbracoSettings.RequestHandler, Logger, globalSettings.Object, new SiteDomainHelper()) }, globalSettings: globalSettings.Object); - var requestMock = Mock.Get(umbracoSettings.RequestHandler); - requestMock.Setup(x => x.UseDomainPrefixes).Returns(false); - + var result = umbracoContext.UrlProvider.GetUrl(nodeId); Assert.AreEqual(niceUrlMatch, result); } @@ -161,8 +157,6 @@ namespace Umbraco.Tests.Routing var umbracoSettings = Current.Configs.Settings(); - var requestMock = Mock.Get(umbracoSettings.RequestHandler); - requestMock.Setup(x => x.UseDomainPrefixes).Returns(false); var contentType = new PublishedContentType(666, "alias", PublishedItemType.Content, Enumerable.Empty(), Enumerable.Empty(), ContentVariation.Culture); var publishedContent = new TestPublishedContent(contentType, 1234, Guid.NewGuid(), new Dictionary(), false); @@ -209,9 +203,6 @@ namespace Umbraco.Tests.Routing var umbracoSettings = Current.Configs.Settings(); - var requestMock = Mock.Get(umbracoSettings.RequestHandler); - requestMock.Setup(x => x.UseDomainPrefixes).Returns(false); - var contentType = new PublishedContentType(666, "alias", PublishedItemType.Content, Enumerable.Empty(), Enumerable.Empty(), ContentVariation.Culture); var publishedContent = new TestPublishedContent(contentType, 1234, Guid.NewGuid(), new Dictionary(), false); @@ -266,9 +257,6 @@ namespace Umbraco.Tests.Routing var umbracoSettings = Current.Configs.Settings(); - var requestMock = Mock.Get(umbracoSettings.RequestHandler); - requestMock.Setup(x => x.UseDomainPrefixes).Returns(false); - var contentType = new PublishedContentType(666, "alias", PublishedItemType.Content, Enumerable.Empty(), Enumerable.Empty(), ContentVariation.Culture); var publishedContent = new TestPublishedContent(contentType, 1234, Guid.NewGuid(), new Dictionary(), false); @@ -319,9 +307,6 @@ namespace Umbraco.Tests.Routing var umbracoSettings = Current.Configs.Settings(); - var requestMock = Mock.Get(umbracoSettings.RequestHandler); - requestMock.Setup(x => x.UseDomainPrefixes).Returns(false); - var umbracoContext = GetUmbracoContext("http://example.com/test", 1111, umbracoSettings: umbracoSettings, urlProviders: new[] { new DefaultUrlProvider(umbracoSettings.RequestHandler, Logger, globalSettings.Object, new SiteDomainHelper()) @@ -329,10 +314,6 @@ namespace Umbraco.Tests.Routing Assert.AreEqual("/home/sub1/custom-sub-1/", umbracoContext.UrlProvider.GetUrl(1177)); - requestMock.Setup(x => x.UseDomainPrefixes).Returns(true); - Assert.AreEqual("http://example.com/home/sub1/custom-sub-1/", umbracoContext.UrlProvider.GetUrl(1177)); - - requestMock.Setup(x => x.UseDomainPrefixes).Returns(false); umbracoContext.UrlProvider.Mode = UrlProviderMode.Absolute; Assert.AreEqual("http://example.com/home/sub1/custom-sub-1/", umbracoContext.UrlProvider.GetUrl(1177)); } @@ -351,17 +332,9 @@ namespace Umbraco.Tests.Routing }, globalSettings: globalSettings.Object); //mock the Umbraco settings that we need - var requestMock = Mock.Get(umbracoSettings.RequestHandler); - requestMock.Setup(x => x.UseDomainPrefixes).Returns(false); - + Assert.AreEqual("#", umbracoContext.UrlProvider.GetUrl(999999)); - requestMock.Setup(x => x.UseDomainPrefixes).Returns(true); - - Assert.AreEqual("#", umbracoContext.UrlProvider.GetUrl(999999)); - - requestMock.Setup(x => x.UseDomainPrefixes).Returns(false); - umbracoContext.UrlProvider.Mode = UrlProviderMode.Absolute; Assert.AreEqual("#", umbracoContext.UrlProvider.GetUrl(999999)); diff --git a/src/Umbraco.Tests/Routing/UrlsProviderWithDomainsTests.cs b/src/Umbraco.Tests/Routing/UrlsProviderWithDomainsTests.cs index be654b4a09..c01ee83d6a 100644 --- a/src/Umbraco.Tests/Routing/UrlsProviderWithDomainsTests.cs +++ b/src/Umbraco.Tests/Routing/UrlsProviderWithDomainsTests.cs @@ -176,8 +176,6 @@ namespace Umbraco.Tests.Routing public void Get_Url_SimpleDomain(int nodeId, string currentUrl, bool absolute, string expected) { var settings = SettingsForTests.GenerateMockUmbracoSettings(); - var request = Mock.Get(settings.RequestHandler); - request.Setup(x => x.UseDomainPrefixes).Returns(false); var globalSettings = Mock.Get(Factory.GetInstance()); //this will modify the IGlobalSettings instance stored in the container globalSettings.Setup(x => x.HideTopLevelNodeFromPath).Returns(false); // ignored w/domains @@ -210,9 +208,7 @@ namespace Umbraco.Tests.Routing public void Get_Url_SimpleWithSchemeAndPath(int nodeId, string currentUrl, bool absolute, string expected) { var settings = SettingsForTests.GenerateMockUmbracoSettings(); - var request = Mock.Get(settings.RequestHandler); - request.Setup(x => x.UseDomainPrefixes).Returns(false); - + var globalSettings = Mock.Get(Factory.GetInstance()); //this will modify the IGlobalSettings instance stored in the container globalSettings.Setup(x => x.HideTopLevelNodeFromPath).Returns(false); // ignored w/domains @@ -236,8 +232,6 @@ namespace Umbraco.Tests.Routing public void Get_Url_DeepDomain(int nodeId, string currentUrl, bool absolute, string expected) { var settings = SettingsForTests.GenerateMockUmbracoSettings(); - var request = Mock.Get(settings.RequestHandler); - request.Setup(x => x.UseDomainPrefixes).Returns(false); var globalSettings = Mock.Get(Factory.GetInstance()); //this will modify the IGlobalSettings instance stored in the container globalSettings.Setup(x => x.HideTopLevelNodeFromPath).Returns(false); // ignored w/domains @@ -268,9 +262,7 @@ namespace Umbraco.Tests.Routing public void Get_Url_NestedDomains(int nodeId, string currentUrl, bool absolute, string expected) { var settings = SettingsForTests.GenerateMockUmbracoSettings(); - var request = Mock.Get(settings.RequestHandler); - request.Setup(x => x.UseDomainPrefixes).Returns(false); - + var globalSettings = Mock.Get(Factory.GetInstance()); //this will modify the IGlobalSettings instance stored in the container globalSettings.Setup(x => x.HideTopLevelNodeFromPath).Returns(false); // ignored w/domains @@ -290,9 +282,7 @@ namespace Umbraco.Tests.Routing public void Get_Url_DomainsAndCache() { var settings = SettingsForTests.GenerateMockUmbracoSettings(); - var request = Mock.Get(settings.RequestHandler); - request.Setup(x => x.UseDomainPrefixes).Returns(false); - + var globalSettings = Mock.Get(Factory.GetInstance()); //this will modify the IGlobalSettings instance stored in the container globalSettings.Setup(x => x.HideTopLevelNodeFromPath).Returns(false); // ignored w/domains @@ -355,9 +345,7 @@ namespace Umbraco.Tests.Routing public void Get_Url_Relative_Or_Absolute() { var settings = SettingsForTests.GenerateMockUmbracoSettings(); - var requestMock = Mock.Get(settings.RequestHandler); - requestMock.Setup(x => x.UseDomainPrefixes).Returns(false); - + var globalSettings = Mock.Get(Factory.GetInstance()); //this will modify the IGlobalSettings instance stored in the container globalSettings.Setup(x => x.HideTopLevelNodeFromPath).Returns(false); // ignored w/domains @@ -371,12 +359,6 @@ namespace Umbraco.Tests.Routing Assert.AreEqual("/en/1001-1-1/", umbracoContext.UrlProvider.GetUrl(100111)); Assert.AreEqual("http://domain3.com/en/1003-1-1/", umbracoContext.UrlProvider.GetUrl(100311)); - requestMock.Setup(x => x.UseDomainPrefixes).Returns(true); - - Assert.AreEqual("http://domain1.com/en/1001-1-1/", umbracoContext.UrlProvider.GetUrl(100111)); - Assert.AreEqual("http://domain3.com/en/1003-1-1/", umbracoContext.UrlProvider.GetUrl(100311)); - - requestMock.Setup(x => x.UseDomainPrefixes).Returns(false); umbracoContext.UrlProvider.Mode = UrlProviderMode.Absolute; Assert.AreEqual("http://domain1.com/en/1001-1-1/", umbracoContext.UrlProvider.GetUrl(100111)); diff --git a/src/Umbraco.Tests/Routing/UrlsWithNestedDomains.cs b/src/Umbraco.Tests/Routing/UrlsWithNestedDomains.cs index 3d3533697c..0eb621bd93 100644 --- a/src/Umbraco.Tests/Routing/UrlsWithNestedDomains.cs +++ b/src/Umbraco.Tests/Routing/UrlsWithNestedDomains.cs @@ -34,8 +34,6 @@ namespace Umbraco.Tests.Routing globalSettings.Setup(x => x.HideTopLevelNodeFromPath).Returns(false); var settings = SettingsForTests.GenerateMockUmbracoSettings(); - var request = Mock.Get(settings.RequestHandler); - request.Setup(x => x.UseDomainPrefixes).Returns(true); SetDomains1(); diff --git a/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs b/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs index df4ec37a19..a989289cd3 100644 --- a/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs +++ b/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs @@ -54,7 +54,6 @@ namespace Umbraco.Tests.TestHelpers settings.Setup(x => x.Content.ImageAutoFillProperties).Returns(ContentImagingElement.GetDefaultImageAutoFillProperties()); settings.Setup(x => x.Content.ImageFileTypes).Returns(ContentImagingElement.GetDefaultImageFileTypes()); settings.Setup(x => x.RequestHandler.AddTrailingSlash).Returns(true); - settings.Setup(x => x.RequestHandler.UseDomainPrefixes).Returns(false); settings.Setup(x => x.RequestHandler.CharCollection).Returns(RequestHandlerElement.GetDefaultCharReplacements()); settings.Setup(x => x.WebRouting.UrlProviderMode).Returns("AutoLegacy"); settings.Setup(x => x.Providers.DefaultBackOfficeUserProvider).Returns("UsersMembershipProvider"); diff --git a/src/Umbraco.Web.UI/config/umbracoSettings.Release.config b/src/Umbraco.Web.UI/config/umbracoSettings.Release.config index 616eca9d6b..1b5104d074 100644 --- a/src/Umbraco.Web.UI/config/umbracoSettings.Release.config +++ b/src/Umbraco.Web.UI/config/umbracoSettings.Release.config @@ -59,9 +59,6 @@ Textstring - - true - assets/img/installer.jpg diff --git a/src/Umbraco.Web.UI/config/umbracoSettings.config b/src/Umbraco.Web.UI/config/umbracoSettings.config index 4f6474b658..fd3573ce8d 100644 --- a/src/Umbraco.Web.UI/config/umbracoSettings.config +++ b/src/Umbraco.Web.UI/config/umbracoSettings.config @@ -68,11 +68,6 @@ false - - - assets/img/installer.jpg diff --git a/src/Umbraco.Web/Routing/DefaultUrlProvider.cs b/src/Umbraco.Web/Routing/DefaultUrlProvider.cs index 5045b1af96..9e13d3b9c1 100644 --- a/src/Umbraco.Web/Routing/DefaultUrlProvider.cs +++ b/src/Umbraco.Web/Routing/DefaultUrlProvider.cs @@ -127,13 +127,6 @@ namespace Umbraco.Web.Routing // ignore vdir at that point, UriFromUmbraco will do it - if (mode == UrlProviderMode.AutoLegacy) - { - mode = _requestSettings.UseDomainPrefixes - ? UrlProviderMode.Absolute - : UrlProviderMode.Auto; - } - if (domainUri == null) // no domain was found { if (current == null) diff --git a/src/Umbraco.Web/Routing/UrlProviderMode.cs b/src/Umbraco.Web/Routing/UrlProviderMode.cs index 942f14e373..b45dc7c777 100644 --- a/src/Umbraco.Web/Routing/UrlProviderMode.cs +++ b/src/Umbraco.Web/Routing/UrlProviderMode.cs @@ -12,11 +12,6 @@ /// public enum UrlProviderMode { - /// - /// Indicates that the url provider should determine automatically whether to return relative or absolute urls, - /// and also respect the legacy useDomainPrefixes setting. - /// - AutoLegacy, /// /// Indicates that the url provider should produce relative urls exclusively. From 7a50856d32de80481fa34484f3f1cd3558bd3c59 Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 31 Jan 2019 00:33:02 +1100 Subject: [PATCH 404/437] Removes AutoLegacy routing and the legacy UseDomainPrefixes from umbraco settings --- .../Configurations/UmbracoSettings/umbracoSettings.config | 2 -- src/Umbraco.Web.UI/config/umbracoSettings.Release.config | 2 -- src/Umbraco.Web.UI/config/umbracoSettings.config | 2 -- 3 files changed, 6 deletions(-) diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config index 47bcfa3ac4..4561ed10bd 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config @@ -74,8 +74,6 @@ - - false true diff --git a/src/Umbraco.Web.UI/config/umbracoSettings.Release.config b/src/Umbraco.Web.UI/config/umbracoSettings.Release.config index 1b5104d074..ba16e34c3c 100644 --- a/src/Umbraco.Web.UI/config/umbracoSettings.Release.config +++ b/src/Umbraco.Web.UI/config/umbracoSettings.Release.config @@ -74,8 +74,6 @@ - - false true diff --git a/src/Umbraco.Web.UI/config/umbracoSettings.config b/src/Umbraco.Web.UI/config/umbracoSettings.config index fd3573ce8d..2a189c1515 100644 --- a/src/Umbraco.Web.UI/config/umbracoSettings.config +++ b/src/Umbraco.Web.UI/config/umbracoSettings.config @@ -86,8 +86,6 @@ - - false true From 1c8b4412e388ba452976bafd7fe4d08b6a80c8fe Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 31 Jan 2019 00:57:10 +1100 Subject: [PATCH 405/437] Removes scheduled tasks --- .../UmbracoSettings/IScheduledTask.cs | 13 -- .../UmbracoSettings/IScheduledTasksSection.cs | 11 -- .../IUmbracoSettingsSection.cs | 2 - .../UmbracoSettings/ScheduledTaskElement.cs | 31 ----- .../ScheduledTasksCollection.cs | 31 ----- .../UmbracoSettings/ScheduledTasksElement.cs | 26 ---- .../UmbracoSettings/UmbracoSettingsSection.cs | 11 -- .../UmbracoSettings/WebRoutingElement.cs | 2 +- src/Umbraco.Core/Sync/ApplicationUrlHelper.cs | 16 --- src/Umbraco.Core/Umbraco.Core.csproj | 5 - .../ScheduledTasksElementDefaultTests.cs | 20 --- .../ScheduledTasksElementTests.cs | 24 ---- .../WebRoutingElementDefaultTests.cs | 2 +- .../UmbracoSettings/WebRoutingElementTests.cs | 2 +- .../UmbracoSettings/umbracoSettings.config | 6 - .../umbracoSettings.minimal.config | 3 - .../Misc/ApplicationUrlHelperTests.cs | 48 +------ .../TestHelpers/SettingsForTests.cs | 4 +- src/Umbraco.Tests/Umbraco.Tests.csproj | 2 - .../Web/Mvc/SurfaceControllerTests.cs | 4 +- .../Web/TemplateUtilitiesTests.cs | 2 +- .../config/umbracoSettings.Release.config | 7 - .../config/umbracoSettings.config | 5 - src/Umbraco.Web/Routing/UrlProviderMode.cs | 5 +- src/Umbraco.Web/Scheduling/ScheduledTasks.cs | 127 ------------------ .../Scheduling/SchedulerComponent.cs | 10 +- src/Umbraco.Web/Umbraco.Web.csproj | 1 - 27 files changed, 14 insertions(+), 406 deletions(-) delete mode 100644 src/Umbraco.Core/Configuration/UmbracoSettings/IScheduledTask.cs delete mode 100644 src/Umbraco.Core/Configuration/UmbracoSettings/IScheduledTasksSection.cs delete mode 100644 src/Umbraco.Core/Configuration/UmbracoSettings/ScheduledTaskElement.cs delete mode 100644 src/Umbraco.Core/Configuration/UmbracoSettings/ScheduledTasksCollection.cs delete mode 100644 src/Umbraco.Core/Configuration/UmbracoSettings/ScheduledTasksElement.cs delete mode 100644 src/Umbraco.Tests/Configurations/UmbracoSettings/ScheduledTasksElementDefaultTests.cs delete mode 100644 src/Umbraco.Tests/Configurations/UmbracoSettings/ScheduledTasksElementTests.cs delete mode 100644 src/Umbraco.Web/Scheduling/ScheduledTasks.cs diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IScheduledTask.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IScheduledTask.cs deleted file mode 100644 index 22fa0288bc..0000000000 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/IScheduledTask.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace Umbraco.Core.Configuration.UmbracoSettings -{ - public interface IScheduledTask - { - string Alias { get; } - - bool Log { get; } - - int Interval { get; } - - string Url { get; } - } -} diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IScheduledTasksSection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IScheduledTasksSection.cs deleted file mode 100644 index e4a52e1fb1..0000000000 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/IScheduledTasksSection.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Collections.Generic; - -namespace Umbraco.Core.Configuration.UmbracoSettings -{ - public interface IScheduledTasksSection : IUmbracoConfigurationSection - { - IEnumerable Tasks { get; } - - string BaseUrl { get; } - } -} diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IUmbracoSettingsSection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IUmbracoSettingsSection.cs index 33416d38cc..db3f937a35 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/IUmbracoSettingsSection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IUmbracoSettingsSection.cs @@ -14,8 +14,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings ILoggingSection Logging { get; } - IScheduledTasksSection ScheduledTasks { get; } - IProvidersSection Providers { get; } IWebRoutingSection WebRouting { get; } diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ScheduledTaskElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ScheduledTaskElement.cs deleted file mode 100644 index a7ecd6f84e..0000000000 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ScheduledTaskElement.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Configuration; - -namespace Umbraco.Core.Configuration.UmbracoSettings -{ - internal class ScheduledTaskElement : ConfigurationElement, IScheduledTask - { - [ConfigurationProperty("alias")] - public string Alias - { - get { return (string)base["alias"]; } - } - - [ConfigurationProperty("log")] - public bool Log - { - get { return (bool)base["log"]; } - } - - [ConfigurationProperty("interval")] - public int Interval - { - get { return (int)base["interval"]; } - } - - [ConfigurationProperty("url")] - public string Url - { - get { return (string)base["url"]; } - } - } -} diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ScheduledTasksCollection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ScheduledTasksCollection.cs deleted file mode 100644 index 9e9a037c0f..0000000000 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ScheduledTasksCollection.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Collections.Generic; -using System.Configuration; - -namespace Umbraco.Core.Configuration.UmbracoSettings -{ - internal class ScheduledTasksCollection : ConfigurationElementCollection, IEnumerable - { - protected override ConfigurationElement CreateNewElement() - { - return new ScheduledTaskElement(); - } - - protected override object GetElementKey(ConfigurationElement element) - { - return ((ScheduledTaskElement)element).Alias; - } - - IEnumerator IEnumerable.GetEnumerator() - { - for (var i = 0; i < Count; i++) - { - yield return BaseGet(i) as IScheduledTask; - } - } - - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - } -} diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ScheduledTasksElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ScheduledTasksElement.cs deleted file mode 100644 index 5c83939a7f..0000000000 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ScheduledTasksElement.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.Collections.Generic; -using System.Configuration; - -namespace Umbraco.Core.Configuration.UmbracoSettings -{ - internal class ScheduledTasksElement : ConfigurationElement, IScheduledTasksSection - { - [ConfigurationCollection(typeof(ScheduledTasksCollection), AddItemName = "task")] - [ConfigurationProperty("", IsDefaultCollection = true)] - internal ScheduledTasksCollection Tasks - { - get { return (ScheduledTasksCollection)base[""]; } - } - - IEnumerable IScheduledTasksSection.Tasks - { - get { return Tasks; } - } - - [ConfigurationProperty("baseUrl", IsRequired = false, DefaultValue = null)] - public string BaseUrl - { - get { return (string)base["baseUrl"]; } - } - } -} diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/UmbracoSettingsSection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/UmbracoSettingsSection.cs index 9ed635f6a9..929babef83 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/UmbracoSettingsSection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/UmbracoSettingsSection.cs @@ -34,12 +34,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings get { return (LoggingElement)this["logging"]; } } - [ConfigurationProperty("scheduledTasks")] - internal ScheduledTasksElement ScheduledTasks - { - get { return (ScheduledTasksElement)this["scheduledTasks"]; } - } - [ConfigurationProperty("providers")] internal ProvidersElement Providers { @@ -77,11 +71,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings get { return Logging; } } - IScheduledTasksSection IUmbracoSettingsSection.ScheduledTasks - { - get { return ScheduledTasks; } - } - IProvidersSection IUmbracoSettingsSection.Providers { get { return Providers; } diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/WebRoutingElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/WebRoutingElement.cs index b4bd821338..7b7102f2e7 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/WebRoutingElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/WebRoutingElement.cs @@ -22,7 +22,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings [ConfigurationProperty("disableRedirectUrlTracking", DefaultValue = "false")] public bool DisableRedirectUrlTracking => (bool) base["disableRedirectUrlTracking"]; - [ConfigurationProperty("urlProviderMode", DefaultValue = "AutoLegacy")] + [ConfigurationProperty("urlProviderMode", DefaultValue = "Auto")] public string UrlProviderMode => (string) base["urlProviderMode"]; [ConfigurationProperty("umbracoApplicationUrl", DefaultValue = null)] diff --git a/src/Umbraco.Core/Sync/ApplicationUrlHelper.cs b/src/Umbraco.Core/Sync/ApplicationUrlHelper.cs index a10c967866..9cd4a58c65 100644 --- a/src/Umbraco.Core/Sync/ApplicationUrlHelper.cs +++ b/src/Umbraco.Core/Sync/ApplicationUrlHelper.cs @@ -66,22 +66,6 @@ namespace Umbraco.Core.Sync return umbracoApplicationUrl; } - // try umbracoSettings:settings/scheduledTasks/@baseUrl - // which is assumed to: - // - end with SystemDirectories.Umbraco - // - NOT contain any scheme (because, legacy) - // - end or not with a slash, it will be taken care of - // eg "mysite.com/umbraco" - url = settings.ScheduledTasks.BaseUrl; - if (url.IsNullOrWhiteSpace() == false) - { - var ssl = globalSettings.UseHttps ? "s" : ""; - url = "http" + ssl + "://" + url; - var umbracoApplicationUrl = url.TrimEnd('/'); - logger.Info(TypeOfApplicationUrlHelper, "ApplicationUrl: {UmbracoAppUrl} (using scheduledTasks/@baseUrl)", umbracoApplicationUrl); - return umbracoApplicationUrl; - } - // try the server registrar // which is assumed to return a url that: // - end with SystemDirectories.Umbraco diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 1f10085e14..35ef18d3e8 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -265,8 +265,6 @@ - - @@ -276,9 +274,6 @@ - - - diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/ScheduledTasksElementDefaultTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/ScheduledTasksElementDefaultTests.cs deleted file mode 100644 index c5947207c5..0000000000 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/ScheduledTasksElementDefaultTests.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Linq; -using NUnit.Framework; - -namespace Umbraco.Tests.Configurations.UmbracoSettings -{ - [TestFixture] - public class ScheduledTasksElementDefaultTests : ScheduledTasksElementTests - { - protected override bool TestingDefaults - { - get { return true; } - } - - [Test] - public override void Tasks() - { - Assert.IsTrue(SettingsSection.ScheduledTasks.Tasks.Any() == false); - } - } -} diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/ScheduledTasksElementTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/ScheduledTasksElementTests.cs deleted file mode 100644 index b040e124d9..0000000000 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/ScheduledTasksElementTests.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.Linq; -using NUnit.Framework; - -namespace Umbraco.Tests.Configurations.UmbracoSettings -{ - [TestFixture] - public class ScheduledTasksElementTests : UmbracoSettingsTests - { - [Test] - public virtual void Tasks() - { - Assert.IsTrue(SettingsSection.ScheduledTasks.Tasks.Count() == 2); - Assert.IsTrue(SettingsSection.ScheduledTasks.Tasks.ElementAt(0).Alias == "test60"); - Assert.IsTrue(SettingsSection.ScheduledTasks.Tasks.ElementAt(0).Log == true); - Assert.IsTrue(SettingsSection.ScheduledTasks.Tasks.ElementAt(0).Interval == 60); - Assert.IsTrue(SettingsSection.ScheduledTasks.Tasks.ElementAt(0).Url == "http://localhost/umbraco/test.aspx"); - Assert.IsTrue(SettingsSection.ScheduledTasks.Tasks.ElementAt(1).Alias == "testtest"); - Assert.IsTrue(SettingsSection.ScheduledTasks.Tasks.ElementAt(1).Log == false); - Assert.IsTrue(SettingsSection.ScheduledTasks.Tasks.ElementAt(1).Interval == 61); - Assert.IsTrue(SettingsSection.ScheduledTasks.Tasks.ElementAt(1).Url == "http://localhost/umbraco/test1.aspx"); - } - - } -} diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/WebRoutingElementDefaultTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/WebRoutingElementDefaultTests.cs index 6ff2dc8340..b593e9082e 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/WebRoutingElementDefaultTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/WebRoutingElementDefaultTests.cs @@ -14,7 +14,7 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings [Test] public override void UrlProviderMode() { - Assert.IsTrue(SettingsSection.WebRouting.UrlProviderMode == "AutoLegacy"); + Assert.IsTrue(SettingsSection.WebRouting.UrlProviderMode == "Auto"); } [Test] diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/WebRoutingElementTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/WebRoutingElementTests.cs index f7dce4cb80..dad1173c3f 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/WebRoutingElementTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/WebRoutingElementTests.cs @@ -20,7 +20,7 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings [Test] public virtual void UrlProviderMode() { - Assert.IsTrue(SettingsSection.WebRouting.UrlProviderMode == "AutoLegacy"); + Assert.IsTrue(SettingsSection.WebRouting.UrlProviderMode == "Auto"); } } } diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config index 4561ed10bd..5367fe3ece 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config @@ -119,12 +119,6 @@ - - - - - - diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.minimal.config b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.minimal.config index cd9738c58f..6119926eaa 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.minimal.config +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.minimal.config @@ -37,9 +37,6 @@ - - - diff --git a/src/Umbraco.Tests/Misc/ApplicationUrlHelperTests.cs b/src/Umbraco.Tests/Misc/ApplicationUrlHelperTests.cs index 47c854333a..79878a59a1 100644 --- a/src/Umbraco.Tests/Misc/ApplicationUrlHelperTests.cs +++ b/src/Umbraco.Tests/Misc/ApplicationUrlHelperTests.cs @@ -37,8 +37,7 @@ namespace Umbraco.Tests.Misc // no applicable settings, but a provider var settings = Mock.Of(section => - section.WebRouting == Mock.Of(wrSection => wrSection.UmbracoApplicationUrl == (string)null) - && section.ScheduledTasks == Mock.Of()); + section.WebRouting == Mock.Of(wrSection => wrSection.UmbracoApplicationUrl == (string)null)); var globalConfig = Mock.Get(SettingsForTests.GenerateMockGlobalSettings()); globalConfig.Setup(x => x.UseHttps).Returns(true); @@ -59,8 +58,7 @@ namespace Umbraco.Tests.Misc // no applicable settings, but a provider var settings = Mock.Of(section => - section.WebRouting == Mock.Of(wrSection => wrSection.UmbracoApplicationUrl == (string) null) - && section.ScheduledTasks == Mock.Of()); + section.WebRouting == Mock.Of(wrSection => wrSection.UmbracoApplicationUrl == (string) null)); var globalConfig = Mock.Get(SettingsForTests.GenerateMockGlobalSettings()); globalConfig.Setup(x => x.UseHttps).Returns(true); @@ -82,8 +80,7 @@ namespace Umbraco.Tests.Misc // no applicable settings, cannot set url var settings = Mock.Of(section => - section.WebRouting == Mock.Of(wrSection => wrSection.UmbracoApplicationUrl == (string) null) - && section.ScheduledTasks == Mock.Of()); + section.WebRouting == Mock.Of(wrSection => wrSection.UmbracoApplicationUrl == (string) null)); var globalConfig = Mock.Get(SettingsForTests.GenerateMockGlobalSettings()); globalConfig.Setup(x => x.UseHttps).Returns(true); @@ -93,47 +90,12 @@ namespace Umbraco.Tests.Misc // still NOT set Assert.IsNull(url); } - - [Test] - public void SetApplicationUrlFromStSettingsNoSsl() - { - var settings = Mock.Of(section => - section.WebRouting == Mock.Of(wrSection => wrSection.UmbracoApplicationUrl == (string) null) - && section.ScheduledTasks == Mock.Of(tasksSection => tasksSection.BaseUrl == "mycoolhost.com/umbraco")); - - var globalConfig = Mock.Get(SettingsForTests.GenerateMockGlobalSettings()); - globalConfig.Setup(x => x.UseHttps).Returns(false); - - - - var url = ApplicationUrlHelper.TryGetApplicationUrl(settings, Mock.Of(), globalConfig.Object, Mock.Of()); - - Assert.AreEqual("http://mycoolhost.com/umbraco", url); - } - - [Test] - public void SetApplicationUrlFromStSettingsSsl() - { - var settings = Mock.Of(section => - section.WebRouting == Mock.Of(wrSection => wrSection.UmbracoApplicationUrl == (string) null) - && section.ScheduledTasks == Mock.Of(tasksSection => tasksSection.BaseUrl == "mycoolhost.com/umbraco/")); - - var globalConfig = Mock.Get(SettingsForTests.GenerateMockGlobalSettings()); - globalConfig.Setup(x => x.UseHttps).Returns(true); - - - - var url = ApplicationUrlHelper.TryGetApplicationUrl(settings, Mock.Of(), globalConfig.Object, Mock.Of()); - - Assert.AreEqual("https://mycoolhost.com/umbraco", url); - } - + [Test] public void SetApplicationUrlFromWrSettingsSsl() { var settings = Mock.Of(section => - section.WebRouting == Mock.Of(wrSection => wrSection.UmbracoApplicationUrl == "httpx://whatever.com/umbraco/") - && section.ScheduledTasks == Mock.Of(tasksSection => tasksSection.BaseUrl == "mycoolhost.com/umbraco")); + section.WebRouting == Mock.Of(wrSection => wrSection.UmbracoApplicationUrl == "httpx://whatever.com/umbraco/")); var globalConfig = Mock.Get(SettingsForTests.GenerateMockGlobalSettings()); globalConfig.Setup(x => x.UseHttps).Returns(true); diff --git a/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs b/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs index a989289cd3..86a767f84a 100644 --- a/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs +++ b/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs @@ -38,7 +38,6 @@ namespace Umbraco.Tests.TestHelpers var security = new Mock(); var requestHandler = new Mock(); var logging = new Mock(); - var tasks = new Mock(); var providers = new Mock(); var routing = new Mock(); @@ -46,7 +45,6 @@ namespace Umbraco.Tests.TestHelpers settings.Setup(x => x.Security).Returns(security.Object); settings.Setup(x => x.RequestHandler).Returns(requestHandler.Object); settings.Setup(x => x.Logging).Returns(logging.Object); - settings.Setup(x => x.ScheduledTasks).Returns(tasks.Object); settings.Setup(x => x.Providers).Returns(providers.Object); settings.Setup(x => x.WebRouting).Returns(routing.Object); @@ -55,7 +53,7 @@ namespace Umbraco.Tests.TestHelpers settings.Setup(x => x.Content.ImageFileTypes).Returns(ContentImagingElement.GetDefaultImageFileTypes()); settings.Setup(x => x.RequestHandler.AddTrailingSlash).Returns(true); settings.Setup(x => x.RequestHandler.CharCollection).Returns(RequestHandlerElement.GetDefaultCharReplacements()); - settings.Setup(x => x.WebRouting.UrlProviderMode).Returns("AutoLegacy"); + settings.Setup(x => x.WebRouting.UrlProviderMode).Returns("Auto"); settings.Setup(x => x.Providers.DefaultBackOfficeUserProvider).Returns("UsersMembershipProvider"); return settings.Object; diff --git a/src/Umbraco.Tests/Umbraco.Tests.csproj b/src/Umbraco.Tests/Umbraco.Tests.csproj index 8c86873e0a..83d2e83d94 100644 --- a/src/Umbraco.Tests/Umbraco.Tests.csproj +++ b/src/Umbraco.Tests/Umbraco.Tests.csproj @@ -302,8 +302,6 @@ - - diff --git a/src/Umbraco.Tests/Web/Mvc/SurfaceControllerTests.cs b/src/Umbraco.Tests/Web/Mvc/SurfaceControllerTests.cs index 03844b5d72..69f6c5d13e 100644 --- a/src/Umbraco.Tests/Web/Mvc/SurfaceControllerTests.cs +++ b/src/Umbraco.Tests/Web/Mvc/SurfaceControllerTests.cs @@ -120,7 +120,7 @@ namespace Umbraco.Tests.Web.Mvc new Mock().Object, publishedSnapshotService.Object, new Mock(null, null, globalSettings).Object, - Mock.Of(section => section.WebRouting == Mock.Of(routingSection => routingSection.UrlProviderMode == "AutoLegacy")), + Mock.Of(section => section.WebRouting == Mock.Of(routingSection => routingSection.UrlProviderMode == "Auto")), Enumerable.Empty(), globalSettings, new TestVariationContextAccessor(), @@ -145,7 +145,7 @@ namespace Umbraco.Tests.Web.Mvc [Test] public void Mock_Current_Page() { - var webRoutingSettings = Mock.Of(section => section.UrlProviderMode == "AutoLegacy"); + var webRoutingSettings = Mock.Of(section => section.UrlProviderMode == "Auto"); var globalSettings = TestObjects.GetGlobalSettings(); var umbracoContext = UmbracoContext.EnsureContext( diff --git a/src/Umbraco.Tests/Web/TemplateUtilitiesTests.cs b/src/Umbraco.Tests/Web/TemplateUtilitiesTests.cs index 4bcad4f4d3..aa44e7d085 100644 --- a/src/Umbraco.Tests/Web/TemplateUtilitiesTests.cs +++ b/src/Umbraco.Tests/Web/TemplateUtilitiesTests.cs @@ -102,7 +102,7 @@ namespace Umbraco.Tests.Web snapshotService, new Mock(null, null, globalSettings).Object, //setup a quick mock of the WebRouting section - Mock.Of(section => section.WebRouting == Mock.Of(routingSection => routingSection.UrlProviderMode == "AutoLegacy")), + Mock.Of(section => section.WebRouting == Mock.Of(routingSection => routingSection.UrlProviderMode == "Auto")), //pass in the custom url provider new[]{ testUrlProvider.Object }, globalSettings, diff --git a/src/Umbraco.Web.UI/config/umbracoSettings.Release.config b/src/Umbraco.Web.UI/config/umbracoSettings.Release.config index ba16e34c3c..c42a5f7668 100644 --- a/src/Umbraco.Web.UI/config/umbracoSettings.Release.config +++ b/src/Umbraco.Web.UI/config/umbracoSettings.Release.config @@ -74,17 +74,10 @@ - - true - - - - - - - - - - diff --git a/src/Umbraco.Web/Routing/UrlProviderMode.cs b/src/Umbraco.Web/Routing/UrlProviderMode.cs index b45dc7c777..ac29aed3fb 100644 --- a/src/Umbraco.Web/Routing/UrlProviderMode.cs +++ b/src/Umbraco.Web/Routing/UrlProviderMode.cs @@ -1,14 +1,11 @@ namespace Umbraco.Web.Routing { /// - /// Specifies the type of urls that the url provider should produce. + /// Specifies the type of urls that the url provider should produce, Auto is the default /// /// - /// The AutoLegacy option is equivalent to Auto but it also respects the legacy useDomainPrefixes setting. - /// When that setting is true, then all urls are absolute. Otherwise, urls will be relative or absolute, depending on hostnames. /// The Relative option can lead to invalid results when combined with hostnames, but it is the only way to reproduce /// the true, pre-4.10, always-relative behavior of Umbraco. - /// For the time being, the default option is AutoLegacy although in the future it will be Auto. /// public enum UrlProviderMode { diff --git a/src/Umbraco.Web/Scheduling/ScheduledTasks.cs b/src/Umbraco.Web/Scheduling/ScheduledTasks.cs deleted file mode 100644 index a26b8b23ac..0000000000 --- a/src/Umbraco.Web/Scheduling/ScheduledTasks.cs +++ /dev/null @@ -1,127 +0,0 @@ -using System; -using System.Collections; -using System.Net; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Umbraco.Core; -using Umbraco.Core.Configuration.UmbracoSettings; -using Umbraco.Core.Logging; -using Umbraco.Core.Sync; - -namespace Umbraco.Web.Scheduling -{ - // TODO: No scheduled task (i.e. URL) would be secured, so if people are actually using these each task - // would need to be a publicly available task (URL) which isn't really very good :( - // We should really be using the AdminTokenAuthorizeAttribute for this stuff - - internal class ScheduledTasks : RecurringTaskBase - { - private static HttpClient _httpClient; - private readonly IRuntimeState _runtime; - private readonly IUmbracoSettingsSection _settings; - private readonly IProfilingLogger _logger; - private static readonly Hashtable ScheduledTaskTimes = new Hashtable(); - - public ScheduledTasks(IBackgroundTaskRunner runner, int delayMilliseconds, int periodMilliseconds, - IRuntimeState runtime, IUmbracoSettingsSection settings, IProfilingLogger logger) - : base(runner, delayMilliseconds, periodMilliseconds) - { - _runtime = runtime; - _settings = settings; - _logger = logger; - } - - private async Task ProcessTasksAsync(CancellationToken token) - { - var scheduledTasks = _settings.ScheduledTasks.Tasks; - foreach (var t in scheduledTasks) - { - var runTask = false; - if (ScheduledTaskTimes.ContainsKey(t.Alias) == false) - { - runTask = true; - ScheduledTaskTimes.Add(t.Alias, DateTime.Now); - } - - // Add 1 second to timespan to compensate for differences in timer - else if ( - new TimeSpan( - DateTime.Now.Ticks - ((DateTime)ScheduledTaskTimes[t.Alias]).Ticks).TotalSeconds + 1 >= t.Interval) - { - runTask = true; - ScheduledTaskTimes[t.Alias] = DateTime.Now; - } - - if (runTask) - { - var taskResult = await GetTaskByHttpAync(t.Url, token); - if (t.Log) - _logger.Info("{TaskAlias} has been called with response: {TaskResult}", t.Alias, taskResult); - } - } - } - - private async Task GetTaskByHttpAync(string url, CancellationToken token) - { - if (_httpClient == null) - _httpClient = new HttpClient - { - BaseAddress = _runtime.ApplicationUrl - }; - - var request = new HttpRequestMessage(HttpMethod.Get, url); - - // TODO: pass custom the authorization header, currently these aren't really secured! - //request.Headers.Authorization = AdminTokenAuthorizeAttribute.GetAuthenticationHeaderValue(_appContext); - - try - { - var result = await _httpClient.SendAsync(request, token).ConfigureAwait(false); // ConfigureAwait(false) is recommended? http://blog.stephencleary.com/2012/07/dont-block-on-async-code.html - return result.StatusCode == HttpStatusCode.OK; - } - catch (Exception ex) - { - _logger.Error(ex, "An error occurred calling web task for url: {Url}", url); - - } - return false; - } - - public override async Task PerformRunAsync(CancellationToken token) - { - switch (_runtime.ServerRole) - { - case ServerRole.Replica: - _logger.Debug("Does not run on replica servers."); - return true; // DO repeat, server role can change - case ServerRole.Unknown: - _logger.Debug("Does not run on servers with unknown role."); - return true; // DO repeat, server role can change - } - - // ensure we do not run if not main domain, but do NOT lock it - if (_runtime.IsMainDom == false) - { - _logger.Debug("Does not run if not MainDom."); - return false; // do NOT repeat, going down - } - - using (_logger.DebugDuration("Scheduled tasks executing", "Scheduled tasks complete")) - { - try - { - await ProcessTasksAsync(token); - } - catch (Exception ex) - { - _logger.Error(ex, "Error executing scheduled task"); - } - } - - return true; // repeat - } - - public override bool IsAsync => true; - } -} diff --git a/src/Umbraco.Web/Scheduling/SchedulerComponent.cs b/src/Umbraco.Web/Scheduling/SchedulerComponent.cs index d400ccc077..697c80e76d 100644 --- a/src/Umbraco.Web/Scheduling/SchedulerComponent.cs +++ b/src/Umbraco.Web/Scheduling/SchedulerComponent.cs @@ -91,7 +91,6 @@ namespace Umbraco.Web.Scheduling tasks.Add(RegisterKeepAlive()); tasks.Add(RegisterScheduledPublishing()); - tasks.Add(RegisterTaskRunner(settings)); tasks.Add(RegisterLogScrubber(settings)); var healthCheckConfig = Current.Configs.HealthChecks(); @@ -119,14 +118,7 @@ namespace Umbraco.Web.Scheduling _publishingRunner.TryAdd(task); return task; } - - private IBackgroundTask RegisterTaskRunner(IUmbracoSettingsSection settings) - { - var task = new ScheduledTasks(_tasksRunner, 60000, 60000, _runtime, settings, _logger); - _tasksRunner.TryAdd(task); - return task; - } - + private IBackgroundTask RegisterHealthCheckNotifier(IHealthChecks healthCheckConfig, HealthCheckCollection healthChecks, HealthCheckNotificationMethodCollection notifications, IProfilingLogger logger) diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index a7ed8f5e12..849d82940f 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -924,7 +924,6 @@ - From f28c60ced3289c472dfb79ad25b7f862c868a6e1 Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 31 Jan 2019 01:11:15 +1100 Subject: [PATCH 406/437] Removes all irrelevant logging settings from umbraco settings --- .../UmbracoSettings/ExternalLoggerElement.cs | 25 ------- .../UmbracoSettings/ILoggingSection.cs | 8 -- .../UmbracoSettings/LoggingElement.cs | 73 +------------------ src/Umbraco.Core/Umbraco.Core.csproj | 1 - .../LoggingElementDefaultTests.cs | 10 --- .../UmbracoSettings/LoggingElementTests.cs | 27 +------ .../UmbracoSettings/umbracoSettings.config | 9 --- .../config/umbracoSettings.config | 15 ---- src/Umbraco.Web/Scheduling/LogScrubber.cs | 11 +-- 9 files changed, 3 insertions(+), 176 deletions(-) delete mode 100644 src/Umbraco.Core/Configuration/UmbracoSettings/ExternalLoggerElement.cs diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ExternalLoggerElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ExternalLoggerElement.cs deleted file mode 100644 index 00cf29a751..0000000000 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ExternalLoggerElement.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Configuration; - -namespace Umbraco.Core.Configuration.UmbracoSettings -{ - internal class ExternalLoggerElement : ConfigurationElement - { - [ConfigurationProperty("assembly")] - internal string Assembly - { - get { return (string)base["assembly"]; } - } - - [ConfigurationProperty("type")] - internal string Type - { - get { return (string)base["type"]; } - } - - [ConfigurationProperty("logAuditTrail")] - internal bool LogAuditTrail - { - get { return (bool)base["logAuditTrail"]; } - } - } -} diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ILoggingSection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ILoggingSection.cs index 220f4b9d5b..6c1be8ade5 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ILoggingSection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ILoggingSection.cs @@ -4,14 +4,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { public interface ILoggingSection : IUmbracoConfigurationSection { - bool AutoCleanLogs { get; } - - bool EnableLogging { get; } - - int CleaningMiliseconds { get; } - int MaxLogAge { get; } - - IEnumerable DisabledLogTypes { get; } } } diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/LoggingElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/LoggingElement.cs index 7632f241e1..abe10d830e 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/LoggingElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/LoggingElement.cs @@ -6,87 +6,16 @@ namespace Umbraco.Core.Configuration.UmbracoSettings internal class LoggingElement : UmbracoConfigurationElement, ILoggingSection { - [ConfigurationProperty("autoCleanLogs")] - internal InnerTextConfigurationElement AutoCleanLogs - { - get { return GetOptionalTextElement("autoCleanLogs", false); } - } - - [ConfigurationProperty("enableLogging")] - internal InnerTextConfigurationElement EnableLogging - { - get { return GetOptionalTextElement("enableLogging", true); } - } - - [ConfigurationProperty("enableAsyncLogging")] - internal InnerTextConfigurationElement EnableAsyncLogging - { - get { return GetOptionalTextElement("enableAsyncLogging", true); } - } - - [ConfigurationProperty("cleaningMiliseconds")] - internal InnerTextConfigurationElement CleaningMiliseconds - { - get { return GetOptionalTextElement("cleaningMiliseconds", -1); } - } - [ConfigurationProperty("maxLogAge")] internal InnerTextConfigurationElement MaxLogAge { get { return GetOptionalTextElement("maxLogAge", -1); } } - - [ConfigurationCollection(typeof(DisabledLogTypesCollection), AddItemName = "logTypeAlias")] - [ConfigurationProperty("disabledLogTypes", IsDefaultCollection = true)] - internal DisabledLogTypesCollection DisabledLogTypes - { - get { return (DisabledLogTypesCollection)base["disabledLogTypes"]; } - } - - [ConfigurationProperty("externalLogger", IsRequired = false)] - internal ExternalLoggerElement ExternalLogger - { - get { return (ExternalLoggerElement) base["externalLogger"]; } - } - - public bool ExternalLoggerIsConfigured - { - get - { - var externalLoggerProperty = Properties["externalLogger"]; - var externalLogger = this[externalLoggerProperty] as ConfigurationElement; - if (externalLogger != null && externalLogger.ElementInformation.IsPresent) - { - return true; - } - return false; - } - } - - bool ILoggingSection.AutoCleanLogs - { - get { return AutoCleanLogs; } - } - - bool ILoggingSection.EnableLogging - { - get { return EnableLogging; } - } - - int ILoggingSection.CleaningMiliseconds - { - get { return CleaningMiliseconds; } - } - + int ILoggingSection.MaxLogAge { get { return MaxLogAge; } } - IEnumerable ILoggingSection.DisabledLogTypes - { - get { return DisabledLogTypes; } - } - } } diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 35ef18d3e8..049ca914d4 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -251,7 +251,6 @@ - diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/LoggingElementDefaultTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/LoggingElementDefaultTests.cs index 7eb5a9c4c5..c0819ad828 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/LoggingElementDefaultTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/LoggingElementDefaultTests.cs @@ -11,16 +11,6 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings get { return true; } } - [Test] - public override void DisabledLogTypes() - { - Assert.IsTrue(SettingsSection.Logging.DisabledLogTypes.Any() == false); - } - [Test] - public override void CleaningMiliseconds() - { - Assert.IsTrue(SettingsSection.Logging.CleaningMiliseconds == -1); - } [Test] public override void MaxLogAge() { diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/LoggingElementTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/LoggingElementTests.cs index 2fd32e4a36..31edc87a7c 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/LoggingElementTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/LoggingElementTests.cs @@ -6,32 +6,7 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings [TestFixture] public class LoggingElementTests : UmbracoSettingsTests { - [Test] - public void EnableLogging() - { - Assert.IsTrue(SettingsSection.Logging.EnableLogging == true); - } - - [Test] - public virtual void DisabledLogTypes() - { - Assert.IsTrue(SettingsSection.Logging.DisabledLogTypes.Count() == 2); - Assert.IsTrue(SettingsSection.Logging.DisabledLogTypes.ElementAt(0).LogTypeAlias == "[alias-of-log-type-in-lowercase]"); - Assert.IsTrue(SettingsSection.Logging.DisabledLogTypes.ElementAt(1).LogTypeAlias == "anotherlogalias"); - } - - [Test] - public void AutoCleanLogs() - { - Assert.IsTrue(SettingsSection.Logging.AutoCleanLogs == false); - } - - [Test] - public virtual void CleaningMiliseconds() - { - Assert.IsTrue(SettingsSection.Logging.CleaningMiliseconds == 86400); - - } + [Test] public virtual void MaxLogAge() { diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config index 5367fe3ece..7aeb779e0b 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config @@ -107,16 +107,7 @@ - false - true - true - - [alias-of-log-type-in-lowercase] - anotherlogalias - - 86400 1440 - diff --git a/src/Umbraco.Web.UI/config/umbracoSettings.config b/src/Umbraco.Web.UI/config/umbracoSettings.config index c4b25919d2..fa60e31a08 100644 --- a/src/Umbraco.Web.UI/config/umbracoSettings.config +++ b/src/Umbraco.Web.UI/config/umbracoSettings.config @@ -118,21 +118,6 @@ - - - true - true - - - - - - - - diff --git a/src/Umbraco.Web/Scheduling/LogScrubber.cs b/src/Umbraco.Web/Scheduling/LogScrubber.cs index ae27809987..c39f9df1b3 100644 --- a/src/Umbraco.Web/Scheduling/LogScrubber.cs +++ b/src/Umbraco.Web/Scheduling/LogScrubber.cs @@ -49,16 +49,7 @@ namespace Umbraco.Web.Scheduling public static int GetLogScrubbingInterval(IUmbracoSettingsSection settings, ILogger logger) { - var interval = 4 * 60 * 60 * 1000; // 4 hours, in milliseconds - try - { - if (settings.Logging.CleaningMiliseconds > -1) - interval = settings.Logging.CleaningMiliseconds; - } - catch (Exception ex) - { - logger.Error(ex, "Unable to locate a log scrubbing interval. Defaulting to 4 hours."); - } + const int interval = 4 * 60 * 60 * 1000; // 4 hours, in milliseconds return interval; } From 2a54b2931cc6b35ac7c443689ba2e9c2a8d9fbc5 Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 31 Jan 2019 01:20:19 +1100 Subject: [PATCH 407/437] Removes providers section from umbraco settings --- .../UmbracoSettings/IProvidersSection.cs | 9 --- .../IUmbracoSettingsSection.cs | 2 - .../UmbracoSettings/ProvidersElement.cs | 18 ----- .../UmbracoSettings/UmbracoSettingsSection.cs | 70 ++++--------------- .../UmbracoSettings/UserProviderElement.cs | 21 ------ src/Umbraco.Core/Constants-Security.cs | 2 + .../Security/MembershipProviderExtensions.cs | 6 +- src/Umbraco.Core/Umbraco.Core.csproj | 3 - .../ProvidersElementDefaultTests.cs | 14 ---- .../UmbracoSettings/ProvidersElementTests.cs | 15 ---- .../UmbracoSettings/umbracoSettings.config | 8 --- .../umbracoSettings.minimal.config | 3 - .../TestHelpers/SettingsForTests.cs | 3 - src/Umbraco.Tests/Umbraco.Tests.csproj | 2 - .../config/umbracoSettings.config | 8 --- .../Providers/UsersMembershipProvider.cs | 15 +--- 16 files changed, 20 insertions(+), 179 deletions(-) delete mode 100644 src/Umbraco.Core/Configuration/UmbracoSettings/IProvidersSection.cs delete mode 100644 src/Umbraco.Core/Configuration/UmbracoSettings/ProvidersElement.cs delete mode 100644 src/Umbraco.Core/Configuration/UmbracoSettings/UserProviderElement.cs delete mode 100644 src/Umbraco.Tests/Configurations/UmbracoSettings/ProvidersElementDefaultTests.cs delete mode 100644 src/Umbraco.Tests/Configurations/UmbracoSettings/ProvidersElementTests.cs diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IProvidersSection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IProvidersSection.cs deleted file mode 100644 index 6fdac94af1..0000000000 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/IProvidersSection.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Configuration; - -namespace Umbraco.Core.Configuration.UmbracoSettings -{ - public interface IProvidersSection : IUmbracoConfigurationSection - { - string DefaultBackOfficeUserProvider { get; } - } -} diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IUmbracoSettingsSection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IUmbracoSettingsSection.cs index db3f937a35..81d27e7bae 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/IUmbracoSettingsSection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IUmbracoSettingsSection.cs @@ -14,8 +14,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings ILoggingSection Logging { get; } - IProvidersSection Providers { get; } - IWebRoutingSection WebRouting { get; } } } diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ProvidersElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ProvidersElement.cs deleted file mode 100644 index 87876b1e0a..0000000000 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ProvidersElement.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Configuration; - -namespace Umbraco.Core.Configuration.UmbracoSettings -{ - internal class ProvidersElement : ConfigurationElement, IProvidersSection - { - [ConfigurationProperty("users")] - public UserProviderElement Users - { - get { return (UserProviderElement)base["users"]; } - } - - public string DefaultBackOfficeUserProvider - { - get { return Users.DefaultBackOfficeProvider; } - } - } -} diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/UmbracoSettingsSection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/UmbracoSettingsSection.cs index 929babef83..7cf8096345 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/UmbracoSettingsSection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/UmbracoSettingsSection.cs @@ -5,80 +5,34 @@ namespace Umbraco.Core.Configuration.UmbracoSettings public class UmbracoSettingsSection : ConfigurationSection, IUmbracoSettingsSection { [ConfigurationProperty("backOffice")] - internal BackOfficeElement BackOffice - { - get { return (BackOfficeElement)this["backOffice"]; } - } + internal BackOfficeElement BackOffice => (BackOfficeElement)this["backOffice"]; [ConfigurationProperty("content")] - internal ContentElement Content - { - get { return (ContentElement)this["content"]; } - } + internal ContentElement Content => (ContentElement)this["content"]; [ConfigurationProperty("security")] - internal SecurityElement Security - { - get { return (SecurityElement)this["security"]; } - } + internal SecurityElement Security => (SecurityElement)this["security"]; [ConfigurationProperty("requestHandler")] - internal RequestHandlerElement RequestHandler - { - get { return (RequestHandlerElement)this["requestHandler"]; } - } + internal RequestHandlerElement RequestHandler => (RequestHandlerElement)this["requestHandler"]; [ConfigurationProperty("logging")] - internal LoggingElement Logging - { - get { return (LoggingElement)this["logging"]; } - } + internal LoggingElement Logging => (LoggingElement)this["logging"]; - [ConfigurationProperty("providers")] - internal ProvidersElement Providers - { - get { return (ProvidersElement)this["providers"]; } - } [ConfigurationProperty("web.routing")] - internal WebRoutingElement WebRouting - { - get { return (WebRoutingElement)this["web.routing"]; } - } + internal WebRoutingElement WebRouting => (WebRoutingElement)this["web.routing"]; - IContentSection IUmbracoSettingsSection.Content - { - get { return Content; } - } + IContentSection IUmbracoSettingsSection.Content => Content; - ISecuritySection IUmbracoSettingsSection.Security - { - get { return Security; } - } + ISecuritySection IUmbracoSettingsSection.Security => Security; - IRequestHandlerSection IUmbracoSettingsSection.RequestHandler - { - get { return RequestHandler; } - } + IRequestHandlerSection IUmbracoSettingsSection.RequestHandler => RequestHandler; - IBackOfficeSection IUmbracoSettingsSection.BackOffice - { - get { return BackOffice; } - } + IBackOfficeSection IUmbracoSettingsSection.BackOffice => BackOffice; - ILoggingSection IUmbracoSettingsSection.Logging - { - get { return Logging; } - } + ILoggingSection IUmbracoSettingsSection.Logging => Logging; - IProvidersSection IUmbracoSettingsSection.Providers - { - get { return Providers; } - } - - IWebRoutingSection IUmbracoSettingsSection.WebRouting - { - get { return WebRouting; } - } + IWebRoutingSection IUmbracoSettingsSection.WebRouting => WebRouting; } } diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/UserProviderElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/UserProviderElement.cs deleted file mode 100644 index eedb7b4ccf..0000000000 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/UserProviderElement.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.Configuration; - -namespace Umbraco.Core.Configuration.UmbracoSettings -{ - internal class UserProviderElement : ConfigurationElement - { - [ConfigurationProperty("DefaultBackofficeProvider")] - internal InnerTextConfigurationElement DefaultBackOfficeProvider - { - get - { - return new OptionalInnerTextConfigurationElement( - (InnerTextConfigurationElement)this["DefaultBackofficeProvider"], - //set the default - "UsersMembershipProvider"); - } - } - - - } -} diff --git a/src/Umbraco.Core/Constants-Security.cs b/src/Umbraco.Core/Constants-Security.cs index f1b9f5cce3..80f18eb2e0 100644 --- a/src/Umbraco.Core/Constants-Security.cs +++ b/src/Umbraco.Core/Constants-Security.cs @@ -7,6 +7,8 @@ namespace Umbraco.Core { public static class Security { + public const string UserMembershipProviderName = "UsersMembershipProvider"; + /// /// Gets the identifier of the 'super' user. /// diff --git a/src/Umbraco.Core/Security/MembershipProviderExtensions.cs b/src/Umbraco.Core/Security/MembershipProviderExtensions.cs index 8fc2cb77e4..367e6f5c5a 100644 --- a/src/Umbraco.Core/Security/MembershipProviderExtensions.cs +++ b/src/Umbraco.Core/Security/MembershipProviderExtensions.cs @@ -88,11 +88,11 @@ namespace Umbraco.Core.Security /// public static MembershipProvider GetUsersMembershipProvider() { - if (Membership.Providers[Current.Configs.Settings().Providers.DefaultBackOfficeUserProvider] == null) + if (Membership.Providers[Constants.Security.UserMembershipProviderName] == null) { - throw new InvalidOperationException("No membership provider found with name " + Current.Configs.Settings().Providers.DefaultBackOfficeUserProvider); + throw new InvalidOperationException("No membership provider found with name " + Constants.Security.UserMembershipProviderName); } - return Membership.Providers[Current.Configs.Settings().Providers.DefaultBackOfficeUserProvider]; + return Membership.Providers[Constants.Security.UserMembershipProviderName]; } /// diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 049ca914d4..c90641adeb 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -262,7 +262,6 @@ - @@ -271,14 +270,12 @@ - - diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/ProvidersElementDefaultTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/ProvidersElementDefaultTests.cs deleted file mode 100644 index e01d2275b4..0000000000 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/ProvidersElementDefaultTests.cs +++ /dev/null @@ -1,14 +0,0 @@ -using NUnit.Framework; - -namespace Umbraco.Tests.Configurations.UmbracoSettings -{ - [TestFixture] - public class ProvidersElementDefaultTests : ProvidersElementTests - { - protected override bool TestingDefaults - { - get { return true; } - } - - } -} diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/ProvidersElementTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/ProvidersElementTests.cs deleted file mode 100644 index d879b8dcb8..0000000000 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/ProvidersElementTests.cs +++ /dev/null @@ -1,15 +0,0 @@ -using NUnit.Framework; -using Umbraco.Core; - -namespace Umbraco.Tests.Configurations.UmbracoSettings -{ - [TestFixture] - public class ProvidersElementTests : UmbracoSettingsTests - { - [Test] - public void Users() - { - Assert.IsTrue(SettingsSection.Providers.DefaultBackOfficeUserProvider == "UsersMembershipProvider"); - } - } -} diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config index 7aeb779e0b..ac022a5489 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config @@ -110,14 +110,6 @@ 1440 - - - - - UsersMembershipProvider - - - - - - diff --git a/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs b/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs index 86a767f84a..97fffe11dd 100644 --- a/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs +++ b/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs @@ -38,14 +38,12 @@ namespace Umbraco.Tests.TestHelpers var security = new Mock(); var requestHandler = new Mock(); var logging = new Mock(); - var providers = new Mock(); var routing = new Mock(); settings.Setup(x => x.Content).Returns(content.Object); settings.Setup(x => x.Security).Returns(security.Object); settings.Setup(x => x.RequestHandler).Returns(requestHandler.Object); settings.Setup(x => x.Logging).Returns(logging.Object); - settings.Setup(x => x.Providers).Returns(providers.Object); settings.Setup(x => x.WebRouting).Returns(routing.Object); //Now configure some defaults - the defaults in the config section classes do NOT pertain to the mocked data!! @@ -54,7 +52,6 @@ namespace Umbraco.Tests.TestHelpers settings.Setup(x => x.RequestHandler.AddTrailingSlash).Returns(true); settings.Setup(x => x.RequestHandler.CharCollection).Returns(RequestHandlerElement.GetDefaultCharReplacements()); settings.Setup(x => x.WebRouting.UrlProviderMode).Returns("Auto"); - settings.Setup(x => x.Providers.DefaultBackOfficeUserProvider).Returns("UsersMembershipProvider"); return settings.Object; } diff --git a/src/Umbraco.Tests/Umbraco.Tests.csproj b/src/Umbraco.Tests/Umbraco.Tests.csproj index 83d2e83d94..42e4aa28c7 100644 --- a/src/Umbraco.Tests/Umbraco.Tests.csproj +++ b/src/Umbraco.Tests/Umbraco.Tests.csproj @@ -298,8 +298,6 @@ - - diff --git a/src/Umbraco.Web.UI/config/umbracoSettings.config b/src/Umbraco.Web.UI/config/umbracoSettings.config index fa60e31a08..668a98c7cf 100644 --- a/src/Umbraco.Web.UI/config/umbracoSettings.config +++ b/src/Umbraco.Web.UI/config/umbracoSettings.config @@ -118,14 +118,6 @@ - - - - - UsersMembershipProvider - - - - text - ashx,aspx,ascx,config,cshtml,vbhtml,asmx,air,axd,swf,xml,xhtml,html,htm,php,htaccess - - Textstring - assets/img/installer.jpg diff --git a/src/Umbraco.Web.UI/config/umbracoSettings.config b/src/Umbraco.Web.UI/config/umbracoSettings.config index 668a98c7cf..eb63fdac7a 100644 --- a/src/Umbraco.Web.UI/config/umbracoSettings.config +++ b/src/Umbraco.Web.UI/config/umbracoSettings.config @@ -1,124 +1,78 @@ + + - - - - jpeg,jpg,gif,bmp,png,tiff,tif,svg - - - - umbracoWidth - umbracoHeight - umbracoBytes - umbracoExtension - - + - + + 1 + + + - - - - - 1 - 1079 - 1080 - - - - - - your@email.here - + + + + your@email.here + - - - + + In Preview Mode - click to end - ]]> - + ]]> - - - - - false - - - throw + throw - - ashx,aspx,ascx,config,cshtml,vbhtml,asmx,air,axd,swf,xml,xhtml,html,htm,php,htaccess + + ashx,aspx,ascx,config,cshtml,vbhtml,asmx,air,axd,swf,xml,xhtml,html,htm,php,htaccess - - + + assets/img/installer.jpg - false + - - assets/img/installer.jpg + + + false + + true + + false + - + + + + - - - true - - - false - - - true - - - - - - true - - - - - - - - - - - - - plus - star - - - ae - oe - aa - ae - oe - ue - ss - ae - oe - - - - - - - - - - + + From 396fa732835a653cb2be0f3111ade9971620c6fc Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Wed, 30 Jan 2019 18:00:40 +0100 Subject: [PATCH 414/437] There is no UI.xml --- build/NuSpecs/tools/install.ps1 | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/build/NuSpecs/tools/install.ps1 b/build/NuSpecs/tools/install.ps1 index 0d4bb20b48..9cc7bd5b26 100644 --- a/build/NuSpecs/tools/install.ps1 +++ b/build/NuSpecs/tools/install.ps1 @@ -77,10 +77,6 @@ if ($project) { $splashesDestination = Join-Path $projectPath "Config\splashes\" New-Item $splashesDestination -Type directory Copy-Item $splashesSource $splashesDestination -Force - - $umbracoUIXMLSource = Join-Path $installPath "UmbracoFiles\Umbraco\Config\Create\UI.xml" - $umbracoUIXMLDestination = Join-Path $projectPath "Umbraco\Config\Create\UI.xml" - Copy-Item $umbracoUIXMLSource $umbracoUIXMLDestination -Force } else { # This part only runs for upgrades @@ -102,31 +98,6 @@ if ($project) { { # Not a big problem if this fails, let it go } - - Try - { - $uiXmlConfigPath = Join-Path $umbracoFolder -ChildPath "Config" | Join-Path -ChildPath "create" | Join-Path -ChildPath "UI.xml" - $uiXmlFile = Join-Path $umbracoFolder -ChildPath "Config" | Join-Path -ChildPath "create" | Join-Path -ChildPath "UI.xml" - - $uiXml = New-Object System.Xml.XmlDocument - $uiXml.PreserveWhitespace = $true - - $uiXml.Load($uiXmlFile) - $createExists = $uiXml.SelectNodes("//nodeType[@alias='macros']/tasks/create") - - if($createExists.Count -eq 0) - { - $macrosTasksNode = $uiXml.SelectNodes("//nodeType[@alias='macros']/tasks") - - #Creating: - $createNode = $uiXml.CreateElement("create") - $createNode.SetAttribute("assembly", "umbraco") - $createNode.SetAttribute("type", "macroTasks") - $macrosTasksNode.AppendChild($createNode) - $uiXml.Save($uiXmlFile) - } - } - Catch { } } $installFolder = Join-Path $projectPath "Install" From b7a788e219690060f8775148f3cc678372ac3c09 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Wed, 30 Jan 2019 18:01:01 +0100 Subject: [PATCH 415/437] There is no trees.config --- build/NuSpecs/tools/trees.config.install.xdt | 143 ------------------- 1 file changed, 143 deletions(-) delete mode 100644 build/NuSpecs/tools/trees.config.install.xdt diff --git a/build/NuSpecs/tools/trees.config.install.xdt b/build/NuSpecs/tools/trees.config.install.xdt deleted file mode 100644 index 42adf3cb0e..0000000000 --- a/build/NuSpecs/tools/trees.config.install.xdt +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 781f63b8056ffcb6f5b3297654c50b8852e3bfe5 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Wed, 30 Jan 2019 18:01:16 +0100 Subject: [PATCH 416/437] There is no log4net.config --- .../NuSpecs/tools/log4net.config.install.xdt | 20 ------------------- 1 file changed, 20 deletions(-) delete mode 100644 build/NuSpecs/tools/log4net.config.install.xdt diff --git a/build/NuSpecs/tools/log4net.config.install.xdt b/build/NuSpecs/tools/log4net.config.install.xdt deleted file mode 100644 index f4d3caf7fc..0000000000 --- a/build/NuSpecs/tools/log4net.config.install.xdt +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - From 74a1bb91231c1dcccf8995398a262162ac9b61de Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Wed, 30 Jan 2019 18:02:48 +0100 Subject: [PATCH 417/437] Update .net version, don't insert examine nor defaultuilanguage --- build/NuSpecs/tools/Web.config.install.xdt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/build/NuSpecs/tools/Web.config.install.xdt b/build/NuSpecs/tools/Web.config.install.xdt index 74a614275f..2da3206e7a 100644 --- a/build/NuSpecs/tools/Web.config.install.xdt +++ b/build/NuSpecs/tools/Web.config.install.xdt @@ -2,8 +2,6 @@ -
    - @@ -18,7 +16,6 @@ - @@ -40,7 +37,7 @@ - + From 2036da5e84f72d9344d7ad85a4fbbd4e9ede33df Mon Sep 17 00:00:00 2001 From: Callum Whyte Date: Thu, 31 Jan 2019 04:37:07 +1100 Subject: [PATCH 418/437] V8: kill usercontrol support, cleanup macros (#4329) --- src/Umbraco.Core/IO/SystemDirectories.cs | 6 +- .../Upgrade/V_8_0_0/RefactorMacroColumns.cs | 2 +- src/Umbraco.Core/Models/MacroTypes.cs | 2 - src/Umbraco.Tests/IO/IoHelperTests.cs | 4 +- src/Umbraco.Tests/Macros/MacroTests.cs | 61 +------------ .../src/common/services/macro.service.js | 36 +------- .../common/services/macro-service.spec.js | 30 +------ src/Umbraco.Web.UI/Umbraco/config/lang/en.xml | 1 - .../Umbraco/config/lang/en_us.xml | 1 - src/Umbraco.Web.UI/Umbraco/config/lang/es.xml | 1 - src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml | 1 - src/Umbraco.Web.UI/Umbraco/config/lang/ja.xml | 1 - src/Umbraco.Web.UI/Umbraco/config/lang/nl.xml | 1 - src/Umbraco.Web.UI/Umbraco/config/lang/pl.xml | 1 - src/Umbraco.Web.UI/Umbraco/config/lang/ru.xml | 1 - src/Umbraco.Web.UI/Umbraco/config/lang/tr.xml | 1 - src/Umbraco.Web.UI/Umbraco/config/lang/zh.xml | 1 - .../Umbraco/config/lang/zh_tw.xml | 1 - .../FolderAndFilePermissionsCheck.cs | 1 - .../Install/FilePermissionHelper.cs | 4 +- src/Umbraco.Web/Macros/MacroRenderer.cs | 23 +---- src/Umbraco.Web/Macros/MacroTagParser.cs | 2 - .../Macros/UserControlMacroEngine.cs | 90 ------------------- src/Umbraco.Web/Mvc/RenderRouteHandler.cs | 7 +- src/Umbraco.Web/Mvc/UmbracoPageResult.cs | 23 ----- src/Umbraco.Web/Templates/TemplateRenderer.cs | 4 +- src/Umbraco.Web/Umbraco.Web.csproj | 1 - 27 files changed, 13 insertions(+), 294 deletions(-) delete mode 100644 src/Umbraco.Web/Macros/UserControlMacroEngine.cs diff --git a/src/Umbraco.Core/IO/SystemDirectories.cs b/src/Umbraco.Core/IO/SystemDirectories.cs index 100dbc265e..2f33d82bdc 100644 --- a/src/Umbraco.Core/IO/SystemDirectories.cs +++ b/src/Umbraco.Core/IO/SystemDirectories.cs @@ -1,5 +1,4 @@ -using System; -using System.Web; +using System.Web; namespace Umbraco.Core.IO { @@ -36,9 +35,6 @@ namespace Umbraco.Core.IO public static string Umbraco => IOHelper.ReturnPath("umbracoPath", "~/umbraco"); - [Obsolete("Usercontrols are obsolete and code should be removed")] - public static string UserControls => "~/usercontrols"; - public static string Packages => Data + "/packages"; public static string Preview => Data + "/preview"; diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/RefactorMacroColumns.cs b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/RefactorMacroColumns.cs index 623a842525..bd08b53877 100644 --- a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/RefactorMacroColumns.cs +++ b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/RefactorMacroColumns.cs @@ -26,7 +26,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 //populate the new macroSource column with legacy data Execute.Sql($"UPDATE {Constants.DatabaseSchema.Tables.Macro} SET macroSource = macroXSLT, macroType = {(int)MacroTypes.Unknown} WHERE macroXSLT IS NOT NULL").Do(); Execute.Sql($"UPDATE {Constants.DatabaseSchema.Tables.Macro} SET macroSource = macroScriptAssembly, macroType = {(int)MacroTypes.Unknown} WHERE macroScriptAssembly IS NOT NULL").Do(); - Execute.Sql($"UPDATE {Constants.DatabaseSchema.Tables.Macro} SET macroSource = macroScriptType, macroType = {(int)MacroTypes.UserControl} WHERE macroScriptType IS NOT NULL").Do(); + Execute.Sql($"UPDATE {Constants.DatabaseSchema.Tables.Macro} SET macroSource = macroScriptType, macroType = {(int)MacroTypes.Unknown} WHERE macroScriptType IS NOT NULL").Do(); Execute.Sql($"UPDATE {Constants.DatabaseSchema.Tables.Macro} SET macroSource = macroPython, macroType = {(int)MacroTypes.PartialView} WHERE macroPython IS NOT NULL").Do(); //now apply constraints (NOT NULL) to new table diff --git a/src/Umbraco.Core/Models/MacroTypes.cs b/src/Umbraco.Core/Models/MacroTypes.cs index 1f8ae696c5..5f8440845d 100644 --- a/src/Umbraco.Core/Models/MacroTypes.cs +++ b/src/Umbraco.Core/Models/MacroTypes.cs @@ -10,8 +10,6 @@ namespace Umbraco.Core.Models [DataContract(IsReference = true)] public enum MacroTypes { - [EnumMember] - UserControl = 3, [EnumMember] Unknown = 4, [EnumMember] diff --git a/src/Umbraco.Tests/IO/IoHelperTests.cs b/src/Umbraco.Tests/IO/IoHelperTests.cs index 3f510dd57e..34b18ffc5e 100644 --- a/src/Umbraco.Tests/IO/IoHelperTests.cs +++ b/src/Umbraco.Tests/IO/IoHelperTests.cs @@ -7,7 +7,6 @@ namespace Umbraco.Tests.IO [TestFixture] public class IoHelperTests { - [TestCase("~/Scripts", "/Scripts", null)] [TestCase("/Scripts", "/Scripts", null)] [TestCase("../Scripts", "/Scripts", typeof(ArgumentException))] @@ -42,8 +41,7 @@ namespace Umbraco.Tests.IO Assert.AreEqual(IOHelper.MapPath(SystemDirectories.Preview, true), IOHelper.MapPath(SystemDirectories.Preview, false)); Assert.AreEqual(IOHelper.MapPath(SystemDirectories.Root, true), IOHelper.MapPath(SystemDirectories.Root, false)); Assert.AreEqual(IOHelper.MapPath(SystemDirectories.Scripts, true), IOHelper.MapPath(SystemDirectories.Scripts, false)); - Assert.AreEqual(IOHelper.MapPath(SystemDirectories.Umbraco, true), IOHelper.MapPath(SystemDirectories.Umbraco, false)); - Assert.AreEqual(IOHelper.MapPath(SystemDirectories.UserControls, true), IOHelper.MapPath(SystemDirectories.UserControls, false)); + Assert.AreEqual(IOHelper.MapPath(SystemDirectories.Umbraco, true), IOHelper.MapPath(SystemDirectories.Umbraco, false)); } [Test] diff --git a/src/Umbraco.Tests/Macros/MacroTests.cs b/src/Umbraco.Tests/Macros/MacroTests.cs index 0d60181c79..9cc1d14954 100644 --- a/src/Umbraco.Tests/Macros/MacroTests.cs +++ b/src/Umbraco.Tests/Macros/MacroTests.cs @@ -1,12 +1,7 @@ -using System; -using System.Web.UI; -using System.Web.UI.WebControls; -using NUnit.Framework; +using NUnit.Framework; using Umbraco.Core; using Umbraco.Core.Cache; using Umbraco.Core.Composing; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.UmbracoSettings; using Umbraco.Core.Models; using Umbraco.Tests.TestHelpers; using Umbraco.Web.Macros; @@ -32,47 +27,7 @@ namespace Umbraco.Tests.Macros Current.Configs.Add(SettingsForTests.GetDefaultUmbracoSettings); } - [TestCase("123", "IntProp", typeof(int))] - [TestCase("Hello", "StringProp", typeof(string))] - [TestCase("123456789.01", "DoubleProp", typeof(double))] - [TestCase("1234567", "FloatProp", typeof(float))] - [TestCase("1", "BoolProp", typeof(bool))] - [TestCase("true", "BoolProp", typeof(bool))] - [TestCase("0", "BoolProp", typeof(bool))] - [TestCase("false", "BoolProp", typeof(bool))] - [TestCase("2001-05-10", "DateProp", typeof(DateTime))] - [TestCase("123px", "UnitProp", typeof(Unit))] - [TestCase("456pt", "UnitProp", typeof(Unit))] - [TestCase("CEC063D3-D73E-4B7D-93ED-7F69CA9BF2D0", "GuidProp", typeof(Guid))] - [TestCase("CEC063D3D73E4B7D93ED7F69CA9BF2D0", "GuidProp", typeof(Guid))] - [TestCase("", "NullDateProp", typeof(DateTime?))] - [TestCase("2001-05-10", "NullDateProp", typeof(DateTime?))] - [TestCase("", "NullUnitProp", typeof(Unit?))] - [TestCase("456pt", "NullUnitProp", typeof(Unit?))] - public void SetUserControlProperty(string val, string macroPropName, Type convertTo) - { - var ctrl = new UserControlTest(); - var macroModel = new MacroModel - { - Name = "test", - Alias = "test", - MacroSource = "~/usercontrols/menu.ascx" - }; - macroModel.Properties.Add(new MacroPropertyModel(macroPropName, val)); - - UserControlMacroEngine.UpdateControlProperties(ctrl, macroModel); - - var ctrlType = ctrl.GetType(); - var prop = ctrlType.GetProperty(macroPropName); - var converted = val.TryConvertTo(convertTo); - - Assert.IsTrue(converted.Success); - Assert.NotNull(prop); - Assert.AreEqual(converted.Result, prop.GetValue(ctrl)); - } - [TestCase("PartialView", true)] - [TestCase("UserControl", true)] [TestCase("Unknown", false)] public void Macro_Is_File_Based(string macroTypeString, bool expectedNonNull) { @@ -102,19 +57,5 @@ namespace Umbraco.Tests.Macros { //var asdf = macro.GetCacheIdentifier() } - - private class UserControlTest : UserControl - { - public int IntProp { get; set; } - public string StringProp { get; set; } - public double DoubleProp { get; set; } - public float FloatProp { get; set; } - public bool BoolProp { get; set; } - public DateTime DateProp { get; set; } - public Unit UnitProp { get; set; } - public Guid GuidProp { get; set; } - public DateTime? NullDateProp { get; set; } - public Unit? NullUnitProp { get; set; } - } } } diff --git a/src/Umbraco.Web.UI.Client/src/common/services/macro.service.js b/src/Umbraco.Web.UI.Client/src/common/services/macro.service.js index 77ed6e821e..6c8c0a6ff2 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/macro.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/macro.service.js @@ -40,7 +40,7 @@ function macroService() { /** * @ngdoc function - * @name umbraco.services.macroService#generateWebFormsSyntax + * @name umbraco.services.macroService#generateMacroSyntax * @methodOf umbraco.services.macroService * @function * @@ -82,35 +82,6 @@ function macroService() { return macroString; }, - - /** - * @ngdoc function - * @name umbraco.services.macroService#generateWebFormsSyntax - * @methodOf umbraco.services.macroService - * @function - * - * @description - * generates the syntax for inserting a macro into a webforms templates - * - * @param {object} args an object containing the macro alias and it's parameter values - */ - generateWebFormsSyntax: function(args) { - - var macroString = '"; - - return macroString; - }, /** * @ngdoc function @@ -180,10 +151,7 @@ function macroService() { }); //get the syntax based on the rendering engine - if (renderingEngine && renderingEngine === "WebForms") { - syntax = this.generateWebFormsSyntax({ macroAlias: macroAlias, macroParamsDictionary: paramDictionary }); - } - else if (renderingEngine && renderingEngine === "Mvc") { + if (renderingEngine && renderingEngine === "Mvc") { syntax = this.generateMvcSyntax({ macroAlias: macroAlias, macroParamsDictionary: paramDictionary }); } else { diff --git a/src/Umbraco.Web.UI.Client/test/unit/common/services/macro-service.spec.js b/src/Umbraco.Web.UI.Client/test/unit/common/services/macro-service.spec.js index 44334e140a..3f92236169 100644 --- a/src/Umbraco.Web.UI.Client/test/unit/common/services/macro-service.spec.js +++ b/src/Umbraco.Web.UI.Client/test/unit/common/services/macro-service.spec.js @@ -108,34 +108,6 @@ describe('macro service tests', function () { toBe(""); }); - - it('can generate syntax for webforms', function () { - - var syntax = macroService.generateWebFormsSyntax({ - macroAlias: "myMacro", - macroParamsDictionary: { - param1: "value1", - param2: "value2", - param3: "value3" - } - }); - - expect(syntax). - toBe(""); - - }); - - it('can generate syntax for webforms with no params', function () { - - var syntax = macroService.generateWebFormsSyntax({ - macroAlias: "myMacro", - macroParamsDictionary: {} - }); - - expect(syntax). - toBe(""); - - }); it('can generate syntax for MVC', function () { @@ -167,4 +139,4 @@ describe('macro service tests', function () { }); }); -}); \ No newline at end of file +}); diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml index e89ef44923..ad78274c91 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml @@ -544,7 +544,6 @@ Please fill both alias and name on the new property type! There is a problem with read/write access to a specific file or folder Error loading Partial View script (file: %0%) - Error loading userControl '%0%' Please enter a title Please choose a type You're about to make the picture larger than the original size. Are you sure that you want to proceed? 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 bb8d9b12eb..36c738c42c 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml @@ -548,7 +548,6 @@ Please fill both alias and name on the new property type! There is a problem with read/write access to a specific file or folder Error loading Partial View script (file: %0%) - Error loading userControl '%0%' Please enter a title Please choose a type You're about to make the picture larger than the original size. Are you sure that you want to proceed? diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/es.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/es.xml index 9aeab1dba4..fb7350d603 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/es.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/es.xml @@ -451,7 +451,6 @@ Debes rellenar el alias y el nombre en el tipo de propiedad Hay un problema de lectura y escritura al acceder a un archivo o carpeta Error cargando Vista Parcial (archivo: %0%) - Error cargando userControl '%0%' Por favor, elige un tipo diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml index b6fd93df03..45af92a440 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml @@ -464,7 +464,6 @@ Veuillez remplir l'alias et le nom de la nouvelle propriété! Il y a un problème de droits en lecture/écriture sur un fichier ou dossier spécifique Erreur de chargement du script d'une Partial View (fichier : %0%) - Erreur de chargement du userControl '%0%' Veuillez entrer un titre Veuillez choisir un type Vous allez définir une taille d'image supérieure à sa taille d'origine. Êtes-vous certain(e) de vouloir continuer? diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/ja.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/ja.xml index 730e4e06b7..bf6a9eea75 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/ja.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/ja.xml @@ -344,7 +344,6 @@ 新しいプロパティ型のエイリアスと名前の両方を設定してください! 特定のファイルまたはフォルタの読み込み/書き込みアクセスに問題があります Partial View スクリプトの読み込みエラー (ファイル: %0%) - userControl の読み込みエラー '%0%' タイトルを入力してください 型を選択してください 元画像より大きくしようとしていますが、本当によろしいのですか? diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/nl.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/nl.xml index 5904958b93..60f8e36449 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/nl.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/nl.xml @@ -376,7 +376,6 @@ Zowel de alias als de naam van het nieuwe eigenschappentype moeten worden ingevuld! Er is een probleem met de lees/schrijfrechten op een bestand of map Error bij het laden van Partial View script (file: %0%) - Error bij het laden van userControl '%0%' Vul een titel in Selecteer een type U wilt een afbeelding groter maken dan de originele afmetingen. Weet je zeker dat je wilt doorgaan? diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/pl.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/pl.xml index 893bf356dd..159bb8e7c2 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/pl.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/pl.xml @@ -446,7 +446,6 @@ Proszę uzupełnij zarówno alias, jak i nazwę dla nowego typu właściwości Wystąpił problem podczas zapisu/odczytu wymaganego pliku lub folderu Wystąpił błąd podczas ładowania skryptu Częściowego Widoku (plik: %0%) - Wystąpił błąd podczas ładowania userControl '%0%' Proszę podać tytuł Proszę wybrać typ Chcesz utworzyć obraz większy niż rozmiar oryginalny. Czy na pewno chcesz kontynuować? diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/ru.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/ru.xml index 4854a2c3aa..c484e33423 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/ru.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/ru.xml @@ -483,7 +483,6 @@ Использование данного типа файлов на сайте запрещено администратором Ошибка доступа к указанному файлу или папке Ошибка загрузки кода в частичном представлении (файл: %0%) - Ошибка загрузки пользовательского элемента управления '%0%' Укажите заголовок Выберите тип Вы пытаетесь увеличить изображение по сравнению с его исходным размером. Уверены, что хотите сделать это? diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/tr.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/tr.xml index 7f0f874237..6c4a0773a4 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/tr.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/tr.xml @@ -286,7 +286,6 @@ Yeni özellik tipine takma adını ve hem de doldurunuz! Belirli bir dosya veya klasör için okuma / yazma erişimi olan bir sorun var Error loading Partial View script (Dosya: %0%) - Error loading userControl '%0%' Lütfen bir başlık girin Lütfen bir tür seçin Orijinal boyutundan daha resmi büyütmek üzereyiz. Devam etmek istediğinizden emin misiniz? diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/zh.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/zh.xml index 374d8802eb..7e3c275b06 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/zh.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/zh.xml @@ -364,7 +364,6 @@ 请为新的属性类型填写名称和别名! 权限有问题,访问指定文件或文件夹失败! 加载Partial视图脚本时出错(文件: %0%) - 加载 userControl 时出错 '%0%' 请输入标题 请选择类型 图片尺寸大于原始尺寸不会提高图片质量,您确定要把图片尺寸变大吗? 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 98279d58f3..f7461ad9d7 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/zh_tw.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/zh_tw.xml @@ -357,7 +357,6 @@ 請為新的屬性類型填寫名稱和別名! 許可權有問題,訪問指定文檔或資料夾失敗! 讀取片段視圖腳本錯誤(檔案:%0%) - 讀取使用者控制項 %0% 錯誤 請輸入標題 請選擇類型 圖片尺寸大於原始尺寸不會提高圖片品質,您確定要把圖片尺寸變大嗎? diff --git a/src/Umbraco.Web/HealthCheck/Checks/Permissions/FolderAndFilePermissionsCheck.cs b/src/Umbraco.Web/HealthCheck/Checks/Permissions/FolderAndFilePermissionsCheck.cs index 273d19bae0..ee6f254235 100644 --- a/src/Umbraco.Web/HealthCheck/Checks/Permissions/FolderAndFilePermissionsCheck.cs +++ b/src/Umbraco.Web/HealthCheck/Checks/Permissions/FolderAndFilePermissionsCheck.cs @@ -68,7 +68,6 @@ namespace Umbraco.Web.HealthCheck.Checks.Permissions { SystemDirectories.Media, PermissionCheckRequirement.Optional }, { SystemDirectories.Scripts, PermissionCheckRequirement.Optional }, { SystemDirectories.Umbraco, PermissionCheckRequirement.Optional }, - { SystemDirectories.UserControls, PermissionCheckRequirement.Optional }, { SystemDirectories.MvcViews, PermissionCheckRequirement.Optional } }; diff --git a/src/Umbraco.Web/Install/FilePermissionHelper.cs b/src/Umbraco.Web/Install/FilePermissionHelper.cs index 6c166e734b..e802b19c8d 100644 --- a/src/Umbraco.Web/Install/FilePermissionHelper.cs +++ b/src/Umbraco.Web/Install/FilePermissionHelper.cs @@ -11,8 +11,8 @@ namespace Umbraco.Web.Install internal class FilePermissionHelper { // ensure that these directories exist and Umbraco can write to them - private static readonly string[] PermissionDirs = { SystemDirectories.Css, SystemDirectories.Config, SystemDirectories.Data, SystemDirectories.Media, SystemDirectories.UserControls, SystemDirectories.Preview }; - private static readonly string[] PackagesPermissionsDirs = { SystemDirectories.Bin, SystemDirectories.Umbraco, SystemDirectories.UserControls, SystemDirectories.Packages }; + private static readonly string[] PermissionDirs = { SystemDirectories.Css, SystemDirectories.Config, SystemDirectories.Data, SystemDirectories.Media, SystemDirectories.Preview }; + private static readonly string[] PackagesPermissionsDirs = { SystemDirectories.Bin, SystemDirectories.Umbraco, SystemDirectories.Packages }; // ensure Umbraco can write to these files (the directories must exist) private static readonly string[] PermissionFiles = { }; diff --git a/src/Umbraco.Web/Macros/MacroRenderer.cs b/src/Umbraco.Web/Macros/MacroRenderer.cs index 17c5859e91..c975c4a60b 100755 --- a/src/Umbraco.Web/Macros/MacroRenderer.cs +++ b/src/Umbraco.Web/Macros/MacroRenderer.cs @@ -11,7 +11,6 @@ using System.Text; using System.Text.RegularExpressions; using System.Web; using System.Web.Caching; -using System.Web.Hosting; using Umbraco.Core; using Umbraco.Core.Cache; using Umbraco.Core.Configuration; @@ -171,8 +170,7 @@ namespace Umbraco.Web.Macros switch (model.MacroType) { case MacroTypes.PartialView: - case MacroTypes.UserControl: - filename = model.MacroSource; //user controls & partial views are saved with their full virtual path + filename = model.MacroSource; // partial views are saved with their full virtual path break; default: // not file-based, or not supported @@ -363,14 +361,6 @@ namespace Umbraco.Web.Macros () => ExecutePartialView(model), () => textService.Localize("errors/macroErrorLoadingPartialView", new[] { model.MacroSource })); - case MacroTypes.UserControl: - return ExecuteMacroWithErrorWrapper(model, - $"Loading UserControl: MacroSource=\"{model.MacroSource}\".", - "Loaded UserControl.", - () => ExecuteUserControl(model), - () => textService.Localize("errors/macroErrorLoadingUsercontrol", new[] { model.MacroSource })); - - //case MacroTypes.Script: default: return ExecuteMacroWithErrorWrapper(model, $"Execute macro with unsupported type \"{model.MacroType}\".", @@ -411,17 +401,6 @@ namespace Umbraco.Web.Macros return engine.Execute(macro, content); } - public static MacroContent ExecuteUserControl(MacroModel macro) - { - // add tilde for v4 defined macros - if (string.IsNullOrEmpty(macro.MacroSource) == false - && macro.MacroSource.StartsWith("~") == false) - macro.MacroSource = "~/" + macro.MacroSource; - - var engine = new UserControlMacroEngine(); - return engine.Execute(macro); - } - #endregion #region Execution helpers diff --git a/src/Umbraco.Web/Macros/MacroTagParser.cs b/src/Umbraco.Web/Macros/MacroTagParser.cs index 8e3f116614..7dea3674b0 100644 --- a/src/Umbraco.Web/Macros/MacroTagParser.cs +++ b/src/Umbraco.Web/Macros/MacroTagParser.cs @@ -162,8 +162,6 @@ namespace Umbraco.Web.Macros while (!stop) { var tagIndex = fieldResult.ToString().ToLower().IndexOf(" -1) { var tempElementContent = ""; diff --git a/src/Umbraco.Web/Macros/UserControlMacroEngine.cs b/src/Umbraco.Web/Macros/UserControlMacroEngine.cs deleted file mode 100644 index f92074a91b..0000000000 --- a/src/Umbraco.Web/Macros/UserControlMacroEngine.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System; -using System.IO; -using System.Web; -using System.Web.UI; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.Logging; -using Umbraco.Web.Composing; - -namespace Umbraco.Web.Macros -{ - class UserControlMacroEngine - { - public MacroContent Execute(MacroModel model) - { - var filename = model.MacroSource; - - // ensure the file exists - var path = IOHelper.FindFile(filename); - if (File.Exists(IOHelper.MapPath(path)) == false) - throw new Exception($"Failed to load control, file {filename} does not exist."); - - // load the control - var control = (UserControl)new UserControl().LoadControl(path); - control.ID = string.IsNullOrEmpty(model.MacroControlIdentifier) - ? GetControlUniqueId(filename) - : model.MacroControlIdentifier; - - // initialize the control - // note: we are not setting the 'CurrentNode' property on the control anymore, - // as that was an INode which is gone in v8. Use UmbracoContext to access the - // current content. - Current.Logger.Info("Loaded control '{UserControlFile}' with ID '{UserControlId}'", filename, control.ID); - UpdateControlProperties(control, model); - - return new MacroContent { Control = control }; - } - - private static string GetControlUniqueId(string filename) - { - const string key = "MacroControlUniqueId"; - - var x = 0; - - if (HttpContext.Current != null) - { - if (HttpContext.Current.Items.Contains(key)) - x = (int)HttpContext.Current.Items[key]; - x += 1; - HttpContext.Current.Items[key] = x; - } - - return $"{Path.GetFileNameWithoutExtension(filename)}_{x}"; - } - - // set the control properties according to the model properties ie parameters - internal static void UpdateControlProperties(Control control, MacroModel model) - { - var type = control.GetType(); - - foreach (var modelProperty in model.Properties) - { - var controlProperty = type.GetProperty(modelProperty.Key); - if (controlProperty == null) - { - Current.Logger.Warn("Control property '{UserControlProperty}' doesn't exist or isn't accessible, skip.", modelProperty.Key); - continue; - } - - var tryConvert = modelProperty.Value.TryConvertTo(controlProperty.PropertyType); - if (tryConvert.Success) - { - try - { - controlProperty.SetValue(control, tryConvert.Result, null); - Current.Logger.Debug("Set property '{UserControlProperty}' value '{UserControlPropertyValue}'", modelProperty.Key, modelProperty.Value); - } - catch (Exception e) - { - Current.Logger.Warn(e, "Failed to set property '{UserControlProperty}' value '{UserControlPropertyValue}'", modelProperty.Key, modelProperty.Value); - } - } - else - { - Current.Logger.Warn("Failed to set property '{UserControlProperty}' value '{UserControlPropertyValue}'", modelProperty.Key, modelProperty.Value); - } - } - } - } -} diff --git a/src/Umbraco.Web/Mvc/RenderRouteHandler.cs b/src/Umbraco.Web/Mvc/RenderRouteHandler.cs index 4cd7e3b0e0..215eb39573 100644 --- a/src/Umbraco.Web/Mvc/RenderRouteHandler.cs +++ b/src/Umbraco.Web/Mvc/RenderRouteHandler.cs @@ -386,11 +386,8 @@ namespace Umbraco.Web.Mvc var handler = GetHandlerOnMissingTemplate(request); - // if it's not null it can be either the PublishedContentNotFoundHandler (no document was - // found to handle 404, or document with no template was found) or the WebForms handler - // (a document was found and its template is WebForms) - - // if it's null it means that a document was found and its template is Mvc + // if it's not null it's the PublishedContentNotFoundHandler (no document was found to handle 404, or document with no template was found) + // if it's null it means that a document was found // if we have a handler, return now if (handler != null) diff --git a/src/Umbraco.Web/Mvc/UmbracoPageResult.cs b/src/Umbraco.Web/Mvc/UmbracoPageResult.cs index d506090ecd..75804b47bb 100644 --- a/src/Umbraco.Web/Mvc/UmbracoPageResult.cs +++ b/src/Umbraco.Web/Mvc/UmbracoPageResult.cs @@ -1,11 +1,9 @@ using System; using System.IO; -using System.Web; using System.Web.Mvc; using System.Web.Routing; using Umbraco.Core; using Umbraco.Core.Logging; -using Umbraco.Web.Composing; namespace Umbraco.Web.Mvc { @@ -80,27 +78,6 @@ namespace Umbraco.Web.Mvc } } - /// - /// When POSTing to MVC but rendering in WebForms we need to do some trickery, we'll create a dummy viewcontext with all of the - /// current model state, tempdata, viewdata so that if we're rendering partial view macros within the webforms view, they will - /// get all of this merged into them. - /// - /// - private static void EnsureViewContextForWebForms(ControllerContext context) - { - var tempDataDictionary = new TempDataDictionary(); - tempDataDictionary.Save(context, new SessionStateTempDataProvider()); - var viewCtx = new ViewContext(context, new DummyView(), new ViewDataDictionary(), tempDataDictionary, new StringWriter()); - - viewCtx.ViewData.ModelState.Merge(new ModelStateDictionary(context.Controller.ViewData.ModelState)); - - foreach (var d in context.Controller.ViewData) - viewCtx.ViewData[d.Key] = d.Value; - - //now we need to add it to the special route tokens so it's picked up later - context.HttpContext.Request.RequestContext.RouteData.DataTokens[Constants.DataTokenCurrentViewContext] = viewCtx; - } - /// /// Ensure ModelState, ViewData and TempData is copied across /// diff --git a/src/Umbraco.Web/Templates/TemplateRenderer.cs b/src/Umbraco.Web/Templates/TemplateRenderer.cs index 214612ef2d..9279eea124 100644 --- a/src/Umbraco.Web/Templates/TemplateRenderer.cs +++ b/src/Umbraco.Web/Templates/TemplateRenderer.cs @@ -2,7 +2,6 @@ using System.Globalization; using System.IO; using System.Linq; -using System.Web.Compilation; using System.Web.Mvc; using System.Web.Routing; using Umbraco.Core; @@ -10,7 +9,6 @@ using Umbraco.Web.Models; using Umbraco.Web.Mvc; using Umbraco.Web.Routing; using Umbraco.Core.Composing; -using Umbraco.Core.Configuration; using Umbraco.Core.Services; using Umbraco.Web.Macros; using Current = Umbraco.Web.Composing.Current; @@ -21,7 +19,7 @@ namespace Umbraco.Web.Templates /// This is used purely for the RenderTemplate functionality in Umbraco ///
    /// - /// This allows you to render either an MVC or Webforms template based purely off of a node id and an optional alttemplate id as string output. + /// This allows you to render an MVC template based purely off of a node id and an optional alttemplate id as string output. /// internal class TemplateRenderer { diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 849d82940f..6b7f568566 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -341,7 +341,6 @@ - From dcacff0124e29f0089a9a1fc20ca232e5afca290 Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 31 Jan 2019 11:03:25 +1100 Subject: [PATCH 419/437] Updates user section routing so that it has nice urls --- src/Umbraco.Web.UI.Client/src/routes.js | 7 ++++++ .../src/views/users/group.controller.js | 5 ++-- .../src/views/users/overview.controller.js | 24 +++++++------------ .../src/views/users/user.controller.js | 5 ++-- .../users/views/users/users.controller.js | 2 +- src/Umbraco.Web/Trees/UserTreeController.cs | 2 +- 6 files changed, 22 insertions(+), 23 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/routes.js b/src/Umbraco.Web.UI.Client/src/routes.js index c2d3ea2df8..ecb011e3f0 100644 --- a/src/Umbraco.Web.UI.Client/src/routes.js +++ b/src/Umbraco.Web.UI.Client/src/routes.js @@ -164,6 +164,13 @@ app.config(function ($routeProvider) { return; } + //special case for the users section + var usersPages = ["user", "group"]; + if ($routeParams.section.toLowerCase() === "users" && $routeParams.tree.toLowerCase() === "users" && usersPages.indexOf($routeParams.method.toLowerCase()) === -1) { + $scope.templateUrl = "views/users/overview.html"; + return; + } + // Here we need to figure out if this route is for a user's package tree and if so then we need // to change it's convention view path to: // /App_Plugins/{mypackage}/backoffice/{treetype}/{method}.html diff --git a/src/Umbraco.Web.UI.Client/src/views/users/group.controller.js b/src/Umbraco.Web.UI.Client/src/views/users/group.controller.js index 54096d413b..a9d9f5d4e4 100644 --- a/src/Umbraco.Web.UI.Client/src/views/users/group.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/users/group.controller.js @@ -100,7 +100,7 @@ } function goToPage(ancestor) { - $location.path(ancestor.path).search("subview", ancestor.subView); + $location.path(ancestor.path); } function openSectionPicker() { @@ -292,8 +292,7 @@ vm.breadcrumbs = [ { "name": vm.labels.groups, - "path": "/users/users/overview", - "subView": "groups" + "path": "/users/users/groups" }, { "name": vm.userGroup.name diff --git a/src/Umbraco.Web.UI.Client/src/views/users/overview.controller.js b/src/Umbraco.Web.UI.Client/src/views/users/overview.controller.js index 80e2322f6b..2268bb93b8 100644 --- a/src/Umbraco.Web.UI.Client/src/views/users/overview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/users/overview.controller.js @@ -1,17 +1,11 @@ (function () { "use strict"; - function UsersOverviewController($scope, $location, localizationService) { + function UsersOverviewController($scope, $location, $routeParams, localizationService) { var vm = this; - var usersUri = $location.search().subview; - if (!usersUri) { - $location.search("subview", "users"); - //exit after this, we don't want to initialize anything further since this - //is going to change the route - return; - } - + let usersUri = $routeParams.method; + //note on the below, we dont assign a view unless it's the right route since if we did that it will load in that controller //for the view which is unecessary and will cause extra overhead/requests to occur vm.page = {}; @@ -30,7 +24,7 @@ var labels = ["sections_users", "general_groups"]; - localizationService.localizeMany(labels).then(function(data){ + localizationService.localizeMany(labels).then(function (data) { vm.page.labels.users = data[0]; vm.page.labels.groups = data[1]; @@ -38,8 +32,8 @@ { "name": vm.page.labels.users, "icon": "icon-user", - "action": function() { - $location.search("subview", "users") + "action": function () { + $location.path("/users/users/users").search("create", null); }, "view": !usersUri || usersUri === "users" ? "views/users/views/users/users.html" : null, "active": !usersUri || usersUri === "users", @@ -49,7 +43,7 @@ "name": vm.page.labels.groups, "icon": "icon-users", "action": function () { - $location.search("subview", "groups") + $location.path("/users/users/groups").search("create", null); }, "view": usersUri === "groups" ? "views/users/views/groups/groups.html" : null, "active": usersUri === "groups", @@ -60,11 +54,11 @@ } function setPageName() { - localizationService.localize("user_userManagement").then(function(data){ + localizationService.localize("user_userManagement").then(function (data) { vm.page.name = data; }) } - + onInit(); } diff --git a/src/Umbraco.Web.UI.Client/src/views/users/user.controller.js b/src/Umbraco.Web.UI.Client/src/views/users/user.controller.js index dc4512a549..d5636c5b3f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/users/user.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/users/user.controller.js @@ -205,7 +205,7 @@ } function goToPage(ancestor) { - $location.path(ancestor.path).search("subview", ancestor.subView); + $location.path(ancestor.path); } function openUserGroupPicker() { @@ -458,8 +458,7 @@ vm.breadcrumbs = [ { "name": vm.labels.users, - "path": "/users/users/overview", - "subView": "users" + "path": "/users/users/users" }, { "name": vm.user.name diff --git a/src/Umbraco.Web.UI.Client/src/views/users/views/users/users.controller.js b/src/Umbraco.Web.UI.Client/src/views/users/views/users/users.controller.js index 2b531b7ef2..92ed10267d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/users/views/users/users.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/users/views/users/users.controller.js @@ -558,7 +558,7 @@ } function goToUser(userId) { - $location.path('users/users/user/' + userId); + $location.path('users/users/user/' + userId).search("create", null).search("invite", null); } // helpers diff --git a/src/Umbraco.Web/Trees/UserTreeController.cs b/src/Umbraco.Web/Trees/UserTreeController.cs index 91078b2be8..7da0b689af 100644 --- a/src/Umbraco.Web/Trees/UserTreeController.cs +++ b/src/Umbraco.Web/Trees/UserTreeController.cs @@ -21,7 +21,7 @@ namespace Umbraco.Web.Trees var root = base.CreateRootNode(queryStrings); //this will load in a custom UI instead of the dashboard for the root node - root.RoutePath = string.Format("{0}/{1}/{2}", Constants.Applications.Users, Constants.Trees.Users, "overview"); + root.RoutePath = $"{Constants.Applications.Users}/{Constants.Trees.Users}/users"; root.Icon = "icon-users"; root.HasChildren = false; From 0e9eae6f73ab617eecea914619311d74c455e0e2 Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 31 Jan 2019 11:05:41 +1100 Subject: [PATCH 420/437] removes a bunch of console.log that was recently added --- .../components/content/umbcontentnodeinfo.directive.js | 2 -- .../directives/components/editor/umbeditors.directive.js | 4 ---- .../directives/components/tags/umbtagseditor.directive.js | 2 +- .../src/controllers/navigation.controller.js | 1 - .../propertyeditors/nestedcontent/nestedcontent.controller.js | 1 - 5 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbcontentnodeinfo.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbcontentnodeinfo.directive.js index 0a25471c4f..06a147969a 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbcontentnodeinfo.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbcontentnodeinfo.directive.js @@ -246,8 +246,6 @@ function setAuditTrailLogTypeColor(auditTrail) { angular.forEach(auditTrail, function (item) { - console.log(item.logType); - switch (item.logType) { case "Save": item.logTypeColor = "primary"; diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditors.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditors.directive.js index ed8618d644..0db239c56a 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditors.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditors.directive.js @@ -13,8 +13,6 @@ function addEditor(editor) { - console.log("add:", editor) - editor.animating = true; showOverlayOnPrevEditor(); @@ -91,8 +89,6 @@ function removeEditor(editor) { - console.log("remove: ", editor) - editor.animating = true; $timeout(function(){ diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/tags/umbtagseditor.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/tags/umbtagseditor.directive.js index 3d784c999f..1850445bd4 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/tags/umbtagseditor.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/tags/umbtagseditor.directive.js @@ -116,7 +116,7 @@ }); }).bind("typeahead:opened", function (obj) { - console.log("opened "); + }); }); diff --git a/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js b/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js index 96f3115185..27c6208e1b 100644 --- a/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js +++ b/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js @@ -216,7 +216,6 @@ function NavigationController($scope, $rootScope, $location, $log, $q, $routePar //Emitted when a language is created or an existing one saved/edited evts.push(eventsService.on("editors.languages.languageSaved", function (e, args) { - console.log('lang event listen args', args); if(args.isNew){ //A new language has been created - reload languages for tree loadLanguages().then(function (languages) { 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 884b661beb..0d24f9d1cc 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 @@ -71,7 +71,6 @@ angular.module("umbraco").controller("Umbraco.PropertyEditors.NestedContent.Prop //$scope.model.config.contentTypes; //$scope.model.config.minItems; //$scope.model.config.maxItems; - //console.log($scope); var inited = false; From d9cb605f226fe6a0e9767a78dc828c61b51ab295 Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 31 Jan 2019 14:48:43 +1100 Subject: [PATCH 421/437] Fixing getting the macro to render in the rte, incorrect params being set --- .../src/common/services/macro.service.js | 4 ++++ .../src/common/services/tinymce.service.js | 2 +- .../views/common/infiniteeditors/macropicker/macropicker.html | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/services/macro.service.js b/src/Umbraco.Web.UI.Client/src/common/services/macro.service.js index 6c8c0a6ff2..a91f9d51e4 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/macro.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/macro.service.js @@ -130,6 +130,10 @@ function macroService() { var paramDictionary = {}; var macroAlias = macro.alias; + if (!macroAlias) { + throw "The macro object does not contain an alias"; + } + var syntax; _.each(macroParams, function (item) { diff --git a/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js b/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js index 896a360814..0ba795626a 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js @@ -1346,7 +1346,7 @@ function tinyMceService($rootScope, $q, imageHelper, $locale, $http, $timeout, s dialogData: dialogData, submit: function (model) { var macroObject = macroService.collectValueData(model.selectedMacro, model.macroParams, dialogData.renderingEngine); - self.insertMacroInEditor(args.editor, macroObject, $scope); + self.insertMacroInEditor(args.editor, macroObject); editorService.close(); }, close: function () { diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/macropicker/macropicker.html b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/macropicker/macropicker.html index 7e54e2ef8e..d6a5fbe230 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/macropicker/macropicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/macropicker/macropicker.html @@ -88,7 +88,7 @@ type="button" button-style="success" label-key="general_submit" - action="selectMacro(model)"> + action="selectMacro(model.selectedMacro)"> From 7b3623a9d9c9fe8d07121a7e38c95d4d4876bace Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Wed, 30 Jan 2019 23:29:09 +0100 Subject: [PATCH 422/437] Localize edit link, remove duplicate class attributes and only make remove link red --- .../propertyeditors/imagecropper/imagecropper.prevalues.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html index d11e176c2b..757978d32f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html @@ -65,8 +65,8 @@

    {{item.alias}} ({{item.width}}px × {{item.height}}px)

    From d55262b322f4884e211e709f5c2df6350836d48c Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Wed, 30 Jan 2019 23:29:50 +0100 Subject: [PATCH 423/437] Revert "Localize edit link, remove duplicate class attributes and only make remove link red" This reverts commit 63cc250c0f929b1f7e6f9f05fae2fd302682d418. --- .../propertyeditors/imagecropper/imagecropper.prevalues.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html index 757978d32f..d11e176c2b 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html @@ -65,8 +65,8 @@

    {{item.alias}} ({{item.width}}px × {{item.height}}px)

    From 3ba32dafa5f67061d15ca7d5da803be74388c172 Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Wed, 30 Jan 2019 23:33:19 +0100 Subject: [PATCH 424/437] Localize edit link, remove duplicate class attributes and only make remove link red --- .../propertyeditors/imagecropper/imagecropper.prevalues.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html index d11e176c2b..757978d32f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html @@ -65,8 +65,8 @@

    {{item.alias}} ({{item.width}}px × {{item.height}}px)

    From a1f72826c777c130b2765b7159d080c8217ccb97 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Thu, 31 Jan 2019 08:39:59 +0100 Subject: [PATCH 425/437] Remove duplicate css class --- .../propertyeditors/imagecropper/imagecropper.prevalues.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html index 757978d32f..0aa4b5e561 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html @@ -65,7 +65,7 @@

    {{item.alias}} ({{item.width}}px × {{item.height}}px)

    From 2ab391eb69abc7fc5d243e4930ce21386a81a870 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Thu, 31 Jan 2019 09:37:04 +0100 Subject: [PATCH 426/437] V8: UI select colors --- .../editor/umbeditormenu.directive.js | 5 +- .../components/tree/umbtreeitem.directive.js | 25 +++++++-- .../components/umbmediagrid.directive.js | 10 ++-- .../src/controllers/navigation.controller.js | 6 +- .../src/less/buttons.less | 6 +- .../less/components/tree/umb-tree-item.less | 40 +++++++++++++ .../src/less/components/tree/umb-tree.less | 19 +------ .../src/less/components/umb-content-grid.less | 29 ++++++++-- .../src/less/components/umb-folder-grid.less | 25 +++++++-- .../src/less/components/umb-media-grid.less | 56 ++++++++++++++----- .../src/less/variables.less | 5 +- .../views/components/tree/umb-tree-item.html | 14 ++--- .../views/components/umb-content-grid.html | 4 +- .../propertyeditors/listview/listview.html | 15 ++--- 14 files changed, 181 insertions(+), 78 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditormenu.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditormenu.directive.js index 22939c7f2c..9dff712ef6 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditormenu.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditormenu.directive.js @@ -30,8 +30,9 @@ } //when the options item is selected, we need to set the current menu item in appState (since this is synonymous with a menu) - appState.setMenuState("currentNode", scope.currentNode); - + // Niels: No i think we are wrong, we should not set the currentNode, cause it represents the currentNode of interaction. + //appState.setMenuState("currentNode", scope.currentNode); + if (!scope.actions) { treeService.getMenu({ treeNode: scope.currentNode }) .then(function (data) { diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreeitem.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreeitem.directive.js index 0f9a14d71a..51eb8ca285 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreeitem.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreeitem.directive.js @@ -60,10 +60,13 @@ angular.module("umbraco.directives") if (!node) { return ''; } - + // TODO: This is called constantly because as a method in a template it's re-evaluated pretty much all the time // it would be better if we could cache the processing. The problem is that some of these things are dynamic. + //is this the current action node (this is not the same as the current selected node!) + var actionNode = appState.getMenuState("currentNode"); + var css = []; if (node.cssClasses) { _.each(node.cssClasses, function(c) { @@ -73,17 +76,27 @@ angular.module("umbraco.directives") if (node.selected) { css.push("umb-tree-node-checked"); } + if (node == scope.currentNode) { + css.push("current"); + if (actionNode && actionNode.id !== node.id) { + css.push("current-not-active");// when its the current node, but its not the active(current node for the given action) + } + } + if (node.hasChildren) { + css.push("has-children"); + } + if (node.deleteAnimations) { + css.push("umb-tree-item--deleted"); + } - //is this the current action node (this is not the same as the current selected node!) - var actionNode = appState.getMenuState("currentNode"); if (actionNode) { - if (actionNode.id === node.id && String(actionNode.id) !== "-1") { + if (actionNode.id === node.id && String(node.id) !== "-1") { css.push("active"); } - + // special handling of root nodes with id -1 // as there can be many nodes with id -1 in a tree we need to check the treeAlias instead - if (String(actionNode.id) === "-1" && actionNode.metaData.treeAlias === node.metaData.treeAlias) { + if (String(node.id) === "-1" && actionNode.metaData.treeAlias === node.metaData.treeAlias) { css.push("active"); } } diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbmediagrid.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbmediagrid.directive.js index 308ffbf00f..29335f276e 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbmediagrid.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbmediagrid.directive.js @@ -140,11 +140,11 @@ Use this directive to generate a thumbnail grid of media items. } } - + if (scope.items.length > 0) { setFlexValues(scope.items); } - + } function setItemData(item) { @@ -235,7 +235,7 @@ Use this directive to generate a thumbnail grid of media items. } } - + function setFlexValues(mediaItems) { var flexSortArray = mediaItems; @@ -269,12 +269,12 @@ Use this directive to generate a thumbnail grid of media items. "min-height": itemMinHeight + "px" }; - mediaItem.flexStyle = flexStyle; + mediaItem.flexStyle = flexStyle; } } - + scope.clickItem = function(item, $event, $index) { if (scope.onClick) { scope.onClick(item, $event, $index); diff --git a/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js b/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js index 96f3115185..071d984c6a 100644 --- a/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js +++ b/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js @@ -34,7 +34,7 @@ function NavigationController($scope, $rootScope, $location, $log, $q, $routePar appState.setTreeState("selectedNode", args.node); //when a node is activated, this is the same as clicking it and we need to set the //current menu item to be this node as well. - appState.setMenuState("currentNode", args.node); + //appState.setMenuState("currentNode", args.node);// Niels: No, we are setting it from the dialog. } }); @@ -44,7 +44,7 @@ function NavigationController($scope, $rootScope, $location, $log, $q, $routePar args.event.preventDefault(); //Set the current action node (this is not the same as the current selected node!) - appState.setMenuState("currentNode", args.node); + //appState.setMenuState("currentNode", args.node);// Niels: No, we are setting it from the dialog. if (args.event && args.event.altKey) { args.skipDefault = true; @@ -96,7 +96,7 @@ function NavigationController($scope, $rootScope, $location, $log, $q, $routePar //put this node into the tree state appState.setTreeState("selectedNode", args.node); //when a node is clicked we also need to set the active menu node to this node - appState.setMenuState("currentNode", args.node); + //appState.setMenuState("currentNode", args.node); //not legacy, lets just set the route value and clear the query string if there is one. $location.path(n.routePath); diff --git a/src/Umbraco.Web.UI.Client/src/less/buttons.less b/src/Umbraco.Web.UI.Client/src/less/buttons.less index 51dcce7b92..a246ef585e 100644 --- a/src/Umbraco.Web.UI.Client/src/less/buttons.less +++ b/src/Umbraco.Web.UI.Client/src/less/buttons.less @@ -197,7 +197,11 @@ input[type="button"] { } // Made for Umbraco, 2019 .btn-action { - .buttonBackground(@pinkLight, @blueDark, @blueExtraDark, @u-white); + .buttonBackground(@blueExtraDark, @blueDark, @pinkLight, @u-white); +} +// Made for Umbraco, 2019 +.btn-selection { + .buttonBackground(@pinkLight, ligthen(@pinkLight, 20%), @blueExtraDark, @blueDark); } // Made for Umbraco, 2019, used for buttons that has to stand back. .btn-white { diff --git a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less index 097665bdd4..53e724cf54 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree-item.less @@ -2,6 +2,7 @@ display: block; min-width: 100%; width: auto; + margin-top:1px; .umb-tree-item__label { user-select: none; @@ -44,6 +45,38 @@ } } +// active is equivilant to selected, its the item that is begin affected by the actions performed in the right-click-dialog. +.umb-tree-item.active { + +} +.umb-tree-item.active > .umb-tree-item__inner { + //background: @ui-selected; + color: @ui-selected-type; + a { + color: @ui-selected-type; + } + + border-color: @ui-selected-border; + box-shadow: 0 0 2px 0 fade(@ui-selected-border, 80%); + &::before { + content: ""; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + border: 2px solid fade(white, 80%); + } + &:hover { + //background: @ui-selected-hover; + //border-color: @ui-selected-border-hover;// dont hover border, cause its cant be deselected in current code. + color: @ui-selected-type-hover; + a { + color: @ui-selected-type-hover; + } + } +} + .umb-tree-item.current > .umb-tree-item__inner { background: @ui-active; @@ -75,3 +108,10 @@ //border-color: @ui-active; } } + +.umb-tree-item.current-not-active > .umb-tree-item__inner { + + background: @ui-active-blur; + color:@ui-active-type; + +} diff --git a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less index 13e2a55089..698a4211f5 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less @@ -87,23 +87,6 @@ body.touch .umb-tree { } } -// active is equivilant to selected, its the item that is begin affected by the actions performed in the right-click-dialog. -.umb-tree-item > .umb-tree-item__inner.active { - //background: @ui-selected; - border-color: @ui-selected-border; - color: @ui-selected-type; - a { - color: @ui-selected-type; - } - &:hover { - //background: @ui-selected-hover; - border-color: @ui-selected-border-hover; - color: @ui-selected-type-hover; - a { - color: @ui-selected-type-hover; - } - } -} .umb-tree-root, .umb-tree-item__inner { padding: 0; position: relative; @@ -112,7 +95,7 @@ body.touch .umb-tree { flex-wrap: nowrap; align-items: center; - border:2px dashed transparent; + border:2px solid transparent; color: @ui-option-type; a { diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-content-grid.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-content-grid.less index 399a367dc5..b55a511f4b 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-content-grid.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-content-grid.less @@ -14,10 +14,31 @@ user-select: none; box-shadow: 0 1px 1px 0 rgba(0,0,0,0.16); border-radius: 3px; + + color: @ui-option-type; + &:hover { + color:@ui-option-type-hover; + } } .umb-content-grid__item.-selected { - box-shadow: 0 2px 8px 0 rgba(0,0,0,0.35); + //box-shadow: 0 2px 8px 0 rgba(0,0,0,0.35); + + //color:@ui-selected-type; + + &::before { + content: ""; + position: absolute; + z-index:2; + top: -2px; + left: -2px; + right: -2px; + bottom: -2px; + border: 2px solid @ui-selected-border; + border-radius: 5px; + box-shadow: 0 0 4px 0 darken(@ui-selected-border, 20), inset 0 0 2px 0 darken(@ui-selected-border, 20); + } + } .umb-content-grid__icon-container { @@ -31,12 +52,12 @@ .umb-content-grid__icon[class^="icon-"], .umb-content-grid__icon[class*=" icon-"] { font-size: 20px; - color: @gray-8; +//color: @gray-8; margin-right: 5px; } .umb-content-grid__icon.-light { - color: @gray-5; + //color: @gray-5; } @@ -48,7 +69,7 @@ .umb-content-grid__item-name { font-weight: bold; margin-bottom: 15px; - color: @black; + //color: @black; line-height: 1.4em; display: inline-flex; } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-folder-grid.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-folder-grid.less index f5ca1f8438..d2f86affab 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-folder-grid.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-folder-grid.less @@ -14,7 +14,7 @@ padding: 10px 20px; box-sizing: border-box; flex: 1 1 200px; - border: 2px dashed transparent; + //border: 2px solid transparent; transition: border 0.2s; position: relative; justify-content: space-between; @@ -27,15 +27,28 @@ } .umb-folder-grid__folder.-selected { - box-shadow: 0 2px 8px 0 darken(@ui-selected-border, 20); + //box-shadow: 0 2px 8px 0 darken(@ui-selected-border, 20); //background: @ui-selected; color:@ui-selected-type; - border-color:@ui-selected-border; + //border-color:@ui-selected-border; + + &::before { + content: ""; + position: absolute; + z-index:2; + top: -2px; + left: -2px; + right: -2px; + bottom: -2px; + border: 2px solid @ui-selected-border; + border-radius: 5px; + box-shadow: 0 0 4px 0 darken(@ui-selected-border, 20), inset 0 0 2px 0 darken(@ui-selected-border, 20); + } &:hover { color:@ui-selected-type-hover; - border-color:@ui-selected-border-hover; + //border-color:@ui-selected-border-hover; } } @@ -59,12 +72,12 @@ .umb-folder-grid__folder-icon[class*=" icon-"] { font-size: 20px; margin-right: 15px; - color: @black; + //color: @black; } .umb-folder-grid__folder-name { font-size: 13px; - color: @black; + //color: @black; font-weight: bold; } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-media-grid.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-media-grid.less index 8185040f23..017313af80 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-media-grid.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-media-grid.less @@ -21,11 +21,14 @@ margin: 10px; position: relative; - overflow: hidden; + //overflow: hidden; + + user-select: none; + cursor: pointer; - border: 2px dashed transparent; box-shadow: 0 1px 1px 0 rgba(0,0,0,.2); + //border: 2px solid transparent; transition: box-shadow 150ms ease-in-out; } @@ -35,16 +38,30 @@ } .umb-media-grid__item.-selected { - box-shadow: 0 2px 8px 0 darken(@ui-selected-border, 20); //background: @ui-selected; color:@ui-selected-type; - border-color:@ui-selected-border; + //border-color: @ui-selected-border; + //box-shadow: 0 2px 8px 0 darken(@ui-selected-border, 20); - &:hover { - color:@ui-selected-type-hover; - border-color:@ui-selected-border-hover; + &::before { + content: ""; + position: absolute; + z-index:2; + top: -2px; + left: -2px; + right: -2px; + bottom: -2px; + border: 2px solid @ui-selected-border; + border-radius: 5px; + box-shadow: 0 0 4px 0 darken(@ui-selected-border, 20), inset 0 0 2px 0 darken(@ui-selected-border, 20); } + + .umb-media-grid__item-overlay { + color: @ui-selected-type; + //background: @ui-selected-border; + } + } .umb-media-grid__item-file-icon > span { @@ -64,16 +81,22 @@ } .umb-media-grid__item-image { - max-width: 100% !important; - height: auto; + //max-width: 100% !important; + //height: auto; position: relative; + + object-fit: contain; + height: 100%; } .umb-media-grid__item-image-placeholder { width: 100%; - max-width: 100%; - height: auto; + //max-width: 100%; + //height: auto; position: relative; + + object-fit: contain; + height: 100%; } .umb-media-grid__image-background { @@ -95,17 +118,18 @@ right: 0; bottom: 0; left: 0; - z-index: 100; + z-index: 1; padding: 5px 10px; box-sizing: border-box; font-size: 12px; overflow: hidden; color: @black; white-space: nowrap; - border-top:1px solid @gray-9; - background: @white; + border-top:1px solid fade(black, 4%); + background: fade(@white, 92%); transition: opacity 150ms; } + /* .umb-media-grid__item.-file .umb-media-grid__item-overlay { opacity: 1; @@ -180,6 +204,10 @@ align-items: center; color: @black; transition: opacity 150ms; + + &:hover { + color: @ui-action-disgrete-type-hover; + } } .umb-media-grid__item:hover .umb-media-grid__edit { diff --git a/src/Umbraco.Web.UI.Client/src/less/variables.less b/src/Umbraco.Web.UI.Client/src/less/variables.less index e66c3de597..80665e4c64 100644 --- a/src/Umbraco.Web.UI.Client/src/less/variables.less +++ b/src/Umbraco.Web.UI.Client/src/less/variables.less @@ -117,7 +117,7 @@ @pinkRedLight: #ff8a89;// added 2019 @brown: #9d8057;// added 2019 @brownLight: #e4e0dd;// added 2019 -@brownGrayLight: #f3f2f1;// added 2019 +@brownGrayLight: #f6f4f4;// added 2019 @orange: #ff9412;// added 2019 //@u-greyLight: #f2ebe6;// added 2019 @@ -134,6 +134,7 @@ //@ui-active: #346ab3; @ui-active: @pinkLight; +@ui-active-blur: @brownLight; @ui-active-type: @blueExtraDark; @ui-active-type-hover: @blueMid; @@ -142,7 +143,7 @@ @ui-selected-type: @blueExtraDark; @ui-selected-type-hover: @blueMid; @ui-selected-border: @pinkLight; -@ui-selected-border-hover: @pinkLight; +@ui-selected-border-hover: darken(@pinkLight, 10); @ui-light-border: @pinkLight; @ui-light-type: @gray-4; diff --git a/src/Umbraco.Web.UI.Client/src/views/components/tree/umb-tree-item.html b/src/Umbraco.Web.UI.Client/src/views/components/tree/umb-tree-item.html index d3854683c8..9474e98350 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/tree/umb-tree-item.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/tree/umb-tree-item.html @@ -1,21 +1,19 @@ -
  • -
    - +
    +   {{node.name}} - +
    - +
  • - - diff --git a/src/Umbraco.Web.UI.Client/src/views/components/umb-content-grid.html b/src/Umbraco.Web.UI.Client/src/views/components/umb-content-grid.html index 490c94a79d..487be4af87 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/umb-content-grid.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/umb-content-grid.html @@ -5,8 +5,8 @@ ng-repeat="item in content" ng-class="{'-selected': item.selected}" ng-click="clickItem(item, $event, $index)"> - - + +
    diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html index dba6a41a7c..9a638d91fa 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html @@ -13,13 +13,13 @@
    - + Create {{listViewAllowedTypes[0].name}} @@ -85,6 +85,7 @@ type="button" label="Clear selection" label-key="buttons_clearSelection" + button-style="selection" action="clearSelection()" disabled="actionInProgress"> @@ -139,7 +140,7 @@ ng-if="options.allowBulkPublish && (buttonPermissions == null || buttonPermissions.canPublish)" style="margin-right: 5px;" type="button" - button-style="outline" + button-style="selection" label-key="actions_publish" icon="icon-globe" action="publish()" @@ -152,7 +153,7 @@ ng-if="options.allowBulkUnpublish && (buttonPermissions == null || buttonPermissions.canUnpublish)" style="margin-right: 5px;" type="button" - button-style="outline" + button-style="selection" label-key="actions_unpublish" icon="icon-block" action="unpublish()" @@ -165,7 +166,7 @@ ng-if="options.allowBulkCopy && (buttonPermissions == null || buttonPermissions.canCopy)" style="margin-right: 5px;" type="button" - button-style="outline" + button-style="selection" label-key="actions_copy" icon="icon-documents" action="copy()" @@ -178,7 +179,7 @@ ng-if="options.allowBulkMove && (buttonPermissions == null || buttonPermissions.canMove)" style="margin-right: 5px;" type="button" - button-style="outline" + button-style="selection" label-key="actions_move" icon="icon-enter" action="move()" @@ -190,7 +191,7 @@ Date: Thu, 31 Jan 2019 10:13:07 +0100 Subject: [PATCH 427/437] V8: UI interact vs. select --- src/Umbraco.Web.UI.Client/src/less/canvas-designer.less | 1 - .../src/less/components/umb-content-grid.less | 1 + .../src/less/components/umb-folder-grid.less | 1 + .../src/less/components/umb-media-grid.less | 5 +++++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/canvas-designer.less b/src/Umbraco.Web.UI.Client/src/less/canvas-designer.less index a144336a54..146f9b8a67 100644 --- a/src/Umbraco.Web.UI.Client/src/less/canvas-designer.less +++ b/src/Umbraco.Web.UI.Client/src/less/canvas-designer.less @@ -45,7 +45,6 @@ h4 { h5 { margin: 0 0 6px 0; - color: #535353; font-size: 12px; } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-content-grid.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-content-grid.less index b55a511f4b..5a2821eb9e 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-content-grid.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-content-grid.less @@ -37,6 +37,7 @@ border: 2px solid @ui-selected-border; border-radius: 5px; box-shadow: 0 0 4px 0 darken(@ui-selected-border, 20), inset 0 0 2px 0 darken(@ui-selected-border, 20); + pointer-events: none; } } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-folder-grid.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-folder-grid.less index d2f86affab..32100247a0 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-folder-grid.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-folder-grid.less @@ -44,6 +44,7 @@ border: 2px solid @ui-selected-border; border-radius: 5px; box-shadow: 0 0 4px 0 darken(@ui-selected-border, 20), inset 0 0 2px 0 darken(@ui-selected-border, 20); + pointer-events: none; } &:hover { diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-media-grid.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-media-grid.less index 017313af80..fc6de2bf75 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-media-grid.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-media-grid.less @@ -55,6 +55,7 @@ border: 2px solid @ui-selected-border; border-radius: 5px; box-shadow: 0 0 4px 0 darken(@ui-selected-border, 20), inset 0 0 2px 0 darken(@ui-selected-border, 20); + pointer-events: none; } .umb-media-grid__item-overlay { @@ -128,6 +129,10 @@ border-top:1px solid fade(black, 4%); background: fade(@white, 92%); transition: opacity 150ms; + + &:hover { + text-decoration: underline; + } } /* From a6f9598a23e41687d2d6b0f6b0e518cf830ab825 Mon Sep 17 00:00:00 2001 From: Stephan Date: Thu, 31 Jan 2019 09:08:51 +0100 Subject: [PATCH 428/437] Introduce IPublishedRouter --- .../TestControllerActivatorBase.cs | 2 +- .../Testing/TestingTests/MockTests.cs | 2 +- src/Umbraco.Tests/Testing/UmbracoTestBase.cs | 2 +- .../Web/Mvc/SurfaceControllerTests.cs | 2 +- .../Models/Mapping/ContentUrlResolver.cs | 4 +- .../EnsurePublishedContentRequestAttribute.cs | 8 ++- src/Umbraco.Web/Mvc/RenderRouteHandler.cs | 2 +- .../Mvc/UmbracoVirtualNodeRouteHandler.cs | 2 +- src/Umbraco.Web/Routing/IPublishedRouter.cs | 54 +++++++++++++++++++ src/Umbraco.Web/Routing/PublishedRequest.cs | 8 +-- src/Umbraco.Web/Routing/PublishedRouter.cs | 43 +++++---------- .../Routing/UrlProviderExtensions.cs | 6 +-- src/Umbraco.Web/Runtime/WebRuntimeComposer.cs | 2 +- src/Umbraco.Web/Security/MembershipHelper.cs | 27 +++++++--- src/Umbraco.Web/Templates/TemplateRenderer.cs | 2 +- src/Umbraco.Web/Umbraco.Web.csproj | 1 + src/Umbraco.Web/UmbracoInjectedModule.cs | 4 +- 17 files changed, 111 insertions(+), 60 deletions(-) create mode 100644 src/Umbraco.Web/Routing/IPublishedRouter.cs diff --git a/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestControllerActivatorBase.cs b/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestControllerActivatorBase.cs index 602b5907d8..6414ea469d 100644 --- a/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestControllerActivatorBase.cs +++ b/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestControllerActivatorBase.cs @@ -150,7 +150,7 @@ namespace Umbraco.Tests.TestHelpers.ControllerTesting urlHelper.Setup(provider => provider.GetUrl(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) .Returns(UrlInfo.Url("/hello/world/1234")); - var membershipHelper = new MembershipHelper(new TestUmbracoContextAccessor(umbCtx), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), null, Mock.Of(), Mock.Of()); + var membershipHelper = new MembershipHelper(new TestUmbracoContextAccessor(umbCtx), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of()); var umbHelper = new UmbracoHelper(umbCtx, Mock.Of(), diff --git a/src/Umbraco.Tests/Testing/TestingTests/MockTests.cs b/src/Umbraco.Tests/Testing/TestingTests/MockTests.cs index 575f14e818..622186a547 100644 --- a/src/Umbraco.Tests/Testing/TestingTests/MockTests.cs +++ b/src/Umbraco.Tests/Testing/TestingTests/MockTests.cs @@ -65,7 +65,7 @@ namespace Umbraco.Tests.Testing.TestingTests Mock.Of(), Mock.Of(), Mock.Of(), - new MembershipHelper(new TestUmbracoContextAccessor(umbracoContext), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), null, Mock.Of(), Mock.Of()), + new MembershipHelper(new TestUmbracoContextAccessor(umbracoContext), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of()), ServiceContext.CreatePartial()); Assert.Pass(); } diff --git a/src/Umbraco.Tests/Testing/UmbracoTestBase.cs b/src/Umbraco.Tests/Testing/UmbracoTestBase.cs index 9616a26891..7c8d1100f8 100644 --- a/src/Umbraco.Tests/Testing/UmbracoTestBase.cs +++ b/src/Umbraco.Tests/Testing/UmbracoTestBase.cs @@ -213,7 +213,7 @@ namespace Umbraco.Tests.Testing // web Composition.RegisterUnique(_ => Umbraco.Web.Composing.Current.UmbracoContextAccessor); - Composition.RegisterUnique(); + Composition.RegisterUnique(); Composition.WithCollectionBuilder(); Composition.RegisterUnique(); Composition.RegisterUnique(); diff --git a/src/Umbraco.Tests/Web/Mvc/SurfaceControllerTests.cs b/src/Umbraco.Tests/Web/Mvc/SurfaceControllerTests.cs index 69f6c5d13e..ec37793c10 100644 --- a/src/Umbraco.Tests/Web/Mvc/SurfaceControllerTests.cs +++ b/src/Umbraco.Tests/Web/Mvc/SurfaceControllerTests.cs @@ -132,7 +132,7 @@ namespace Umbraco.Tests.Web.Mvc Mock.Of(), Mock.Of(), Mock.Of(), - new MembershipHelper(new TestUmbracoContextAccessor(umbracoContext), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), null, Mock.Of(), Mock.Of()), + new MembershipHelper(new TestUmbracoContextAccessor(umbracoContext), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of(), Mock.Of()), ServiceContext.CreatePartial()); var ctrl = new TestSurfaceController(umbracoContext, helper); diff --git a/src/Umbraco.Web/Models/Mapping/ContentUrlResolver.cs b/src/Umbraco.Web/Models/Mapping/ContentUrlResolver.cs index f09638330b..42c4997d86 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentUrlResolver.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentUrlResolver.cs @@ -11,7 +11,7 @@ namespace Umbraco.Web.Models.Mapping internal class ContentUrlResolver : IValueResolver { private readonly IUmbracoContextAccessor _umbracoContextAccessor; - private readonly PublishedRouter _publishedRouter; + private readonly IPublishedRouter _publishedRouter; private readonly ILocalizationService _localizationService; private readonly ILocalizedTextService _textService; private readonly IContentService _contentService; @@ -19,7 +19,7 @@ namespace Umbraco.Web.Models.Mapping public ContentUrlResolver( IUmbracoContextAccessor umbracoContextAccessor, - PublishedRouter publishedRouter, + IPublishedRouter publishedRouter, ILocalizationService localizationService, ILocalizedTextService textService, IContentService contentService, diff --git a/src/Umbraco.Web/Mvc/EnsurePublishedContentRequestAttribute.cs b/src/Umbraco.Web/Mvc/EnsurePublishedContentRequestAttribute.cs index 62a7c48d2b..471cec6db7 100644 --- a/src/Umbraco.Web/Mvc/EnsurePublishedContentRequestAttribute.cs +++ b/src/Umbraco.Web/Mvc/EnsurePublishedContentRequestAttribute.cs @@ -33,8 +33,7 @@ namespace Umbraco.Web.Mvc /// public EnsurePublishedContentRequestAttribute(UmbracoContext umbracoContext, int contentId) { - if (umbracoContext == null) throw new ArgumentNullException(nameof(umbracoContext)); - _umbracoContext = umbracoContext; + _umbracoContext = umbracoContext ?? throw new ArgumentNullException(nameof(umbracoContext)); _contentId = contentId; } @@ -63,8 +62,7 @@ namespace Umbraco.Web.Mvc /// public EnsurePublishedContentRequestAttribute(UmbracoContext umbracoContext, string dataTokenName) { - if (umbracoContext == null) throw new ArgumentNullException(nameof(umbracoContext)); - _umbracoContext = umbracoContext; + _umbracoContext = umbracoContext ?? throw new ArgumentNullException(nameof(umbracoContext)); _dataTokenName = dataTokenName; } @@ -74,7 +72,7 @@ namespace Umbraco.Web.Mvc protected UmbracoContext UmbracoContext => _umbracoContext ?? (_umbracoContext = UmbracoContext.Current); // TODO: try lazy property injection? - private PublishedRouter PublishedRouter => Core.Composing.Current.Factory.GetInstance(); + private IPublishedRouter PublishedRouter => Core.Composing.Current.Factory.GetInstance(); /// /// Exposes an UmbracoHelper diff --git a/src/Umbraco.Web/Mvc/RenderRouteHandler.cs b/src/Umbraco.Web/Mvc/RenderRouteHandler.cs index 215eb39573..2c550effc4 100644 --- a/src/Umbraco.Web/Mvc/RenderRouteHandler.cs +++ b/src/Umbraco.Web/Mvc/RenderRouteHandler.cs @@ -377,7 +377,7 @@ namespace Umbraco.Web.Mvc if ((request.HasTemplate == false && Features.Disabled.DisableTemplates == false) && routeDef.HasHijackedRoute == false) { - request.UpdateOnMissingTemplate(); // request will go 404 + request.UpdateToNotFound(); // request will go 404 // HandleHttpResponseStatus returns a value indicating that the request should // not be processed any further, eg because it has been redirect. then, exit. diff --git a/src/Umbraco.Web/Mvc/UmbracoVirtualNodeRouteHandler.cs b/src/Umbraco.Web/Mvc/UmbracoVirtualNodeRouteHandler.cs index 48e16b48d7..1af434e94e 100644 --- a/src/Umbraco.Web/Mvc/UmbracoVirtualNodeRouteHandler.cs +++ b/src/Umbraco.Web/Mvc/UmbracoVirtualNodeRouteHandler.cs @@ -12,7 +12,7 @@ namespace Umbraco.Web.Mvc public abstract class UmbracoVirtualNodeRouteHandler : IRouteHandler { // TODO: try lazy property injection? - private PublishedRouter PublishedRouter => Core.Composing.Current.Factory.GetInstance(); + private IPublishedRouter PublishedRouter => Current.Factory.GetInstance(); /// /// Returns the UmbracoContext for this route handler diff --git a/src/Umbraco.Web/Routing/IPublishedRouter.cs b/src/Umbraco.Web/Routing/IPublishedRouter.cs new file mode 100644 index 0000000000..df06e42e55 --- /dev/null +++ b/src/Umbraco.Web/Routing/IPublishedRouter.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using Umbraco.Core.Models; + +namespace Umbraco.Web.Routing +{ + /// + /// Routes requests. + /// + public interface IPublishedRouter + { + // TODO: consider this and RenderRouteHandler - move some code around? + + /// + /// Creates a published request. + /// + /// The current Umbraco context. + /// The (optional) request Uri. + /// A published request. + PublishedRequest CreateRequest(UmbracoContext umbracoContext, Uri uri = null); + + /// + /// Prepares a request for rendering. + /// + /// The request. + /// A value indicating whether the request was successfully prepared and can be rendered. + bool PrepareRequest(PublishedRequest request); + + /// + /// Tries to route a request. + /// + /// The request. + /// A value indicating whether the request can be routed to a document. + bool TryRouteRequest(PublishedRequest request); + + /// + /// Gets a template. + /// + /// The template alias + /// The template. + ITemplate GetTemplate(string alias); + + /// + /// Updates the request to "not found". + /// + /// The request. + /// + /// This method is invoked when the pipeline decides it cannot render + /// the request, for whatever reason, and wants to force it to be re-routed + /// and rendered as if no document were found (404). + /// + void UpdateRequestToNotFound(PublishedRequest request); + } +} diff --git a/src/Umbraco.Web/Routing/PublishedRequest.cs b/src/Umbraco.Web/Routing/PublishedRequest.cs index c5475f8b73..52f5820744 100644 --- a/src/Umbraco.Web/Routing/PublishedRequest.cs +++ b/src/Umbraco.Web/Routing/PublishedRequest.cs @@ -17,7 +17,7 @@ namespace Umbraco.Web.Routing /// public class PublishedRequest { - private readonly PublishedRouter _publishedRouter; + private readonly IPublishedRouter _publishedRouter; private bool _readonly; // after prepared private bool _readonlyUri; // after preparing @@ -35,7 +35,7 @@ namespace Umbraco.Web.Routing /// The published router. /// The Umbraco context. /// The request Uri. - internal PublishedRequest(PublishedRouter publishedRouter, UmbracoContext umbracoContext, Uri uri = null) + internal PublishedRequest(IPublishedRouter publishedRouter, UmbracoContext umbracoContext, Uri uri = null) { UmbracoContext = umbracoContext ?? throw new ArgumentNullException(nameof(umbracoContext)); _publishedRouter = publishedRouter ?? throw new ArgumentNullException(nameof(publishedRouter)); @@ -291,11 +291,11 @@ namespace Umbraco.Web.Routing /// public bool HasTemplate => TemplateModel != null; - internal void UpdateOnMissingTemplate() + internal void UpdateToNotFound() { var __readonly = _readonly; _readonly = false; - _publishedRouter.UpdateRequestOnMissingTemplate(this); + _publishedRouter.UpdateRequestToNotFound(this); _readonly = __readonly; } diff --git a/src/Umbraco.Web/Routing/PublishedRouter.cs b/src/Umbraco.Web/Routing/PublishedRouter.cs index 14c36198d8..7dd1ec9f1a 100644 --- a/src/Umbraco.Web/Routing/PublishedRouter.cs +++ b/src/Umbraco.Web/Routing/PublishedRouter.cs @@ -6,6 +6,7 @@ using System.Globalization; using System.IO; using System.Web.Security; using Umbraco.Core; +using Umbraco.Core.Cache; using Umbraco.Core.Composing; using Umbraco.Core.Configuration.UmbracoSettings; using Umbraco.Core.IO; @@ -18,8 +19,10 @@ using Umbraco.Web.Security; namespace Umbraco.Web.Routing { - // TODO: making sense to have an interface? - public class PublishedRouter + /// + /// Provides the default implementation. + /// + public class PublishedRouter : IPublishedRouter { private readonly IWebRoutingSection _webRoutingSection; private readonly ContentFinderCollection _contentFinders; @@ -47,15 +50,9 @@ namespace Umbraco.Web.Routing _profilingLogger = proflog ?? throw new ArgumentNullException(nameof(proflog)); _variationContextAccessor = variationContextAccessor ?? throw new ArgumentNullException(nameof(variationContextAccessor)); _logger = proflog; - - GetRolesForLogin = s => Roles.Provider.GetRolesForUser(s); } - // TODO: in 7.7 this is cached in the PublishedContentRequest, which ... makes little sense - // killing it entirely, if we need cache, just implement it properly !! - // this is all so weird - public Func> GetRolesForLogin { get; } - + /// public PublishedRequest CreateRequest(UmbracoContext umbracoContext, Uri uri = null) { return new PublishedRequest(this, umbracoContext, uri ?? umbracoContext.CleanedUmbracoUrl); @@ -63,10 +60,8 @@ namespace Umbraco.Web.Routing #region Request - /// - /// Tries to route the request. - /// - internal bool TryRouteRequest(PublishedRequest request) + /// + public bool TryRouteRequest(PublishedRequest request) { // disabled - is it going to change the routing? //_pcr.OnPreparing(); @@ -96,12 +91,7 @@ namespace Umbraco.Web.Routing _variationContextAccessor.VariationContext = new VariationContext(culture); } - /// - /// Prepares the request. - /// - /// - /// Returns false if the request was not successfully prepared - /// + /// public bool PrepareRequest(PublishedRequest request) { // note - at that point the original legacy module did something do handle IIS custom 404 errors @@ -213,11 +203,8 @@ namespace Umbraco.Web.Routing return true; } - /// - /// Updates the request when there is no template to render the content. - /// - /// This is called from Mvc when there's a document to render but no template. - public void UpdateRequestOnMissingTemplate(PublishedRequest request) + /// + public void UpdateRequestToNotFound(PublishedRequest request) { // clear content var content = request.PublishedContent; @@ -386,11 +373,7 @@ namespace Umbraco.Web.Routing #region Document and template - /// - /// Gets a template. - /// - /// The template alias - /// The template. + /// public ITemplate GetTemplate(string alias) { return _services.FileService.GetTemplate(alias); @@ -607,7 +590,7 @@ namespace Umbraco.Web.Routing if (loginPageId != request.PublishedContent.Id) request.PublishedContent = request.UmbracoContext.PublishedSnapshot.Content.GetById(loginPageId); } - else if (_services.PublicAccessService.HasAccess(request.PublishedContent.Id, _services.ContentService, membershipHelper.CurrentUserName, GetRolesForLogin(membershipHelper.CurrentUserName)) == false) + else if (_services.PublicAccessService.HasAccess(request.PublishedContent.Id, _services.ContentService, membershipHelper.CurrentUserName, membershipHelper.GetCurrentUserRoles()) == false) { _logger.Debug("EnsurePublishedContentAccess: Current member has not access, redirect to error page"); var errorPageId = publicAccessAttempt.Result.NoAccessNodeId; diff --git a/src/Umbraco.Web/Routing/UrlProviderExtensions.cs b/src/Umbraco.Web/Routing/UrlProviderExtensions.cs index 8db657ed30..2a840828b6 100644 --- a/src/Umbraco.Web/Routing/UrlProviderExtensions.cs +++ b/src/Umbraco.Web/Routing/UrlProviderExtensions.cs @@ -18,7 +18,7 @@ namespace Umbraco.Web.Routing /// Contains all the Urls that we can figure out (based upon domains, etc). /// public static IEnumerable GetContentUrls(this IContent content, - PublishedRouter publishedRouter, + IPublishedRouter publishedRouter, UmbracoContext umbracoContext, ILocalizationService localizationService, ILocalizedTextService textService, @@ -92,7 +92,7 @@ namespace Umbraco.Web.Routing /// private static IEnumerable GetContentUrlsByCulture(IContent content, IEnumerable cultures, - PublishedRouter publishedRouter, + IPublishedRouter publishedRouter, UmbracoContext umbracoContext, IContentService contentService, ILocalizedTextService textService, @@ -161,7 +161,7 @@ namespace Umbraco.Web.Routing return UrlInfo.Message(textService.Localize("content/parentCultureNotPublished", new[] {parent.Name}), culture); } - private static bool DetectCollision(IContent content, string url, string culture, UmbracoContext umbracoContext, PublishedRouter publishedRouter, ILocalizedTextService textService, out UrlInfo urlInfo) + private static bool DetectCollision(IContent content, string url, string culture, UmbracoContext umbracoContext, IPublishedRouter publishedRouter, ILocalizedTextService textService, out UrlInfo urlInfo) { // test for collisions on the 'main' url var uri = new Uri(url.TrimEnd('/'), UriKind.RelativeOrAbsolute); diff --git a/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs b/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs index de3ca47b38..4070ee9ece 100644 --- a/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs +++ b/src/Umbraco.Web/Runtime/WebRuntimeComposer.cs @@ -178,7 +178,7 @@ namespace Umbraco.Web.Runtime composition.RegisterAuto(typeof(UmbracoViewPage<>)); // register published router - composition.RegisterUnique(); + composition.RegisterUnique(); composition.Register(_ => Current.Configs.Settings().WebRouting); // register preview SignalR hub diff --git a/src/Umbraco.Web/Security/MembershipHelper.cs b/src/Umbraco.Web/Security/MembershipHelper.cs index e053617806..daec4bb1f7 100644 --- a/src/Umbraco.Web/Security/MembershipHelper.cs +++ b/src/Umbraco.Web/Security/MembershipHelper.cs @@ -31,7 +31,6 @@ namespace Umbraco.Web.Security private readonly IMemberTypeService _memberTypeService; private readonly IUserService _userService; private readonly IPublicAccessService _publicAccessService; - private readonly PublishedRouter _publishedRouter; private readonly AppCaches _appCaches; private readonly ILogger _logger; @@ -46,7 +45,6 @@ namespace Umbraco.Web.Security IMemberTypeService memberTypeService, IUserService userService, IPublicAccessService publicAccessService, - PublishedRouter publishedRouter, AppCaches appCaches, ILogger logger ) @@ -57,7 +55,6 @@ namespace Umbraco.Web.Security _memberTypeService = memberTypeService; _userService = userService; _publicAccessService = publicAccessService; - _publishedRouter = publishedRouter; _appCaches = appCaches; _logger = logger; @@ -116,7 +113,7 @@ namespace Umbraco.Web.Security { return UmbracoContext.PublishedRequest == null ? _publicAccessService.HasAccess(path, CurrentUserName, roleProvider.GetRolesForUser) - : _publicAccessService.HasAccess(path, CurrentUserName, _publishedRouter.GetRolesForLogin); + : _publicAccessService.HasAccess(path, CurrentUserName, GetUserRoles); } /// @@ -514,6 +511,24 @@ namespace Umbraco.Web.Security } #endregion + /// + /// Gets the current user's roles. + /// + /// Roles are cached per user name, at request level. + public IEnumerable GetCurrentUserRoles() + => GetUserRoles(CurrentUserName); + + /// + /// Gets a user's roles. + /// + /// Roles are cached per user name, at request level. + public IEnumerable GetUserRoles(string userName) + { + // optimize by caching per-request (v7 cached per PublishedRequest, in PublishedRouter) + var key = "Umbraco.Web.Security.MembershipHelper__Roles__" + userName; + return _appCaches.RequestCache.GetCacheItem(key, () => Roles.Provider.GetRolesForUser(userName)); + } + /// /// Returns the login status model of the currently logged in member, if no member is logged in it returns null; /// @@ -618,7 +633,7 @@ namespace Umbraco.Web.Security var provider = _membershipProvider; string username; - + if (provider.IsUmbracoMembershipProvider()) { var member = GetCurrentPersistedMember(); @@ -626,7 +641,7 @@ namespace Umbraco.Web.Security if (member == null) return false; username = member.Username; - + // If types defined, check member is of one of those types var allowTypesList = allowTypes as IList ?? allowTypes.ToList(); if (allowTypesList.Any(allowType => allowType != string.Empty)) diff --git a/src/Umbraco.Web/Templates/TemplateRenderer.cs b/src/Umbraco.Web/Templates/TemplateRenderer.cs index 9279eea124..7d678b93ca 100644 --- a/src/Umbraco.Web/Templates/TemplateRenderer.cs +++ b/src/Umbraco.Web/Templates/TemplateRenderer.cs @@ -36,7 +36,7 @@ namespace Umbraco.Web.Templates } private IFileService FileService => Current.Services.FileService; // TODO: inject - private PublishedRouter PublishedRouter => Core.Composing.Current.Factory.GetInstance(); // TODO: inject + private IPublishedRouter PublishedRouter => Core.Composing.Current.Factory.GetInstance(); // TODO: inject /// diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index f078e9d79f..709d938ba4 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -183,6 +183,7 @@ + diff --git a/src/Umbraco.Web/UmbracoInjectedModule.cs b/src/Umbraco.Web/UmbracoInjectedModule.cs index 95819e79d7..ba1a384484 100644 --- a/src/Umbraco.Web/UmbracoInjectedModule.cs +++ b/src/Umbraco.Web/UmbracoInjectedModule.cs @@ -45,7 +45,7 @@ namespace Umbraco.Web private readonly UrlProviderCollection _urlProviders; private readonly IRuntimeState _runtime; private readonly ILogger _logger; - private readonly PublishedRouter _publishedRouter; + private readonly IPublishedRouter _publishedRouter; private readonly IVariationContextAccessor _variationContextAccessor; public UmbracoInjectedModule( @@ -56,7 +56,7 @@ namespace Umbraco.Web UrlProviderCollection urlProviders, IRuntimeState runtime, ILogger logger, - PublishedRouter publishedRouter, + IPublishedRouter publishedRouter, IVariationContextAccessor variationContextAccessor) { _combinedRouteCollection = new Lazy(CreateRouteCollection); From 92d53eb527cad1faf1ce6e91ad0f49efe33d142d Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Thu, 31 Jan 2019 11:10:27 +0100 Subject: [PATCH 429/437] #3648 - Besides mculture also retain cculture in querystring on navigation --- .../src/common/services/navigation.service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js b/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js index 76fcc2d1d8..d9c505aa23 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js @@ -28,7 +28,7 @@ function navigationService($routeParams, $location, $q, $timeout, $injector, eve //A list of query strings defined that when changed will not cause a reload of the route var nonRoutingQueryStrings = ["mculture", "cculture", "lq"]; - var retainedQueryStrings = ["mculture"]; + var retainedQueryStrings = ["mculture", "cculture"]; function setMode(mode) { From d45d0a816ef23346a9b52bc912b9162be5e8de74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Thu, 31 Jan 2019 12:58:17 +0100 Subject: [PATCH 430/437] =?UTF-8?q?V8:=20UI=20=E2=80=94=20changed=20colors?= =?UTF-8?q?=20for=20selection=20state=20for=20rows=20in=20list-view?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/less/buttons.less | 3 ++- .../less/components/umb-layout-selector.less | 4 ++-- .../src/less/components/umb-table.less | 18 ++++++++++++++++-- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/buttons.less b/src/Umbraco.Web.UI.Client/src/less/buttons.less index a246ef585e..c6a8447342 100644 --- a/src/Umbraco.Web.UI.Client/src/less/buttons.less +++ b/src/Umbraco.Web.UI.Client/src/less/buttons.less @@ -201,7 +201,8 @@ input[type="button"] { } // Made for Umbraco, 2019 .btn-selection { - .buttonBackground(@pinkLight, ligthen(@pinkLight, 20%), @blueExtraDark, @blueDark); + @btnSelectionBackgroundHover: darken(@pinkLight, 10%); + .buttonBackground(@pinkLight, @btnSelectionBackgroundHover, @blueExtraDark, @blueDark); } // Made for Umbraco, 2019, used for buttons that has to stand back. .btn-white { diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-layout-selector.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-layout-selector.less index adaf45b4b0..cf407b667f 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-layout-selector.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-layout-selector.less @@ -5,7 +5,7 @@ .umb-layout-selector__active-layout { box-sizing: border-box; - border: 1px solid transparent; + border: 1px solid @inputBorder; cursor: pointer; height: 30px; width: 30px; @@ -16,7 +16,7 @@ } .umb-layout-selector__active-layout:hover { - border-color: @gray-8; + border-color: @inputBorderFocus; } .umb-layout-selector__dropdown { diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-table.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-table.less index c1687636d3..291eef43e0 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-table.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-table.less @@ -90,13 +90,13 @@ input.umb-table__input { .umb-table-body .umb-table-row { color: @gray-5; - border-top: 1px solid @gray-8; + border-top: 1px solid @gray-9; cursor: pointer; font-size: 14px; position: relative; min-height: 52px; &:hover { - background-color: @gray-10; + background-color: @ui-option-hover; } } @@ -151,12 +151,26 @@ input.umb-table__input { // Show checkmark when checked, hide file icon .umb-table-row--selected { + /* .umb-table-body__fileicon { display: none; } .umb-table-body__checkicon { display: inline-block; } + */ + &::before { + content: ""; + position: absolute; + z-index:1; + top: 1px; + left: 1px; + right: 1px; + bottom: 1px; + border: 2px solid @ui-selected-border; + box-shadow: 0 0 2px 0 fade(@ui-selected-border, 80%); + pointer-events: none; + } } // Table Row Styles From 452badab41580ca362e7fac017d2c2039116cd12 Mon Sep 17 00:00:00 2001 From: Shannon Date: Fri, 1 Feb 2019 11:27:40 +1100 Subject: [PATCH 431/437] Fixes tag editor for proper dirty tracking and model updating, the models weren't being updated correctly --- .../tags/umbtagseditor.directive.js | 37 ++++++++++++++----- .../propertyeditors/tags/tags.controller.js | 5 +-- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/tags/umbtagseditor.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/tags/umbtagseditor.directive.js index 1850445bd4..4d10625d23 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/tags/umbtagseditor.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/tags/umbtagseditor.directive.js @@ -52,7 +52,8 @@ vm.isLoading = false; - configureViewModel(); + //ensure that the models are formatted correctly + configureViewModel(true); // Set the visible prompt to -1 to ensure it will not be visible vm.promptIsVisible = "-1"; @@ -123,9 +124,13 @@ }); } + /** + * Watch for value changes + * @param {any} changes + */ function onChanges(changes) { - // watch for value changes externally + //when the model 'value' changes, sync the viewModel object if (changes.value) { if (!changes.value.isFirstChange() && changes.value.currentValue !== changes.value.previousValue) { @@ -145,13 +150,15 @@ $element.find('.tags-' + vm.htmlId).typeahead('destroy'); } - function configureViewModel() { + function configureViewModel(isInitLoad) { if (vm.value) { if (angular.isString(vm.value) && vm.value.length > 0) { if (vm.config.storageType === "Json") { //json storage vm.viewModel = JSON.parse(vm.value); - updateModelValue(vm.viewModel); + if (!isInitLoad) { + updateModelValue(vm.viewModel); + } } else { //csv storage @@ -165,7 +172,10 @@ return self.indexOf(v) === i; }); - updateModelValue(vm.viewModel); + if (!isInitLoad) { + updateModelValue(vm.viewModel); + } + } } else if (angular.isArray(vm.value)) { @@ -175,13 +185,18 @@ } function updateModelValue(val) { - if (val) { - vm.onValueChanged({ value: val }); + + //need to format the underlying model value for persistence based on the storage type + if (vm.config.storageType === "Json") { + val = val ? val : []; } else { - vm.onValueChanged({ value: [] }); + //then it is csv and we need to format it like that + val = val ? val.join() : ""; } + vm.onValueChanged({ value: val }); + reValidate(); } @@ -273,8 +288,10 @@ } function reValidate() { - //this is required to re-validate - vm.tagEditorForm.tagCount.$setViewValue(vm.viewModel.length); + //this is required to re-validate for the mandatory validation + if (vm.tagEditorForm && vm.tagEditorForm.tagCount) { + vm.tagEditorForm.tagCount.$setViewValue(vm.viewModel.length); + } } } diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/tags/tags.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/tags/tags.controller.js index a61930f877..688ac7693f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/tags/tags.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/tags/tags.controller.js @@ -1,12 +1,9 @@ angular.module("umbraco") .controller("Umbraco.PropertyEditors.TagsController", - function ($scope, angularHelper) { + function ($scope) { $scope.valueChanged = function(value) { $scope.model.value = value; - // the model value seems to be a reference to the same array, so we need - // to set the form as dirty explicitly when the content of the array changes - angularHelper.getCurrentForm($scope).$setDirty(); } } From 7614ba42df7b1ef33575e58bbfc068ad50149619 Mon Sep 17 00:00:00 2001 From: Shannon Date: Fri, 1 Feb 2019 13:32:17 +1100 Subject: [PATCH 432/437] Fixes the tag editor and tag suggestions --- .../tags/umbtagseditor.directive.js | 85 +++++++------------ .../Editors/BackOfficeServerVariables.cs | 2 +- .../PropertyEditors/TagsDataController.cs | 24 +++++- 3 files changed, 56 insertions(+), 55 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/tags/umbtagseditor.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/tags/umbtagseditor.directive.js index 4d10625d23..edf54ca034 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/tags/umbtagseditor.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/tags/umbtagseditor.directive.js @@ -24,10 +24,10 @@ function umbTagsEditorController($rootScope, assetsService, umbRequestHelper, angularHelper, $timeout, $element) { - var vm = this; + let vm = this; - var typeahead; - var tagsHound; + let typeahead; + let tagsHound; vm.$onInit = onInit; vm.$onChanges = onChanges; @@ -53,50 +53,51 @@ vm.isLoading = false; //ensure that the models are formatted correctly - configureViewModel(true); + configureViewModel(); // Set the visible prompt to -1 to ensure it will not be visible vm.promptIsVisible = "-1"; tagsHound = new Bloodhound({ - datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'), + initialize: false, + identify: function (obj) { return obj.id; }, + datumTokenizer: Bloodhound.tokenizers.obj.whitespace('text'), queryTokenizer: Bloodhound.tokenizers.whitespace, //pre-fetch the tags for this category prefetch: { url: umbRequestHelper.getApiUrl("tagsDataBaseUrl", "GetTags", { tagGroup: vm.config.group, culture: vm.culture }), //TTL = 5 minutes - ttl: 300000, - transform: dataTransform + ttl: 300000 }, //dynamically get the tags for this category (they may have changed on the server) remote: { - url: umbRequestHelper.getApiUrl("tagsDataBaseUrl", "GetTags", { tagGroup: vm.config.group, culture: vm.culture }), - transform: dataTransform + url: umbRequestHelper.getApiUrl("tagsDataBaseUrl", "GetTags", { tagGroup: vm.config.group, culture: vm.culture, query: "%QUERY" }), + wildcard: "%QUERY" } }); - tagsHound.initialize(true); - - //configure the type ahead - $timeout(function () { + tagsHound.initialize().then(function() { + //configure the type ahead + var sources = { //see: https://github.com/twitter/typeahead.js/blob/master/doc/jquery_typeahead.md#options - // name = the data set name, we'll make this the tag group name - name: vm.config.group, - display: "value", + // name = the data set name, we'll make this the tag group name + culture + name: vm.config.group + (vm.culture ? vm.culture : ""), + display: "text", //source: tagsHound - source: function (query, cb) { + source: function (query, syncCallback, asyncCallback) { tagsHound.search(query, function(suggestions) { - cb(removeCurrentTagsFromSuggestions(suggestions)); + syncCallback(removeCurrentTagsFromSuggestions(suggestions)); + }, function(suggestions) { + asyncCallback(removeCurrentTagsFromSuggestions(suggestions)); }); } }; var opts = { - //This causes some strangeness as it duplicates the textbox, best leave off for now. - hint: false, + hint: true, highlight: true, cacheKey: new Date(), // Force a cache refresh each time the control is initialized minLength: 1 @@ -105,22 +106,25 @@ typeahead = $element.find('.tags-' + vm.htmlId).typeahead(opts, sources) .bind("typeahead:selected", function (obj, datum, name) { angularHelper.safeApply($rootScope, function () { - addTagInternal(datum["value"]); + addTagInternal(datum["text"]); vm.tagToAdd = ""; // clear the typed text typeahead.typeahead('val', ''); }); }).bind("typeahead:autocompleted", function (obj, datum, name) { angularHelper.safeApply($rootScope, function () { - addTagInternal(datum["value"]); + addTagInternal(datum["text"]); vm.tagToAdd = ""; + // clear the typed text + typeahead.typeahead('val', ''); }); }).bind("typeahead:opened", function (obj) { }); - }); + }); + }); } @@ -150,15 +154,13 @@ $element.find('.tags-' + vm.htmlId).typeahead('destroy'); } - function configureViewModel(isInitLoad) { + function configureViewModel() { if (vm.value) { if (angular.isString(vm.value) && vm.value.length > 0) { if (vm.config.storageType === "Json") { //json storage vm.viewModel = JSON.parse(vm.value); - if (!isInitLoad) { - updateModelValue(vm.viewModel); - } + updateModelValue(vm.viewModel); } else { //csv storage @@ -172,9 +174,7 @@ return self.indexOf(v) === i; }); - if (!isInitLoad) { - updateModelValue(vm.viewModel); - } + updateModelValue(vm.viewModel); } } @@ -186,14 +186,7 @@ function updateModelValue(val) { - //need to format the underlying model value for persistence based on the storage type - if (vm.config.storageType === "Json") { - val = val ? val : []; - } - else { - //then it is csv and we need to format it like that - val = val ? val.join() : ""; - } + val = val ? val : []; vm.onValueChanged({ value: val }); @@ -267,23 +260,11 @@ function hidePrompt() { vm.promptIsVisible = "-1"; } - - //helper method to format the data for bloodhound - function dataTransform(list) { - //transform the result to what bloodhound wants - var tagList = _.map(list, function (i) { - return { value: i.text }; - }); - // remove current tags from the list - return $.grep(tagList, function (tag) { - return ($.inArray(tag.value, vm.viewModel) === -1); - }); - } - + // helper method to remove current tags function removeCurrentTagsFromSuggestions(suggestions) { return $.grep(suggestions, function (suggestion) { - return ($.inArray(suggestion.value, vm.viewModel) === -1); + return ($.inArray(suggestion.text, vm.viewModel) === -1); }); } diff --git a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs index 83bb152e0a..954491eab9 100644 --- a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs +++ b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs @@ -259,7 +259,7 @@ namespace Umbraco.Web.Editors }, { "tagsDataBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl( - controller => controller.GetTags("", "")) + controller => controller.GetTags("", "", null)) }, { "examineMgmtBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl( diff --git a/src/Umbraco.Web/PropertyEditors/TagsDataController.cs b/src/Umbraco.Web/PropertyEditors/TagsDataController.cs index 15c39bf994..7d699077c3 100644 --- a/src/Umbraco.Web/PropertyEditors/TagsDataController.cs +++ b/src/Umbraco.Web/PropertyEditors/TagsDataController.cs @@ -1,4 +1,6 @@ using System.Collections.Generic; +using System.Linq; +using Umbraco.Core; using Umbraco.Web.Models; using Umbraco.Web.Mvc; using Umbraco.Web.WebApi; @@ -15,10 +17,28 @@ namespace Umbraco.Web.PropertyEditors [PluginController("UmbracoApi")] public class TagsDataController : UmbracoAuthorizedApiController { - public IEnumerable GetTags(string tagGroup, string culture) + /// + /// Returns all tags matching tagGroup, culture and an optional query + /// + /// + /// + /// + /// + public IEnumerable GetTags(string tagGroup, string culture, string query = null) { if (culture == string.Empty) culture = null; - return Umbraco.TagQuery.GetAllTags(tagGroup, culture); + + var result = Umbraco.TagQuery.GetAllTags(tagGroup, culture); + + + if (!query.IsNullOrWhiteSpace()) + { + //TODO: add the query to TagQuery + the tag service, this is ugly but all we can do for now. + //currently we are post filtering this :( but works for now + result = result.Where(x => x.Text.InvariantContains(query)); + } + + return result.OrderBy(x => x.Text); } } } From fc6e17f3f9032b0fc9b9dbf3a2cb82421c048fcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Fri, 1 Feb 2019 10:49:09 +0100 Subject: [PATCH 433/437] =?UTF-8?q?V8:=20UI=20=E2=80=94=20umb-content-grid?= =?UTF-8?q?=20color=20change?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/less/components/umb-content-grid.less | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-content-grid.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-content-grid.less index 5a2821eb9e..ccf86e7ea6 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-content-grid.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-content-grid.less @@ -15,10 +15,6 @@ box-shadow: 0 1px 1px 0 rgba(0,0,0,0.16); border-radius: 3px; - color: @ui-option-type; - &:hover { - color:@ui-option-type-hover; - } } .umb-content-grid__item.-selected { @@ -70,9 +66,13 @@ .umb-content-grid__item-name { font-weight: bold; margin-bottom: 15px; - //color: @black; line-height: 1.4em; display: inline-flex; + + color: @ui-option-type; + &:hover { + color:@ui-option-type-hover; + } } .umb-content-grid__item-name:hover span { From 3fac16eda8b44d7ab2755bcc658e70289acefdb2 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Fri, 1 Feb 2019 09:58:10 +0000 Subject: [PATCH 434/437] Fix count bug - so it works with two languages --- src/Umbraco.Web.UI/Umbraco/Views/Preview/Index.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI/Umbraco/Views/Preview/Index.cshtml b/src/Umbraco.Web.UI/Umbraco/Views/Preview/Index.cshtml index b656942020..17a2f3c66a 100644 --- a/src/Umbraco.Web.UI/Umbraco/Views/Preview/Index.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/Views/Preview/Index.cshtml @@ -47,7 +47,7 @@ - @if (Model.Languages != null && Model.Languages.Count() > 2) + @if (Model.Languages != null && Model.Languages.Count() > 1) { foreach (var previewLink in Model.Languages) { From 0bb69aeeeeac4c7d27463a3318202beadf52909c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Fri, 1 Feb 2019 11:10:20 +0100 Subject: [PATCH 435/437] V8: preview colors changed for brandcolors 2019 --- .../src/less/canvas-designer.less | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/canvas-designer.less b/src/Umbraco.Web.UI.Client/src/less/canvas-designer.less index 146f9b8a67..7f67d5c3b2 100644 --- a/src/Umbraco.Web.UI.Client/src/less/canvas-designer.less +++ b/src/Umbraco.Web.UI.Client/src/less/canvas-designer.less @@ -275,7 +275,7 @@ a, a:hover{ font-family: "Lato", Helvetica, Arial, sans-serif; font-size: 13px; line-height: 16px; - background: #413659; + background: #1b264f; -webkit-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; @@ -306,7 +306,7 @@ a, a:hover{ ul.sections { display: block; - background: #413659; + background: #1b264f; height: 100%; position:absolute; top: 90px; @@ -322,7 +322,7 @@ ul.sections { ul.sections li { display: block; - border-left: 4px #413659 solid; + border-left: 4px #1b264f solid; -webkit-transition: all .3s linear; -moz-transition: all .3s linear; transition: all .3s linear; @@ -330,7 +330,8 @@ ul.sections li { .fix-left-menu ul.sections li a span, .fix-left-menu ul.sections li a i { - color: #8d869b; + color: #fff; + opacity: .7; -webkit-transition: all .3s linear; -moz-transition: all .3s linear; transition: all .3s linear; @@ -345,6 +346,11 @@ ul.sections li a { text-align: center; text-decoration: none; border-bottom: 1px solid #2E2246; + &:hover { + span, i { + opacity: 1; + } + } } ul.sections li a i { @@ -367,7 +373,7 @@ ul.sections li.current a i { } ul.sections li.current, ul.sections li:hover { - border-left: 4px #00AEA2 solid; + border-left: 4px #f5c1bc solid; } .fix-left-menu:hover ul.sections li a span, From d38dba16600fcc45e05b8a6aa5b4a8821342470e Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Fri, 1 Feb 2019 10:14:29 +0000 Subject: [PATCH 436/437] Update nuspec to include new hosted image/icon for Nuget packages from .com site --- build/NuSpecs/UmbracoCms.Core.nuspec | 2 +- build/NuSpecs/UmbracoCms.Web.nuspec | 4 ++-- build/NuSpecs/UmbracoCms.nuspec | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/NuSpecs/UmbracoCms.Core.nuspec b/build/NuSpecs/UmbracoCms.Core.nuspec index dc1224842e..9758c05dd6 100644 --- a/build/NuSpecs/UmbracoCms.Core.nuspec +++ b/build/NuSpecs/UmbracoCms.Core.nuspec @@ -8,7 +8,7 @@ Umbraco HQ http://opensource.org/licenses/MIT http://umbraco.com/ - http://umbraco.com/media/357769/100px_transparent.png + https://umbraco.com/dist/nuget/logo-small.png false Contains the core assemblies needed to run Umbraco Cms. This package only contains assemblies and can be used for package development. Use the UmbracoCms package to setup Umbraco in Visual Studio as an ASP.NET project. Contains the core assemblies needed to run Umbraco Cms diff --git a/build/NuSpecs/UmbracoCms.Web.nuspec b/build/NuSpecs/UmbracoCms.Web.nuspec index 30fa303b30..fabd1e25a8 100644 --- a/build/NuSpecs/UmbracoCms.Web.nuspec +++ b/build/NuSpecs/UmbracoCms.Web.nuspec @@ -8,13 +8,13 @@ Umbraco HQ http://opensource.org/licenses/MIT http://umbraco.com/ - http://umbraco.com/media/357769/100px_transparent.png + https://umbraco.com/dist/nuget/logo-small.png false Contains the web assemblies needed to run Umbraco Cms. This package only contains assemblies and can be used for package development. Use the UmbracoCms package to setup Umbraco in Visual Studio as an ASP.NET project. Contains the core assemblies needed to run Umbraco Cms en-US umbraco - +