Skip to content

Commit e3fa562

Browse files
committed
fixes #24
1 parent eb29274 commit e3fa562

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

ExtentReports/Views/Html/Dashboard.cshtml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -376,15 +376,15 @@
376376
</div>
377377
<script>
378378
var statusGroup = {
379-
ParentCount: @Model.ReportStatusStats.ParentCount,
379+
parentCount: @Model.ReportStatusStats.ParentCount,
380380
passParent: @Model.ReportStatusStats.ParentCountPass,
381381
failParent: @Model.ReportStatusStats.ParentCountFail,
382382
fatalParent: @Model.ReportStatusStats.ParentCountFatal,
383383
errorParent: @Model.ReportStatusStats.ParentCountError,
384384
warningParent: @Model.ReportStatusStats.ParentCountWarning,
385385
skipParent: @Model.ReportStatusStats.ParentCountSkip,
386386
exceptionsParent: @Model.ReportStatusStats.ParentCountExceptions,
387-
ChildCount: @Model.ReportStatusStats.ChildCount,
387+
childCount: @Model.ReportStatusStats.ChildCount,
388388
passChild: @Model.ReportStatusStats.ChildCountPass,
389389
failChild: @Model.ReportStatusStats.ChildCountFail,
390390
fatalChild: @Model.ReportStatusStats.ChildCountFatal,
@@ -394,7 +394,7 @@
394394
infoChild: @Model.ReportStatusStats.ChildCountInfo,
395395
debugChild: @Model.ReportStatusStats.ChildCountDebug,
396396
exceptionsChild: @Model.ReportStatusStats.ChildCountExceptions,
397-
GrandChildCount: @Model.ReportStatusStats.GrandChildCount,
397+
grandChildCount: @Model.ReportStatusStats.GrandChildCount,
398398
passGrandChild: @Model.ReportStatusStats.GrandChildCountPass,
399399
failGrandChild: @Model.ReportStatusStats.GrandChildCountFail,
400400
fatalGrandChild: @Model.ReportStatusStats.GrandChildCountFatal,
@@ -471,7 +471,7 @@
471471
472472
/* -- [ children chart ] -- */
473473
(function drawChildChart() {
474-
if (typeof statusGroup !== "undefined") {
474+
if (typeof statusGroup !== "undefined" && statusGroup.childCount > 0) {
475475
var config = {
476476
type: 'doughnut',
477477
data: {
@@ -496,7 +496,7 @@
496496
497497
/* -- [ grand-children chart ] -- */
498498
(function drawGrandChildChart() {
499-
if ($('#grandchild-analysis').length > 0 && typeof statusGroup !== "undefined") {
499+
if ($('#grandchild-analysis').length > 0 && typeof statusGroup !== "undefined" && statusGroup.grandChildCount > 0) {
500500
var config = {
501501
type: 'doughnut',
502502
data: {
@@ -533,9 +533,8 @@
533533
if (typeof timeline !== "undefined") {
534534
var datasets = [];
535535
for (var key in timeline) {
536-
datasets.push({ label:key, data: [ timeline[key] ], backgroundColor: getRandomColor(), borderWidth: 1 });
536+
datasets.push({ label:key, data:[timeline[key]], backgroundColor: getRandomColor(), borderWidth: 1 });
537537
}
538-
539538
var ctx = document.getElementById('timeline').getContext('2d');
540539
541540
new Chart(ctx, {

0 commit comments

Comments
 (0)