| 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 <link rel="import" href="/components/paper-button/paper-button.html"> | 8 <link rel="import" href="/components/paper-button/paper-button.html"> |
| 9 | 9 |
| 10 <link rel="import" href="/dashboard/elements/bisect-form.html"> | 10 <link rel="import" href="/dashboard/elements/bisect-form.html"> |
| 11 <link rel="import" href="/dashboard/elements/pinpoint-job-dialog.html"> | 11 <link rel="import" href="/dashboard/elements/pinpoint-job-dialog.html"> |
| 12 <link rel="import" href="/dashboard/static/pinpoint.html"> |
| 12 <link rel="import" href="/dashboard/static/simple_xhr.html"> | 13 <link rel="import" href="/dashboard/static/simple_xhr.html"> |
| 13 | 14 |
| 14 <dom-module id="bisect-button"> | 15 <dom-module id="bisect-button"> |
| 15 <template> | 16 <template> |
| 16 <style> | 17 <style> |
| 17 /* | 18 /* |
| 18 * A special style for the "enabled" attribute is used because when style | 19 * A special style for the "enabled" attribute is used because when style |
| 19 * is applied to the button element, it seems to override the paper-button | 20 * is applied to the button element, it seems to override the paper-button |
| 20 * [disabled] style. | 21 * [disabled] style. |
| 21 * The selector #button:enabled doesn't work because the underlying | 22 * The selector #button:enabled doesn't work because the underlying |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 107 |
| 107 this.fire('display-toast', {'content': this.$.jobsubmitted}); | 108 this.fire('display-toast', {'content': this.$.jobsubmitted}); |
| 108 }, | 109 }, |
| 109 | 110 |
| 110 /** | 111 /** |
| 111 * Displays the bisect-form when the bisect button is clicked. | 112 * Displays the bisect-form when the bisect button is clicked. |
| 112 */ | 113 */ |
| 113 onBisect() { | 114 onBisect() { |
| 114 const testPathParts = this.bisectInfo.testPath.split('/'); | 115 const testPathParts = this.bisectInfo.testPath.split('/'); |
| 115 const botName = testPathParts[1]; | 116 const botName = testPathParts[1]; |
| 116 const PINPOINT_BOTS = [ | |
| 117 'chromium-rel-mac11-air', | |
| 118 'chromium-rel-mac11-pro' | |
| 119 ]; | |
| 120 | 117 |
| 121 if (PINPOINT_BOTS.indexOf(botName) != -1) { | 118 if (d.PINPOINT_BOTS.indexOf(botName) != -1) { |
| 122 this.$.pinpoint.test_path = this.bisectInfo.testPath; | 119 this.$.pinpoint.test_path = this.bisectInfo.testPath; |
| 123 this.$.pinpoint.start_commit = this.bisectInfo.goodRev; | 120 this.$.pinpoint.start_commit = this.bisectInfo.goodRev; |
| 124 this.$.pinpoint.start_repository = this.bisectInfo.goodRevRepo; | 121 this.$.pinpoint.start_repository = this.bisectInfo.goodRevRepo; |
| 125 this.$.pinpoint.end_commit = this.bisectInfo.badRev; | 122 this.$.pinpoint.end_commit = this.bisectInfo.badRev; |
| 126 this.$.pinpoint.end_repository = this.bisectInfo.badRevRepo; | 123 this.$.pinpoint.end_repository = this.bisectInfo.badRevRepo; |
| 127 this.$.pinpoint.bug_id = this.bugId; | 124 this.$.pinpoint.bug_id = this.bugId; |
| 128 this.$.pinpoint.show(); | 125 this.$.pinpoint.show(); |
| 129 } else { | 126 } else { |
| 130 this.$.bisect.show(); | 127 this.$.bisect.show(); |
| 131 } | 128 } |
| 132 } | 129 } |
| 133 }); | 130 }); |
| 134 })(); | 131 })(); |
| 135 </script> | 132 </script> |
| 136 </dom-module> | 133 </dom-module> |
| OLD | NEW |