Skip to content

Commit

Permalink
Telemetry revisited - Move from App_Data file to UmbracoSettings.conf…
Browse files Browse the repository at this point in the history
…ig (umbraco#9554)
  • Loading branch information
Warren Buckley authored Dec 16, 2020
1 parent 6a4045c commit 36cb342
Show file tree
Hide file tree
Showing 14 changed files with 148 additions and 402 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,5 @@ cypress.env.json
/src/Umbraco.Tests.AcceptanceTest/cypress/videos/
/src/Umbraco.Tests.AcceptanceTest/cypress/screenshots/
src/Umbraco.Web.UI/Umbraco/telemetrics-id.umb

/src/Umbraco.Web.UI/config/umbracoSettings.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,10 @@ internal class BackOfficeElement : UmbracoConfigurationElement, IBackOfficeSecti
internal TourConfigElement Tours => (TourConfigElement)this["tours"];

ITourSection IBackOfficeSection.Tours => Tours;

[ConfigurationProperty("id", DefaultValue = "")]
internal string Id => (string)base["id"];

string IBackOfficeSection.Id => (string)base["id"];
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
namespace Umbraco.Core.Configuration.UmbracoSettings
using System;

namespace Umbraco.Core.Configuration.UmbracoSettings
{
public interface IBackOfficeSection
{
ITourSection Tours { get; }
string Id { get; }
}
}
}
2 changes: 1 addition & 1 deletion src/Umbraco.Core/IO/SystemFiles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class SystemFiles
{
public static string TinyMceConfig => SystemDirectories.Config + "/tinyMceConfig.config";

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

// TODO: Kill this off we don't have umbraco.config XML cache we now have NuCache
public static string GetContentCacheXml(IGlobalSettings globalSettings)
Expand Down
1 change: 1 addition & 0 deletions src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@
<!-- Create ClientDependency.config file from Template if it doesn't exist -->
<Message Text="Copy ClientDependency.$(Configuration).config to ClientDependency.config" Importance="high" Condition="!Exists('$(ProjectDir)Config\ClientDependency.config')" />
<Copy SourceFiles="$(ProjectDir)Config\ClientDependency.Release.config" DestinationFiles="$(ProjectDir)Config\ClientDependency.config" OverwriteReadOnlyFiles="true" SkipUnchangedFiles="false" Condition="!Exists('$(ProjectDir)Config\ClientDependency.config')" />
<Copy SourceFiles="$(ProjectDir)Config\umbracoSettings.Release.config" DestinationFiles="$(ProjectDir)Config\umbracoSettings.config" OverwriteReadOnlyFiles="true" SkipUnchangedFiles="false" Condition="!Exists('$(ProjectDir)Config\umbracoSettings.config')" />
<!-- Create Serilog.config & serilog.user.config file from Templates if it doesn't exist -->
<Message Text="Copy serilog.$(Configuration).config to serilog.config" Importance="high" Condition="!Exists('$(ProjectDir)Config\serilog.config')" />
<Copy SourceFiles="$(ProjectDir)Config\serilog.Release.config" DestinationFiles="$(ProjectDir)Config\serilog.config" OverwriteReadOnlyFiles="true" SkipUnchangedFiles="false" Condition="!Exists('$(ProjectDir)Config\serilog.config')" />
Expand Down
46 changes: 34 additions & 12 deletions src/Umbraco.Web.UI/config/umbracoSettings.Release.config
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
<![CDATA[
<div id="umbracoPreviewBadge" class="umbraco-preview-badge">
<span class="umbraco-preview-badge__header">Preview mode</span>
<a href="{0}/preview/?id={2}" class="umbraco-preview-badge__a open">
<a href="{0}/preview/?id={2}" class="umbraco-preview-badge__a open" title="Open preview in BackOffice">
</a>
<a href="{0}/preview/end?redir={1}" class="umbraco-preview-badge__a end">
<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>
<a href="{0}/preview/end?redir={1}" class="umbraco-preview-badge__a end" title="End preview mode">
<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>
</a>
</div>
<style type="text/css">
Expand All @@ -64,7 +64,7 @@
pointer-events:none;
left: 50%;
transform: translate(-50%, 40px);
animation: umbraco-preview-badge--effect 10s 100ms ease both;
animation: umbraco-preview-badge--effect 10s 1.2s ease both;
border-radius: 3px 3px 0 0;
}}
@keyframes umbraco-preview-badge--effect {{
Expand All @@ -91,20 +91,20 @@
3.5%,
6.5%,
8.5% {{
transform: translate(-50%, 0px);
transform: translate(-50%, 0);
animation-timing-function: ease-out;
}}
9.7% {{
transform: translate(-50%, 0px);
transform: translate(-50%, 0);
animation-timing-function: ease-out;
}}
10.0% {{
transform: translate(-50%, 0px);
transform: translate(-50%, 0);
}}
60% {{
transform: translate(-50%, 0px);
transform: translate(-50%, 0);
animation-timing-function: ease-out;
}}
61.5% {{
Expand All @@ -126,18 +126,18 @@
63.5%,
66.5%,
68.5% {{
transform: translate(-50%, 0px);
transform: translate(-50%, 0);
animation-timing-function: ease-out;
}}
69.7% {{
transform: translate(-50%, 0px);
transform: translate(-50%, 0);
animation-timing-function: ease-out;
}}
70.0% {{
transform: translate(-50%, 0px);
transform: translate(-50%, 0);
}}
100.0% {{
transform: translate(-50%, 0px);
transform: translate(-50%, 0);
}}
}}
.umbraco-preview-badge__header {{
Expand Down Expand Up @@ -170,6 +170,7 @@
width:1em;
}}
</style>
<script type="text/javascript" data-umbraco-path="{0}" src="{0}/js/umbraco.websitepreview.js"></script>
]]>
</PreviewBadge>

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

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

0 comments on commit 36cb342

Please sign in to comment.