mini profiler in back office now enabled with query string
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
@using System.Web.Mvc.Html
|
||||
@using System.Net.Http
|
||||
@using System.Web.Mvc.Html
|
||||
@using Umbraco.Core
|
||||
@using ClientDependency.Core
|
||||
@using ClientDependency.Core.Mvc
|
||||
@@ -63,7 +64,23 @@
|
||||
<script type="text/javascript" src="lib/lazyload/lazyload.min.js"></script>
|
||||
<script type="text/javascript" src="@Url.GetUrlWithCacheBust("Application", "BackOffice")"></script>
|
||||
|
||||
@Html.RenderProfiler()
|
||||
@{
|
||||
var isDebug = false;
|
||||
if (Request.RawUrl.IndexOf('?') >= 0)
|
||||
{
|
||||
var parsed = HttpUtility.ParseQueryString(Request.RawUrl.Split('?')[1]);
|
||||
var attempt = parsed["umbDebug"].TryConvertTo<bool>();
|
||||
if (attempt && attempt.Result)
|
||||
{
|
||||
isDebug = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@if (isDebug)
|
||||
{
|
||||
@Html.RenderProfiler()
|
||||
}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user