@@ -42,36 +42,35 @@ <h2>Project: <a href="#"> {{ project.name }}</a></h2>
42
42
</ div >
43
43
</ div >
44
44
<!-- project profile table -->
45
+
46
+
45
47
< div class ="project__progress ">
46
48
< h2 > Historical progression</ h2 >
47
49
< div class ="progress__graph ">
48
50
<!-- single graph -->
49
51
< div class ="single__graph ">
52
+
50
53
< div class ="graph__chart ">
51
- < img src =" {{url_for('static', filename='assets/img/progress-chart-1.svg')}} " alt =" chart " / >
54
+ < div id =" codeCoverageLinesOverTimePlot " style =" width:100%;max-width:500px " > </ div >
52
55
</ div >
53
- < p > Code coverage (lines)</ p >
54
56
</ div >
55
57
<!-- single graph -->
56
58
< div class ="single__graph ">
57
59
< div class ="graph__chart ">
58
- < img src =" {{url_for('static', filename='assets/img/progress-chart-2.svg')}} " alt =" chart " / >
60
+ < div id =" codeCoverageFunctionsOverTimePlot " style =" width:100%;max-width:500px " > </ div >
59
61
</ div >
60
- < p > Code coverage (functions)</ p >
61
62
</ div >
62
63
<!-- single graph -->
63
64
< div class ="single__graph ">
64
65
< div class ="graph__chart ">
65
- < img src =" {{url_for('static', filename='assets/img/progress-chart-3.svg')}} " alt =" chart " / >
66
+ < div id =" staticReachabilityOverTimePlot " style =" width:100%;max-width:500px " > </ div >
66
67
</ div >
67
- < p > Static reachability</ p >
68
68
</ div >
69
69
<!-- single graph -->
70
70
< div class ="single__graph ">
71
71
< div class ="graph__chart ">
72
- < img src =" {{url_for('static', filename='assets/img/progress-chart-4.svg')}} " alt =" chart " / >
72
+ < div id =" fuzzerCountOverTimePlot " style =" width:100%;max-width:500px " > </ div >
73
73
</ div >
74
- < p > Fuzzer count</ p >
75
74
</ div >
76
75
</ div >
77
76
</ div >
@@ -80,5 +79,108 @@ <h2>Historical progression</h2>
80
79
</ main >
81
80
<!-- end main content -->
82
81
<!-- footer -->
82
+ < script src ="https://cdn.plot.ly/plotly-latest.min.js "> </ script >
83
+ < script >
84
+
85
+ // Plot for code coverage in terms of lines over time
86
+ const code_coverage_lines_x = [
87
+ { % for x_cord , y_cord in project . code_coverage_line_history % }
88
+ "{{ x_cord }}" ,
89
+ { % endfor % }
90
+ ] ;
91
+ const code_coverage_lines_y = [
92
+ { % for x_cord , y_cord in project . code_coverage_line_history % }
93
+ { { y_cord } } ,
94
+ { % endfor % }
95
+ ] ;
96
+ const code_coverage_lines_data = [ {
97
+ x : code_coverage_lines_x ,
98
+ y : code_coverage_lines_y ,
99
+ mode :"lines"
100
+ } ] ;
101
+ const code_coverage_lines_layout = {
102
+ xaxis : { title : "Date" } ,
103
+ yaxis : { title : "Coverage" } ,
104
+ title : "Code Coverage (lines)" ,
105
+ type : "scatter"
106
+ } ;
107
+ Plotly . newPlot ( "codeCoverageLinesOverTimePlot" , code_coverage_lines_data , code_coverage_lines_layout ) ;
108
+
109
+
110
+ // Plot for code coverage in terms of functions over time
111
+ const code_coverage_functions_x = [
112
+ { % for x_cord , y_cord in project . code_coverage_functions_history % }
113
+ "{{ x_cord }}" ,
114
+ { % endfor % }
115
+ ] ;
116
+ const code_coverage_functions_y = [
117
+ { % for x_cord , y_cord in project . code_coverage_functions_history % }
118
+ { { y_cord } } ,
119
+ { % endfor % }
120
+ ] ;
121
+ const code_coverage_functions_data = [ {
122
+ x : code_coverage_functions_x ,
123
+ y : code_coverage_functions_y ,
124
+ mode :"lines"
125
+ } ] ;
126
+ const code_coverage_functions_layout = {
127
+ xaxis : { title : "Date" } ,
128
+ yaxis : { title : "Coverage" } ,
129
+ title : "Code Coverage (lines)" ,
130
+ type : "scatter"
131
+ } ;
132
+ Plotly . newPlot ( "codeCoverageFunctionsOverTimePlot" , code_coverage_functions_data , code_coverage_functions_layout ) ;
133
+
134
+
135
+ // Plot for static rachability over time
136
+ const code_reachability_x = [
137
+ { % for x_cord , y_cord in project . code_reachability_history % }
138
+ "{{ x_cord }}" ,
139
+ { % endfor % }
140
+ ] ;
141
+ const code_reachability_y = [
142
+ { % for x_cord , y_cord in project . code_reachability_history % }
143
+ { { y_cord } } ,
144
+ { % endfor % }
145
+ ] ;
146
+ const code_reachability_data = [ {
147
+ x : code_reachability_x ,
148
+ y : code_reachability_y ,
149
+ mode :"lines"
150
+ } ] ;
151
+ const code_reachability_layout = {
152
+ xaxis : { title : "Date" } ,
153
+ yaxis : { title : "Coverage" } ,
154
+ title : "Code Coverage (lines)" ,
155
+ type : "scatter"
156
+ } ;
157
+ Plotly . newPlot ( "staticReachabilityOverTimePlot" , code_reachability_data , code_reachability_layout ) ;
158
+
159
+
160
+ // Plot for fuzzer counter over time
161
+ const fuzzer_count_x = [
162
+ { % for x_cord , y_cord in project . fuzzer_count_history % }
163
+ "{{ x_cord }}" ,
164
+ { % endfor % }
165
+ ] ;
166
+ const fuzzer_count_y = [
167
+ { % for x_cord , y_cord in project . fuzzer_count_history % }
168
+ { { y_cord } } ,
169
+ { % endfor % }
170
+ ] ;
171
+ const fuzzer_count_data = [ {
172
+ x : fuzzer_count_x ,
173
+ y : fuzzer_count_y ,
174
+ mode :"lines"
175
+ } ] ;
176
+ const fuzzer_count_layout = {
177
+ xaxis : { title : "Date" } ,
178
+ yaxis : { title : "Coverage" } ,
179
+ title : "Code Coverage (lines)" ,
180
+ type : "scatter"
181
+ } ;
182
+ Plotly . newPlot ( "fuzzerCountOverTimePlot" , fuzzer_count_data , fuzzer_count_layout ) ;
183
+
184
+ </ script >
83
185
84
186
{% endblock %}
0 commit comments