OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright 2016 The Chromium Authors. All rights reserved. | 3 Copyright 2016 The Chromium Authors. All rights reserved. |
4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
5 found in the LICENSE file. | 5 found in the LICENSE file. |
6 --> | 6 --> |
7 <!-- | 7 <!-- |
8 Most of this code is duplicated in bisect-form. | 8 Most of this code is duplicated in bisect-form. |
9 TODO(qyearsley): This should be resolved for better code health. | 9 TODO(qyearsley): This should be resolved for better code health. |
10 See https://github.com/catapult-project/catapult/issues/1905 | 10 See https://github.com/catapult-project/catapult/issues/1905 |
11 --> | 11 --> |
12 | 12 |
13 <link rel="import" href="/components/paper-button/paper-button.html"> | 13 <link rel="import" href="/components/paper-button/paper-button.html"> |
14 | 14 |
| 15 <link rel="import" href="/dashboard/elements/pinpoint-perf-job-dialog.html"> |
15 <link rel="import" href="/dashboard/elements/trace-form.html"> | 16 <link rel="import" href="/dashboard/elements/trace-form.html"> |
| 17 <link rel="import" href="/dashboard/static/pinpoint.html"> |
16 <link rel="import" href="/dashboard/static/simple_xhr.html"> | 18 <link rel="import" href="/dashboard/static/simple_xhr.html"> |
17 | 19 |
18 <dom-module id="trace-button"> | 20 <dom-module id="trace-button"> |
19 <template> | 21 <template> |
20 <style> | 22 <style> |
21 /* | 23 /* |
22 * FIXME: This style is duplicated from the bisect-form style. | 24 * FIXME: This style is duplicated from the bisect-form style. |
23 * See the comments there. | 25 * See the comments there. |
24 */ | 26 */ |
25 #button:not([disabled]) { | 27 #button:not([disabled]) { |
(...skipping 12 matching lines...) Expand all Loading... |
38 id="button" | 40 id="button" |
39 disabled$={{!traceInfo.canBisect}} | 41 disabled$={{!traceInfo.canBisect}} |
40 on-click="onTrace">Request Debug Trace</paper-button> | 42 on-click="onTrace">Request Debug Trace</paper-button> |
41 <trace-form | 43 <trace-form |
42 id="trace" | 44 id="trace" |
43 xsrf-token="{{xsrfToken}}" | 45 xsrf-token="{{xsrfToken}}" |
44 earlier-revision="{{traceInfo.goodRev}}" | 46 earlier-revision="{{traceInfo.goodRev}}" |
45 later-revision="{{traceInfo.badRev}}" | 47 later-revision="{{traceInfo.badRev}}" |
46 test-path="{{traceInfo.testPath}}" | 48 test-path="{{traceInfo.testPath}}" |
47 bug-id="{{bugId}}"></trace-form> | 49 bug-id="{{bugId}}"></trace-form> |
| 50 <pinpoint-perf-job-dialog |
| 51 id="pinpoint" |
| 52 xsrf-token="{{xsrfToken}}" |
| 53 start-commit="{{traceInfo.goodRev}}" |
| 54 end-commit="{{traceInfo.badRev}}" |
| 55 start-repository="{{traceInfo.goodRevRepo}}" |
| 56 end-repository="{{traceInfo.badRevRepo}}" |
| 57 test-path="{{traceInfo.testPath}}"></pinpoint-perf-job-dialog> |
48 </template> | 58 </template> |
49 <script> | 59 <script> |
50 'use strict'; | 60 'use strict'; |
51 (function() { | 61 (function() { |
52 Polymer({ | 62 Polymer({ |
53 | 63 |
54 is: 'trace-button', | 64 is: 'trace-button', |
55 properties: { | 65 properties: { |
56 bugId: { notify: true }, | 66 bugId: { notify: true }, |
57 traceInfo: { | 67 traceInfo: { |
58 notify: true | 68 notify: true |
59 }, | 69 }, |
60 xsrfToken: { notify: true } | 70 xsrfToken: { notify: true } |
61 }, | 71 }, |
62 | 72 |
63 /** | 73 /** |
64 * Displays the trace-form when the trace button is clicked. | 74 * Displays the trace-form when the trace button is clicked. |
65 */ | 75 */ |
66 onTrace() { | 76 onTrace() { |
67 this.$.trace.show(); | 77 this.$.trace.show(); |
68 } | 78 } |
69 }); | 79 }); |
70 })(); | 80 })(); |
71 </script> | 81 </script> |
72 </dom-module> | 82 </dom-module> |
OLD | NEW |