5 <title>Dashboard for {{full_path}}</title>
6 <meta name="viewport" content="width=device-width, initial-scale=1.0">
7 <link href="{{path_to_root}}css/bootstrap.min.css" rel="stylesheet">
8 <link href="{{path_to_root}}css/nv.d3.min.css" rel="stylesheet">
9 <link href="{{path_to_root}}css/style.css" rel="stylesheet">
11 <script src="{{path_to_root}}js/html5shiv.min.js"></script>
12 <script src="{{path_to_root}}js/respond.min.js"></script>
17 <div class="container">
19 <div class="col-md-12">
20 <ol class="breadcrumb">
27 <div class="container">
29 <div class="col-md-12">
34 <div class="col-md-6">
35 <h3>Coverage Distribution</h3>
36 <div id="classCoverageDistribution" style="height: 300px;">
40 <div class="col-md-6">
42 <div id="classComplexity" style="height: 300px;">
48 <div class="col-md-6">
49 <h3>Insufficient Coverage</h3>
50 <div class="scrollbox">
55 <th class="text-right">Coverage</th>
59 {{insufficient_coverage_classes}}
64 <div class="col-md-6">
65 <h3>Project Risks</h3>
66 <div class="scrollbox">
71 <th class="text-right"><abbr title="Change Risk Anti-Patterns (CRAP) Index">CRAP</abbr></th>
75 {{project_risks_classes}}
82 <div class="col-md-12">
87 <div class="col-md-6">
88 <h3>Coverage Distribution</h3>
89 <div id="methodCoverageDistribution" style="height: 300px;">
93 <div class="col-md-6">
95 <div id="methodComplexity" style="height: 300px;">
101 <div class="col-md-6">
102 <h3>Insufficient Coverage</h3>
103 <div class="scrollbox">
104 <table class="table">
108 <th class="text-right">Coverage</th>
112 {{insufficient_coverage_methods}}
117 <div class="col-md-6">
118 <h3>Project Risks</h3>
119 <div class="scrollbox">
120 <table class="table">
124 <th class="text-right"><abbr title="Change Risk Anti-Patterns (CRAP) Index">CRAP</abbr></th>
128 {{project_risks_methods}}
137 <small>Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage {{version}}</a> using <a href="{{runtime_link}}" target="_top">{{runtime_name}} {{runtime_version}}</a>{{generator}} at {{date}}.</small>
141 <script src="{{path_to_root}}js/jquery.min.js" type="text/javascript"></script>
142 <script src="{{path_to_root}}js/bootstrap.min.js" type="text/javascript"></script>
143 <script src="{{path_to_root}}js/holder.min.js" type="text/javascript"></script>
144 <script src="{{path_to_root}}js/d3.min.js" type="text/javascript"></script>
145 <script src="{{path_to_root}}js/nv.d3.min.js" type="text/javascript"></script>
146 <script type="text/javascript">
147 $(document).ready(function() {
148 nv.addGraph(function() {
149 var chart = nv.models.multiBarChart();
150 chart.tooltips(false)
155 .yAxis.tickFormat(d3.format('d'));
157 d3.select('#classCoverageDistribution svg')
158 .datum(getCoverageDistributionData({{class_coverage_distribution}}, "Class Coverage"))
159 .transition().duration(500).call(chart);
161 nv.utils.windowResize(chart.update);
166 nv.addGraph(function() {
167 var chart = nv.models.multiBarChart();
168 chart.tooltips(false)
173 .yAxis.tickFormat(d3.format('d'));
175 d3.select('#methodCoverageDistribution svg')
176 .datum(getCoverageDistributionData({{method_coverage_distribution}}, "Method Coverage"))
177 .transition().duration(500).call(chart);
179 nv.utils.windowResize(chart.update);
184 function getCoverageDistributionData(data, label) {
200 $.each(labels, function(key) {
201 values.push({x: labels[key], y: data[key]});
212 nv.addGraph(function() {
213 var chart = nv.models.scatterChart()
218 chart.tooltipContent(function(key, y, e, graph) {
219 return '<p>' + graph.point.class + '</p>';
222 chart.xAxis.axisLabel('Code Coverage (in percent)');
223 chart.yAxis.axisLabel('Cyclomatic Complexity');
225 d3.select('#classComplexity svg')
226 .datum(getComplexityData({{complexity_class}}, 'Class Complexity'))
231 nv.utils.windowResize(chart.update);
236 nv.addGraph(function() {
237 var chart = nv.models.scatterChart()
242 chart.tooltipContent(function(key, y, e, graph) {
243 return '<p>' + graph.point.class + '</p>';
246 chart.xAxis.axisLabel('Code Coverage (in percent)');
247 chart.yAxis.axisLabel('Method Complexity');
249 d3.select('#methodComplexity svg')
250 .datum(getComplexityData({{complexity_method}}, 'Method Complexity'))
255 nv.utils.windowResize(chart.update);
260 function getComplexityData(data, label) {
262 $.each(data, function(key) {
263 var value = Math.round(data[key][0]*100) / 100;