14
14
<!--[if lt IE 9]>
15
15
<script src="js/html5.js"></script>
16
16
<![endif]-->
17
+ #### EMBED EXPERIMENTALS ####
17
18
</ head >
18
19
19
- < body >
20
+ < body data-bind =" style: { overflow: overviewVisible() ? 'hidden' : 'auto' } " >
20
21
< div id ="progress " style ="width:100%;height:100%;position: absolute;left:0;top:0;background:#ffffff;z-index:100 ">
21
22
< span style ="position: absolute;left:50%;top:50%;font-weight:bold "> Loading...</ span >
22
23
</ div >
82
83
< div class ="navbar navbar-inverse navbar-fixed-top " id ="TopNav ">
83
84
< div class ="navbar-inner ">
84
85
< div class ="container-fluid ">
86
+ <!-- ko ifnot: overviewVisible -->
85
87
< a class ="brand " href ="# " data-bind ="text: configuration().SutName != null ? configuration().SutName : 'Features' "> </ a >
86
88
< div class ="navbar-search pull-left ">
87
- < input type ="text " id ="TypeAheadSearchBox " class ="search-query " data-bind ="value: whatToSearchFor " style ="width: 300px " placeholder ="@tag or feature name " />
89
+ < input type ="text " id ="TypeAheadSearchBox " class ="search-query " data-bind ="value: whatToSearchFor " style ="width: 300px " placeholder ="@tag or feature name "/>
88
90
< a id ="SearchButton " data-bind ="click: search " class ="btn "> Search</ a >
89
91
< a id ="ClearSearchButton " data-bind ="click: clearSearch " class ="btn "> Clear</ a >
90
92
</ div >
93
+ <!-- /ko -->
94
+ <!-- ko if: overviewVisible -->
95
+ < div class ="pull-left ">
96
+ < span class ="brand "> Overview and Summary</ span >
97
+ </ div >
98
+ <!-- /ko -->
99
+ < div class ="overview pull-right ">
100
+ < a id ="OverviewButton " class ="btn " data-bind ="text: overviewVisible() ? 'Hide Overview' : 'Show Overview', click: toggleOverview "> </ a >
101
+ </ div >
91
102
</ div >
92
103
</ div >
93
- < div class ="navbar-below ">
104
+ < div class ="navbar-below " data-bind =" style: { height: overviewVisible() ? '0px' : '22px' } " >
94
105
< div data-bind ="click: $root.hideShowNavigation "> < i class ="icon-white " data-bind ="css: { 'icon-minus-sign': $root.navIsShown(), 'icon-plus-sign': !$root.navIsShown() } "> </ i > Navigation</ div >
95
106
< div data-bind ="click: $root.hideShowNavigationTree "> < i class ="icon-white " data-bind ="css: { 'icon-minus-sign': $root.ShowAllLinks(), 'icon-plus-sign': !$root.ShowAllLinks() } "> </ i > Links</ div >
96
107
</ div >
@@ -183,7 +194,6 @@ <h4 data-bind="text: Name, click: $root.toggleDetail" class="canHighlight, click
183
194
</ div >
184
195
</ div >
185
196
<!--/row-->
186
-
187
197
<!--<hr>
188
198
189
199
<footer>
@@ -192,7 +202,41 @@ <h4 data-bind="text: Name, click: $root.toggleDetail" class="canHighlight, click
192
202
193
203
</ div >
194
204
<!--/.fluid-container-->
195
- <!-- Le javascript
205
+
206
+ < div class ="modal-host ">
207
+ < div class ="modal-overlay " data-bind ="css: { 'modal-overlay-visible': overviewVisible } ">
208
+ < div class ="modal-box ">
209
+ < div class ="clearfix ">
210
+ < div id ="overallCompleteCanvas-container " class ="pull-left ">
211
+ < canvas id ="overallCompleteCanvas "> </ canvas >
212
+ </ div >
213
+ < aside id ="overallCompleteSummary " class ="pull-right ">
214
+ < h3 > Scenario Summary by Result</ h3 >
215
+ < ul data-bind ="foreach: totals ">
216
+ < li >
217
+ < span class ="color-key " data-bind ="text: value, style: { backgroundColor: color } "> </ span >
218
+ < span data-bind ="text: label "> </ span >
219
+ </ li >
220
+ </ ul >
221
+ </ aside >
222
+ </ div >
223
+ < div >
224
+ < h3 class ="header "> Scenario Summary by Root Namespace</ h3 >
225
+ < canvas id ="byRootFolderCanvas "> </ canvas >
226
+ </ div >
227
+ < div >
228
+ < h3 class ="header "> Scenario Summary by Top 20 Tags</ h3 >
229
+ < canvas id ="byTagCanvas "> </ canvas >
230
+ </ div >
231
+ < div >
232
+ < h3 class ="header "> @NotTested Scenario Summary by Root Namespace</ h3 >
233
+ < canvas id ="notTestedbyRootFolderCanvas "> </ canvas >
234
+ </ div >
235
+ </ div >
236
+ </ div >
237
+ </ div >
238
+
239
+ <!-- Le javascript
196
240
================================================== -->
197
241
<!-- Placed at the end of the document so the pages load faster -->
198
242
< script src ="js/jquery-1.8.3.min.js " type ="text/javascript "> </ script >
@@ -201,6 +245,8 @@ <h4 data-bind="text: Name, click: $root.toggleDetail" class="canHighlight, click
201
245
< script src ="js/knockout.mapping-latest.js " type ="text/javascript "> </ script >
202
246
< script src ="js/underscore-min.js " type ="text/javascript "> </ script >
203
247
< script src ="js/jquery.highlight-4.closure.js "> </ script >
248
+ < script src ="js/Chart.min.js "> </ script >
249
+ < script src ="js/Chart.StackedBar.js "> </ script >
204
250
< script src ="js/Markdown.Converter.js " type ="text/javascript "> </ script >
205
251
< script src ="js/Markdown.Extra.js " type ="text/javascript "> </ script >
206
252
< script src ="js/featuresModel.js " type ="text/javascript "> </ script >
@@ -209,8 +255,9 @@ <h4 data-bind="text: Name, click: $root.toggleDetail" class="canHighlight, click
209
255
< script src ="js/heirarchyBuilder.js " type ="text/javascript "> </ script >
210
256
< script src ="js/typeaheadList.js " type ="text/javascript "> </ script >
211
257
< script src ="js/featureSearch.js " type ="text/javascript "> </ script >
258
+ < script src ="js/picklesOverview.js " type ="text/javascript "> </ script >
212
259
< script type ="text/javascript ">
213
- function ViewModel ( features , configuration ) {
260
+ function ViewModel ( features , configuration , summary ) {
214
261
var self = this ;
215
262
216
263
features = $ . map ( features , function ( el , i ) { return new FeatureParent ( el ) ; } ) ;
@@ -219,8 +266,11 @@ <h4 data-bind="text: Name, click: $root.toggleDetail" class="canHighlight, click
219
266
self . featuresByFolder = ko . observable ( buildFullHierarchy ( getFeaturesFromScenariosList ( features ) ) ) ;
220
267
self . currentFeature = ko . observable ( ) ;
221
268
self . configuration = ko . observable ( configuration ) ;
269
+ self . totals = ko . observable ( [ ] ) ;
270
+
222
271
self . ShowAllLinks = ko . observable ( false ) ;
223
-
272
+ self . overviewVisible = ko . observable ( false ) ;
273
+
224
274
self . setCurrentFeature = function ( ) {
225
275
if ( window . location . hash != '' ) {
226
276
var featureFromHashLocation = findFeatureByRelativeFolder ( removeBeginningHash ( window . location . hash ) , features ) ;
@@ -230,6 +280,29 @@ <h4 data-bind="text: Name, click: $root.toggleDetail" class="canHighlight, click
230
280
}
231
281
} ;
232
282
283
+ self . toggleOverview = function ( ) {
284
+ if ( ! self . overviewVisible ( ) ) {
285
+ // scroll to top to support fixed overlay
286
+ window . scrollTo ( 0 , 0 ) ;
287
+ }
288
+
289
+ self . overviewVisible ( ! self . overviewVisible ( ) ) ;
290
+
291
+ if ( self . overviewVisible ( ) ) {
292
+ if ( ! self . overview ) {
293
+ // build charts first time overview becomes visible
294
+ self . overview = PicklesOverview ( summary ) ;
295
+ self . overview . createOverallTotalsChart ( $ ( '#overallCompleteCanvas' ) . get ( 0 ) . getContext ( '2d' ) ) ;
296
+ self . overview . createByTagChart ( $ ( '#byTagCanvas' ) . get ( 0 ) . getContext ( '2d' ) ) ;
297
+ self . overview . createByRootFolderChart ( $ ( '#byRootFolderCanvas' ) . get ( 0 ) . getContext ( '2d' ) ) ;
298
+ self . overview . createNotTestedByRootFolderChart ( $ ( '#notTestedbyRootFolderCanvas' ) . get ( 0 ) . getContext ( '2d' ) ) ;
299
+ self . totals ( self . overview . getTotalsData ( ) ) ;
300
+ } else {
301
+ $ ( '.modal-overlay' ) . scrollTop ( 0 ) ;
302
+ }
303
+ }
304
+ } ;
305
+
233
306
self . whatToSearchFor = ko . observable ( "" ) ;
234
307
235
308
self . clearSearch = function ( ) {
@@ -317,7 +390,7 @@ <h4 data-bind="text: Name, click: $root.toggleDetail" class="canHighlight, click
317
390
function jsonPWrapper ( data ) {
318
391
data . Features . reverse ( ) ;
319
392
320
- var viewModel = new window . ViewModel ( data . Features , data . Configuration ) ;
393
+ var viewModel = new window . ViewModel ( data . Features , data . Configuration , data . Summary ) ;
321
394
viewModel . setCurrentFeature ( ) ;
322
395
323
396
window . ko . applyBindings ( viewModel ) ;
@@ -328,11 +401,14 @@ <h4 data-bind="text: Name, click: $root.toggleDetail" class="canHighlight, click
328
401
} ) ;
329
402
330
403
$ ( '#progress' ) . hide ( ) ;
404
+ $ ( '#TopNav' ) . show ( ) ;
331
405
}
332
406
333
407
var navShown = true ;
334
408
335
409
$ ( document ) . ready ( function ( ) {
410
+ $ ( '#TopNav' ) . hide ( ) ;
411
+
336
412
function chromeSOPHack_LoadJsonPFileAndCreateDynamicScriptTag ( ) {
337
413
var url = "pickledFeatures.js" ; // URL of the external script
338
414
0 commit comments