8cfe0f97d455e0fccd92aeb88b9b826ea8cb4721
[WebKit-https.git] / Websites / perf.webkit.org / public / v2 / index.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4     <meta charset="utf-8">
5     <title>WebKit Performance Monitor (Beta)</title>
6     <script src="js/jquery.min.js" defer></script>
7     <script src="js/handlebars.js" defer></script>
8     <script src="js/ember.js" defer></script>
9     <script src="js/ember-data.js" defer></script>
10     <script src="js/d3/d3.min.js" defer></script>
11     <script src="js/statistics.js" defer></script>
12     <script src="data.js" defer></script>
13     <script src="app.js" defer></script>
14     <script src="manifest.js" defer></script>
15     <script src="analysis.js" defer></script>
16     <script src="popup.js" defer></script>
17     <link rel="stylesheet" href="app.css">
18     <link rel="stylesheet" href="chart-pane.css">
19
20     <script type="text/x-handlebars" data-template-name="index">
21         <header id="header">
22             {{partial "navbar"}}
23             {{view App.NumberOfDaysControlView tagName="ul" numberOfDays=numberOfDays}}
24             <ul class="controls">
25                 <li>
26                     <a href="#" class="control-button" {{action toggleEditMode}}>
27                         {{#if controller.editMode}}
28                             Finish editing
29                         {{else}}
30                             Edit
31                         {{/if}}
32                     </a>
33                 </li>
34             </ul>
35         </header>
36
37         <table {{bind-attr class=":dashboard editMode:editMode:readonly"}}>
38         <thead>
39             <tr>
40                 <td></td>
41                 {{#each headerColumns}}
42                     {{#if controller.editMode}}
43                         <th>
44                             <a href="#" title="Remove column" {{action "removeColumn" index}}>
45                                 {{partial "close-button"}}
46                             </a>
47                             {{input value=label}}
48                         </th>
49                     {{else}}
50                         <th>{{label}}</th>
51                     {{/if}}
52                 {{/each}}
53                 {{#if controller.editMode}}
54                     <td>{{input value=newColumnHeader action="addColumn" placeholder="Add a column"}}</td>
55                 {{/if}}
56             </tr>
57         </thead>
58         <tbody>
59             {{#each rows}}
60                 <tr>
61                     {{#if controller.editMode}}
62                         <th>
63                             <a href="#" title="Remove row" {{action "removeRow" this}}>
64                                 {{partial "close-button"}}
65                             </a>
66                             {{input value=header}}
67                         </th>
68                     {{else}}
69                         <th><span class="label">{{header}}</span></th>
70                     {{/if}}
71                     {{#each cells}}
72                         <td>
73                             {{#if empty}}
74                                 {{#if controller.editMode}}
75                                     {{view App.PopupView list=pickerData label='Choose'}}
76                                 {{/if}}
77                             {{else}}
78                                 {{#if chartData}}
79                                     {{#link-to 'charts' (query-params paneList=paneList)}}
80                                     {{interactive-chart
81                                         chartData=chartData
82                                         domain=controller.sharedDomain
83                                         enableSelection=false}}
84                                     {{/link-to}}
85                                 {{else}}
86                                     {{#if failure}}
87                                         <div class="failure">{{failure}}</div>
88                                     {{else}}
89                                         <div class="progress">{{partial "spinner"}}</div>
90                                     {{/if}}
91                                 {{/if}}
92                                 {{#if controller.editMode}}
93                                     <a href="#" title="Reset pane" class="reset" {{action "resetPane" this}}>
94                                         {{partial "close-button"}}
95                                     </a>
96                                 {{/if}}
97                             {{/if}}
98                         </td>
99                     {{/each}}
100                     {{#if controller.editMode}}
101                         <td></td>
102                     {{/if}}
103                 </tr>
104             {{/each}}
105             {{#if controller.editMode}}
106                 <tr>
107                     <td>{{input value=newRowHeader action="addRow" placeholder="Add a row"}}</td>
108                     {{#each emptyRow}}
109                         <td></td>
110                     {{/each}}
111                     <td></td>
112                 </tr>
113             {{/if}}
114         </tbody>
115         </table>
116     </script>
117
118     <script type="text/x-handlebars" data-template-name="charts">
119         <header id="header">
120             {{partial "navbar"}}
121             <ul class="controls">
122                 <li>{{view App.PopupView list=platforms label='Add pane'}}</li>
123             </ul>
124             <ul class="controls">
125                 <li>{{view App.StartTimeSliderView startTime=startTime oldestStartTime=oldestStartTime}}</li>
126             </ul>
127         </header>
128
129         {{#each panes itemController="pane"}}
130             <section class="chart-pane" tabindex="0">
131                 <header>
132                     <h1 {{action "toggleDetails"}}>{{metric.fullName}} - {{ platform.name}}</h1>
133                     <a href="#" title="Close" class="close-button" {{action "close"}}>{{partial "close-button"}}</a>
134                     {{#if App.Manifest.bugTrackers}}
135                         <a href="#" title="Bugs and Analysis" class="bugs-button" {{action "toggleBugsPane"}}>
136                             {{partial "bugs-button"}}
137                         </a>
138                     {{/if}}
139                     {{#if App.Manifest.repositoriesWithReportedCommits}}
140                         <a href="#" title="Search" class="search-button" {{action "toggleSearchPane"}}>{{partial "search-button"}}</a>
141                     {{/if}}
142                 </header>
143
144                 <div class="body">
145                     <div class="svg-container">
146                     {{#if chartData}}
147                         {{interactive-chart
148                             chartData=chartData
149                             domain=mainPlotDomain
150                             interactive=true
151                             chartPointRadius=2
152                             currentItem=currentItem
153                             currentTime=sharedTime
154                             selectedItem=selectedItem
155                             highlightedItems=highlightedItems
156                             selection=timeRange
157                             sharedSelection=sharedSelection
158                             selectionChanged="rangeChanged"
159                             selectionIsLocked=timeRangeIsLocked
160                             markedPoints=markedPoints
161                             zoom="zoomed"}}
162                     {{else}}
163                         {{#if failure}}
164                             <div class="failure">{{failure}}</div>
165                         {{else}}
166                             <div class="progress">{{partial "spinner"}}</div>
167                         {{/if}}
168                     {{/if}}
169                     </div>
170                     <div class="details">
171                         <div class="overview">
172                         {{#if chartData}}
173                             {{interactive-chart
174                                 chartData=chartData
175                                 showYAxis=false
176                                 domain=overviewDomain
177                                 domainChanged="overviewDomainChanged"
178                                 selection=mainPlotDomain
179                                 selectionChanged="zoomed"}}
180                         {{/if}}
181                         </div>
182                         {{#if details}}
183                             {{partial "chart-details"}}
184                         {{/if}}
185                     </div>
186                 </div>
187
188                 <form {{bind-attr class=":search-pane showingSearchPane::hidden"}}>
189                     <span class="repositories">
190                         {{view Ember.Select content=App.Manifest.repositoriesWithReportedCommits
191                             optionLabelPath='content.id'
192                             selection=commitSearchRepository}}
193                     </span>
194                     {{input action="searchCommit" placeholder="Name or email" value=commitSearchKeyword}}
195                 </form>
196
197                 <div {{bind-attr class=":bugs-pane showingBugsPane::hidden"}}>
198                     <table>
199                         <tbody>
200                             {{#if selectedSinglePoint}}
201                                 {{#each details.bugTrackers}}
202                                     <tr>
203                                         <th>{{label}}</th>
204                                         <td>
205                                             <form {{action "associateBug" this editedBugNumber on="submit"}}>
206                                                 {{input type=text value=editedBugNumber}}
207                                             </form>
208                                         </td>
209                                     </tr>
210                                 {{/each}}
211                             {{/if}}
212                             <tr>
213                                 <th>
214                                     <label>Name: {{input type=text value=newAnalysisTaskName}}</label>
215                                     <button {{action "createAnalysisTask"}}>Analyze</button>
216                                 </th>
217                             </tr>
218                         </tbody>
219                     </table>
220                 </div>
221
222             </section>
223         {{/each}}
224     </script>
225
226     <script type="text/x-handlebars" data-template-name="components/interactive-chart">
227         {{#if interactive}}
228             <div class="selection-toolbar" style="display: none;">
229                 <a href="#" class="button" {{action "zoom"}}>
230                     <svg class="zoom" viewBox="0 0 100 100">
231                         <g stroke-width="0" stroke="none">
232                             <polygon points="25,25 5,50 25,75"/>
233                             <polygon points="75,25 95,50 75,75"/>
234                         </g>
235                         <line x1="20" y1="50" x2="80" y2="50" stroke-width="10"></line>
236                     </svg>
237                 </a>
238             </div>
239         {{/if}}
240     </script>
241
242     <script type="text/x-handlebars" data-template-name="chart-details">
243     <div class="details-table-container">
244         <table class="details-table">
245             <tbody class="bugs">
246             {{#each details.bugTrackers}}
247                 {{#if bugs}}
248                     <tr>
249                         <th>{{label}}</th>
250                         <td>
251                             {{#each bugs}}
252                                 <a {{bind-attr href=bugUrl}} target="_blank">{{bugNumber}}</a>
253                             {{/each}}
254                         </td>
255                     </tr>
256                 {{/if}}
257             {{/each}}
258             </tbody>
259             <tr><th>Current</th><td>{{details.currentValue}} {{chartData.unit}}
260             {{#if details.oldValue}}
261                 (from {{details.oldValue}})
262             {{/if}}</td></tr>
263             {{#if details.buildNumber}}
264                 <tr>
265                     <th>Build</th>
266                     <td>
267                         {{#if details.buildURL}}
268                             <a {{bind-attr href=details.buildURL}} target="_blank">{{details.buildNumber}}</a>
269                         {{else}}
270                             {{details.buildNumber}}
271                         {{/if}}
272                         ({{details.buildTime}})
273                     </td>
274                 </tr>
275             {{/if}}
276             {{#each details.revisions}}
277                 <tr>
278                     <th>{{name}}</th>
279                     <td>
280                         {{#if url}}
281                             <a {{bind-attr href=url}} target="_blank">{{label}}</a>
282                         {{else}}
283                             {{label}}
284                         {{/if}}
285                     </td>
286                 </tr>
287                 <tr>
288                     <td colspan="2">{{commits-viewer repository=repository revisionInfo=this}}</td>
289                 </tr>
290             {{/each}}
291         </table>
292     </div>
293     </script>
294
295     <script type="text/x-handlebars" data-template-name="components/commits-viewer">
296     {{#if commits}}
297         <table>
298             <tbody>
299                 {{#each commits}}
300                     <tr>
301                         <td>
302                             {{#if url}}
303                                 <a {{bind-attr href=url}} target="_blank">{{author}}</a>
304                             {{else}}
305                                 {{author}}
306                             {{/if}}
307                         </td>
308                         <td>{{message}}</td>
309                     </tr>
310                 {{/each}}
311             </tbody>
312         </table>
313     {{/if}}
314     </script>
315
316     <script type="text/x-handlebars" data-template-name="close-button">
317         <svg class="close-button icon-button" viewBox="0 0 100 100">
318             <g stroke="black" stroke-width="10">
319                 <circle cx="50" cy="50" r="45" fill="transparent"/>
320                 <polygon points="30,30 70,70" />
321                 <polygon points="30,70 70,30" />
322             </g>
323         </svg>
324     </script>
325
326     <script type="text/x-handlebars" data-template-name="bugs-button">
327         <svg class="bugs-button icon-button" viewBox="0 0 100 100">
328             <g stroke="black" stroke-width="15">
329                 <circle cx="50" cy="50" r="40" fill="transparent"/>
330                 <line x1="50" y1="25" x2="50" y2="55"/>
331                 <circle cx="50" cy="67.5" r="2.5" fill="transparent"/>
332             </g>
333         </svg>
334     </script>
335
336     <script type="text/x-handlebars" data-template-name="search-button">
337         <svg class="search-button icon-button" viewBox="0 0 100 100">
338             <g stroke="black" stroke-width="15">
339                 <circle cx="60" cy="40" r="30" fill="transparent"/>
340                 <line x1="10" y1="90" x2="40" y2="60"/>
341             </g>
342         </svg>
343     </script>
344
345     <script type="text/x-handlebars" data-template-name="spinner">
346         <svg class="spinner" viewBox="0 0 100 100">
347             <line x1="10" y1="50" x2="30" y2="50" stroke="black" stroke-width="10" stroke-linecap="round"/>
348             <line x1="21.72" y1="21.72" x2="35.86" y2="35.86" stroke="black" stroke-width="10" stroke-linecap="round"/>
349             <line x1="50" y1="10" x2="50" y2="30" stroke="black" stroke-width="10" stroke-linecap="round"/>
350             <line x1="78.28" y1="21.72" x2="64.14" y2="35.86" stroke="black" stroke-width="10" stroke-linecap="round"/>
351             <line x1="70" y1="50" x2="90" y2="50" stroke="black" stroke-width="10" stroke-linecap="round"/>
352             <line x1="65.86" y1="65.86" x2="78.28" y2="78.28" stroke="black" stroke-width="10" stroke-linecap="round"/>
353             <line x1="50" y1="70" x2="50" y2="90" stroke="black" stroke-width="10" stroke-linecap="round"/>
354             <line x1="21.72" y1="78.28" x2="35.86" y2="65.86" stroke="black" stroke-width="10" stroke-linecap="round"/>
355         </svg>
356     </script>
357
358     <script type="text/x-handlebars" data-template-name="navbar">
359         <nav id="navigation" role="navigation">
360             <h1><a href="#">WebKit Perf Monitor</a></h1>
361             <ul>
362                 {{#link-to 'index' tagName='li'}}
363                     {{#link-to 'index'}}Dashboard{{/link-to}}
364                 {{/link-to}}
365                 {{#link-to 'charts' tagName='li'}}
366                     {{#link-to 'charts'}}Charts{{/link-to}}
367                 {{/link-to}}
368                 {{#link-to 'analysis' tagName='li'}}
369                     {{#link-to 'analysis'}}Analysis{{/link-to}}
370                 {{/link-to}}
371             </ul>
372         </nav>
373     </script>
374
375     <script type="text/x-handlebars" data-template-name="number-of-days-controls">
376         <li class="numberOfDaysIs1">
377             <a href="#" class="control-button" {{action "setNumberOfDays" 1}}>1D</a>
378         </li>
379         <li class="numberOfDaysIs7">
380             <a href="#" class="control-button" {{action "setNumberOfDays" 7}}>1W</a>
381         </li>
382         <li class="numberOfDaysIs30">
383             <a href="#" class="control-button" {{action "setNumberOfDays" 30}}>1M</a>
384         </li>
385         <li class="numberOfDaysIs90">
386             <a href="#" class="control-button" {{action "setNumberOfDays" 90}}>3M</a>
387         </li>
388         <li class="numberOfDaysIs183">
389             <a href="#" class="control-button" {{action "setNumberOfDays" 183}}>6M</a>
390         </li>
391         <li class="numberOfDaysIs365">
392             <a href="#" class="control-button" {{action "setNumberOfDays" 365}}>1Y</a>
393         </li>
394     </script>
395
396     <script type="text/x-handlebars" data-template-name="start-time-slider">
397         <label><input type="range"> <span class="numberOfDays">X</span> days</label>
398     </script>
399
400     <script type="text/x-handlebars" data-template-name="popup">
401         <span class="label">{{view App.PopupButtonView tagName="a" label=view.label }}</span>
402         {{view view.popupListContainerView viewName="popupListContainerViewInstance"}}
403     </script>
404
405     <script type="text/x-handlebars" data-template-name="popup-list">
406         {{#each view.list}}
407             {{#if isSeparator}}
408                 <li><hr></li>
409             {{else }} {{#if children}}
410                 <li>{{view App.PopupView list=children label=label}}</li>
411             {{else}}
412                 <li>
413                     {{#if actionName}}
414                         <a href="#" class="label" {{action actionName actionArgument}}>{{label}}</a>
415                     {{else}}
416                         <a class="label">{{label}}</a>
417                     {{/if}}
418                 </li>
419             {{/if}} {{/if}}
420         {{/each}}
421     </script>
422
423     <script type="text/x-handlebars" data-template-name="analysis">
424         <header id="header">
425             {{partial "navbar"}}
426         </header>
427
428         <table id="analysis-tasks">
429             <thead>
430                 <tr>
431                     <td>ID</td>
432                     <td>Name</td>
433                     <td>Created at</td>
434                 </tr>
435             </thead>
436             <tbody>
437                 {{#each model.tasks}}
438                     <tr>
439                         <td>{{#link-to 'analysisTask' id}}{{id}}{{/link-to}}</td>
440                         <td>{{name}}</td>
441                         <td>{{createdAt}}</td>
442                     </tr>
443                 {{/each}}
444             </tbody>
445         </table>
446     </script>
447
448     <script type="text/x-handlebars" data-template-name="analysisTask">
449         <header id="header">
450             {{partial "navbar"}}
451         </header>
452
453         <h2 id="analysis-task-title">{{name}}</h2>
454         {{#if platform.label}}
455             <h3 id="analysis-task-testname">{{metric.fullName}} - {{platform.label}}</h3>
456
457             <section class="analysis-chart-pane chart-pane">
458                 <div class="svg-container">
459                     {{interactive-chart
460                         chartData=chartData
461                         enableSelection=false
462                         chartPointRadius=2
463                         domain=chartDomain
464                         markedPoints=markedPoints}}
465                 </div>
466                 <div class="details">
467                     <table>
468                         <tbody>
469                             {{#each analysisPoints}}
470                                 <tr><td>{{label}}</td><td>{{value}}</td></tr>
471                             {{/each}}
472                         </tbody>
473                     </table>
474                 </div>
475             </section>
476
477             {{#each testGroups}}
478                 <section class="test-groups">
479                     <table>
480                         <caption>{{name}}</caption>
481                         <thead>
482                             <tr>
483                                 <td>Configuration</td>
484                                 <td>Build</td>
485                                 <td>Build Time</td>
486                                 <td>{{../metric.fullName}}</td>
487                             </tr>
488                         </thead>
489                         <tbody>
490                             {{#each buildRequests}}
491                                 <tr>
492                                     <td>{{id}}</td>
493                                     <td>{{buildNumber}}</td>
494                                     <td>{{buildTime}}</td>
495                                     <td>{{mean}}</td>
496                                 </tr>
497                             {{/each}}
498                         </tbody>
499                     </table>
500                 </section>
501             {{/each}}
502
503             <form class="test-groups">
504                 <table>
505                     <caption><input name="name" placeholder="Test group name" required></caption>
506                     <thead>
507                         <tr>
508                             <th>Root</th>
509                             {{#each testSets}}
510                                 <th>
511                                     {{name}}
512                                     {{view Ember.Select
513                                         content=options
514                                         optionValuePath="content.value"
515                                         optionLabelPath="content.label"
516                                         selection=selection}}
517                                 </th>
518                             {{/each}}
519                         </tr>
520                     </thead>
521                     <tbody>
522                         {{#each roots}}
523                             <tr>
524                                 <th>{{name}}</th>
525                                 {{#each sets}}
526                                     <td>{{view Ember.Select name=name content=revisions
527                                         optionValuePath="content.value" optionLabelPath="content.label"
528                                         selection=selection}}</td>
529                                 {{/each}}
530                             </tr>
531                         {{/each}}
532                     </tbody>
533                     <tbody>
534                         <tr>
535                             <th>Number of runs</th>
536                             <td colspan=2>
537                                 <select>
538                                     <option>1</option>
539                                     <option>2</option>
540                                     <option>3</option>
541                                     <option>4</option>
542                                     <option>5</option>
543                                     <option>6</option>
544                                 </select>
545                             </td>
546                         </tr>
547                     </tbody>
548                 </table>
549
550                 <button type="submit">Start A/B testing</button>
551             </form>
552         {{/if}}
553     </script>
554
555 </head>
556 <body>
557 </body>
558 </html>