Skip to content

Commit 36cb342

Browse files
author
Warren Buckley
authored
Telemetry revisited - Move from App_Data file to UmbracoSettings.config (#9554)
1 parent 6a4045c commit 36cb342

File tree

14 files changed

+148
-402
lines changed

14 files changed

+148
-402
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,5 @@ cypress.env.json
176176
/src/Umbraco.Tests.AcceptanceTest/cypress/videos/
177177
/src/Umbraco.Tests.AcceptanceTest/cypress/screenshots/
178178
src/Umbraco.Web.UI/Umbraco/telemetrics-id.umb
179+
180+
/src/Umbraco.Web.UI/config/umbracoSettings.config

src/Umbraco.Core/Configuration/UmbracoSettings/BackOfficeElement.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,10 @@ internal class BackOfficeElement : UmbracoConfigurationElement, IBackOfficeSecti
88
internal TourConfigElement Tours => (TourConfigElement)this["tours"];
99

1010
ITourSection IBackOfficeSection.Tours => Tours;
11+
12+
[ConfigurationProperty("id", DefaultValue = "")]
13+
internal string Id => (string)base["id"];
14+
15+
string IBackOfficeSection.Id => (string)base["id"];
1116
}
1217
}
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
namespace Umbraco.Core.Configuration.UmbracoSettings
1+
using System;
2+
3+
namespace Umbraco.Core.Configuration.UmbracoSettings
24
{
35
public interface IBackOfficeSection
46
{
57
ITourSection Tours { get; }
8+
string Id { get; }
69
}
7-
}
10+
}

src/Umbraco.Core/IO/SystemFiles.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public class SystemFiles
77
{
88
public static string TinyMceConfig => SystemDirectories.Config + "/tinyMceConfig.config";
99

10-
public static string TelemetricsIdentifier => SystemDirectories.Data + "/telemetrics-id.umb";
10+
public static string UmbracoSettings => SystemDirectories.Config + "/UmbracoSettings.config";
1111

1212
// TODO: Kill this off we don't have umbraco.config XML cache we now have NuCache
1313
public static string GetContentCacheXml(IGlobalSettings globalSettings)

src/Umbraco.Web.UI/Umbraco.Web.UI.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@
377377
<!-- Create ClientDependency.config file from Template if it doesn't exist -->
378378
<Message Text="Copy ClientDependency.$(Configuration).config to ClientDependency.config" Importance="high" Condition="!Exists('$(ProjectDir)Config\ClientDependency.config')" />
379379
<Copy SourceFiles="$(ProjectDir)Config\ClientDependency.Release.config" DestinationFiles="$(ProjectDir)Config\ClientDependency.config" OverwriteReadOnlyFiles="true" SkipUnchangedFiles="false" Condition="!Exists('$(ProjectDir)Config\ClientDependency.config')" />
380+
<Copy SourceFiles="$(ProjectDir)Config\umbracoSettings.Release.config" DestinationFiles="$(ProjectDir)Config\umbracoSettings.config" OverwriteReadOnlyFiles="true" SkipUnchangedFiles="false" Condition="!Exists('$(ProjectDir)Config\umbracoSettings.config')" />
380381
<!-- Create Serilog.config & serilog.user.config file from Templates if it doesn't exist -->
381382
<Message Text="Copy serilog.$(Configuration).config to serilog.config" Importance="high" Condition="!Exists('$(ProjectDir)Config\serilog.config')" />
382383
<Copy SourceFiles="$(ProjectDir)Config\serilog.Release.config" DestinationFiles="$(ProjectDir)Config\serilog.config" OverwriteReadOnlyFiles="true" SkipUnchangedFiles="false" Condition="!Exists('$(ProjectDir)Config\serilog.config')" />

src/Umbraco.Web.UI/config/umbracoSettings.Release.config

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@
4141
<![CDATA[
4242
<div id="umbracoPreviewBadge" class="umbraco-preview-badge">
4343
<span class="umbraco-preview-badge__header">Preview mode</span>
44-
<a href="{0}/preview/?id={2}" class="umbraco-preview-badge__a open">
44+
<a href="{0}/preview/?id={2}" class="umbraco-preview-badge__a open" title="Open preview in BackOffice">
4545
4646
</a>
47-
<a href="{0}/preview/end?redir={1}" class="umbraco-preview-badge__a end">
48-
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><title>Click to end</title><path fill="#fff" d="M5273.1 2400.1v-2c0-2.8-5-4-9.7-4s-9.7 1.3-9.7 4v2a7 7 0 002 4.9l5 4.9c.3.3.4.6.4 1v6.4c0 .4.2.7.6.8l2.9.9c.5.1 1-.2 1-.8v-7.2c0-.4.2-.7.4-1l5.1-5a7 7 0 002-4.9zm-9.7-.1c-4.8 0-7.4-1.3-7.5-1.8.1-.5 2.7-1.8 7.5-1.8s7.3 1.3 7.5 1.8c-.2.5-2.7 1.8-7.5 1.8z"/><path fill="#fff" d="M5268.4 2410.3c-.6 0-1 .4-1 1s.4 1 1 1h4.3c.6 0 1-.4 1-1s-.4-1-1-1h-4.3zM5272.7 2413.7h-4.3c-.6 0-1 .4-1 1s.4 1 1 1h4.3c.6 0 1-.4 1-1s-.4-1-1-1zM5272.7 2417h-4.3c-.6 0-1 .4-1 1s.4 1 1 1h4.3c.6 0 1-.4 1-1 0-.5-.4-1-1-1z"/><path fill="#fff" d="M78.2 13l-8.7 11.7a32.5 32.5 0 11-51.9 25.8c0-10.3 4.7-19.7 12.9-25.8L21.8 13a47 47 0 1056.4 0z"/><path fill="#fff" d="M42.7 2.5h14.6v49.4H42.7z"/></svg>
47+
<a href="{0}/preview/end?redir={1}" class="umbraco-preview-badge__a end" title="End preview mode">
48+
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><title>Click to end preview mode</title><path fill="#fff" d="M5273.1 2400.1v-2c0-2.8-5-4-9.7-4s-9.7 1.3-9.7 4v2a7 7 0 002 4.9l5 4.9c.3.3.4.6.4 1v6.4c0 .4.2.7.6.8l2.9.9c.5.1 1-.2 1-.8v-7.2c0-.4.2-.7.4-1l5.1-5a7 7 0 002-4.9zm-9.7-.1c-4.8 0-7.4-1.3-7.5-1.8.1-.5 2.7-1.8 7.5-1.8s7.3 1.3 7.5 1.8c-.2.5-2.7 1.8-7.5 1.8z"/><path fill="#fff" d="M5268.4 2410.3c-.6 0-1 .4-1 1s.4 1 1 1h4.3c.6 0 1-.4 1-1s-.4-1-1-1h-4.3zM5272.7 2413.7h-4.3c-.6 0-1 .4-1 1s.4 1 1 1h4.3c.6 0 1-.4 1-1s-.4-1-1-1zM5272.7 2417h-4.3c-.6 0-1 .4-1 1s.4 1 1 1h4.3c.6 0 1-.4 1-1 0-.5-.4-1-1-1z"/><path fill="#fff" d="M78.2 13l-8.7 11.7a32.5 32.5 0 11-51.9 25.8c0-10.3 4.7-19.7 12.9-25.8L21.8 13a47 47 0 1056.4 0z"/><path fill="#fff" d="M42.7 2.5h14.6v49.4H42.7z"/></svg>
4949
</a>
5050
</div>
5151
<style type="text/css">
@@ -64,7 +64,7 @@
6464
pointer-events:none;
6565
left: 50%;
6666
transform: translate(-50%, 40px);
67-
animation: umbraco-preview-badge--effect 10s 100ms ease both;
67+
animation: umbraco-preview-badge--effect 10s 1.2s ease both;
6868
border-radius: 3px 3px 0 0;
6969
}}
7070
@keyframes umbraco-preview-badge--effect {{
@@ -91,20 +91,20 @@
9191
3.5%,
9292
6.5%,
9393
8.5% {{
94-
transform: translate(-50%, 0px);
94+
transform: translate(-50%, 0);
9595
animation-timing-function: ease-out;
9696
}}
9797
9.7% {{
98-
transform: translate(-50%, 0px);
98+
transform: translate(-50%, 0);
9999
animation-timing-function: ease-out;
100100
}}
101101
10.0% {{
102-
transform: translate(-50%, 0px);
102+
transform: translate(-50%, 0);
103103
}}
104104
105105
106106
60% {{
107-
transform: translate(-50%, 0px);
107+
transform: translate(-50%, 0);
108108
animation-timing-function: ease-out;
109109
}}
110110
61.5% {{
@@ -126,18 +126,18 @@
126126
63.5%,
127127
66.5%,
128128
68.5% {{
129-
transform: translate(-50%, 0px);
129+
transform: translate(-50%, 0);
130130
animation-timing-function: ease-out;
131131
}}
132132
69.7% {{
133-
transform: translate(-50%, 0px);
133+
transform: translate(-50%, 0);
134134
animation-timing-function: ease-out;
135135
}}
136136
70.0% {{
137-
transform: translate(-50%, 0px);
137+
transform: translate(-50%, 0);
138138
}}
139139
100.0% {{
140-
transform: translate(-50%, 0px);
140+
transform: translate(-50%, 0);
141141
}}
142142
}}
143143
.umbraco-preview-badge__header {{
@@ -170,6 +170,7 @@
170170
width:1em;
171171
}}
172172
</style>
173+
<script type="text/javascript" data-umbraco-path="{0}" src="{0}/js/umbraco.websitepreview.js"></script>
173174
]]>
174175
</PreviewBadge>
175176

@@ -231,6 +232,14 @@
231232
By default you can call any content Id in the url and show the content with that id, for example:
232233
http://mysite.com/1092 or http://mysite.com/1092.aspx would render the content with id 1092. Setting
233234
this setting to true stops that behavior
235+
@disableRedirectUrlTracking
236+
When the URL changes for content, redirects are automatically created for redirect handling within the
237+
request pipeline. Setting this setting to true stops the automatic creation of redirects. Note that this
238+
does not stop the request pipeline from handling any previously created redirects.
239+
@urlProviderMode
240+
By default Umbraco automatically figures out if internal URLs should be rendered as relative or absolute,
241+
depending on the current request and the configured domains. By setting this setting to "Relative" or
242+
"Absolute" you can force Umbraco to always render URLs as either relative or absolute.
234243
@umbracoApplicationUrl
235244
The url of the Umbraco application. By default, Umbraco will figure it out from the first request.
236245
Configure it here if you need anything specific. Needs to be a complete url with scheme and umbraco
@@ -242,4 +251,17 @@
242251
umbracoApplicationUrl="">
243252
</web.routing>
244253

254+
<!--
255+
keepAlive
256+
@disableKeepAliveTask
257+
Disables the periodic KeepAliveTask when set to "true".
258+
Use this setting to disable the KeepAliveTask in case you already have an alternative.
259+
For example, Azure App Service has keep alive functionality built-in.
260+
Defaults to "false".
261+
@keepAlivePingUrl
262+
The url of the KeepAlivePing action. By default, the url will use the umbracoApplicationUrl setting as the basis.
263+
Change this setting to specify an alternative url to reach the KeepAlivePing action. eg http://localhost/umbraco/api/keepalive/ping
264+
Defaults to "{umbracoApplicationUrl}/api/keepalive/ping".
265+
-->
266+
<keepAlive disableKeepAliveTask="false" keepAlivePingUrl="{umbracoApplicationUrl}/api/keepalive/ping" />
245267
</settings>

0 commit comments

Comments
 (0)