Introduce the concept of analysis task to perf dashboard
[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                         {{#if selectedSinglePoint}}
200                             {{#each details.bugTrackers}}
201                                 <tr>
202                                     <th>{{label}}</th>
203                                     <td>
204                                         <form {{action "associateBug" this editedBugNumber on="submit"}}>
205                                             {{input type=text value=editedBugNumber}}
206                                         </form>
207                                     </td>
208                                 </tr>
209                             {{/each}}
210                         {{/if}}
211                         <tr>
212                             <th>
213                                 <label>Name: {{input type=text value=newAnalysisTaskName}}</label>
214                                 <button {{action "createAnalysisTask"}}>Analyze</button>
215                             </th>
216                         </tr>
217                     </table>
218                 </div>
219
220             </section>
221         {{/each}}
222     </script>
223
224     <script type="text/x-handlebars" data-template-name="components/interactive-chart">
225         {{#if interactive}}
226             <div class="selection-toolbar" style="display: none;">
227                 <a href="#" class="button" {{action "zoom"}}>
228                     <svg class="zoom" viewBox="0 0 100 100">
229                         <g stroke-width="0" stroke="none">
230                             <polygon points="25,25 5,50 25,75"/>
231                             <polygon points="75,25 95,50 75,75"/>
232                         </g>
233                         <line x1="20" y1="50" x2="80" y2="50" stroke-width="10"></line>
234                     </svg>
235                 </a>
236             </div>
237         {{/if}}
238     </script>
239
240     <script type="text/x-handlebars" data-template-name="chart-details">
241     <div class="details-table-container">
242         <table class="details-table">
243             <tbody class="bugs">
244             {{#each details.bugTrackers}}
245                 {{#if bugs}}
246                     <tr>
247                         <th>{{label}}</th>
248                         <td>
249                             {{#each bugs}}
250                                 <a {{bind-attr href=bugUrl}} target="_blank">{{bugNumber}}</a>
251                             {{/each}}
252                         </td>
253                     </tr>
254                 {{/if}}
255             {{/each}}
256             </tbody>
257             <tr><th>Current</th><td>{{details.currentValue}} {{chartData.unit}}
258             {{#if details.oldValue}}
259                 (from {{details.oldValue}})
260             {{/if}}</td></tr>
261             {{#if details.buildNumber}}
262                 <tr>
263                     <th>Build</th>
264                     <td>
265                         {{#if details.buildURL}}
266                             <a {{bind-attr href=details.buildURL}} target="_blank">{{details.buildNumber}}</a>
267                         {{else}}
268                             {{details.buildNumber}}
269                         {{/if}}
270                         ({{details.buildTime}})
271                     </td>
272                 </tr>
273             {{/if}}
274             {{#each details.revisions}}
275                 <tr>
276                     <th>{{name}}</th>
277                     <td>
278                         {{#if url}}
279                             <a {{bind-attr href=url}} target="_blank">{{label}}</a>
280                         {{else}}
281                             {{label}}
282                         {{/if}}
283                     </td>
284                 </tr>
285                 <tr>
286                     <td colspan="2">{{commits-viewer repository=repository revisionInfo=this}}</td>
287                 </tr>
288             {{/each}}
289         </table>
290     </div>
291     </script>
292
293     <script type="text/x-handlebars" data-template-name="components/commits-viewer">
294     {{#if commits}}
295         <table>
296             <tbody>
297                 {{#each commits}}
298                     <tr>
299                         <td>
300                             {{#if url}}
301                                 <a {{bind-attr href=url}} target="_blank">{{author}}</a>
302                             {{else}}
303                                 {{author}}
304                             {{/if}}
305                         </td>
306                         <td>{{message}}</td>
307                     </tr>
308                 {{/each}}
309             </tbody>
310         </table>
311     {{/if}}
312     </script>
313
314     <script type="text/x-handlebars" data-template-name="close-button">
315         <svg class="close-button icon-button" viewBox="0 0 100 100">
316             <g stroke="black" stroke-width="10">
317                 <circle cx="50" cy="50" r="45" fill="transparent"/>
318                 <polygon points="30,30 70,70" />
319                 <polygon points="30,70 70,30" />
320             </g>
321         </svg>
322     </script>
323
324     <script type="text/x-handlebars" data-template-name="bugs-button">
325         <svg class="bugs-button icon-button" viewBox="0 0 100 100">
326             <g stroke="black" stroke-width="15">
327                 <circle cx="50" cy="50" r="40" fill="transparent"/>
328                 <line x1="50" y1="25" x2="50" y2="55"/>
329                 <circle cx="50" cy="67.5" r="2.5" fill="transparent"/>
330             </g>
331         </svg>
332     </script>
333
334     <script type="text/x-handlebars" data-template-name="search-button">
335         <svg class="search-button icon-button" viewBox="0 0 100 100">
336             <g stroke="black" stroke-width="15">
337                 <circle cx="60" cy="40" r="30" fill="transparent"/>
338                 <line x1="10" y1="90" x2="40" y2="60"/>
339             </g>
340         </svg>
341     </script>
342
343     <script type="text/x-handlebars" data-template-name="spinner">
344         <svg class="spinner" viewBox="0 0 100 100">
345             <line x1="10" y1="50" x2="30" y2="50" stroke="black" stroke-width="10" stroke-linecap="round"/>
346             <line x1="21.72" y1="21.72" x2="35.86" y2="35.86" stroke="black" stroke-width="10" stroke-linecap="round"/>
347             <line x1="50" y1="10" x2="50" y2="30" stroke="black" stroke-width="10" stroke-linecap="round"/>
348             <line x1="78.28" y1="21.72" x2="64.14" y2="35.86" stroke="black" stroke-width="10" stroke-linecap="round"/>
349             <line x1="70" y1="50" x2="90" y2="50" stroke="black" stroke-width="10" stroke-linecap="round"/>
350             <line x1="65.86" y1="65.86" x2="78.28" y2="78.28" stroke="black" stroke-width="10" stroke-linecap="round"/>
351             <line x1="50" y1="70" x2="50" y2="90" stroke="black" stroke-width="10" stroke-linecap="round"/>
352             <line x1="21.72" y1="78.28" x2="35.86" y2="65.86" stroke="black" stroke-width="10" stroke-linecap="round"/>
353         </svg>
354     </script>
355
356     <script type="text/x-handlebars" data-template-name="navbar">
357         <nav id="navigation" role="navigation">
358             <h1><a href="#">WebKit Perf Monitor</a></h1>
359             <ul>
360                 {{#link-to 'index' tagName='li'}}
361                     {{#link-to 'index'}}Dashboard{{/link-to}}
362                 {{/link-to}}
363                 {{#link-to 'charts' tagName='li'}}
364                     {{#link-to 'charts'}}Charts{{/link-to}}
365                 {{/link-to}}
366                 {{#link-to 'analysis' tagName='li'}}
367                     {{#link-to 'analysis'}}Analysis{{/link-to}}
368                 {{/link-to}}
369             </ul>
370         </nav>
371     </script>
372
373     <script type="text/x-handlebars" data-template-name="number-of-days-controls">
374         <li class="numberOfDaysIs1">
375             <a href="#" class="control-button" {{action "setNumberOfDays" 1}}>1D</a>
376         </li>
377         <li class="numberOfDaysIs7">
378             <a href="#" class="control-button" {{action "setNumberOfDays" 7}}>1W</a>
379         </li>
380         <li class="numberOfDaysIs30">
381             <a href="#" class="control-button" {{action "setNumberOfDays" 30}}>1M</a>
382         </li>
383         <li class="numberOfDaysIs90">
384             <a href="#" class="control-button" {{action "setNumberOfDays" 90}}>3M</a>
385         </li>
386         <li class="numberOfDaysIs183">
387             <a href="#" class="control-button" {{action "setNumberOfDays" 183}}>6M</a>
388         </li>
389         <li class="numberOfDaysIs365">
390             <a href="#" class="control-button" {{action "setNumberOfDays" 365}}>1Y</a>
391         </li>
392     </script>
393
394     <script type="text/x-handlebars" data-template-name="start-time-slider">
395         <label><input type="range"> <span class="numberOfDays">X</span> days</label>
396     </script>
397
398     <script type="text/x-handlebars" data-template-name="popup">
399         <span class="label">{{view App.PopupButtonView tagName="a" label=view.label }}</span>
400         {{view view.popupListContainerView viewName="popupListContainerViewInstance"}}
401     </script>
402
403     <script type="text/x-handlebars" data-template-name="popup-list">
404         {{#each view.list}}
405             {{#if isSeparator}}
406                 <li><hr></li>
407             {{else }} {{#if children}}
408                 <li>{{view App.PopupView list=children label=label}}</li>
409             {{else}}
410                 <li>
411                     {{#if actionName}}
412                         <a href="#" class="label" {{action actionName actionArgument}}>{{label}}</a>
413                     {{else}}
414                         <a class="label">{{label}}</a>
415                     {{/if}}
416                 </li>
417             {{/if}} {{/if}}
418         {{/each}}
419     </script>
420
421     <script type="text/x-handlebars" data-template-name="analysis">
422         <header id="header">
423             {{partial "navbar"}}
424         </header>
425
426         <table id="analysis-tasks">
427             <thead>
428                 <tr>
429                     <td>ID</td>
430                     <td>Name</td>
431                     <td>Created at</td>
432                 </tr>
433             </thead>
434             <tbody>
435                 {{#each model.tasks}}
436                     <tr>
437                         <td>{{#link-to 'analysisTask' id}}{{id}}{{/link-to}}</td>
438                         <td>{{name}}</td>
439                         <td>{{createdAt}}</td>
440                     </tr>
441                 {{/each}}
442             </tbody>
443         </table>
444     </script>
445
446     <script type="text/x-handlebars" data-template-name="analysisTask">
447         <header id="header">
448             {{partial "navbar"}}
449         </header>
450
451         <h2 id="analysis-task-title">{{name}}</h2>
452         {{#if platform.label}}
453             <h3 id="analysis-task-testname">{{metric.fullName}} - {{platform.label}}</h3>
454
455             <section class="analysis-chart-pane chart-pane">
456                 <div class="svg-container">
457                     {{interactive-chart
458                         chartData=chartData
459                         enableSelection=false
460                         chartPointRadius=2
461                         domain=chartDomain
462                         markedPoints=markedPoints}}
463                 </div>
464                 <div class="details">
465                     <table>
466                         <tbody>
467                             {{#each analysisPoints}}
468                                 <tr><td>{{label}}</td><td>{{value}}</td></tr>
469                             {{/each}}
470                         </tbody>
471                     </table>
472                 </div>
473             </section>
474
475             {{#each testGroups}}
476                 <section class="test-groups">
477                     <table>
478                         <caption>{{name}}</caption>
479                         <thead>
480                             <tr>
481                                 <td>Configuration</td>
482                                 <td>Build</td>
483                                 <td>Build Time</td>
484                                 <td>{{../metric.fullName}}</td>
485                             </tr>
486                         </thead>
487                         <tbody>
488                             {{#each buildRequests}}
489                                 <tr>
490                                     <td>{{id}}</td>
491                                     <td>{{buildNumber}}</td>
492                                     <td>{{buildTime}}</td>
493                                     <td>{{mean}}</td>
494                                 </tr>
495                             {{/each}}
496                         </tbody>
497                     </table>
498                 </section>
499             {{/each}}
500
501             <form class="test-groups">
502                 <table>
503                     <caption><input name="name" placeholder="Test group name" required></caption>
504                     <thead>
505                         <tr>
506                             <th>Root</th>
507                             {{#each testSets}}
508                                 <th>
509                                     {{name}}
510                                     {{view Ember.Select
511                                         content=options
512                                         optionValuePath="content.value"
513                                         optionLabelPath="content.label"
514                                         selection=selection}}
515                                 </th>
516                             {{/each}}
517                         </tr>
518                     </thead>
519                     <tbody>
520                         {{#each roots}}
521                             <tr>
522                                 <th>{{name}}</th>
523                                 {{#each sets}}
524                                     <td>{{view Ember.Select name=name content=revisions
525                                         optionValuePath="content.value" optionLabelPath="content.label"
526                                         selection=selection}}</td>
527                                 {{/each}}
528                             </tr>
529                         {{/each}}
530                     </tbody>
531                     <tbody>
532                         <tr>
533                             <th>Number of runs</th>
534                             <td colspan=2>
535                                 <select>
536                                     <option>1</option>
537                                     <option>2</option>
538                                     <option>3</option>
539                                     <option>4</option>
540                                     <option>5</option>
541                                     <option>6</option>
542                                 </select>
543                             </td>
544                         </tr>
545                     </tbody>
546                 </table>
547
548                 <button type="submit">Start A/B testing</button>
549             </form>
550         {{/if}}
551     </script>
552
553 </head>
554 <body>
555 </body>
556 </html>