From 2eec246d252b2dea7db8079383c8560896a04373 Mon Sep 17 00:00:00 2001 From: Pascal Berger Date: Mon, 18 Jun 2018 20:27:36 +0200 Subject: [PATCH] (GH-34) Add report using DevExtreme PivotGrid --- .../GenericIssueReportGeneratorTests.cs | 1 + .../Cake.Issues.Reporting.Generic.csproj | 1 + .../GenericIssueReportTemplate.cs | 8 +- .../GenericIssueReportTemplateExtensions.cs | 3 + .../Templates/DxPivotGrid.cshtml | 146 ++++++++++++++++++ 5 files changed, 158 insertions(+), 1 deletion(-) create mode 100644 src/Cake.Issues.Reporting.Generic/Templates/DxPivotGrid.cshtml diff --git a/src/Cake.Issues.Reporting.Generic.Tests/GenericIssueReportGeneratorTests.cs b/src/Cake.Issues.Reporting.Generic.Tests/GenericIssueReportGeneratorTests.cs index c98b7d05..c46da5a3 100644 --- a/src/Cake.Issues.Reporting.Generic.Tests/GenericIssueReportGeneratorTests.cs +++ b/src/Cake.Issues.Reporting.Generic.Tests/GenericIssueReportGeneratorTests.cs @@ -43,6 +43,7 @@ public sealed class TheInternalCreateReportMethod [InlineData(GenericIssueReportTemplate.HtmlDiagnostic)] [InlineData(GenericIssueReportTemplate.HtmlDataTable)] [InlineData(GenericIssueReportTemplate.HtmlDxDataGrid)] + [InlineData(GenericIssueReportTemplate.HtmlDxPivotGrid)] public void Should_Generate_Report_From_Embedded_Template(GenericIssueReportTemplate template) { // Given diff --git a/src/Cake.Issues.Reporting.Generic/Cake.Issues.Reporting.Generic.csproj b/src/Cake.Issues.Reporting.Generic/Cake.Issues.Reporting.Generic.csproj index 1039e88c..4f481ab3 100644 --- a/src/Cake.Issues.Reporting.Generic/Cake.Issues.Reporting.Generic.csproj +++ b/src/Cake.Issues.Reporting.Generic/Cake.Issues.Reporting.Generic.csproj @@ -86,6 +86,7 @@ + diff --git a/src/Cake.Issues.Reporting.Generic/GenericIssueReportTemplate.cs b/src/Cake.Issues.Reporting.Generic/GenericIssueReportTemplate.cs index 0b74370c..ad7fc4a2 100644 --- a/src/Cake.Issues.Reporting.Generic/GenericIssueReportTemplate.cs +++ b/src/Cake.Issues.Reporting.Generic/GenericIssueReportTemplate.cs @@ -18,6 +18,12 @@ public enum GenericIssueReportTemplate /// /// Template for a HTML report containing a rich data grid with sorting, filtering, grouping and search capabilities. /// - HtmlDxDataGrid + HtmlDxDataGrid, + + /// + /// Template for a HTML report containing a pivot grid showing number of errors, warnings, suggestions and hints, + /// with a detail drill down view and an overview chart. + /// + HtmlDxPivotGrid } } diff --git a/src/Cake.Issues.Reporting.Generic/GenericIssueReportTemplateExtensions.cs b/src/Cake.Issues.Reporting.Generic/GenericIssueReportTemplateExtensions.cs index 2a52854a..759ef8b7 100644 --- a/src/Cake.Issues.Reporting.Generic/GenericIssueReportTemplateExtensions.cs +++ b/src/Cake.Issues.Reporting.Generic/GenericIssueReportTemplateExtensions.cs @@ -25,6 +25,9 @@ public static string GetTemplateResourceName(this GenericIssueReportTemplate tem case GenericIssueReportTemplate.HtmlDxDataGrid: return "DxDataGrid.cshtml"; + case GenericIssueReportTemplate.HtmlDxPivotGrid: + return "DxPivotGrid.cshtml"; + default: throw new ArgumentOutOfRangeException(nameof(template)); } diff --git a/src/Cake.Issues.Reporting.Generic/Templates/DxPivotGrid.cshtml b/src/Cake.Issues.Reporting.Generic/Templates/DxPivotGrid.cshtml new file mode 100644 index 00000000..7ad58e32 --- /dev/null +++ b/src/Cake.Issues.Reporting.Generic/Templates/DxPivotGrid.cshtml @@ -0,0 +1,146 @@ +@model IEnumerable + + + + + + + Issues Report + + @* DevExtreme dependencies *@ + + @* DevExtreme themes *@ + + + @* DevExtreme library *@ + + + +

Issues Report

+ +
+
+
+
+
+ + + + + \ No newline at end of file