OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <!-- | |
3 Copyright 2017 The Chromium Authors. All rights reserved. | |
4 Use of this source code is governed by a BSD-style license that can be | |
5 found in the LICENSE file. | |
6 --> | |
7 <link rel="import" href="/components/polymer/polymer.html"> | |
8 | |
9 <link rel="import" href="/dashboard/elements/benchmark-quality-report-details.ht ml"> | |
10 <link rel="import" href="/dashboard/elements/benchmark-quality-report-list.html" > | |
11 <link rel="import" href="/dashboard/static/uri.html"> | |
12 | |
13 <dom-module id="benchmark-quality-report-page"> | |
14 <template> | |
15 <template is="dom-if" if="{{computeShowList(pageType)}}"> | |
16 <benchmark-quality-report-list | |
17 master="{{master}}" | |
18 num-days="{{numDays}}"></benchmark-quality-report-list> | |
19 </template> | |
20 <template is="dom-if" if="{{computeShowBenchmark(pageType)}}"> | |
21 <benchmark-quality-report-details | |
22 benchmark="{{benchmark}}" | |
23 num-days="{{numDays}}" | |
24 master="{{master}}"></benchmark-quality-report-details> | |
25 </template> | |
sullivan
2017/02/17 16:30:13
This element parses the uri parameters and shows e
| |
26 </template> | |
27 <script> | |
28 'use strict'; | |
29 Polymer({ | |
30 is: 'benchmark-quality-report-page', | |
31 properties: { | |
32 pageType: { | |
33 type: String | |
34 }, | |
35 master: { | |
36 type: String | |
37 }, | |
38 numDays: { | |
39 type: Number | |
40 }, | |
41 benchmark: { | |
42 type: String | |
43 } | |
44 }, | |
45 | |
46 computeShowList: pageType => pageType == 'list', | |
47 | |
48 computeShowBenchmark: pageType => pageType == 'benchmark', | |
49 | |
50 /** | |
51 * The url params determine what data to request from | |
52 * /group_report. sid is a hash of a group of keys. | |
53 */ | |
54 ready: function() { | |
55 this.benchmark = uri.getParameter('benchmark'); | |
56 this.master = uri.getParameter('master', 'ChromiumPerf'); | |
57 this.numDays = uri.getParameter('num_days', 30); | |
58 this.pageType = this.benchmark ? 'benchmark' : 'list'; | |
59 } | |
60 }); | |
61 </script> | |
62 </dom-module> | |
OLD | NEW |