Show decoded MODE SENSE 2Ah in mmc details.

This commit is contained in:
2019-11-13 00:46:10 +00:00
parent dbf9b5bc55
commit 8be757ae7a
2 changed files with 9 additions and 9 deletions

View File

@@ -1,3 +1,5 @@
@using DiscImageChef.Decoders.SCSI
@using DiscImageChef.Server.Core
@model DiscImageChef.CommonTypes.Metadata.Mmc
@{
@@ -34,16 +36,9 @@
// ****************************************************************************/
}
<div>
<h4>Mmc</h4>
<h4>MMC FEATURES - ID = @Model.Id</h4>
<hr />
<dl class="row">
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.ModeSense2AData)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.ModeSense2AData)
</dd>
</dl>
@Html.Raw(Html.EncodedMultiLineText(Modes.PrettifyModePage_2A(Model.ModeSense2AData)))
</div>
<div>
<a asp-action="Index" class="btn btn-secondary">Back to List</a>

View File

@@ -1,4 +1,5 @@
using System.Text.RegularExpressions;
using DiscImageChef.CommonTypes.Metadata;
using Microsoft.AspNetCore.Mvc.Rendering;
namespace DiscImageChef.Server.Core
@@ -8,5 +9,9 @@ namespace DiscImageChef.Server.Core
public static string EncodedMultiLineText(this IHtmlHelper<CommonTypes.Metadata.Ata> helper, string text) =>
string.IsNullOrEmpty(text) ? string.Empty
: Regex.Replace(helper.Encode(text), "&#xD;&#xA;|&#xA;|&#xD;", "<br/>");
public static string EncodedMultiLineText(this IHtmlHelper<Mmc> helper, string text) =>
string.IsNullOrEmpty(text) ? string.Empty
: Regex.Replace(helper.Encode(text), "&#xD;&#xA;|&#xA;|&#xD;", "<br/>");
}
}