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