Added Content-Type header to RuntimeInfoPage view and reacting to namespace change

This commit is contained in:
Kiran Challa 2015-08-07 12:42:29 -07:00
parent 6a606a8c9a
commit 12e78455d4
2 changed files with 49 additions and 39 deletions

View File

@ -59,85 +59,92 @@ using Microsoft.Dnx.Runtime;
public override async Task ExecuteAsync()
{
WriteLiteral("\r\n");
WriteLiteral("<!DOCTYPE html>\r\n<html");
WriteAttribute("lang", Tuple.Create(" lang=\"", 372), Tuple.Create("\"", 433),
Tuple.Create(Tuple.Create("", 379), Tuple.Create<System.Object, System.Int32>(CultureInfo.CurrentUICulture.TwoLetterISOLanguageName, 379), false));
#line 17 "RuntimeInfoPage.cshtml"
Response.ContentType = "text/html; charset=utf-8";
#line default
#line hidden
WriteLiteral("\r\n<!DOCTYPE html>\r\n<html");
WriteAttribute("lang", Tuple.Create(" lang=\"", 429), Tuple.Create("\"", 490),
Tuple.Create(Tuple.Create("", 436), Tuple.Create<System.Object, System.Int32>(CultureInfo.CurrentUICulture.TwoLetterISOLanguageName, 436), false));
WriteLiteral(" xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n <meta charset=\"utf-8\" />\r\n " +
" <title>");
#line 21 "RuntimeInfoPage.cshtml"
#line 24 "RuntimeInfoPage.cshtml"
Write(Resources.RuntimeInfoPage_Title);
#line default
#line hidden
WriteLiteral("</title>\r\n <style>\r\n body {\r\n font-family: 'Segoe UI', Tahoma, Arial, Helvetica, sans-serif;\r\n font-size: .813em;\r\n line-height: 1.4em;\r\n color: #222;\r\n}\r\n\r\nh1, h2, h3, h4, h5, th {\r\n font-weight: 100;\r\n}\r\n\r\nh1 {\r\n color: #44525e;\r\n margin: 15px 0 15px 0;\r\n}\r\n\r\nh2 {\r\n margin: 10px 5px 0 0;\r\n}\r\n\r\ntable .even{\r\n background-color: #f0f0f0;\r\n}\r\n\r\nth {\r\n font-size: 16px;\r\n}\r\n\r\n\r\n\r\n </style>\r" +
"\n</head>\r\n<body>\r\n <h2>");
#line 27 "RuntimeInfoPage.cshtml"
#line 30 "RuntimeInfoPage.cshtml"
Write(Resources.RuntimeInfoPage_Environment);
#line default
#line hidden
WriteLiteral("</h2>\r\n <p>");
#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("</p>\r\n \r\n <p>");
#line 30 "RuntimeInfoPage.cshtml"
WriteLiteral("</p>\r\n\r\n <p>");
#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("</p>\r\n\r\n <p>");
#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("</p>\r\n\r\n <p>");
#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("</p>\r\n \r\n <h2>");
#line 36 "RuntimeInfoPage.cshtml"
WriteLiteral("</p>\r\n\r\n <h2>");
#line 39 "RuntimeInfoPage.cshtml"
Write(Resources.RuntimeInfoPage_Packages);
#line default
#line hidden
WriteLiteral("</h2>\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(" <h2>");
#line 39 "RuntimeInfoPage.cshtml"
#line 42 "RuntimeInfoPage.cshtml"
Write(Resources.RuntimeInfoPage_PackagesFail);
#line default
#line hidden
WriteLiteral("</h2>\r\n");
#line 40 "RuntimeInfoPage.cshtml"
#line 43 "RuntimeInfoPage.cshtml"
}
else
{
@ -161,44 +168,44 @@ using Microsoft.Dnx.Runtime;
WriteLiteral(" <table>\r\n <thead>\r\n <tr>\r\n <" +
"th>");
#line 46 "RuntimeInfoPage.cshtml"
#line 49 "RuntimeInfoPage.cshtml"
Write(Resources.RuntimeInfoPage_PackageNameColumnName);
#line default
#line hidden
WriteLiteral("</th>\r\n <th>");
#line 47 "RuntimeInfoPage.cshtml"
#line 50 "RuntimeInfoPage.cshtml"
Write(Resources.RuntimeInfoPage_PackageVersionColumnName);
#line default
#line hidden
WriteLiteral("</th>\r\n <th>");
#line 48 "RuntimeInfoPage.cshtml"
#line 51 "RuntimeInfoPage.cshtml"
Write(Resources.RuntimeInfoPage_PackagePathColumnName);
#line default
#line hidden
WriteLiteral("</th>\r\n </tr>\r\n </thead>\r\n <tbody>\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(" <tr");
WriteAttribute("class", Tuple.Create(" class=\"", 2160), Tuple.Create("\"", 2188),
Tuple.Create(Tuple.Create("", 2168), Tuple.Create<System.Object, System.Int32>(even?"even":"odd", 2168), false));
WriteAttribute("class", Tuple.Create(" class=\"", 2209), Tuple.Create("\"", 2237),
Tuple.Create(Tuple.Create("", 2217), Tuple.Create<System.Object, System.Int32>(even?"even":"odd", 2217), false));
WriteLiteral(">\r\n <td>");
#line 56 "RuntimeInfoPage.cshtml"
#line 59 "RuntimeInfoPage.cshtml"
Write(package.Name);
#line default
#line hidden
WriteLiteral("</td>\r\n <td>");
#line 57 "RuntimeInfoPage.cshtml"
#line 60 "RuntimeInfoPage.cshtml"
Write(package.Version);
#line default
#line hidden
WriteLiteral("</td>\r\n <td>");
#line 58 "RuntimeInfoPage.cshtml"
#line 61 "RuntimeInfoPage.cshtml"
Write(package.Path);
#line default
#line hidden
WriteLiteral("</td>\r\n </tr>\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(" </tbody>\r\n </table>\r\n");
#line 64 "RuntimeInfoPage.cshtml"
#line 67 "RuntimeInfoPage.cshtml"
}
#line default

View File

@ -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";
}
<!DOCTYPE html>
<html lang="@CultureInfo.CurrentUICulture.TwoLetterISOLanguageName" xmlns="http://www.w3.org/1999/xhtml">
<head>
@ -26,13 +29,13 @@
<body>
<h2>@Resources.RuntimeInfoPage_Environment</h2>
<p>@Resources.RuntimeInfoPage_OperatingSystem @(string.IsNullOrWhiteSpace(Model.OperatingSystem) ? Resources.RuntimeInfoPage_OperatingSystemFail : Model.OperatingSystem)</p>
<p>@Resources.RuntimeInfoPage_RuntimeVersion @(string.IsNullOrWhiteSpace(Model.Version) ? Resources.RuntimeInfoPage_RuntimeVersionFail : Model.Version)</p>
<p>@Resources.RuntimeInfoPage_RuntimeArchitecture @(string.IsNullOrWhiteSpace(Model.RuntimeArchitecture) ? Resources.RuntimeInfoPage_RuntimeArchitectureFail : Model.RuntimeArchitecture)</p>
<p>@Resources.RuntimeInfoPage_RuntimeType @(string.IsNullOrWhiteSpace(Model.RuntimeType) ? Resources.RuntimeInfoPage_RuntimeTypeFail : Model.RuntimeType)</p>
<h2>@Resources.RuntimeInfoPage_Packages</h2>
@if (@Resources.RuntimeInfoPage_Packages == null)
{