| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 Copyright 2014 The Chromium Authors. All rights reserved. | 2 Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 Use of this source code is governed by a BSD-style license that can be | 3 Use of this source code is governed by a BSD-style license that can be |
| 4 found in the LICENSE file. | 4 found in the LICENSE file. |
| 5 --> | 5 --> |
| 6 | 6 |
| 7 <link rel="import" href="ct-builder-grid.html"> | 7 <link rel="import" href="ct-bot-failure-card.html"> |
| 8 <link rel="import" href="ct-commit-list.html"> | 8 <link rel="import" href="ct-trooper-card.html"> |
| 9 <link rel="import" href="ct-test-list.html"> | |
| 10 <link rel="import" href="../bower_components/paper-dialog/paper-dialog.html"> | 9 <link rel="import" href="../bower_components/paper-dialog/paper-dialog.html"> |
| 11 <link rel="import" href="../bower_components/paper-dialog/paper-dialog-transitio
n.html"> | 10 <link rel="import" href="../bower_components/paper-dialog/paper-dialog-transitio
n.html"> |
| 12 <link rel="import" href="../bower_components/paper-input/paper-input.html"> | 11 <link rel="import" href="../bower_components/paper-input/paper-input.html"> |
| 13 | 12 |
| 14 <polymer-element name="ct-failure-card" attributes="group commitLog tree bug"> | 13 <polymer-element name="ct-failure-card" attributes="group commitLog tree bug"> |
| 15 <template> | 14 <template> |
| 16 <style> | 15 <style> |
| 17 :host { | 16 :host { |
| 18 display: flex; | 17 display: flex; |
| 19 } | 18 } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 40 box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3); | 39 box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3); |
| 41 } | 40 } |
| 42 | 41 |
| 43 paper-button:active, paper-button:hover { | 42 paper-button:active, paper-button:hover { |
| 44 background: #f8f8f8; | 43 background: #f8f8f8; |
| 45 border-color: #c6c6c6; | 44 border-color: #c6c6c6; |
| 46 box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.1); | 45 box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.1); |
| 47 color: #222; | 46 color: #222; |
| 48 } | 47 } |
| 49 | 48 |
| 50 ct-builder-grid { | |
| 51 margin-right: 10px; | |
| 52 width: 250px; | |
| 53 } | |
| 54 | |
| 55 #failure { | |
| 56 flex: 1; | |
| 57 } | |
| 58 | |
| 59 #buttons { | 49 #buttons { |
| 60 display: flex; | 50 display: flex; |
| 61 flex-direction: column; | 51 flex-direction: column; |
| 62 } | 52 } |
| 63 | 53 |
| 54 .card { |
| 55 display: flex; |
| 56 flex: 1; |
| 57 } |
| 58 |
| 64 .snoozed { | 59 .snoozed { |
| 65 opacity: 0.5; | 60 opacity: 0.5; |
| 66 } | 61 } |
| 67 </style> | 62 </style> |
| 68 <ct-builder-grid failures="{{ group.failures }}"></ct-builder-grid> | 63 <div class="card {{ { snoozed: group.isSnoozed } | tokenList }}"> |
| 69 <div id="failure" class="{{ { snoozed: group.isSnoozed } | tokenList }}"> | 64 <template if="{{ group.data.type == 'sheriff' }}"> |
| 70 <ct-test-list tests="{{ group.failures }}" tree="{{ tree }}"></ct-test-lis
t> | 65 <ct-bot-failure-card class='card' group="{{ group.data }}"></ct-bot-fail
ure-card> |
| 71 <ct-commit-list commitList="{{ group.commitList }}"></ct-commit-list> | 66 </template> |
| 67 <template if="{{ group.data.type != 'sheriff' }}"> |
| 68 <ct-trooper-card class='card' group="{{ group.data }}"></ct-trooper-card
> |
| 69 </template> |
| 72 </div> | 70 </div> |
| 73 <div id="buttons"> | 71 <div id="buttons"> |
| 74 <paper-button id="examine" on-tap="{{ examine }}" label="Examine"></paper-
button> | 72 <paper-button id="examine" on-tap="{{ examine }}" label="Examine"></paper-
button> |
| 75 <template if="{{ !group.isSnoozed }}"> | 73 <template if="{{ !group.isSnoozed }}"> |
| 76 <paper-button id="snooze" on-tap="{{ snooze }}" label="Snooze"></paper-b
utton> | 74 <paper-button id="snooze" on-tap="{{ snooze }}" label="Snooze"></paper-b
utton> |
| 77 </template> | 75 </template> |
| 78 <template if="{{ group.isSnoozed }}"> | 76 <template if="{{ group.isSnoozed }}"> |
| 79 <paper-button id="snooze" on-tap="{{ unsnooze }}" label="Unsnooze"></pap
er-button> | 77 <paper-button id="snooze" on-tap="{{ unsnooze }}" label="Unsnooze"></pap
er-button> |
| 80 </template> | 78 </template> |
| 81 <paper-button id="link-bug" on-tap="{{ linkBug }}" label="Link Bug"></pape
r-button> | 79 <paper-button id="link-bug" on-tap="{{ linkBug }}" label="Link Bug"></pape
r-button> |
| (...skipping 28 matching lines...) Expand all Loading... |
| 110 | 108 |
| 111 snooze: function() { | 109 snooze: function() { |
| 112 this.group.snoozeUntil(Date.now() + 60 * 60 * 1000); | 110 this.group.snoozeUntil(Date.now() + 60 * 60 * 1000); |
| 113 }, | 111 }, |
| 114 | 112 |
| 115 unsnooze: function() { | 113 unsnooze: function() { |
| 116 this.group.unsnooze(); | 114 this.group.unsnooze(); |
| 117 }, | 115 }, |
| 118 | 116 |
| 119 _updateCommitList: function() { | 117 _updateCommitList: function() { |
| 120 if (this.group && this.commitLog) | 118 if (this.group && this.group.commitList && this.commitLog) |
| 121 this.group.commitList.update(this.commitLog); | 119 this.group.commitList.update(this.commitLog); |
| 122 }, | 120 }, |
| 123 | 121 |
| 124 linkBug: function() { | 122 linkBug: function() { |
| 125 this.$.bug.value = this.group.bug; | 123 this.$.bug.value = this.group.bug; |
| 126 this.$.bugDialog.toggle(); | 124 this.$.bugDialog.toggle(); |
| 127 }, | 125 }, |
| 128 | 126 |
| 129 saveBug: function() { | 127 saveBug: function() { |
| 130 this.group.setBug(this.$.bug.value); | 128 this.group.setBug(this.$.bug.value); |
| 131 }, | 129 }, |
| 132 | 130 |
| 133 removeBug: function() { | 131 removeBug: function() { |
| 134 this.group.clearBug(); | 132 this.group.clearBug(); |
| 135 }, | 133 }, |
| 136 }); | 134 }); |
| 137 </script> | 135 </script> |
| 138 </polymer-element> | 136 </polymer-element> |
| OLD | NEW |