From 12e78455d49acab5b5a5b58fb1f6ef1f34bcae79 Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Fri, 7 Aug 2015 12:42:29 -0700 Subject: [PATCH] Added Content-Type header to RuntimeInfoPage view and reacting to namespace change --- .../Views/RuntimeInfoPage.cs | 79 ++++++++++--------- .../Views/RuntimeInfoPage.cshtml | 9 ++- 2 files changed, 49 insertions(+), 39 deletions(-) diff --git a/src/Microsoft.AspNet.Diagnostics/Views/RuntimeInfoPage.cs b/src/Microsoft.AspNet.Diagnostics/Views/RuntimeInfoPage.cs index 01c71f3ab9..c7f914d877 100644 --- a/src/Microsoft.AspNet.Diagnostics/Views/RuntimeInfoPage.cs +++ b/src/Microsoft.AspNet.Diagnostics/Views/RuntimeInfoPage.cs @@ -59,85 +59,92 @@ using Microsoft.Dnx.Runtime; public override async Task ExecuteAsync() { WriteLiteral("\r\n"); - WriteLiteral("\r\n(CultureInfo.CurrentUICulture.TwoLetterISOLanguageName, 379), false)); +#line 17 "RuntimeInfoPage.cshtml" + + Response.ContentType = "text/html; charset=utf-8"; + +#line default +#line hidden + + WriteLiteral("\r\n\r\n(CultureInfo.CurrentUICulture.TwoLetterISOLanguageName, 436), false)); WriteLiteral(" xmlns=\"http://www.w3.org/1999/xhtml\">\r\n\r\n \r\n " + " "); -#line 21 "RuntimeInfoPage.cshtml" +#line 24 "RuntimeInfoPage.cshtml" Write(Resources.RuntimeInfoPage_Title); #line default #line hidden WriteLiteral("\r\n \r" + "\n\r\n\r\n

"); -#line 27 "RuntimeInfoPage.cshtml" +#line 30 "RuntimeInfoPage.cshtml" Write(Resources.RuntimeInfoPage_Environment); #line default #line hidden WriteLiteral("

\r\n

"); -#line 28 "RuntimeInfoPage.cshtml" +#line 31 "RuntimeInfoPage.cshtml" Write(Resources.RuntimeInfoPage_OperatingSystem); #line default #line hidden WriteLiteral(" "); -#line 28 "RuntimeInfoPage.cshtml" +#line 31 "RuntimeInfoPage.cshtml" Write(string.IsNullOrWhiteSpace(Model.OperatingSystem) ? Resources.RuntimeInfoPage_OperatingSystemFail : Model.OperatingSystem); #line default #line hidden - WriteLiteral("

\r\n \r\n

"); -#line 30 "RuntimeInfoPage.cshtml" + WriteLiteral("

\r\n\r\n

"); +#line 33 "RuntimeInfoPage.cshtml" Write(Resources.RuntimeInfoPage_RuntimeVersion); #line default #line hidden WriteLiteral(" "); -#line 30 "RuntimeInfoPage.cshtml" +#line 33 "RuntimeInfoPage.cshtml" Write(string.IsNullOrWhiteSpace(Model.Version) ? Resources.RuntimeInfoPage_RuntimeVersionFail : Model.Version); #line default #line hidden WriteLiteral("

\r\n\r\n

"); -#line 32 "RuntimeInfoPage.cshtml" +#line 35 "RuntimeInfoPage.cshtml" Write(Resources.RuntimeInfoPage_RuntimeArchitecture); #line default #line hidden WriteLiteral(" "); -#line 32 "RuntimeInfoPage.cshtml" +#line 35 "RuntimeInfoPage.cshtml" Write(string.IsNullOrWhiteSpace(Model.RuntimeArchitecture) ? Resources.RuntimeInfoPage_RuntimeArchitectureFail : Model.RuntimeArchitecture); #line default #line hidden WriteLiteral("

\r\n\r\n

"); -#line 34 "RuntimeInfoPage.cshtml" +#line 37 "RuntimeInfoPage.cshtml" Write(Resources.RuntimeInfoPage_RuntimeType); #line default #line hidden WriteLiteral(" "); -#line 34 "RuntimeInfoPage.cshtml" +#line 37 "RuntimeInfoPage.cshtml" Write(string.IsNullOrWhiteSpace(Model.RuntimeType) ? Resources.RuntimeInfoPage_RuntimeTypeFail : Model.RuntimeType); #line default #line hidden - WriteLiteral("

\r\n \r\n

"); -#line 36 "RuntimeInfoPage.cshtml" + WriteLiteral("

\r\n\r\n

"); +#line 39 "RuntimeInfoPage.cshtml" Write(Resources.RuntimeInfoPage_Packages); #line default #line hidden WriteLiteral("

\r\n"); -#line 37 "RuntimeInfoPage.cshtml" +#line 40 "RuntimeInfoPage.cshtml" #line default #line hidden -#line 37 "RuntimeInfoPage.cshtml" +#line 40 "RuntimeInfoPage.cshtml" if (@Resources.RuntimeInfoPage_Packages == null) { @@ -145,13 +152,13 @@ using Microsoft.Dnx.Runtime; #line hidden WriteLiteral("

"); -#line 39 "RuntimeInfoPage.cshtml" +#line 42 "RuntimeInfoPage.cshtml" Write(Resources.RuntimeInfoPage_PackagesFail); #line default #line hidden WriteLiteral("

\r\n"); -#line 40 "RuntimeInfoPage.cshtml" +#line 43 "RuntimeInfoPage.cshtml" } else { @@ -161,44 +168,44 @@ using Microsoft.Dnx.Runtime; WriteLiteral(" \r\n \r\n \r\n <" + "th>"); -#line 46 "RuntimeInfoPage.cshtml" +#line 49 "RuntimeInfoPage.cshtml" Write(Resources.RuntimeInfoPage_PackageNameColumnName); #line default #line hidden WriteLiteral("\r\n \r\n \r\n \r\n \r\n \r\n"); -#line 52 "RuntimeInfoPage.cshtml" +#line 55 "RuntimeInfoPage.cshtml" #line default #line hidden -#line 52 "RuntimeInfoPage.cshtml" +#line 55 "RuntimeInfoPage.cshtml" bool even = false; #line default #line hidden WriteLiteral("\r\n"); -#line 53 "RuntimeInfoPage.cshtml" +#line 56 "RuntimeInfoPage.cshtml" #line default #line hidden -#line 53 "RuntimeInfoPage.cshtml" +#line 56 "RuntimeInfoPage.cshtml" foreach (var package in Model.References.OrderBy(package => package.Name.ToLowerInvariant())) { @@ -206,40 +213,40 @@ using Microsoft.Dnx.Runtime; #line hidden WriteLiteral(" (even?"even":"odd", 2168), false)); + WriteAttribute("class", Tuple.Create(" class=\"", 2209), Tuple.Create("\"", 2237), + Tuple.Create(Tuple.Create("", 2217), Tuple.Create(even?"even":"odd", 2217), false)); WriteLiteral(">\r\n \r\n \r\n \r\n \r\n"); -#line 60 "RuntimeInfoPage.cshtml" +#line 63 "RuntimeInfoPage.cshtml" #line default #line hidden -#line 60 "RuntimeInfoPage.cshtml" +#line 63 "RuntimeInfoPage.cshtml" even = !even; #line default #line hidden -#line 60 "RuntimeInfoPage.cshtml" +#line 63 "RuntimeInfoPage.cshtml" } @@ -247,7 +254,7 @@ using Microsoft.Dnx.Runtime; #line hidden WriteLiteral(" \r\n
"); -#line 47 "RuntimeInfoPage.cshtml" +#line 50 "RuntimeInfoPage.cshtml" Write(Resources.RuntimeInfoPage_PackageVersionColumnName); #line default #line hidden WriteLiteral(""); -#line 48 "RuntimeInfoPage.cshtml" +#line 51 "RuntimeInfoPage.cshtml" Write(Resources.RuntimeInfoPage_PackagePathColumnName); #line default #line hidden WriteLiteral("
"); -#line 56 "RuntimeInfoPage.cshtml" +#line 59 "RuntimeInfoPage.cshtml" Write(package.Name); #line default #line hidden WriteLiteral(""); -#line 57 "RuntimeInfoPage.cshtml" +#line 60 "RuntimeInfoPage.cshtml" Write(package.Version); #line default #line hidden WriteLiteral(""); -#line 58 "RuntimeInfoPage.cshtml" +#line 61 "RuntimeInfoPage.cshtml" Write(package.Path); #line default #line hidden WriteLiteral("
\r\n"); -#line 64 "RuntimeInfoPage.cshtml" +#line 67 "RuntimeInfoPage.cshtml" } #line default diff --git a/src/Microsoft.AspNet.Diagnostics/Views/RuntimeInfoPage.cshtml b/src/Microsoft.AspNet.Diagnostics/Views/RuntimeInfoPage.cshtml index b46b74647b..6312332a94 100644 --- a/src/Microsoft.AspNet.Diagnostics/Views/RuntimeInfoPage.cshtml +++ b/src/Microsoft.AspNet.Diagnostics/Views/RuntimeInfoPage.cshtml @@ -3,7 +3,7 @@ @using System.Linq @using Microsoft.AspNet.Diagnostics @using Microsoft.AspNet.Diagnostics.Views -@using Microsoft.Framework.Runtime; +@using Microsoft.Dnx.Runtime; @functions { @@ -14,6 +14,9 @@ public RuntimeInfoPageModel Model { get; set; } } +@{ + Response.ContentType = "text/html; charset=utf-8"; +} @@ -26,13 +29,13 @@

@Resources.RuntimeInfoPage_Environment

@Resources.RuntimeInfoPage_OperatingSystem @(string.IsNullOrWhiteSpace(Model.OperatingSystem) ? Resources.RuntimeInfoPage_OperatingSystemFail : Model.OperatingSystem)

- +

@Resources.RuntimeInfoPage_RuntimeVersion @(string.IsNullOrWhiteSpace(Model.Version) ? Resources.RuntimeInfoPage_RuntimeVersionFail : Model.Version)

@Resources.RuntimeInfoPage_RuntimeArchitecture @(string.IsNullOrWhiteSpace(Model.RuntimeArchitecture) ? Resources.RuntimeInfoPage_RuntimeArchitectureFail : Model.RuntimeArchitecture)

@Resources.RuntimeInfoPage_RuntimeType @(string.IsNullOrWhiteSpace(Model.RuntimeType) ? Resources.RuntimeInfoPage_RuntimeTypeFail : Model.RuntimeType)

- +

@Resources.RuntimeInfoPage_Packages

@if (@Resources.RuntimeInfoPage_Packages == null) {