Show some statistics in pie charts.

This commit is contained in:
2018-12-28 02:26:33 +00:00
parent 0acb82b808
commit 1a044dd798
4 changed files with 359 additions and 3 deletions

View File

@@ -43,6 +43,8 @@ using System.Xml.Serialization;
using DiscImageChef.CommonTypes.Interop; using DiscImageChef.CommonTypes.Interop;
using DiscImageChef.CommonTypes.Metadata; using DiscImageChef.CommonTypes.Metadata;
using DiscImageChef.Server.Models; using DiscImageChef.Server.Models;
using Highsoft.Web.Mvc.Charts;
using Filter = DiscImageChef.Server.Models.Filter;
using OperatingSystem = DiscImageChef.Server.Models.OperatingSystem; using OperatingSystem = DiscImageChef.Server.Models.OperatingSystem;
using PlatformID = DiscImageChef.CommonTypes.Interop.PlatformID; using PlatformID = DiscImageChef.CommonTypes.Interop.PlatformID;
using Version = DiscImageChef.Server.Models.Version; using Version = DiscImageChef.Server.Models.Version;
@@ -105,6 +107,71 @@ namespace DiscImageChef.Server.Controllers
}); });
ViewBag.repOperatingSystems = operatingSystems.OrderBy(os => os.name).ToList(); ViewBag.repOperatingSystems = operatingSystems.OrderBy(os => os.name).ToList();
List<PieSeriesData> osPieData = new List<PieSeriesData>();
decimal totalOsCount = ctx.OperatingSystems.Sum(o => o.Count);
foreach(string os in ctx.OperatingSystems.Select(o => o.Name).Distinct().ToList())
{
decimal osCount = ctx.OperatingSystems.Where(o => o.Name == os).Sum(o => o.Count);
osPieData.Add(new PieSeriesData
{
Name =
DetectOS.GetPlatformName((PlatformID)Enum.Parse(typeof(PlatformID),
os)),
Y = (double?)(osCount / totalOsCount),
Sliced = os == "Linux",
Selected = os == "Linux"
});
}
ViewData["osPieData"] = osPieData;
List<PieSeriesData> linuxPieData = new List<PieSeriesData>();
decimal linuxCount = ctx.OperatingSystems.Where(o => o.Name == PlatformID.Linux.ToString())
.Sum(o => o.Count);
foreach(OperatingSystem version in
ctx.OperatingSystems.Where(o => o.Name == PlatformID.Linux.ToString()))
linuxPieData.Add(new PieSeriesData
{
Name =
$"{DetectOS.GetPlatformName(PlatformID.Linux, version.Version)}{(string.IsNullOrEmpty(version.Version) ? "" : " ")}{version.Version}",
Y = (double?)(version.Count / linuxCount)
});
ViewData["linuxPieData"] = linuxPieData;
List<PieSeriesData> macosPieData = new List<PieSeriesData>();
decimal macosCount = ctx.OperatingSystems.Where(o => o.Name == PlatformID.MacOSX.ToString())
.Sum(o => o.Count);
foreach(OperatingSystem version in
ctx.OperatingSystems.Where(o => o.Name == PlatformID.MacOSX.ToString()))
macosPieData.Add(new PieSeriesData
{
Name =
$"{DetectOS.GetPlatformName(PlatformID.MacOSX, version.Version)}{(string.IsNullOrEmpty(version.Version) ? "" : " ")}{version.Version}",
Y = (double?)(version.Count / macosCount)
});
ViewData["macosPieData"] = macosPieData;
List<PieSeriesData> windowsPieData = new List<PieSeriesData>();
decimal windowsCount = ctx.OperatingSystems.Where(o => o.Name == PlatformID.Win32NT.ToString())
.Sum(o => o.Count);
foreach(OperatingSystem version in
ctx.OperatingSystems.Where(o => o.Name == PlatformID.Win32NT.ToString()))
windowsPieData.Add(new PieSeriesData
{
Name =
$"{DetectOS.GetPlatformName(PlatformID.Win32NT, version.Version)}{(string.IsNullOrEmpty(version.Version) ? "" : " ")}{version.Version}",
Y = (double?)(version.Count / windowsCount)
});
ViewData["windowsPieData"] = windowsPieData;
} }
if(ctx.Versions.Any()) if(ctx.Versions.Any())
@@ -118,6 +185,20 @@ namespace DiscImageChef.Server.Controllers
}); });
ViewBag.repVersions = versions.OrderBy(ver => ver.name).ToList(); ViewBag.repVersions = versions.OrderBy(ver => ver.name).ToList();
decimal totalVersionCount = ctx.Versions.Sum(o => o.Count);
ViewData["versionsPieData"] = ctx.Versions.Select(version => new PieSeriesData
{
Name =
version.Value == "previous"
? "Previous than 3.4.99.0"
: version.Value,
Y = (double?)(version.Count /
totalVersionCount),
Sliced = version.Value == "previous",
Selected = version.Value == "previous"
}).ToList();
} }
if(ctx.Commands.Any()) if(ctx.Commands.Any())
@@ -157,18 +238,134 @@ namespace DiscImageChef.Server.Controllers
ctx.Commands.FirstOrDefault(c => c.Name == "convert-image")?.Count.ToString() ?? "0"; ctx.Commands.FirstOrDefault(c => c.Name == "convert-image")?.Count.ToString() ?? "0";
ViewBag.lblImageInfo = ctx.Commands.FirstOrDefault(c => c.Name == "image-info")?.Count.ToString() ?? ViewBag.lblImageInfo = ctx.Commands.FirstOrDefault(c => c.Name == "image-info")?.Count.ToString() ??
"0"; "0";
decimal totalCommandCount = ctx.Commands.Sum(o => o.Count);
ViewData["commandsPieData"] = ctx
.Commands.Select(command => new PieSeriesData
{
Name = command.Name,
Y = (double?)(command.Count /
totalCommandCount),
Sliced = command.Name == "analyze",
Selected = command.Name == "analyze"
}).ToList();
} }
if(ctx.Filters.Any()) ViewBag.repFilters = ctx.Filters.OrderBy(filter => filter.Name).ToList(); if(ctx.Filters.Any())
{
ViewBag.repFilters = ctx.Filters.OrderBy(filter => filter.Name).ToList();
List<PieSeriesData> filtersPieData = new List<PieSeriesData>();
decimal totalFiltersCount = ctx.Filters.Sum(o => o.Count);
foreach(Filter filter in ctx.Filters.ToList())
filtersPieData.Add(new PieSeriesData
{
Name = filter.Name,
Y = (double?)(filter.Count / totalFiltersCount),
Sliced = filter.Name == "No filter",
Selected = filter.Name == "No filter"
});
ViewData["filtersPieData"] = filtersPieData;
}
if(ctx.MediaFormats.Any()) if(ctx.MediaFormats.Any())
{
ViewBag.repMediaImages = ctx.MediaFormats.OrderBy(filter => filter.Name).ToList(); ViewBag.repMediaImages = ctx.MediaFormats.OrderBy(filter => filter.Name).ToList();
if(ctx.Partitions.Any()) ViewBag.repPartitions = ctx.Partitions.OrderBy(filter => filter.Name).ToList(); List<PieSeriesData> formatsPieData = new List<PieSeriesData>();
decimal totalFormatsCount = ctx.MediaFormats.Sum(o => o.Count);
decimal top10FormatCount = 0;
foreach(MediaFormat format in ctx.MediaFormats.OrderByDescending(o => o.Count).Take(10))
{
top10FormatCount += format.Count;
formatsPieData.Add(new PieSeriesData
{
Name = format.Name, Y = (double?)(format.Count / totalFormatsCount)
});
}
formatsPieData.Add(new PieSeriesData
{
Name = "Other",
Y = (double?)((totalFormatsCount - top10FormatCount) /
totalFormatsCount),
Sliced = true,
Selected = true
});
ViewData["formatsPieData"] = formatsPieData;
}
if(ctx.Partitions.Any())
{
ViewBag.repPartitions = ctx.Partitions.OrderBy(filter => filter.Name).ToList();
List<PieSeriesData> partitionsPieData = new List<PieSeriesData>();
decimal totalPartitionsCount = ctx.Partitions.Sum(o => o.Count);
decimal top10PartitionCount = 0;
foreach(Partition partition in ctx.Partitions.OrderByDescending(o => o.Count).Take(10))
{
top10PartitionCount += partition.Count;
partitionsPieData.Add(new PieSeriesData
{
Name = partition.Name,
Y = (double?)(partition.Count / totalPartitionsCount)
});
}
partitionsPieData.Add(new PieSeriesData
{
Name = "Other",
Y = (double?)((totalPartitionsCount - top10PartitionCount) /
totalPartitionsCount),
Sliced = true,
Selected = true
});
ViewData["partitionsPieData"] = partitionsPieData;
}
if(ctx.Filesystems.Any()) if(ctx.Filesystems.Any())
{
ViewBag.repFilesystems = ctx.Filesystems.OrderBy(filter => filter.Name).ToList(); ViewBag.repFilesystems = ctx.Filesystems.OrderBy(filter => filter.Name).ToList();
List<PieSeriesData> filesystemsPieData = new List<PieSeriesData>();
decimal totalFilesystemsCount = ctx.Filesystems.Sum(o => o.Count);
decimal top10FilesystemCount = 0;
foreach(Filesystem filesystem in ctx.Filesystems.OrderByDescending(o => o.Count).Take(10))
{
top10FilesystemCount += filesystem.Count;
filesystemsPieData.Add(new PieSeriesData
{
Name = filesystem.Name,
Y = (double?)(filesystem.Count / totalFilesystemsCount)
});
}
filesystemsPieData.Add(new PieSeriesData
{
Name = "Other",
Y = (double?)((totalFilesystemsCount - top10FilesystemCount) /
totalFilesystemsCount),
Sliced = true,
Selected = true
});
ViewData["filesystemsPieData"] = filesystemsPieData;
}
if(ctx.Medias.Any()) if(ctx.Medias.Any())
{ {
realMedia = new List<MediaItem>(); realMedia = new List<MediaItem>();
@@ -192,12 +389,73 @@ namespace DiscImageChef.Server.Controllers
} }
if(realMedia.Count > 0) if(realMedia.Count > 0)
{
ViewBag.repRealMedia = ViewBag.repRealMedia =
realMedia.OrderBy(media => media.Type).ThenBy(media => media.SubType).ToList(); realMedia.OrderBy(media => media.Type).ThenBy(media => media.SubType).ToList();
List<PieSeriesData> realMediaPieData = new List<PieSeriesData>();
decimal totalRealMediaCount = realMedia.Sum(o => o.Count);
decimal top10RealMediaCount = 0;
foreach(MediaItem realMediaItem in realMedia.OrderByDescending(o => o.Count).Take(10))
{
top10RealMediaCount += realMediaItem.Count;
realMediaPieData.Add(new PieSeriesData
{
Name = $"{realMediaItem.Type} ({realMediaItem.SubType})",
Y = (double?)(realMediaItem.Count / totalRealMediaCount)
});
}
realMediaPieData.Add(new PieSeriesData
{
Name = "Other",
Y = (double?)((totalRealMediaCount - top10RealMediaCount) /
totalRealMediaCount),
Sliced = true,
Selected = true
});
ViewData["realMediaPieData"] = realMediaPieData;
}
if(virtualMedia.Count > 0) if(virtualMedia.Count > 0)
{
ViewBag.repVirtualMedia = ViewBag.repVirtualMedia =
virtualMedia.OrderBy(media => media.Type).ThenBy(media => media.SubType).ToList(); virtualMedia.OrderBy(media => media.Type).ThenBy(media => media.SubType).ToList();
List<PieSeriesData> virtualMediaPieData = new List<PieSeriesData>();
decimal totalVirtualMediaCount = virtualMedia.Sum(o => o.Count);
decimal top10VirtualMediaCount = 0;
foreach(MediaItem virtualMediaItem in virtualMedia.OrderByDescending(o => o.Count).Take(10))
{
top10VirtualMediaCount += virtualMediaItem.Count;
virtualMediaPieData.Add(new PieSeriesData
{
Name =
$"{virtualMediaItem.Type} ({virtualMediaItem.SubType})",
Y = (double?)(virtualMediaItem.Count /
totalVirtualMediaCount)
});
}
virtualMediaPieData.Add(new PieSeriesData
{
Name = "Other",
Y = (double?)
((totalVirtualMediaCount - top10VirtualMediaCount) /
totalVirtualMediaCount),
Sliced = true,
Selected = true
});
ViewData["virtualMediaPieData"] = virtualMediaPieData;
}
} }
if(ctx.DeviceStats.Any()) if(ctx.DeviceStats.Any())
@@ -255,6 +513,22 @@ namespace DiscImageChef.Server.Controllers
ViewBag.repDevices = devices.OrderBy(device => device.Manufacturer).ThenBy(device => device.Model) ViewBag.repDevices = devices.OrderBy(device => device.Manufacturer).ThenBy(device => device.Model)
.ThenBy(device => device.Revision).ThenBy(device => device.Bus) .ThenBy(device => device.Revision).ThenBy(device => device.Bus)
.ToList(); .ToList();
ViewData["devicesBusPieData"] = (from deviceBus in devices.Select(d => d.Bus).Distinct()
let deviceBusCount = devices.Count(d => d.Bus == deviceBus)
select new PieSeriesData
{
Name = deviceBus,
Y = deviceBusCount / (double)devices.Count
}).ToList();
ViewData["devicesManufacturerPieData"] =
(from manufacturer in
devices.Where(d => d.Manufacturer != null).Select(d => d.Manufacturer.ToLowerInvariant())
.Distinct()
let manufacturerCount = devices.Count(d => d.Manufacturer?.ToLowerInvariant() == manufacturer)
select new PieSeriesData {Name = manufacturer, Y = manufacturerCount / (double)devices.Count})
.ToList();
} }
} }
catch(Exception) catch(Exception)

View File

@@ -73,6 +73,10 @@
<HintPath>..\packages\Google.Protobuf.3.5.1\lib\net45\Google.Protobuf.dll</HintPath> <HintPath>..\packages\Google.Protobuf.3.5.1\lib\net45\Google.Protobuf.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Highcharts.Web.Mvc, Version=6.2.0.0, Culture=neutral, PublicKeyToken=90b74bd27a557bd3">
<HintPath>..\packages\Highsoft.Highcharts.6.2.0.67\lib\net40\Highcharts.Web.Mvc.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Markdig, Version=0.15.5.0, Culture=neutral, PublicKeyToken=null"> <Reference Include="Markdig, Version=0.15.5.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\packages\Markdig.0.15.5\lib\net40\Markdig.dll</HintPath> <HintPath>..\packages\Markdig.0.15.5\lib\net40\Markdig.dll</HintPath>
<Private>True</Private> <Private>True</Private>

View File

@@ -1,5 +1,7 @@
@using DiscImageChef.CommonTypes.Metadata @using DiscImageChef.CommonTypes.Metadata
@using DiscImageChef.Server.Models @using DiscImageChef.Server.Models
@using Highsoft.Web.Mvc.Charts
@using Chart = Highsoft.Web.Mvc.Charts.Chart
@using Filter = DiscImageChef.Server.Models.Filter @using Filter = DiscImageChef.Server.Models.Filter
@{ @{
ViewBag.Title = "DiscImageChef Statistics"; ViewBag.Title = "DiscImageChef Statistics";
@@ -28,6 +30,8 @@
gtag('config', 'UA-111466173-1'); gtag('config', 'UA-111466173-1');
</script> </script>
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
</head> </head>
<body> <body>
<h1 align="center"> <h1 align="center">
@@ -41,9 +45,22 @@
</h1> </h1>
<br /> <br />
<div> <div>
@if(ViewBag.repOperatingSystems != null) @if(ViewBag.repOperatingSystems != null)
{ {
<div id="divOperatingSystems"> <div id="divOperatingSystems">
<div id="osChart"
style="background-color: transparent; width: 25%">
</div>
<div id="linuxChart"
style="background-color: transparent; width: 25%">
</div>
<div id="macosChart"
style="background-color: transparent; width: 25%">
</div>
<div id="windowsChart"
style="background-color: transparent; width: 25%">
</div>
<table> <table>
@foreach(NameValueStats os in ViewBag.repOperatingSystems) @foreach(NameValueStats os in ViewBag.repOperatingSystems)
{ {
@@ -60,6 +77,9 @@
@if(ViewBag.repVersions != null) @if(ViewBag.repVersions != null)
{ {
<div id="divVersions"> <div id="divVersions">
<div id="versionsChart"
style="background-color: transparent; width: 25%">
</div>
<table> <table>
@foreach(NameValueStats version in ViewBag.repVersions) @foreach(NameValueStats version in ViewBag.repVersions)
{ {
@@ -74,6 +94,10 @@
</div> </div>
} }
<div id="divCommands"> <div id="divCommands">
<div id="commandsChart"
style="background-color: transparent; width: 25%">
</div>
<h4>Commands run:</h4> <h4>Commands run:</h4>
<p> <p>
<i>analyze</i> command has been run @ViewBag.lblAnalyze times<br /> <i>analyze</i> command has been run @ViewBag.lblAnalyze times<br />
@@ -102,6 +126,9 @@
@if(ViewBag.repFilters != null) @if(ViewBag.repFilters != null)
{ {
<div id="divFilters"> <div id="divFilters">
<div id="filtersChart"
style="background-color: transparent; width: 25%">
</div>
<h3>Filters found:</h3> <h3>Filters found:</h3>
<table align="center" <table align="center"
border="1"> border="1">
@@ -126,6 +153,9 @@
@if(ViewBag.repMediaImages != null) @if(ViewBag.repMediaImages != null)
{ {
<div id="divMediaImages"> <div id="divMediaImages">
<div id="formatsChart"
style="background-color: transparent; width: 25%">
</div>
<h3>Media image formats found:</h3> <h3>Media image formats found:</h3>
<table align="center" <table align="center"
border="1"> border="1">
@@ -150,6 +180,9 @@
@if(ViewBag.repPartitions != null) @if(ViewBag.repPartitions != null)
{ {
<div id="divPartitions"> <div id="divPartitions">
<div id="partitionsChart"
style="background-color: transparent; width: 25%">
</div>
<h3>Partition schemes found:</h3> <h3>Partition schemes found:</h3>
<table align="center" <table align="center"
border="1"> border="1">
@@ -174,6 +207,9 @@
@if(ViewBag.repFilesystems != null) @if(ViewBag.repFilesystems != null)
{ {
<div id="divFilesystems"> <div id="divFilesystems">
<div id="filesystemsChart"
style="background-color: transparent; width: 25%">
</div>
<h3>Filesystems found:</h3> <h3>Filesystems found:</h3>
<table align="center" <table align="center"
border="1"> border="1">
@@ -198,6 +234,9 @@
@if(ViewBag.repVirtualMedia != null) @if(ViewBag.repVirtualMedia != null)
{ {
<div id="divVirtualMedia"> <div id="divVirtualMedia">
<div id="virtualMediaChart"
style="background-color: transparent; width: 25%">
</div>
<h3>Media types found in images:</h3> <h3>Media types found in images:</h3>
<table align="center" <table align="center"
border="1"> border="1">
@@ -226,6 +265,9 @@
@if(ViewBag.repRealMedia != null) @if(ViewBag.repRealMedia != null)
{ {
<div id="divRealMedia"> <div id="divRealMedia">
<div id="realMediaChart"
style="background-color: transparent; width: 25%">
</div>
<h3>Media types found in devices:</h3> <h3>Media types found in devices:</h3>
<table align="center" <table align="center"
border="1"> border="1">
@@ -254,6 +296,12 @@
@if(ViewBag.repDevices != null) @if(ViewBag.repDevices != null)
{ {
<div id="divDevices"> <div id="divDevices">
<div id="devicesBusChart"
style="background-color: transparent; width: 25%">
</div>
<div id="devicesManufacturerChart"
style="background-color: transparent; width: 25%">
</div>
<h3>Found devices:</h3> <h3>Found devices:</h3>
<table align="center" <table align="center"
border="1"> border="1">
@@ -312,4 +360,33 @@
</a> </a>
</footer> </footer>
</body> </body>
</html> </html>
@(Html.Highsoft().GetHighcharts(new Highcharts {Chart = new Chart {PlotBackgroundColor = null, PlotBorderWidth = null, PlotShadow = new Shadow {Enabled = true}}, Title = new Title {Text = "Operating system usage"}, Tooltip = new Tooltip {PointFormat = "{series.name}: <b>{point.percentage:.1f}%</b>"}, PlotOptions = new PlotOptions {Pie = new PlotOptionsPie {AllowPointSelect = true, Cursor = PlotOptionsPieCursor.Pointer, DataLabels = new PlotOptionsPieDataLabels {Enabled = true, Format = "<b>{point.name}</b>: {point.percentage:.1f} %"}}}, Series = new List<Series> {new PieSeries {Name = "Percentage:", Data = ViewData["osPieData"] as List<PieSeriesData>}}}, "osChart", false))
@(Html.Highsoft().GetHighcharts(new Highcharts {Chart = new Chart {PlotBackgroundColor = null, PlotBorderWidth = null, PlotShadow = new Shadow {Enabled = true}}, Title = new Title {Text = "Linux versions"}, Tooltip = new Tooltip {PointFormat = "{series.name}: <b>{point.percentage:.1f}%</b>"}, PlotOptions = new PlotOptions {Pie = new PlotOptionsPie {AllowPointSelect = true, Cursor = PlotOptionsPieCursor.Pointer, DataLabels = new PlotOptionsPieDataLabels {Enabled = true, Format = "<b>{point.name}</b>: {point.percentage:.1f} %"}}}, Series = new List<Series> {new PieSeries {Name = "Percentage:", Data = ViewData["linuxPieData"] as List<PieSeriesData>}}}, "linuxChart", false))
@(Html.Highsoft().GetHighcharts(new Highcharts {Chart = new Chart {PlotBackgroundColor = null, PlotBorderWidth = null, PlotShadow = new Shadow {Enabled = true}}, Title = new Title {Text = "macOS versions"}, Tooltip = new Tooltip {PointFormat = "{series.name}: <b>{point.percentage:.1f}%</b>"}, PlotOptions = new PlotOptions {Pie = new PlotOptionsPie {AllowPointSelect = true, Cursor = PlotOptionsPieCursor.Pointer, DataLabels = new PlotOptionsPieDataLabels {Enabled = true, Format = "<b>{point.name}</b>: {point.percentage:.1f} %"}}}, Series = new List<Series> {new PieSeries {Name = "Percentage:", Data = ViewData["macosPieData"] as List<PieSeriesData>}}}, "macosChart", false))
@(Html.Highsoft().GetHighcharts(new Highcharts {Chart = new Chart {PlotBackgroundColor = null, PlotBorderWidth = null, PlotShadow = new Shadow {Enabled = true}}, Title = new Title {Text = "Windows versions"}, Tooltip = new Tooltip {PointFormat = "{series.name}: <b>{point.percentage:.1f}%</b>"}, PlotOptions = new PlotOptions {Pie = new PlotOptionsPie {AllowPointSelect = true, Cursor = PlotOptionsPieCursor.Pointer, DataLabels = new PlotOptionsPieDataLabels {Enabled = true, Format = "<b>{point.name}</b>: {point.percentage:.1f} %"}}}, Series = new List<Series> {new PieSeries {Name = "Percentage:", Data = ViewData["windowsPieData"] as List<PieSeriesData>}}}, "windowsChart", false))
@(Html.Highsoft().GetHighcharts(new Highcharts {Chart = new Chart {PlotBackgroundColor = null, PlotBorderWidth = null, PlotShadow = new Shadow {Enabled = true}}, Title = new Title {Text = "DiscImageChef versions"}, Tooltip = new Tooltip {PointFormat = "{series.name}: <b>{point.percentage:.1f}%</b>"}, PlotOptions = new PlotOptions {Pie = new PlotOptionsPie {AllowPointSelect = true, Cursor = PlotOptionsPieCursor.Pointer, DataLabels = new PlotOptionsPieDataLabels {Enabled = true, Format = "<b>{point.name}</b>: {point.percentage:.1f} %"}}}, Series = new List<Series> {new PieSeries {Name = "Percentage:", Data = ViewData["versionsPieData"] as List<PieSeriesData>}}}, "versionsChart", false))
@(Html.Highsoft().GetHighcharts(new Highcharts {Chart = new Chart {PlotBackgroundColor = null, PlotBorderWidth = null, PlotShadow = new Shadow {Enabled = true}}, Title = new Title {Text = "Commands run"}, Tooltip = new Tooltip {PointFormat = "{series.name}: <b>{point.percentage:.1f}%</b>"}, PlotOptions = new PlotOptions {Pie = new PlotOptionsPie {AllowPointSelect = true, Cursor = PlotOptionsPieCursor.Pointer, DataLabels = new PlotOptionsPieDataLabels {Enabled = true, Format = "<b>{point.name}</b>: {point.percentage:.1f} %"}}}, Series = new List<Series> {new PieSeries {Name = "Percentage:", Data = ViewData["commandsPieData"] as List<PieSeriesData>}}}, "commandsChart", false))
@(Html.Highsoft().GetHighcharts(new Highcharts {Chart = new Chart {PlotBackgroundColor = null, PlotBorderWidth = null, PlotShadow = new Shadow {Enabled = true}}, Title = new Title {Text = "Filters found"}, Tooltip = new Tooltip {PointFormat = "{series.name}: <b>{point.percentage:.1f}%</b>"}, PlotOptions = new PlotOptions {Pie = new PlotOptionsPie {AllowPointSelect = true, Cursor = PlotOptionsPieCursor.Pointer, DataLabels = new PlotOptionsPieDataLabels {Enabled = true, Format = "<b>{point.name}</b>: {point.percentage:.1f} %"}}}, Series = new List<Series> {new PieSeries {Name = "Percentage:", Data = ViewData["filtersPieData"] as List<PieSeriesData>}}}, "filtersChart", false))
@(Html.Highsoft().GetHighcharts(new Highcharts {Chart = new Chart {PlotBackgroundColor = null, PlotBorderWidth = null, PlotShadow = new Shadow {Enabled = true}}, Title = new Title {Text = "Top 10 media image formats found"}, Tooltip = new Tooltip {PointFormat = "{series.name}: <b>{point.percentage:.1f}%</b>"}, PlotOptions = new PlotOptions {Pie = new PlotOptionsPie {AllowPointSelect = true, Cursor = PlotOptionsPieCursor.Pointer, DataLabels = new PlotOptionsPieDataLabels {Enabled = true, Format = "<b>{point.name}</b>: {point.percentage:.1f} %"}}}, Series = new List<Series> {new PieSeries {Name = "Percentage:", Data = ViewData["formatsPieData"] as List<PieSeriesData>}}}, "formatsChart", false))
@(Html.Highsoft().GetHighcharts(new Highcharts {Chart = new Chart {PlotBackgroundColor = null, PlotBorderWidth = null, PlotShadow = new Shadow {Enabled = true}}, Title = new Title {Text = "Top 10 partitioning schemes found"}, Tooltip = new Tooltip {PointFormat = "{series.name}: <b>{point.percentage:.1f}%</b>"}, PlotOptions = new PlotOptions {Pie = new PlotOptionsPie {AllowPointSelect = true, Cursor = PlotOptionsPieCursor.Pointer, DataLabels = new PlotOptionsPieDataLabels {Enabled = true, Format = "<b>{point.name}</b>: {point.percentage:.1f} %"}}}, Series = new List<Series> {new PieSeries {Name = "Percentage:", Data = ViewData["partitionsPieData"] as List<PieSeriesData>}}}, "partitionsChart", false))
@(Html.Highsoft().GetHighcharts(new Highcharts {Chart = new Chart {PlotBackgroundColor = null, PlotBorderWidth = null, PlotShadow = new Shadow {Enabled = true}}, Title = new Title {Text = "Top 10 filesystems found"}, Tooltip = new Tooltip {PointFormat = "{series.name}: <b>{point.percentage:.1f}%</b>"}, PlotOptions = new PlotOptions {Pie = new PlotOptionsPie {AllowPointSelect = true, Cursor = PlotOptionsPieCursor.Pointer, DataLabels = new PlotOptionsPieDataLabels {Enabled = true, Format = "<b>{point.name}</b>: {point.percentage:.1f} %"}}}, Series = new List<Series> {new PieSeries {Name = "Percentage:", Data = ViewData["filesystemsPieData"] as List<PieSeriesData>}}}, "filesystemsChart", false))
@(Html.Highsoft().GetHighcharts(new Highcharts {Chart = new Chart {PlotBackgroundColor = null, PlotBorderWidth = null, PlotShadow = new Shadow {Enabled = true}}, Title = new Title {Text = "Top 10 media types found in images"}, Tooltip = new Tooltip {PointFormat = "{series.name}: <b>{point.percentage:.1f}%</b>"}, PlotOptions = new PlotOptions {Pie = new PlotOptionsPie {AllowPointSelect = true, Cursor = PlotOptionsPieCursor.Pointer, DataLabels = new PlotOptionsPieDataLabels {Enabled = true, Format = "<b>{point.name}</b>: {point.percentage:.1f} %"}}}, Series = new List<Series> {new PieSeries {Name = "Percentage:", Data = ViewData["virtualMediaPieData"] as List<PieSeriesData>}}}, "virtualMediaChart", false))
@(Html.Highsoft().GetHighcharts(new Highcharts {Chart = new Chart {PlotBackgroundColor = null, PlotBorderWidth = null, PlotShadow = new Shadow {Enabled = true}}, Title = new Title {Text = "Top 10 media types found in real devices"}, Tooltip = new Tooltip {PointFormat = "{series.name}: <b>{point.percentage:.1f}%</b>"}, PlotOptions = new PlotOptions {Pie = new PlotOptionsPie {AllowPointSelect = true, Cursor = PlotOptionsPieCursor.Pointer, DataLabels = new PlotOptionsPieDataLabels {Enabled = true, Format = "<b>{point.name}</b>: {point.percentage:.1f} %"}}}, Series = new List<Series> {new PieSeries {Name = "Percentage:", Data = ViewData["realMediaPieData"] as List<PieSeriesData>}}}, "realMediaChart", false))
@(Html.Highsoft().GetHighcharts(new Highcharts {Chart = new Chart {PlotBackgroundColor = null, PlotBorderWidth = null, PlotShadow = new Shadow {Enabled = true}}, Title = new Title {Text = "Devices found by bus"}, Tooltip = new Tooltip {PointFormat = "{series.name}: <b>{point.percentage:.1f}%</b>"}, PlotOptions = new PlotOptions {Pie = new PlotOptionsPie {AllowPointSelect = true, Cursor = PlotOptionsPieCursor.Pointer, DataLabels = new PlotOptionsPieDataLabels {Enabled = true, Format = "<b>{point.name}</b>: {point.percentage:.1f} %"}}}, Series = new List<Series> {new PieSeries {Name = "Percentage:", Data = ViewData["devicesBusPieData"] as List<PieSeriesData>}}}, "devicesBusChart", false))
@(Html.Highsoft().GetHighcharts(new Highcharts {Chart = new Chart {PlotBackgroundColor = null, PlotBorderWidth = null, PlotShadow = new Shadow {Enabled = true}}, Title = new Title {Text = "Devices found by bus"}, Tooltip = new Tooltip {PointFormat = "{series.name}: <b>{point.percentage:.1f}%</b>"}, PlotOptions = new PlotOptions {Pie = new PlotOptionsPie {AllowPointSelect = true, Cursor = PlotOptionsPieCursor.Pointer, DataLabels = new PlotOptionsPieDataLabels {Enabled = true, Format = "<b>{point.name}</b>: {point.percentage:.1f} %"}}}, Series = new List<Series> {new PieSeries {Name = "Percentage:", Data = ViewData["devicesManufacturerPieData"] as List<PieSeriesData>}}}, "devicesManufacturerChart", false))

View File

@@ -3,6 +3,7 @@
<package id="Antlr" version="3.5.0.2" targetFramework="net461" /> <package id="Antlr" version="3.5.0.2" targetFramework="net461" />
<package id="EntityFramework" version="6.2.0" targetFramework="net461" /> <package id="EntityFramework" version="6.2.0" targetFramework="net461" />
<package id="Google.Protobuf" version="3.5.1" targetFramework="net461" /> <package id="Google.Protobuf" version="3.5.1" targetFramework="net461" />
<package id="Highsoft.Highcharts" version="6.2.0.67" targetFramework="net461" />
<package id="Markdig" version="0.15.5" targetFramework="net461" /> <package id="Markdig" version="0.15.5" targetFramework="net461" />
<package id="Microsoft.AspNet.Mvc" version="5.2.4" targetFramework="net461" /> <package id="Microsoft.AspNet.Mvc" version="5.2.4" targetFramework="net461" />
<package id="Microsoft.AspNet.Razor" version="3.2.4" targetFramework="net461" /> <package id="Microsoft.AspNet.Razor" version="3.2.4" targetFramework="net461" />