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

Side by Side Diff: autoroll/res/imp/arb-status-sk.html

Issue 1411553004: Add autoroll server (Closed) Base URL: https://skia.googlesource.com/buildbot@arb_status
Patch Set: Add error-toast-sk to app-sk Created 5 years, 2 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 | « autoroll/package.json ('k') | autoroll/sys/autorolld.service » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!-- 1 <!--
2 The common.js file must be included before this file. 2 The common.js file must be included before this file.
3 3
4 This in an HTML Import-able file that contains the definition 4 This in an HTML Import-able file that contains the definition
5 of the following elements: 5 of the following elements:
6 6
7 <arb-status-sk> 7 <arb-status-sk>
8 8
9 To use this file import it: 9 To use this file import it:
10 10
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 <div class="td">Recent:</div> 107 <div class="td">Recent:</div>
108 <div class="td"> 108 <div class="td">
109 <div class="table"> 109 <div class="table">
110 <div class="tr"> 110 <div class="tr">
111 <div class="th">Roll</div> 111 <div class="th">Roll</div>
112 <div class="th">Last Modified</div> 112 <div class="th">Last Modified</div>
113 <div class="th">Result</div> 113 <div class="th">Result</div>
114 </div> 114 </div>
115 <template is="dom-repeat" items="{{recent}}"> 115 <template is="dom-repeat" items="{{recent}}">
116 <div class="tr"> 116 <div class="tr">
117 <div class="td"><a href="">{{item.subject}}</a></div> 117 <div class="td"><a href="{{_issueURL(item)}}" target="_blank"> {{item.subject}}</a></div>
118 <div class="td"><human-date-sk date="{{item.modified}}" diff>< /human-date-sk> ago</div> 118 <div class="td"><human-date-sk date="{{item.modified}}" diff>< /human-date-sk> ago</div>
119 <div class="td"><span class$="{{_rollClass(item)}}">{{_rollRes ult(item)}}</span></div> 119 <div class="td"><span class$="{{_rollClass(item)}}">{{_rollRes ult(item)}}</span></div>
120 </div> 120 </div>
121 </template> 121 </template>
122 </div> 122 </div>
123 </div> 123 </div>
124 </div> 124 </div>
125 <div class="tr"> 125 <div class="tr">
126 <div class="td">Full History:</div> 126 <div class="td">Full History:</div>
127 <div class="td"> 127 <div class="td">
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 208
209 _buttonPressed: function(e) { 209 _buttonPressed: function(e) {
210 if (!this._editRights) { 210 if (!this._editRights) {
211 sk.errorMessage("You must be logged in with an @google.com account to set the ARB mode."); 211 sk.errorMessage("You must be logged in with an @google.com account to set the ARB mode.");
212 return 212 return
213 } 213 }
214 var mode = e.srcElement.innerHTML; 214 var mode = e.srcElement.innerHTML;
215 if (mode == this.mode) { 215 if (mode == this.mode) {
216 return; 216 return;
217 } 217 }
218 var modeIdx = this.validModes.indexOf(mode); 218 var url = "/json/mode";
219 sk.post("/setMode", JSON.stringify({"mode": modeIdx})).then(JSON.parse). then(function (json) { 219 var body = JSON.stringify({"mode": mode});
220 sk.post(url, body).then(JSON.parse).then(function (json) {
220 this._update(json); 221 this._update(json);
221 }.bind(this), function(err) { 222 }.bind(this), function(err) {
222 sk.errorMessage("Action failed: " + err); 223 sk.errorMessage("Action failed: " + err);
223 }); 224 });
224 }, 225 },
225 226
226 _issueURL: function(issue) { 227 _issueURL: function(issue) {
227 if (issue) { 228 if (issue) {
228 return "https://codereview.chromium.org/" + issue.issue; 229 return "https://codereview.chromium.org/" + issue.issue;
229 } 230 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 } 283 }
283 this._setModeButtons(modeButtons); 284 this._setModeButtons(modeButtons);
284 285
285 this._lastLoaded = new Date().toLocaleTimeString(); 286 this._lastLoaded = new Date().toLocaleTimeString();
286 this._resetTimeout(); 287 this._resetTimeout();
287 console.log("Reloaded status."); 288 console.log("Reloaded status.");
288 }, 289 },
289 }); 290 });
290 </script> 291 </script>
291 </dom-module> 292 </dom-module>
OLDNEW
« no previous file with comments | « autoroll/package.json ('k') | autoroll/sys/autorolld.service » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698