New perf dashboard should have an ability to search commits by a keyword
[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="popup.js" defer></script>
16     <link rel="stylesheet" href="app.css">
17     <link rel="stylesheet" href="chart-pane.css">
18
19     <script type="text/x-handlebars" data-template-name="index">
20         <header id="header">
21             {{partial "navbar"}}
22             {{view App.NumberOfDaysControlView tagName="ul" numberOfDays=numberOfDays}}
23             <ul class="controls">
24                 <li>
25                     <a href="#" class="control-button" {{action toggleEditMode}}>
26                         {{#if controller.editMode}}
27                             Finish editing
28                         {{else}}
29                             Edit
30                         {{/if}}
31                     </a>
32                 </li>
33             </ul>
34         </header>
35
36         <table {{bind-attr class=":dashboard editMode:editMode:readonly"}}>
37         <thead>
38             <tr>
39                 <td></td>
40                 {{#each headerColumns}}
41                     {{#if controller.editMode}}
42                         <th>
43                             <a href="#" title="Remove column" {{action "removeColumn" index}}>
44                                 {{partial "close-button"}}
45                             </a>
46                             {{input value=label}}
47                         </th>
48                     {{else}}
49                         <th>{{label}}</th>
50                     {{/if}}
51                 {{/each}}
52                 {{#if controller.editMode}}
53                     <td>{{input value=newColumnHeader action="addColumn" placeholder="Add a column"}}</td>
54                 {{/if}}
55             </tr>
56         </thead>
57         <tbody>
58             {{#each rows}}
59                 <tr>
60                     {{#if controller.editMode}}
61                         <th>
62                             <a href="#" title="Remove row" {{action "removeRow" this}}>
63                                 {{partial "close-button"}}
64                             </a>
65                             {{input value=header}}
66                         </th>
67                     {{else}}
68                         <th><span class="label">{{header}}</span></th>
69                     {{/if}}
70                     {{#each cells}}
71                         <td>
72                             {{#if empty}}
73                                 {{#if controller.editMode}}
74                                     {{view App.PopupView list=pickerData label='Choose'}}
75                                 {{/if}}
76                             {{else}}
77                                 {{#if chartData}}
78                                     {{#link-to 'charts' (query-params paneList=paneList)}}
79                                     {{interactive-chart
80                                         chartData=chartData
81                                         domain=controller.sharedDomain
82                                         enableSelection=false}}
83                                     {{/link-to}}
84                                 {{else}}
85                                     {{#if failure}}
86                                         <div class="failure">{{failure}}</div>
87                                     {{else}}
88                                         <div class="progress">{{partial "spinner"}}</div>
89                                     {{/if}}
90                                 {{/if}}
91                                 {{#if controller.editMode}}
92                                     <a href="#" title="Reset pane" class="reset" {{action "resetPane" this}}>
93                                         {{partial "close-button"}}
94                                     </a>
95                                 {{/if}}
96                             {{/if}}
97                         </td>
98                     {{/each}}
99                     {{#if controller.editMode}}
100                         <td></td>
101                     {{/if}}
102                 </tr>
103             {{/each}}
104             {{#if controller.editMode}}
105                 <tr>
106                     <td>{{input value=newRowHeader action="addRow" placeholder="Add a row"}}</td>
107                     {{#each emptyRow}}
108                         <td></td>
109                     {{/each}}
110                     <td></td>
111                 </tr>
112             {{/if}}
113         </tbody>
114         </table>
115     </script>
116
117     <script type="text/x-handlebars" data-template-name="charts">
118         <header id="header">
119             {{partial "navbar"}}
120             <ul class="controls">
121                 <li>{{view App.PopupView list=platforms label='Add pane'}}</li>
122             </ul>
123             <ul class="controls">
124                 <li>{{view App.StartTimeSliderView startTime=startTime oldestStartTime=oldestStartTime}}</li>
125             </ul>
126         </header>
127
128         {{#each panes itemController="pane"}}
129             <section class="chart-pane" tabindex="0">
130                 <header>
131                     <h1 {{action "toggleDetails"}}>
132                     {{#each metric.path}}
133                         {{this}} &ni;
134                     {{/each}}
135                     {{metric.label}}
136                     - {{ platform.name}}</h2>
137                     <a href="#" title="Close" class="close-button" {{action "close"}}>{{partial "close-button"}}</a>
138                     {{if App.Manifest.repositoriesWithReportedCommits}}
139                         <a href="#" title="Search" class="search-button" {{action "toggleSearch"}}>{{partial "search-button"}}</a>
140                     {{/if}}
141                 </header>
142
143                 <div class="body">
144                     <div class="svg-container">
145                     {{#if chartData}}
146                         {{interactive-chart
147                             chartData=chartData
148                             domain=mainPlotDomain
149                             interactive=true
150                             currentItem=currentItem
151                             currentTime=sharedTime
152                             selectedItem=selectedItem
153                             highlightedItems=highlightedItems
154                             selection=timeRange
155                             sharedSelection=sharedSelection
156                             selectionChanged="rangeChanged"
157                             selectionIsLocked=timeRangeIsLocked
158                             zoom="zoomed"}}
159                     {{else}}
160                         {{#if failure}}
161                             <div class="failure">{{failure}}</div>
162                         {{else}}
163                             <div class="progress">{{partial "spinner"}}</div>
164                         {{/if}}
165                     {{/if}}
166                     </div>
167                     <div class="details">
168                         <div class="overview">
169                         {{#if chartData}}
170                             {{interactive-chart
171                                 chartData=chartData
172                                 showYAxis=false
173                                 domain=overviewDomain
174                                 domainChanged="overviewDomainChanged"
175                                 selection=mainPlotDomain
176                                 selectionChanged="zoomed"}}
177                         {{/if}}
178                         </div>
179                         {{#if details}}
180                             {{partial "chart-details"}}
181                         {{/if}}
182                     </div>
183                 </div>
184
185                 <form {{bind-attr class=":search-pane showingSearchPane::hidden"}}>
186                     <span class="repositories">
187                         {{view Ember.Select content=App.Manifest.repositoriesWithReportedCommits
188                             optionLabelPath='content.id'
189                             selection=commitSearchRepository}}
190                     </span>
191                     {{input action="searchCommit" placeholder="Name or email" value=commitSearchKeyword}}
192                 </form>
193
194             </section>
195         {{/each}}
196     </script>
197
198     <script type="text/x-handlebars" data-template-name="components/interactive-chart">
199         {{#if interactive}}
200             <div class="selection-toolbar" style="display: none;">
201                 <a href="#" class="button" {{action "zoom"}}>
202                     <svg class="zoom" viewBox="0 0 100 100">
203                         <g stroke-width="0" stroke="none">
204                             <polygon points="25,25 5,50 25,75"/>
205                             <polygon points="75,25 95,50 75,75"/>
206                         </g>
207                         <line x1="20" y1="50" x2="80" y2="50" stroke-width="10"></line>
208                     </svg>
209                 </a>
210             </div>
211         {{/if}}
212     </script>
213
214     <script type="text/x-handlebars" data-template-name="chart-details">
215     <div class="details-table-container">
216         <table class="details-table">
217             <tr><th>Current</th><td>{{details.currentValue}} {{chartData.unit}}
218             {{#if details.oldValue}}
219                 (from {{details.oldValue}})
220             {{/if}}</td></tr>
221             {{#if details.buildNumber}}
222                 <tr>
223                     <th>Build</th>
224                     <td>
225                         {{#if details.buildURL}}
226                             <a {{bind-attr href=details.buildURL}} target="_blank">{{details.buildNumber}}</a>
227                         {{else}}
228                             {{details.buildNumber}}
229                         {{/if}}
230                         ({{details.buildTime}})
231                     </td>
232                 </tr>
233             {{/if}}
234             {{#each details.revisions}}
235                 <tr>
236                     <th>{{name}}</th>
237                     <td>
238                         {{#if url}}
239                             <a {{bind-attr href=url}} target="_blank">{{label}}</a>
240                         {{else}}
241                             {{label}}
242                         {{/if}}
243                     </td>
244                 </tr>
245                 <tr>
246                     <td colspan="2">{{commits-viewer repository=repository revisionInfo=this}}</td>
247                 </tr>
248             {{/each}}
249         </table>
250     </div>
251     </script>
252
253     <script type="text/x-handlebars" data-template-name="components/commits-viewer">
254     {{#if commits}}
255         <table>
256             <tbody>
257                 {{#each commits}}
258                     <tr>
259                         <td>
260                             {{#if url}}
261                                 <a {{bind-attr href=url}} target="_blank">{{author}}</a>
262                             {{else}}
263                                 {{author}}
264                             {{/if}}
265                         </td>
266                         <td>{{message}}</td>
267                     </tr>
268                 {{/each}}
269             </tbody>
270         </table>
271     {{/if}}
272     </script>
273
274     <script type="text/x-handlebars" data-template-name="close-button">
275         <svg class="close-button icon-button" viewBox="0 0 100 100">
276             <g stroke="black" stroke-width="10">
277                 <circle cx="50" cy="50" r="45" fill="transparent"/>
278                 <polygon points="30,30 70,70" />
279                 <polygon points="30,70 70,30" />
280             </g>
281         </svg>
282     </script>
283
284     <script type="text/x-handlebars" data-template-name="search-button">
285         <svg class="search-button icon-button" viewBox="0 0 100 100">
286             <g stroke="black" stroke-width="15">
287                 <circle cx="60" cy="40" r="30" fill="transparent"/>
288                 <line x1="10" y1="90" x2="40" y2="60"/>
289             </g>
290         </svg>
291     </script>
292
293     <script type="text/x-handlebars" data-template-name="spinner">
294         <svg class="spinner" viewBox="0 0 100 100">
295             <line x1="10" y1="50" x2="30" y2="50" stroke="black" stroke-width="10" stroke-linecap="round"/>
296             <line x1="21.72" y1="21.72" x2="35.86" y2="35.86" stroke="black" stroke-width="10" stroke-linecap="round"/>
297             <line x1="50" y1="10" x2="50" y2="30" stroke="black" stroke-width="10" stroke-linecap="round"/>
298             <line x1="78.28" y1="21.72" x2="64.14" y2="35.86" stroke="black" stroke-width="10" stroke-linecap="round"/>
299             <line x1="70" y1="50" x2="90" y2="50" stroke="black" stroke-width="10" stroke-linecap="round"/>
300             <line x1="65.86" y1="65.86" x2="78.28" y2="78.28" stroke="black" stroke-width="10" stroke-linecap="round"/>
301             <line x1="50" y1="70" x2="50" y2="90" stroke="black" stroke-width="10" stroke-linecap="round"/>
302             <line x1="21.72" y1="78.28" x2="35.86" y2="65.86" stroke="black" stroke-width="10" stroke-linecap="round"/>
303         </svg>
304     </script>
305
306     <script type="text/x-handlebars" data-template-name="navbar">
307         <nav id="navigation" role="navigation">
308             <h1><a href="#">WebKit Perf Monitor</a></h1>
309             <ul>
310                 {{#link-to 'index' tagName='li'}}
311                     {{#link-to 'index'}}Dashboard{{/link-to}}
312                 {{/link-to}}
313                 {{#link-to 'charts' tagName='li'}}
314                     {{#link-to 'charts'}}Charts{{/link-to}}
315                 {{/link-to}}
316             </ul>
317         </nav>
318     </script>
319
320     <script type="text/x-handlebars" data-template-name="number-of-days-controls">
321         <li class="numberOfDaysIs1">
322             <a href="#" class="control-button" {{action "setNumberOfDays" 1}}>1D</a>
323         </li>
324         <li class="numberOfDaysIs7">
325             <a href="#" class="control-button" {{action "setNumberOfDays" 7}}>1W</a>
326         </li>
327         <li class="numberOfDaysIs30">
328             <a href="#" class="control-button" {{action "setNumberOfDays" 30}}>1M</a>
329         </li>
330         <li class="numberOfDaysIs90">
331             <a href="#" class="control-button" {{action "setNumberOfDays" 90}}>3M</a>
332         </li>
333         <li class="numberOfDaysIs183">
334             <a href="#" class="control-button" {{action "setNumberOfDays" 183}}>6M</a>
335         </li>
336         <li class="numberOfDaysIs365">
337             <a href="#" class="control-button" {{action "setNumberOfDays" 365}}>1Y</a>
338         </li>
339     </script>
340
341     <script type="text/x-handlebars" data-template-name="start-time-slider">
342         <label><input type="range"> <span class="numberOfDays">X</span> days</label>
343     </script>
344
345     <script type="text/x-handlebars" data-template-name="popup">
346         <span class="label">{{view App.PopupButtonView tagName="a" label=view.label }}</span>
347         {{view view.popupListContainerView viewName="popupListContainerViewInstance"}}
348     </script>
349
350     <script type="text/x-handlebars" data-template-name="popup-list">
351         {{#each view.list}}
352             {{#if isSeparator}}
353                 <li><hr></li>
354             {{else }} {{#if children}}
355                 <li>{{view App.PopupView list=children label=label}}</li>
356             {{else}}
357                 <li>
358                     {{#if actionName}}
359                         <a href="#" class="label" {{action actionName actionArgument}}>{{label}}</a>
360                     {{else}}
361                         <a class="label">{{label}}</a>
362                     {{/if}}
363                 </li>
364             {{/if}} {{/if}}
365         {{/each}}
366     </script>
367
368 </head>
369 <body>
370 </body>
371 </html>