mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Show commands statistics as list.
This commit is contained in:
@@ -203,41 +203,7 @@ namespace DiscImageChef.Server.Controllers
|
|||||||
|
|
||||||
if(ctx.Commands.Any())
|
if(ctx.Commands.Any())
|
||||||
{
|
{
|
||||||
ViewBag.lblAnalyze = ctx.Commands.FirstOrDefault(c => c.Name == "analyze")?.Count.ToString() ?? "0";
|
ViewBag.repCommands = ctx.Commands.OrderBy(c => c.Name).ToList();
|
||||||
ViewBag.lblCompare = ctx.Commands.FirstOrDefault(c => c.Name == "compare")?.Count.ToString() ?? "0";
|
|
||||||
ViewBag.lblChecksum =
|
|
||||||
ctx.Commands.FirstOrDefault(c => c.Name == "checksum")?.Count.ToString() ?? "0";
|
|
||||||
ViewBag.lblEntropy = ctx.Commands.FirstOrDefault(c => c.Name == "entropy")?.Count.ToString() ?? "0";
|
|
||||||
ViewBag.lblVerify = ctx.Commands.FirstOrDefault(c => c.Name == "verify")?.Count.ToString() ?? "0";
|
|
||||||
ViewBag.lblPrintHex =
|
|
||||||
ctx.Commands.FirstOrDefault(c => c.Name == "printhex")?.Count.ToString() ?? "0";
|
|
||||||
ViewBag.lblDecode = ctx.Commands.FirstOrDefault(c => c.Name == "decode")?.Count.ToString() ?? "0";
|
|
||||||
ViewBag.lblDeviceInfo =
|
|
||||||
ctx.Commands.FirstOrDefault(c => c.Name == "device-info")?.Count.ToString() ?? "0";
|
|
||||||
ViewBag.lblMediaInfo = ctx.Commands.FirstOrDefault(c => c.Name == "media-info")?.Count.ToString() ??
|
|
||||||
"0";
|
|
||||||
ViewBag.lblMediaScan = ctx.Commands.FirstOrDefault(c => c.Name == "media-scan")?.Count.ToString() ??
|
|
||||||
"0";
|
|
||||||
ViewBag.lblFormats = ctx.Commands.FirstOrDefault(c => c.Name == "formats")?.Count.ToString() ?? "0";
|
|
||||||
ViewBag.lblBenchmark =
|
|
||||||
ctx.Commands.FirstOrDefault(c => c.Name == "benchmark")?.Count.ToString() ?? "0";
|
|
||||||
ViewBag.lblCreateSidecar =
|
|
||||||
ctx.Commands.FirstOrDefault(c => c.Name == "create-sidecar")?.Count.ToString() ?? "0";
|
|
||||||
ViewBag.lblDumpMedia = ctx.Commands.FirstOrDefault(c => c.Name == "dump-media")?.Count.ToString() ??
|
|
||||||
"0";
|
|
||||||
ViewBag.lblDeviceReport =
|
|
||||||
ctx.Commands.FirstOrDefault(c => c.Name == "device-report")?.Count.ToString() ?? "0";
|
|
||||||
ViewBag.lblLs = ctx.Commands.FirstOrDefault(c => c.Name == "ls")?.Count.ToString() ?? "0";
|
|
||||||
ViewBag.lblExtractFiles =
|
|
||||||
ctx.Commands.FirstOrDefault(c => c.Name == "extract-files")?.Count.ToString() ?? "0";
|
|
||||||
ViewBag.lblListDevices =
|
|
||||||
ctx.Commands.FirstOrDefault(c => c.Name == "list-devices")?.Count.ToString() ?? "0";
|
|
||||||
ViewBag.lblListEncodings =
|
|
||||||
ctx.Commands.FirstOrDefault(c => c.Name == "list-encodings")?.Count.ToString() ?? "0";
|
|
||||||
ViewBag.lblConvertImage =
|
|
||||||
ctx.Commands.FirstOrDefault(c => c.Name == "convert-image")?.Count.ToString() ?? "0";
|
|
||||||
ViewBag.lblImageInfo = ctx.Commands.FirstOrDefault(c => c.Name == "image-info")?.Count.ToString() ??
|
|
||||||
"0";
|
|
||||||
|
|
||||||
decimal totalCommandCount = ctx.Commands.Sum(o => o.Count);
|
decimal totalCommandCount = ctx.Commands.Sum(o => o.Count);
|
||||||
|
|
||||||
|
|||||||
@@ -186,37 +186,52 @@
|
|||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
<div class="container mt-3"
|
@if(ViewBag.repCommands != null)
|
||||||
id="divCommands">
|
{
|
||||||
<div class="container"
|
<div class="container mt-3"
|
||||||
id="commandsChart">
|
id="divCommands">
|
||||||
</div>
|
<div class="container"
|
||||||
|
id="commandsChart">
|
||||||
|
</div>
|
||||||
|
<div class="accordion mt-3"
|
||||||
|
id="commandsAccordion">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header"
|
||||||
|
id="commandsHeading">
|
||||||
|
<h2 class="mb-0">
|
||||||
|
<button aria-controls="commandsCollapse"
|
||||||
|
aria-expanded="true"
|
||||||
|
class="btn btn-link card-button collapsed"
|
||||||
|
data-target="#commandsCollapse"
|
||||||
|
data-toggle="collapse"
|
||||||
|
type="button">
|
||||||
|
All DiscImageChef commands...
|
||||||
|
</button>
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h4>Commands run:</h4>
|
<div aria-labelledby="commandsHeading"
|
||||||
<p>
|
class="collapse"
|
||||||
<i>analyze</i> command has been run @ViewBag.lblAnalyze times<br />
|
data-parent="#commandsAccordion"
|
||||||
<i>benchmark</i> command has been run @ViewBag.lblBenchmark times<br />
|
id="commandsCollapse">
|
||||||
<i>checksum</i> command has been run @ViewBag.lblChecksum times<br />
|
<div class="card-body">
|
||||||
<i>compare</i> command has been run @ViewBag.lblCompare times<br />
|
<table class="table-dark">
|
||||||
<i>convert-image</i> command has been run @ViewBag.lblConvertImage times<br />
|
@foreach(Command command in ViewBag.repCommands)
|
||||||
<i>create-sidecar</i> command has been run @ViewBag.lblCreateSidecar times<br />
|
{
|
||||||
<i>decode</i> command has been run @ViewBag.lblDecode times<br />
|
<tr>
|
||||||
<i>device-info</i> command has been run @ViewBag.lblDeviceInfo times<br />
|
<td class="text-left">
|
||||||
<i>device-report</i> command has been run @ViewBag.lblDeviceReport times<br />
|
<i class="table-dark-em">@command.Name</i> has been run @command.Count times.
|
||||||
<i>dump-media</i> command has been run @ViewBag.lblDumpMedia times<br />
|
</td>
|
||||||
<i>entropy</i> command has been run @ViewBag.lblEntropy times<br />
|
</tr>
|
||||||
<i>extract-files</i> command has been run @ViewBag.lblExtractFiles times<br />
|
}
|
||||||
<i>formats</i> command has been run @ViewBag.lblFormats times<br />
|
</table>
|
||||||
<i>image-info</i> command has been run @ViewBag.lblImageInfo times<br />
|
</div>
|
||||||
<i>list-devices</i> command has been run @ViewBag.lblListDevices times<br />
|
</div>
|
||||||
<i>list-encodings</i> command has been run @ViewBag.lblListEncodings times<br />
|
</div>
|
||||||
<i>ls</i> command has been run @ViewBag.lblLs times<br />
|
</div>
|
||||||
<i>media-info</i> command has been run @ViewBag.lblMediaInfo times<br />
|
<br />
|
||||||
<i>media-scan</i> command has been run @ViewBag.lblMediaScan times<br />
|
</div>
|
||||||
<i>printhex</i> command has been run @ViewBag.lblPrintHex times<br />
|
}
|
||||||
<i>verify</i> command has been run @ViewBag.lblVerify times
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
@if(ViewBag.repFilters != null)
|
@if(ViewBag.repFilters != null)
|
||||||
{
|
{
|
||||||
<div class="container mt-3"
|
<div class="container mt-3"
|
||||||
|
|||||||
Reference in New Issue
Block a user