Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(670)

Side by Side Diff: dashboard/dashboard/elements/trace-button.html

Issue 1948813002: [Polymer10] Port dashboard buttons to Polymer 1.0 (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Address Annie's comment Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « dashboard/dashboard/elements/primary-button.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/trace-form.html"> 15 <link rel="import" href="/dashboard/elements/trace-form.html">
16 <link rel="import" href="/dashboard/static/simple_xhr.html"> 16 <link rel="import" href="/dashboard/static/simple_xhr.html">
17 17
18 <polymer-element name="trace-button" attributes="traceInfo bugId xsrfToken"> 18 <dom-module id="trace-button">
19 <template> 19 <template>
20 <style> 20 <style>
21 /* 21 /*
22 * FIXME: This style is duplicated from the bisect-form style. 22 * FIXME: This style is duplicated from the bisect-form style.
23 * See the comments there. 23 * See the comments there.
24 */ 24 */
25 #button[enabled] { 25 #button[enabled] {
26 background-color: #4285f4; 26 background-color: #4285f4;
27 color: white; 27 color: white;
28 } 28 }
29 29
30 :host(.mini) #button { 30 :host(.mini) #button {
31 height: 22px; 31 height: 22px;
32 line-height: 0.5em; 32 line-height: 0.5em;
33 margin-left: 5px; 33 margin-left: 5px;
34 padding-top: 0; 34 padding-top: 0;
35 } 35 }
36 </style> 36 </style>
37 <paper-button raised 37 <paper-button raised
38 id="button" 38 id="button"
39 disabled?={{!canTrace}} 39 disabled$={{!canTrace}}
40 enabled?={{canTrace}} 40 enabled$={{canTrace}}
41 on-click="{{onTrace}}">Trace</paper-button> 41 on-click="onTrace">Trace</paper-button>
42 <trace-form 42 <trace-form
43 id="trace" 43 id="trace"
44 xsrfToken="{{xsrfToken}}" 44 xsrfToken="{{xsrfToken}}"
45 earlierRevision="{{traceInfo.goodRev}}" 45 earlierRevision="{{traceInfo.goodRev}}"
46 laterRevision="{{traceInfo.badRev}}" 46 laterRevision="{{traceInfo.badRev}}"
47 testPath="{{traceInfo.testPath}}" 47 testPath="{{traceInfo.testPath}}"
48 rerunInfo="{{traceInfo.traceRerunInfo}}" 48 rerunInfo="{{traceInfo.traceRerunInfo}}"
49 bugId="{{bugId}}"></trace-form> 49 bugId="{{bugId}}"></trace-form>
50 </template> 50 </template>
51 <script> 51 <script>
52 'use strict'; 52 'use strict';
53 (function() { 53 (function() {
54 Polymer('trace-button', { 54 Polymer({
55
56 is: 'trace-button',
57 properties: {
58 bugId: { notify: true },
59 traceInfo: {
60 notify: true,
61 observer: 'traceInfoChanged'
62 },
63 xsrfToken: { notify: true }
64 }
65
55 /** 66 /**
56 * Initializes this element; this is an element lifecycle callback. 67 * Initializes this element; this is an element lifecycle callback.
57 */ 68 */
58 ready: function() { 69 ready: function() {
59 this.update(); 70 this.update();
60 }, 71 },
61 72
62 /** 73 /**
63 * Updates the trace button when the traceInfo is set. 74 * Updates the trace button when the traceInfo is set.
64 */ 75 */
(...skipping 28 matching lines...) Expand all
93 104
94 /** 105 /**
95 * Displays the trace-form when the trace button is clicked. 106 * Displays the trace-form when the trace button is clicked.
96 */ 107 */
97 onTrace: function() { 108 onTrace: function() {
98 this.$.trace.show(); 109 this.$.trace.show();
99 } 110 }
100 }); 111 });
101 })(); 112 })();
102 </script> 113 </script>
103 </polymer-element> 114 </dom-module>
OLDNEW
« no previous file with comments | « dashboard/dashboard/elements/primary-button.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698