aspnetcore/src/Microsoft.AspNet.Diagnostics/RuntimeInfo/Views/RuntimeInfoPage.cshtml

70 lines
2.4 KiB
Plaintext

@using System
@using System.Globalization
@using System.Linq
@using Microsoft.AspNet.Diagnostics
@using Microsoft.AspNet.Diagnostics.Views
@using Microsoft.Extensions.PlatformAbstractions;
@functions
{
public RuntimeInfoPage(RuntimeInfoPageModel model)
{
Model = model;
}
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>
<meta charset="utf-8" />
<title>@Resources.RuntimeInfoPage_Title</title>
<style>
<%$ include: RuntimeInfoPage.css %>
</style>
</head>
<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)
{
<h2>@Resources.RuntimeInfoPage_PackagesFail</h2>
}
else
{
<table>
<thead>
<tr>
<th>@Resources.RuntimeInfoPage_PackageNameColumnName</th>
<th>@Resources.RuntimeInfoPage_PackageVersionColumnName</th>
<th>@Resources.RuntimeInfoPage_PackagePathColumnName</th>
</tr>
</thead>
<tbody>
@{ bool even = false; }
@foreach (var package in Model.References.OrderBy(package => package.Name.ToLowerInvariant()))
{
<tr class="@(even?"even":"odd")">
<td>@package.Name</td>
<td>@package.Version</td>
<td>@package.Path</td>
</tr>
@{ even = !even; }
}
</tbody>
</table>
}
</body>
</html>