Skip to content

Commit

Permalink
added not run status to usage pie charts
Browse files Browse the repository at this point in the history
  • Loading branch information
iantmoore committed Sep 29, 2016
1 parent b660123 commit f90088b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Requirements
* Step implementation method usage report (Beta)
* Replaced hand rolled recursive File listing with commons.io implementation
* Fixed Issue #24 - ExecutionResultsCollector didn't work with forked mode
* Added 3rd colour to usage report pie charts to show not run state

1.0.3
-----
Expand Down
16 changes: 13 additions & 3 deletions core/src/main/scala/org/substeps/report/UsageTreeTemplate.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ trait UsageTreeTemplate {
| stroke-width: 32;
| }
|
| circle.not-run {
| stroke: #f0ad4e;
| }
|
| svg {
| width: 22px; height: 22px;
| transform: rotate(-90deg);
Expand All @@ -35,7 +39,13 @@ trait UsageTreeTemplate {
| </style>
|
| <script id="pie-svg-template" type="text/x-handlebars-template">
| <svg viewBox="0 0 32 32" style="margin-right:4px"><title>{{pc}}%</title><circle r="16" cx="16" cy="16" stroke-dasharray="{{pc}} 100"></circle></svg>
|
|
| <svg viewBox="0 0 32 32" style="margin-right:4px">
| <title>{{passPC}}% Pass {{notRunPC}}% Not run {{failPC}}% Fail</title>
| <circle r="16" cx="16" cy="16" stroke-dasharray="{{passPC}} 100"></circle>
| <circle class="not-run" r="16" cx="16" cy="16" stroke-dashoffset="-{{passPC}}" stroke-dasharray="{{notRunPC}} 100" fill-opacity="0.0"></circle>
| </svg>
| </script>
|
|</head>
Expand Down Expand Up @@ -222,7 +232,7 @@ trait UsageTreeTemplate {
| var failPC = parseFloat($(li).attr("data-stepimpl-failpc"))
| var notRunPC = parseFloat($(li).attr("data-stepimpl-notrunpc"))
|
| var context = {pc: passPc};
| var context = {passPC: passPc, notRunPC : notRunPC, failPC : failPC};
| var html = svgTemplate(context);
|
| $(treeIconPlaceholder).html(html)
Expand All @@ -245,7 +255,7 @@ trait UsageTreeTemplate {
| var failPC = parseFloat($(li).attr("data-substepdef-failpc"))
| var notRunPC = parseFloat($(li).attr("data-substepdef-notrunpc"))
|
| var context = {pc: passPc};
| var context = {passPC: passPc, notRunPC : notRunPC, failPC : failPC};
| var html = svgTemplate(context);
|
| $(treeIconPlaceholder).html(html)
Expand Down

0 comments on commit f90088b

Please sign in to comment.