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

Side by Side Diff: Tools/GardeningServer/ui/ct-failure-card.html

Issue 555263004: Add hung bots to sheriff-o-matic view (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address nits. Created 6 years, 3 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 | Annotate | Revision Log
OLDNEW
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="../model/ct-builder-list.html"> 7 <link rel="import" href="../model/ct-builder-list.html">
8 <link rel="import" href="ct-bot-failure-card.html"> 8 <link rel="import" href="ct-bot-failure-card.html">
9 <link rel="import" href="ct-builder-failure-card.html">
9 <link rel="import" href="ct-trooper-card.html"> 10 <link rel="import" href="ct-trooper-card.html">
10 <link rel="import" href="../bower_components/paper-dialog/paper-dialog.html"> 11 <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"> 12 <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"> 13 <link rel="import" href="../bower_components/paper-input/paper-input.html">
13 14
14 <polymer-element name="ct-failure-card" attributes="group commitLog tree bug"> 15 <polymer-element name="ct-failure-card" attributes="group commitLog tree bug">
15 <template> 16 <template>
16 <style> 17 <style>
17 :host { 18 :host {
18 display: block; 19 display: block;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 display: flex; 61 display: flex;
61 flex: 1; 62 flex: 1;
62 } 63 }
63 64
64 .snoozed { 65 .snoozed {
65 opacity: 0.5; 66 opacity: 0.5;
66 } 67 }
67 </style> 68 </style>
68 <div id="container"> 69 <div id="container">
69 <div class="card {{ { snoozed: group.isSnoozed } | tokenList }}"> 70 <div class="card {{ { snoozed: group.isSnoozed } | tokenList }}">
70 <template if="{{ group.data.type == 'sheriff' }}"> 71 <!-- FIXME: Refactor the buttons into their own widget so we don't need cards within cards -->
72 <template if="{{ group.data.category == 'sheriff' }}">
71 <ct-bot-failure-card class='card' group="{{ group.data }}" builderList ="{{ _builderList }}"></ct-bot-failure-card> 73 <ct-bot-failure-card class='card' group="{{ group.data }}" builderList ="{{ _builderList }}"></ct-bot-failure-card>
72 </template> 74 </template>
73 <template if="{{ group.data.type != 'sheriff' }}"> 75 <template if="{{ group.data.category == 'builder' }}">
76 <ct-builder-failure-card class='card' group="{{ group.data }}" builder List="{{ _builderList }}"></ct-builder-failure-card>
77 </template>
78 <template if="{{ group.data.category == 'trooper' }}">
74 <ct-trooper-card class='card' group="{{ group.data }}"></ct-trooper-ca rd> 79 <ct-trooper-card class='card' group="{{ group.data }}"></ct-trooper-ca rd>
75 </template> 80 </template>
76 </div> 81 </div>
77 <div id="buttons"> 82 <div id="buttons">
78 <paper-button id="examine" on-tap="{{ examine }}" label="Examine"></pape r-button> 83 <paper-button id="examine" on-tap="{{ examine }}" label="Examine"></pape r-button>
79 <template if="{{ !group.isSnoozed }}"> 84 <template if="{{ !group.isSnoozed }}">
80 <paper-button id="snooze" on-tap="{{ snooze }}" label="Snooze"></paper -button> 85 <paper-button id="snooze" on-tap="{{ snooze }}" label="Snooze"></paper -button>
81 </template> 86 </template>
82 <template if="{{ group.isSnoozed }}"> 87 <template if="{{ group.isSnoozed }}">
83 <paper-button id="snooze" on-tap="{{ unsnooze }}" label="Unsnooze"></p aper-button> 88 <paper-button id="snooze" on-tap="{{ unsnooze }}" label="Unsnooze"></p aper-button>
(...skipping 18 matching lines...) Expand all
102 Polymer({ 107 Polymer({
103 group: null, 108 group: null,
104 commitLog: null, 109 commitLog: null,
105 _builderList: null, 110 _builderList: null,
106 tree: '', 111 tree: '',
107 112
108 observe: { 113 observe: {
109 group: '_updateCommitList', 114 group: '_updateCommitList',
110 commitLog: '_updateCommitList', 115 commitLog: '_updateCommitList',
111 'group.data.failures': '_updateBuilderList', 116 'group.data.failures': '_updateBuilderList',
117 'group.data.failure': '_updateBuilderList',
112 }, 118 },
113 119
114 examine: function() { 120 examine: function() {
115 this.fire('ct-examine-failures', this.group); 121 this.fire('ct-examine-failures', this.group);
116 }, 122 },
117 123
118 snooze: function() { 124 snooze: function() {
119 this.group.snoozeUntil(Date.now() + 60 * 60 * 1000); 125 this.group.snoozeUntil(Date.now() + 60 * 60 * 1000);
120 }, 126 },
121 127
122 unsnooze: function() { 128 unsnooze: function() {
123 this.group.unsnooze(); 129 this.group.unsnooze();
124 }, 130 },
125 131
126 _updateCommitList: function() { 132 _updateCommitList: function() {
127 if (this.group && this.group.commitList && this.commitLog) 133 if (this.group && this.group.commitList && this.commitLog)
128 this.group.commitList.update(this.commitLog); 134 this.group.commitList.update(this.commitLog);
129 }, 135 },
130 136
131 _updateBuilderList: function() { 137 _updateBuilderList: function() {
132 if (this.group.data.type == 'sheriff') 138 if (this.group.data.category == 'sheriff')
133 this._builderList = new CTBuilderList(this.group.data.failures); 139 this._builderList = new CTBuilderList(this.group.data.failures);
140 else if (this.group.data.category == 'builder')
141 this._builderList = new CTBuilderList(this.group.data.failure);
134 }, 142 },
135 143
136 linkBug: function() { 144 linkBug: function() {
137 this.$.bug.value = this.group.bug; 145 this.$.bug.value = this.group.bug;
138 this.$.bugDialog.toggle(); 146 this.$.bugDialog.toggle();
139 }, 147 },
140 148
141 saveBug: function() { 149 saveBug: function() {
142 this.group.setBug(this.$.bug.value); 150 this.group.setBug(this.$.bug.value);
143 }, 151 },
144 152
145 removeBug: function() { 153 removeBug: function() {
146 this.group.clearBug(); 154 this.group.clearBug();
147 }, 155 },
148 }); 156 });
149 </script> 157 </script>
150 </polymer-element> 158 </polymer-element>
OLDNEW
« no previous file with comments | « Tools/GardeningServer/ui/ct-builder-failure-card.html ('k') | Tools/GardeningServer/ui/ct-results-detail.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698