Skip to content

Commit

Permalink
rename embedded files as used in MiniProfiler to use ssr- prefix inst…
Browse files Browse the repository at this point in the history
…ead of ss-
  • Loading branch information
mythz committed Dec 16, 2012
1 parent a1efc22 commit 478a86f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
Expand Up @@ -28,11 +28,11 @@ internal static void RegisterRoutes()
{
var urls = new[]
{
"ss-jquip.all",
"ss-includes.js",
"ss-includes.css",
"ss-includes.tmpl",
"ss-results"
"ssr-jquip.all",
"ssr-includes.js",
"ssr-includes.css",
"ssr-includes.tmpl",
"ssr-results"
};
var routes = RouteTable.Routes;
var handler = new MiniProfilerRouteHandler(new MiniProfilerHandler());
Expand Down
6 changes: 3 additions & 3 deletions src/ServiceStack/MiniProfiler/MiniProfiler.Settings.cs
Expand Up @@ -185,14 +185,14 @@ public static void ExcludeMethod(string methodName)
/// <summary>
/// When <see cref="Profiler.Start"/> is called, if the current request url contains any items in this property,
/// no profiler will be instantiated and no results will be displayed.
/// Default value is { "/ss-", "/content/", "/scripts/", "/favicon.ico" }.
/// Default value is { "/ssr-", "/content/", "/scripts/", "/favicon.ico" }.
/// </summary>
[DefaultValue(new string[] { "/ss-", "/content/", "/scripts/", "/favicon.ico" })]
[DefaultValue(new string[] { "/ssr-", "/content/", "/scripts/", "/favicon.ico" })]
public static string[] IgnoredPaths { get; set; }

/// <summary>
/// The path under which ALL routes are registered in, defaults to the application root. For example, "~/myDirectory/" would yield
/// "/myDirectory/ss-includes.js" rather than just "/mini-profiler-includes.js"
/// "/myDirectory/ssr-includes.js" rather than just "/mini-profiler-includes.js"
/// Any setting here should be in APP RELATIVE FORM, e.g. "~/myDirectory/"
/// </summary>
[DefaultValue("~/")]
Expand Down
16 changes: 8 additions & 8 deletions src/ServiceStack/MiniProfiler/UI/MiniProfilerHandler.cs
Expand Up @@ -21,19 +21,19 @@ public class MiniProfilerHandler : /*IRouteHandler, */ IHttpHandler, IServiceSta
public static IHttpHandler MatchesRequest(IHttpRequest request)
{
var file = Path.GetFileNameWithoutExtension(request.PathInfo);
return file != null && file.StartsWith("ss-")
return file != null && file.StartsWith("ssr-")
? new MiniProfilerHandler()
: null;
}

public static HtmlString RenderIncludes(Profiler profiler, RenderPosition? position = null, bool? showTrivial = null, bool? showTimeWithChildren = null, int? maxTracesToShow = null, bool xhtml = false, bool? showControls = null, string path = null)
{
const string format =
@"<link rel=""stylesheet"" type=""text/css"" href=""{path}ss-includes.css?v={version}""{closeXHTML}>
@"<link rel=""stylesheet"" type=""text/css"" href=""{path}ssr-includes.css?v={version}""{closeXHTML}>
<script type=""text/javascript"">
if (!window.jquip) document.write(unescape(""%3Cscript src='{path}ss-jquip.all.js?v={version}' type='text/javascript'%3E%3C/script%3E""));
if (!window.jquip) document.write(unescape(""%3Cscript src='{path}ssr-jquip.all.js?v={version}' type='text/javascript'%3E%3C/script%3E""));
</script>
<script type=""text/javascript"" src=""{path}ss-includes.js?v={version}""></script>
<script type=""text/javascript"" src=""{path}ssr-includes.js?v={version}""></script>
<script type=""text/javascript"">
jQuery(function() {{
MiniProfiler.init({{
Expand Down Expand Up @@ -146,12 +146,12 @@ public void ProcessRequest(IHttpRequest httpReq, IHttpResponse httpRes, string o
{
//case "mini-profiler-jquery.1.6.2":
//case "mini-profiler-jquery.tmpl.beta1":
case "ss-jquip.all":
case "ss-includes":
case "ssr-jquip.all":
case "ssr-includes":
output = Includes(httpReq, httpRes, path);
break;

case "ss-results":
case "ssr-results":
output = Results(httpReq, httpRes);
break;

Expand Down Expand Up @@ -190,7 +190,7 @@ private static string Includes(IHttpRequest httpReq, IHttpResponse httpRes, stri
//cache.SetExpires(DateTime.Now.AddDays(7));
//cache.SetValidUntilExpires(true);

var embeddedFile = Path.GetFileName(path).Replace("ss-", "");
var embeddedFile = Path.GetFileName(path).Replace("ssr-", "");
return GetResource(embeddedFile);
}

Expand Down
8 changes: 4 additions & 4 deletions src/ServiceStack/MiniProfiler/UI/includes.js
Expand Up @@ -77,7 +77,7 @@ var MiniProfiler = (function ($)

var fetchTemplates = function (success)
{
var key = 'ss-templates',
var key = 'ssr-templates',
cached = load(key);

if (cached)
Expand All @@ -87,7 +87,7 @@ var MiniProfiler = (function ($)
}
else
{
$.get(options.path + 'ss-includes.tmpl?v=' + options.version, function (data)
$.get(options.path + 'ssr-includes.tmpl?v=' + options.version, function (data)
{
if (data)
{
Expand All @@ -109,7 +109,7 @@ var MiniProfiler = (function ($)
var idx = fetchingIds.push(id) - 1;

$.ajax({
url: options.path + 'ss-results?id=' + id + '&popup=1',
url: options.path + 'ssr-results?id=' + id + '&popup=1',
dataType: 'json',
success: function (json)
{
Expand Down Expand Up @@ -617,7 +617,7 @@ var MiniProfiler = (function ($)

shareUrl: function (id)
{
return options.path + 'ss-results?id=' + id;
return options.path + 'ssr-results?id=' + id;
},

getSqlTimings: function (root)
Expand Down

0 comments on commit 478a86f

Please sign in to comment.